Skip to content

Commit 1722393

Browse files
committed
ed25519: support signing structs w/ bcs canonical serialization
+ Add `Signable` trait, which mandates signed structs use a domain separation value. + Add `Signed` type, which wraps a recently signed/signature verified struct and is only producable inside the `ed25519` module. I'm hoping this can help with API design, so functions can require "hey you must have signature verified this struct or else I won't accept it". + Use `bcs` for binary canonical serialization since I already trust it. Could use something else in the future, but this works for now.
1 parent 72247c8 commit 1722393

File tree

6 files changed

+289
-46
lines changed

6 files changed

+289
-46
lines changed

Cargo.lock

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

common/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ anyhow = "1"
4343
argh = "0.1"
4444
# async fn's in trait methods
4545
async-trait = "0.1"
46+
# Binary canonical serialization format
47+
bcs = "0.1"
4648
# Working with bytes
4749
bytes = "1"
4850
# Conveniently write #[cfg(..)] if-else statements without repeating clauses

0 commit comments

Comments
 (0)