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

PSS verification - padding bug? #41

Closed
sbheinric opened this issue Nov 20, 2013 · 4 comments
Closed

PSS verification - padding bug? #41

sbheinric opened this issue Nov 20, 2013 · 4 comments

Comments

@sbheinric
Copy link

I am using jsrsasign-latest-all-min.js

  1. I compute PSS signature:

var msg = "hello";
var sig = rsa.signStringPSS(msg, "sha1");

  1. I try to verify:

console.log("verified: " + rsa.verifyStringPSS( msg, sig, "sha1" ) );

Error: on line 389 of rsasign-1.2.js, "encoded message does not end in 0xbc";

Let me know if you have any difficulty reproducing

  1. I think there may be another error, because the signature given by this method cannot be validated using Crypto++ signature scheme RSASS<PSS, SHA1>, which is the same scheme
@sbheinric
Copy link
Author

Found the problem. Rsa key was initialized with values that prevent decryption from inverting the encryption result.

@kjur
Copy link
Owner

kjur commented Nov 20, 2013

@sbheinric I'm happy to hear your issue was solved. Thanks.

@maiermic
Copy link

@sbheinric I try to solve a similar problem (same error). What do you mean by values that prevent decryption from inverting the encryption result?

@maiermic
Copy link

Found the problem: A bug in an unicode-to-hex converter (not part of jsrsasign).

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