Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9203111
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:24:02+00:00 2026-06-17T23:24:02+00:00

I am tasked with implementing a dongle-based copy protection scheme for an application. I

  • 0

I am tasked with implementing a dongle-based copy protection scheme for an application. I realize that no matter what I do, someone will crack it, but I want to at least make it a little more difficult than an if-statement checking whether a dongle is present.

My approach is to encrypt critical data that the application needs for proper execution. During runtime, the decryption key is retrieved from the dongle (our chosen model has some suitable API functions for that), the data is decrypted and the application is happy.

Of course, a determined attacker can intercept that decryption key and also get ahold of the decrypted data. That’s ok. But what should be hard is to substitute their own data. So I’m looking for an encryption scheme where knowing the decryption key doesn’t enable someone to encrypt their own data.

That’s obviously asymmetric encryption. But for every such algorithm I found so far, the encryption (or public) key can be generated from the decryption (or private) key, which is exactly what I’m trying to avoid.

Note: simply signing the data won’t help much, since (unless I’m totally misunderstanding such signatures) verifying the signature will just be another if-statement, which is easily circumvented.

So… any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T23:24:03+00:00Added an answer on June 17, 2026 at 11:24 pm

    To answer my own question (somewhat), it is possible to do this with RSA, but most APIs (including the one of OpenSSL’s crypto library) need to be “tricked” into doing it. The reason you can generate the public key, given the private key, is that

    1. It is common practive for implementations of RSA to save p and q (those big prime numbers) in the private key data structure.

    2. Since the public key (which consists of the modulus N and some exponent e) is public anyway, there’s (usually) no point in choosing an obscure e. Thus, there are a handful of standard values that are used commonly, like 3 or 65537. So even if p and q are unknown, you might be able to “guess” the public exponent.

    However, RSA is symmetrical in the sense that anything you encrypt with the public key can be decrypted with the private key and vice versa. So what I’ve done (I’m a monster) is to let the crypto library generate an RSA key. You can choose your own public exponent there, which will later be used to decrypt (contrary to the normal way). Then, I switch around the public and private exponent in the key data structure.

    Some tips for anyone trying to do something similar with the crypto library:

    1. In the RSA data structure, clear out everything but n and e / d, depending on whether you want to encrypt or decrypt with that particular key.

    2. Turn off blinding with RSA_blind_off. It requires the encryption exponent even when decrypting, which is not what we want. Note that this might open you up to some attacks.

    If someone needs more help, leave a comment and I’ll edit this post with more information.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Say I've been tasked to architect a product that will have a browser-based front
I'm tasked with implementing a search function that will search through several large (couple
I was recently tasked on implementing a buffer which will be used as a
I am tasked with implementing an xml editor based on Win32 as a frontend
I've been tasked with creating a WCF service that will query a db and
I'm tasked with implementing a decryption functionality against a device using the DUKPT protocol/scheme/algorithm.
I have been tasked with creating a SQL query (limited knowledge) that will show
I've been tasked with implementing a blacklist-based profanity filter for a Rails app. I
We have an existing ASP.NET application (WebForms) that uses home-grown authentication. We've been tasked
I've been tasked with implementing Google Analytics inside our (ASP.NET) application. Here is the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.