Skip to content

[cryptography] Signature Scheme Validity Consistency #1070

@technovision99

Description

@technovision99

Unlike the other signature variants, the ed25519-consensus crate, which is the library used to implement ed25519 signatures, only verifies the length of the byte array during deserialization time: https://github.com/penumbra-zone/ed25519-consensus/blob/78f83b21767077f602f30148e513a52e844abbb6/src/signature.rs#L22-L31
This is not an exploitable issue because the signature's validity will be checked during signature verification time: https://github.com/penumbra-zone/ed25519-consensus/blob/78f83b21767077f602f30148e513a52e844abbb6/src/verification_key.rs#L239-L244
However, checking the signature during deserialization may be more robust against invalid curve points if developers choose to perform any operations on signatures. In addition, it would be more consistent with the other signature implementations, as these all check validity during deserialization time.

Metadata

Metadata

Assignees

No one assigned

    Type

    No fields configured for Task.

    Projects

    Status

    Backlog

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions