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

Have DigestSigner/DigestVerifier take Digest instance #17

Merged
merged 1 commit into from
Jun 6, 2019

Commits on Jun 6, 2019

  1. Have DigestSigner/DigestVerifier take Digest instance

    This is needed forcompatibility with ed25519-dalek's Ed25519ph:
    
    https://docs.rs/ed25519-dalek/1.0.0-pre.1/ed25519_dalek/struct.Keypair.html#method.sign_prehashed
    
    Until const generics land, this API feels a lot cleaner to me. It gets
    all the `GenericArray` crap out of the way.
    
    It's also misuse resistant in that it ensures the prehashing is done by
    the relevant hash function, as opposed to the user being able to pass in
    arbitrary values. There's a potential attack if a verifier accidentally
    accepts a raw value which isn't the output of a hash function which
    could allow an attacker to forge signatures:
    
    https://twitter.com/pwuille/status/1063582706288586752
    tarcieri committed Jun 6, 2019
    Configuration menu
    Copy the full SHA
    7ce2694 View commit details
    Browse the repository at this point in the history