Bug 1533666 - Add standard algorithm names for all ECC signature types
Summary: Add standard algorithm names for all ECC signature types
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: jss
Version: 27
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Christina Fu
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1533667
TreeView+ depends on / blocked
 
Reported: 2018-01-11 22:32 UTC by Matthew Harmsen
Modified: 2018-11-30 19:21 UTC (History)
8 users (show)

Fixed In Version: jss-4.4.2-9.fc27
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1533667 (view as bug list)
Environment:
Last Closed: 2018-11-30 19:21:15 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Mozilla Foundation 589158 0 None None None 2018-01-11 22:35:05 UTC

Description Matthew Harmsen 2018-01-11 22:32:30 UTC
In https://bugzilla.mozilla.org/show_bug.cgi?id=589158, David Stutzman Created attachment 467756 [details] - "correct patch showing + for lines instead of -"

JSS uses SHAxwithEC as their naming for EC Signature algorithms but Sun's "Standard Algorithm Names" are SHAxwithECDSA.  I was using Sun's CertPath API to attempt to chain some EC certificates that had SHA384withECDSA signatures and the building of the CertPath threw an exception because it couldn't find a provider that supported SHA384withECDSA.  The attached patch just adds the 4 aliases for the standard Sun algorithm names to the JSS provider.

Adding these aliases should enable JSS's ECC functionality to be used in more places throughout the entire Java library as it would now support the algorithm names that the library uses.

Comment 1 Matthew Harmsen 2018-01-11 22:33:23 UTC
Wan-Teh Chang approved this patch:

r=wtc.

It would be nice if we could make SHA1withECDSA
the algorithm name and make SHA1withEC an alias.
Would that break any code?

Comment 2 Matthew Harmsen 2018-01-11 22:34:02 UTC
David Stutzman replied:

As far as I could tell, the way you guys are creating the provider now, it's reporting the main names of SHAxwithEC.  After I added the new aliases I queried the Provider for it's Provider.Services and called getAlgorithm() and it doesn't explicity list the new ones (or any aliases).  It seems to only show the initial algorithm name.  I don't know if there's a way to get all the aliases for a particular Provider.Service. http://download.oracle.com/javase/6/docs/api/java/security/Provider.Service.html says: "Optionally, it also includes a list of alternate algorithm names for this service (aliases) and attributes, which are a map of (name, value) String pairs," but there doesn't appear to be any getter for that info.

http://download.oracle.com/javase/6/docs/technotes/guides/security/crypto/HowToImplAProvider.html#Aliases  Not a whole lot of helpful info here, but that's the official word on aliases.

On the topic of breaking existing code by changing defaults:

Looking at it with this patch applied if you call  Signature.getInstance("SHA256withEC"), it will work.  If you call Signature.getInstance("SHA256withECDSA"), it will work.

If you change the other name to be the default, again either call above will work.  

The only thing I can see breaking is if someone queries the Provider programatically using Provider.getServices() and then accessing the Provider.Service objects to get names and is expecting to match on the old string (SHAxwithEC) at that point because that won't list aliases.

Most likely it wouldn't be a huge deal because I suspect that not many people are using JSS/NSS for ECC at this time, but that's your call.

Comment 3 Christina Fu 2018-01-12 02:16:26 UTC
pushed:

https://bugzilla.mozilla.org/show_bug.cgi?id=589158#c6

Comment 4 Ben Cotton 2018-11-27 17:23:45 UTC
This message is a reminder that Fedora 27 is nearing its end of life.
On 2018-Nov-30  Fedora will stop maintaining and issuing updates for
Fedora 27. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora  'version' of '27'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 27 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 5 Ben Cotton 2018-11-30 19:21:15 UTC
Fedora 27 changed to end-of-life (EOL) status on 2018-11-30. Fedora 27 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.