rust-secp256k1-unsafe-fast/src
Tobin Harding 6842383161 Use fixed width serde impls for keys
Currently we serialize keys using the `BytesVisitor`, this causes the
serialized data to contain additional metadata encoding the length (an
extra 8 bytes) when serialized with the `bincode` crate. This extra data
is unnecessary since we know in advance the length of these types.

It would be useful for users of the lib to be able to get a fixed width
binary serialization, this can be done but it depends on the crate used
to do the serialization. We elect to optimise for `bincode` and add docs
noting that other binary serialization crates may differ (rustdocs added
in separate patches).

Implement a tuple based visitor that encodes the keys as fixed width
data.

Do fixed width serde implementations for:

- `SecretKey`
- `PublicKey`
- `KeyPair`
- `XOnlyPublicKey`
2022-06-09 16:09:31 +10:00
..
ecdsa Merge rust-bitcoin/rust-secp256k1#331: Update the code to edition 2018, and update dependencies 2022-06-08 20:53:41 +00:00
constants.rs Deprecate SCHNORRSIG_SIGNATURE_SIZE 2022-03-04 14:28:24 +00:00
context.rs Move more things from the std feature to the alloc feature 2022-06-07 23:59:42 +03:00
ecdh.rs Update secp256k1 to edition 2018 and fix imports 2022-06-07 23:59:25 +03:00
key.rs Use fixed width serde impls for keys 2022-06-09 16:09:31 +10:00
lib.rs Update rand to 0.8 and replace CounterRng with mock::StepRng 2022-06-07 23:59:40 +03:00
macros.rs Update secp256k1 to edition 2018 and fix imports 2022-06-07 23:59:25 +03:00
schnorr.rs Use fixed width serde impls for keys 2022-06-09 16:09:31 +10:00
secret.rs Update secp256k1 to edition 2018 and fix imports 2022-06-07 23:59:25 +03:00
serde_util.rs Use fixed width serde impls for keys 2022-06-09 16:09:31 +10:00