-
Notifications
You must be signed in to change notification settings - Fork 315
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
Provide documentation for VerifyingKey and SigningKey #117
Conversation
e692521
to
76cc440
Compare
@ansasaki please review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left some comments, not all of them are requests for changes, but requests for clarification.
Overall the proposed documentation is well written and concise.
thanks for review; will fix the issues I haven't commented on |
@ansasaki updated, please re-check |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found some typos.
src/ecdsa/util.py
Outdated
""" | ||
Encode the signature to raw format (:term:`raw encoding`) | ||
|
||
:param int r: first parametr of the signature |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/parametr/parameter/
src/ecdsa/util.py
Outdated
|
||
:param int r: first parametr of the signature | ||
:param int s: second parameter of the signature | ||
:param int order: the order of curve over which the signature was computed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/the order of curve/the order of the curve/
src/ecdsa/util.py
Outdated
It's expected that this function will be used as a `sigencode=` parameter | ||
in SigningKey.sign() method. | ||
|
||
:param int r: first parametr of the signature |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/parametr/parameter
src/ecdsa/util.py
Outdated
|
||
:param int r: first parametr of the signature | ||
:param int s: second parameter of the signature | ||
:param int order: the order of curve over which the signature was computed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/the order of curve/the order of the curve/
@ansasaki good catch, can you verify? |
(I've also "sphinxified" the cross-links and made them a bit more consistent) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found a small typo
Abstract Syntax Notation 1 is a standard description language for | ||
specifying serialisation and deserialisation of data structures in a | ||
portable and cross-platform way. | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a nit, the glossary could be alphabetically sorted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it will be once it is processed by sphinx :)
src/ecdsa/keys.py
Outdated
# raw encoding of point is invalid in DER files | ||
if not point_str.startswith(b("\x00")) or \ | ||
len(point_str[1:]) == curve.verifying_key_length: | ||
# the bitsting encoding is padded with a zero byte |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/bitsting/bitstring/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
heh, that was actually fixed by the new code that fixed behaviour of bitstring so the rebase fixed it
also do minor cleanup with initialisers and imports
use canonical name for first parameter in classmethods minor fixes with formatting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Thank you! |
Document the VerifyingKey, SigningKey and few directly related classes.
fixes #56
work towards #95