Repository navigation
dsa: Add initial DSA implementation - #471
Conversation
|
Thank you for contributing this! I'll try to do a more thorough review when I have some time. Just glancing through quickly I don't see any immediate concerns. |
|
@tarcieri No problem, take your time! Out of interest, would it be okay to use one of the |
|
Yes, it's fine to use the The |
|
One thing I thought I might mention before I can do a more thorough review is RFC6979 deterministic signature support. The
|
|
The test for the deterministic signatures is pretty messy and doesn't include all test vectors but should be good enough for a start |
|
A few more notes... You appear to be running into one of the problems with the current There's some discussion of that on this tracking issue: RustCrypto/traits#237 Unfortunately ASN.1 DER-encoded signatures are one of the reasons that the The way both the
Anyway, all that said this is a use case to definitely keep in mind when thinking about a hypothetical |
| #![forbid(missing_docs, unsafe_code)] | ||
| #![deny(rust_2018_idioms)] |
There was a problem hiding this comment.
We generally use warn rather than deny, and enforce code is warning-free in CI
| #![forbid(missing_docs, unsafe_code)] | |
| #![deny(rust_2018_idioms)] | |
| #![forbid(unsafe_code)] | |
| #![warn(missing_docs, rust_2018_idioms)] |
(unsafe_code is the one exception in crates where we don't want any)
| @@ -0,0 +1,200 @@ | |||
| //! | |||
There was a problem hiding this comment.
Nit: we generally call these modules private_key.rs which follows a camel case -> snake case conversion
| @@ -0,0 +1,145 @@ | |||
| //! | |||
There was a problem hiding this comment.
Nit: would suggest naming this file public_key.rs
tarcieri
left a comment
There was a problem hiding this comment.
This is looking pretty close to an MVP. Just a few nits.
This PR adds an initial implementation of DSA (see #8)
The following things work when tested against OpenSSL:
Things that need to be looked at:
especially verification of OpenSSL generated signatures(edit: added with commit 40e7fd2))(edit: Thesignaturecompatibility (the crate itself isn't deeply integrated withsignatureand only offers compatibility wrappers (see thecompat.rsfile) Should those traits be integrated more directly?)signaturecrate has been integrated more tightly with commit 7123e0f)