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

Bug 27591 - Must the reflected "publicExponent" for generated RSA keys exactly match input? #61

Closed
mwatson2 opened this issue May 24, 2016 · 3 comments
Labels

Comments

@mwatson2
Copy link
Collaborator

Bug 27591:

The Generate key operation for RSASSA-PKCS1-v1_5 says:

  1. Set the publicExponent attribute of algorithm to equal the publicExponent attribute of normalizedAlgorithm.

I am unsure if this implies that publicExponent is a normalized BigInteger or not.

The section on BigIntegers says that "Values read from the API SHALL have minimal typed array length"

Does this assignment count as such a "read"?

Example:

If generateKey() is called with publicExponent = 00000000000000010001, an implementation should be able to reflect key.algorithm.publicExponent as 010001 and not preserve the zeros

@mwatson2
Copy link
Collaborator Author

I don't think the distinction would be visible on the API, since when you read the value (publicExponent attribute of algorithm) it must be normalized. Whether this happens when you read it or when it is assigned is not visible on the API.

@mwatson2
Copy link
Collaborator Author

Propose wontfix

@jimsch
Copy link
Collaborator

jimsch commented May 26, 2016

(Keys imported from format="jwk" can't have leading zeros in the public exponent, however those from format="pkcs8" or "spki" could I believe)

This is not a true statement if we only permit DER encoded ASN.1

I agree that it does not need to be stated where this is done.

@mwatson2 mwatson2 closed this as completed Jun 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants