From 7b70baaa969c65426bf28b48bc121c044c11d30f Mon Sep 17 00:00:00 2001 From: Luke Parker Date: Mon, 27 Jun 2022 09:02:21 -0400 Subject: [PATCH] Rename transcript-trait to flexible-transcript It offers the trait for flexibility, yet it also offers an incredibly competent (and logical) transcript format, along with a Merlin wrapper. --- coins/monero/Cargo.toml | 2 +- crypto/frost/Cargo.toml | 2 +- crypto/transcript/Cargo.toml | 4 ++-- crypto/transcript/README.md | 25 +++++++++++++++++++++++-- processor/Cargo.toml | 2 +- 5 files changed, 28 insertions(+), 7 deletions(-) diff --git a/coins/monero/Cargo.toml b/coins/monero/Cargo.toml index 883dcdbb..d92cd3a0 100644 --- a/coins/monero/Cargo.toml +++ b/coins/monero/Cargo.toml @@ -23,7 +23,7 @@ curve25519-dalek = { version = "3", features = ["std"] } group = { version = "0.12", optional = true } dalek-ff-group = { path = "../../crypto/dalek-ff-group", optional = true } -transcript = { package = "transcript-trait", path = "../../crypto/transcript", features = ["recommended"], optional = true } +transcript = { package = "flexible-transcript", path = "../../crypto/transcript", features = ["recommended"], optional = true } frost = { package = "modular-frost", path = "../../crypto/frost", features = ["ed25519"], optional = true } monero = "0.16" diff --git a/crypto/frost/Cargo.toml b/crypto/frost/Cargo.toml index 536f5c53..73dbc52d 100644 --- a/crypto/frost/Cargo.toml +++ b/crypto/frost/Cargo.toml @@ -23,7 +23,7 @@ p256 = { version = "0.11", features = ["arithmetic", "hash2curve"], optional = t k256 = { version = "0.11", features = ["arithmetic", "hash2curve"], optional = true } dalek-ff-group = { path = "../dalek-ff-group", version = "0.1", optional = true } -transcript = { package = "transcript-trait", path = "../transcript", version = "0.1" } +transcript = { package = "flexible-transcript", path = "../transcript", version = "0.1" } multiexp = { path = "../multiexp", version = "0.1", features = ["batch"] } diff --git a/crypto/transcript/Cargo.toml b/crypto/transcript/Cargo.toml index 64445baa..a5d366c2 100644 --- a/crypto/transcript/Cargo.toml +++ b/crypto/transcript/Cargo.toml @@ -1,7 +1,7 @@ [package] -name = "transcript-trait" +name = "flexible-transcript" version = "0.1.1" -description = "A simple transcript trait definition" +description = "A simple transcript trait definition, along with viable options" license = "MIT" repository = "https://github.com/serai-dex/serai" authors = ["Luke Parker "] diff --git a/crypto/transcript/README.md b/crypto/transcript/README.md index 10b007c9..92777a52 100644 --- a/crypto/transcript/README.md +++ b/crypto/transcript/README.md @@ -1,3 +1,24 @@ -# Transcript +# Flexible Transcript -Basic transcript trait with a Merlin wrapper available via the Merlin feature. +Flexible Transcript is a crate offering: +- `Transcript`, a trait offering functions transcripts should implement. +- `DigestTranscript`, a competent transcript format instantiated against a +provided hash function. +- `MerlinTranscript`, a wrapper of `merlin` into the trait (available via the +`merlin` feature). + +The trait was created while working on an IETF draft which defined an incredibly +simple transcript format. Extensions of the protocol would quickly require a +more competent format, yet implementing the one specified was mandatory to meet +the specification. Accordingly, the library implementing the draft defined an +`IetfTranscript`, dropping labels and not allowing successive challenges, yet +thanks to the trait, allowed protocols building on top to provide their own +transcript format as needed. + +`DigestTranscript` takes in any hash function implementing `Digest`, offering a +secure transcript format around it. All items are prefixed by a flag, denoting +their type, and their length. + +`MerlinTranscript` was used to justify the API, and if any issues existed with +`DigestTranscript`, enable a fallback. It was also meant as a way to be +compatible with existing Rust projects using `merlin`. diff --git a/processor/Cargo.toml b/processor/Cargo.toml index c22329a3..131b3106 100644 --- a/processor/Cargo.toml +++ b/processor/Cargo.toml @@ -18,7 +18,7 @@ serde_json = "1.0" curve25519-dalek = { version = "3", features = ["std"] } blake2 = "0.10" -transcript = { package = "transcript-trait", path = "../crypto/transcript", features = ["recommended"] } +transcript = { package = "flexible-transcript", path = "../crypto/transcript", features = ["recommended"] } dalek-ff-group = { path = "../crypto/dalek-ff-group" } frost = { package = "modular-frost", path = "../crypto/frost" }