Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The encrypted string is always not the same #43

Closed
nlp-greyfoss opened this issue Jan 29, 2015 · 4 comments
Closed

The encrypted string is always not the same #43

nlp-greyfoss opened this issue Jan 29, 2015 · 4 comments

Comments

@nlp-greyfoss
Copy link

Hello,Why the encrypted string is always not the same even I didn't change the public key.
plz help me.

@nlp-greyfoss
Copy link
Author

E, What I mean is how can I get the same encrypted string,thank you.

@nlp-greyfoss
Copy link
Author

I got it.Because of Random Padding.
The RSA encryption encrypts message padded with '0's and and a string of random bit. In the process, the random string is "hidden" in the ciphertext by cryptographic hashing and XORing. On decryption, the RSA decryption recovers the random string from the ciphertext and use it to recover message. This is why you get different result with openssl rsautl for the same text message.

@zoloft
Copy link
Collaborator

zoloft commented Jan 29, 2015

So you did everything on your own, good! XD

@zoloft zoloft closed this as completed Jan 29, 2015
@qfwfqf
Copy link

qfwfqf commented Sep 14, 2018

Hello,Why the encrypted string is always not the same even I didn't change the public key.

how did u solve this? that i have got the same problem! pls help me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants