On RSA cryptographic algorithm, the private key is used to decrypt and public key is used to encrypt data. however I'd like an algorithm to:
- Generate private key based on specific data so we can recover it later
- Generate public key based on private key
- Encrypt data using private key
- Decrypt data using public key
What algorithms should I use and is there a java implementation for this?
CodePudding user response:
Step 1 is probably a bad idea unless your seed data has at least as much entropy as the private key. But then, it is equally difficult to store/remember than the private key itself.
Are you sure you are looking for encryption? Your steps 3 and 4 look more like you actually want a signature.