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

Support for X9.62 formatted public keys #118

Merged
merged 4 commits into from Oct 1, 2019

Conversation

tomato42
Copy link
Member

@tomato42 tomato42 commented Sep 28, 2019

This is re-working of the PR #54 (which in turn is a reworking of #34).

This implements support for the compressed, uncompressed and hybrid format specified in X9.62 and the SEC1 standards

http://www.secg.org/sec1-v2.pdf

fixes #1, #53
closes #54, #34

I'm not adding documentation as I plan to do that either in #117 or after #117 is merged

@tomato42 tomato42 added the feature functionality to be implemented label Sep 28, 2019
@tomato42 tomato42 self-assigned this Sep 28, 2019
@coveralls
Copy link

coveralls commented Sep 28, 2019

Coverage Status

Coverage increased (+0.5%) to 88.645% when pulling cb15e5f on tomato42:point-compression into bcf6afe on warner:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.2%) to 88.344% when pulling bb9c028 on tomato42:point-compression into bcf6afe on warner:master.

@tomato42 tomato42 force-pushed the point-compression branch 3 times, most recently from 1111ff9 to d1670c7 Compare September 29, 2019 00:10
@tomato42
Copy link
Member Author

@trancee, @mdxs, @mg6maciej, @techguy613, @SimoneBronzini, @florensie, @nomeata:
this should implement the compressed format for public keys, please review or check if it matches your requirements

(I've tagged you as you have expressed interest in this feature in one of the above mentioned PRs or issues)

Copy link

@t8m t8m left a comment

Choose a reason for hiding this comment

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

LGTM (with or without the exception name change)

src/ecdsa/keys.py Outdated Show resolved Hide resolved
tomato42 and others added 4 commits October 1, 2019 15:40
Adds support for encoding and decoding verifying keys in format
specified in SEC 1 or in X9.62. Specifically the uncompressed point
encoding and the compressed point encoding
make the decoding of malformed point raise the same exception irrespective
of the formatting of the key/public point
reuse the new to_string and from_string to support saving and reading the
public key in PEM and DER files with both compressed and uncompressed
point encoding
the X9.62 standard defines also a hybrid public key representation,
add support for it
@tomato42 tomato42 merged commit ba0a5c6 into tlsfuzzer:master Oct 1, 2019
@tomato42 tomato42 deleted the point-compression branch October 1, 2019 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature functionality to be implemented
Projects
None yet
Development

Successfully merging this pull request may close these issues.

point compression: reduce pubkey size in half
3 participants