Patched source for Aeneas/Charon formal verification transpilation
Find a file
Tony Arcieri 5f0d41fcec
ed25519-dalek: remove ExpandedSecretKey::to_bytes (#545)
* ed25519-dalek: remove `ExpandedSecretKey::to_bytes`

The reason `ExpandedSecretKey` needs a private `scalar_bytes` field is
to retain the canonical scalar bytes as output by SHA-512 during key
expansion so they can be serialized by the `to_bytes` method.

However, `ExpandedSecretKey`s should not be serialized to the wire.

Removing this method allows the private field to be removed, which
allows `ExpandedSecretKey` to be constructed entirely from public
fields. This provides an alternative to #544 for use cases like
Ed25519-BIP32 where the private scalar is derived rather than clamped
from bytes.

One other change is needed: `to_scalar_bytes` was changed to `to_scalar`
as the canonical scalar bytes are no longer retained, however this has
no impact on its main use case, X25519 Diffie-Hellman exchanges, where
the `Scalar` should NOT be written to the wire anyway.

* Added scalar byte comparison back to ed25519-dalek x25519 test

---------

Co-authored-by: Michael Rosenberg <michael@mrosenberg.pub>
2023-07-10 22:09:40 -04:00
.github/workflows Re-work CI around workspace 2023-06-28 09:38:56 +00:00
curve25519-dalek Moved code of conduct 2023-06-29 23:35:29 -04:00
curve25519-dalek-derive Bump quote and syn 2023-06-30 04:07:19 +00:00
docs/assets Move CI & assets into workspace 2023-06-28 08:59:51 +00:00
ed25519-dalek ed25519-dalek: remove ExpandedSecretKey::to_bytes (#545) 2023-07-10 22:09:40 -04:00
x25519-dalek Re-organize Cargo manifests to workspace 2023-06-28 09:38:06 +00:00
.gitignore Move CI & assets into workspace 2023-06-28 08:59:51 +00:00
Cargo.toml Re-organize Cargo manifests to workspace 2023-06-28 09:38:06 +00:00
CONTRIBUTING.md Add new workspace README and CONTRIBUTING 2023-06-28 09:40:52 +00:00
README.md Moved code of conduct 2023-06-29 23:35:29 -04:00

dalek-cryptography logo: a dalek with edwards curves as sparkles coming out of its radar-schnozzley blaster thingies

Dalek elliptic curve cryptography

This repo contains pure-Rust crates for elliptic curve cryptography:

Crate Description Crates.io Docs CI
curve25519-dalek A library for arithmetic over the Curve25519 and Ristretto elliptic curves and their associated scalars. Rust
ed25519-dalek An implementation of the EdDSA digital signature scheme over Curve25519. Rust
x25519-dalek An implementation of elliptic curve Diffie-Hellman key exchange over Curve25519.

There is also the curve25519-dalek-derive crate, which is just a helper crate with some macros that make curve25519-dalek easier to write.

Contributing

Please see CONTRIBUTING.md.

Code of Conduct

We follow the Rust Code of Conduct, with the following additional clauses:

  • We respect the rights to privacy and anonymity for contributors and people in the community. If someone wishes to contribute under a pseudonym different to their primary identity, that wish is to be respected by all contributors.