Closed
Bug 1430054
Opened 8 years ago
Closed 4 years ago
JSS cannot do raw ECDSA signature
Categories
(JSS Graveyard :: Library, enhancement)
JSS Graveyard
Library
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: david.konrad.stutzman, Assigned: glenbeasley)
Details
The current modern way of using JSS is via the JCA provider which recognizes the following EC signature algorithms:
SHA1withEC
SHA256withEC
SHA384withEC
SHA512withEC
The provider does not advertise any equivalent of the JCA "NONEwithECDSA" algorithm. In fact, JSS aliases "EC" and "ECDSA" algorithm strings to SHA1withEC.
The deprecated way is using the org.mozilla.jss.crypto.Signature class.
You can obtain one by calling CryptoToken.getSignatureContext and passing a SignatureAlgorithm of which, for ECC, there are the following constants:
ECSignature
ECSignatureWithSHA1Digest
ECSignatureWithSHA256Digest
ECSignatureWithSHA384Digest
ECSignatureWithSHA512Digest
The comments for ECSignature say that it is a raw EC signature with no hashing:
https://hg.mozilla.org/projects/jss/file/tip/org/mozilla/jss/crypto/SignatureAlgorithm.java#l90
If you use the Signature object to perform a signature using the ECSignature algorithm, JSS will create a "signature" and it will verify the signature if you go through the motions but if you analyze the "signature" with an ASN.1 decoding tool you will find that it is not really an ECDSA signature as it is not the encoding of 2 INTEGERS in a SEQUENCE.
This raises 2 issues:
1) If not a true ECDSA signature, then what is JSS producing?
2) The output of a raw ECDSA signature from JSS is not compatible with other security libraries for things like CMS, TLS, etc.
It would be great if JSS could perform a raw ECDSA signature correctly and expose that functionality via the JCA provider via "NONEwithEC(DSA)" algorithm string so people could use the non-deprecated interface to access that functionality.
I discovered this issue working on Bug #1409867. Since the SignerInfo constructor takes pre-digested data, there are certain situations where a raw ECDSA signature must be performed and the output from these operations are not correct.
Comment 1•4 years ago
|
||
JSS development has moved from the Mozilla community to the Dogtag PKI community. Please re-file this bug at https://github.com/dogtagpki/jss if it is still relevant. Thank you!
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•