Previously the serde serializer used `Serialize::serialize_bytes` which accepts a slice and when serialized with e.g. bincode also includes a length prefix on the signature. As it were, this made it incompatible with the extant deserializer (and as such, this PR also adds much needed serialization tests). This commit changes the serializer to use the same internal implementation as serde's own `array_impls`, i.e. signatures are serialized as a tuple with 64 members. Using this implementation, it means an Ed25519 signature serialized with bincode is identical to `to_bytes()`, i.e. there is no redundant length prefix.
RustCrypto: signatures

Support for digital signatures, which provide authentication of data using public-key cryptography.
All algorithms reside in the separate crates and implemented using traits from
the signature crate.
Crates are designed so they do not require the standard library (i.e. no_std)
and can be easily used for bare-metal or lightweight WebAssembly programming.
Crates
| Name | Algorithm | Crates.io | Documentation | Build |
|---|---|---|---|---|
ecdsa |
ECDSA | |||
ed25519 |
Ed25519 |
Minimum Supported Rust Version
All crates in this repository support Rust 1.40 or higher. In future minimum supported Rust version can be changed, but it will be done with the minor version bump.
Usage
Crates functionality is expressed in terms of traits defined in the signature
crate.
License
All crates licensed under either of
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.