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

Adds support for IEEE P1363 formatted ECDSA signatures #75

Merged
merged 4 commits into from
Jan 6, 2020

Conversation

SalusaSecondus
Copy link
Contributor

@SalusaSecondus SalusaSecondus commented Dec 17, 2019

Description of changes: Adds support for IEEE P1363 formatted ECDSA signatures. These signatures consist of a direct concatenation of the r and s values as opposed to the default ASN.1 encoding. Correctness is checked by comparing them to the equivalent "withPLAIN-ECDSA" algorithms from BouncyCastle and Wycheproof.

The specific language from the IEEE specification follows:

For DL/ECSSA, the output of the signature generation function (see Section 10.2.2) is a pair of integers (c, d). Let r denote the order of the generator (g or G) in the DL or EC settings (see Sections 6.1 and 7.1), and let l = ceil(log256 r) (i.e., l is the length of r in octets). The output (c, d) may be formatted as an octet string as follows: convert the integers c and d to octet strings C and D, respectively, of length l octets each, using the primitive I2OSP, and output the concatenation C || D. To parse the signature, split the octet string into two components C and D, of length l each, and convert them to integers c and d, respectively, using OS2IP. Note that it is essential that both C and D be of length l, even if it means that they have leading zero octets.

NOTE— The output of DL/ECSSA may also be formatted according to the following method, described in more detail in X9.57 [ANS97c] and X9.62 [ANS98e]. Combine c and d into an ASN.1 structure [ISO98a] and encode the structure using some encoding rules, such as Basic Encoding Rules (BER) or Distinguished Encoding Rules (DER) [ISO98e].

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@SalusaSecondus
Copy link
Contributor Author

Overkill failed due to Java Heap Space

@SalusaSecondus SalusaSecondus marked this pull request as ready for review January 6, 2020 19:24
@SalusaSecondus
Copy link
Contributor Author

Overkill failed due to heap space error on testing. This is a known issue with our test harness. I've restarted the test, but that is a non-blocking issue.

scottarc
scottarc previously approved these changes Jan 6, 2020
ttjsu-aws
ttjsu-aws previously approved these changes Jan 6, 2020
Copy link

@WesleyRosenblum WesleyRosenblum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor issues, I didn't review the tests

@SalusaSecondus SalusaSecondus dismissed stale reviews from ttjsu-aws and scottarc via d21816b January 6, 2020 20:57
@SalusaSecondus SalusaSecondus merged commit b0b896b into corretto:develop Jan 6, 2020
@SalusaSecondus SalusaSecondus deleted the IEEE-P1363 branch January 6, 2020 22:04
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

Successfully merging this pull request may close these issues.

4 participants