flexible-transcript

A simple transcript trait definition, along with viable options

7 releases

0.3.2 Aug 8, 2023
0.3.1 Mar 21, 2023
0.2.0 Nov 5, 2022
0.1.3 Jul 12, 2022
0.1.2 Jun 28, 2022

#384 in Cryptography

Download history 46/week @ 2024-06-16 35/week @ 2024-06-23 9/week @ 2024-06-30 8/week @ 2024-07-07 36/week @ 2024-07-14 37/week @ 2024-07-21 28/week @ 2024-07-28 28/week @ 2024-08-04 29/week @ 2024-08-11 16/week @ 2024-08-18 21/week @ 2024-08-25 20/week @ 2024-09-01 26/week @ 2024-09-08 23/week @ 2024-09-15 46/week @ 2024-09-22 35/week @ 2024-09-29

130 downloads per month
Used in 16 crates (15 directly)

MIT license

16KB
234 lines

Flexible Transcript

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).
  • RecommendedTranscript, a transcript recommended for usage in applications. Currently, this is DigestTranscript<Blake2b512> (available via the recommended 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.

This library was audited by Cypher Stack in March 2023, culminating in commit 669d2dbffc1dafb82a09d9419ea182667115df06. Any subsequent changes have not undergone auditing.

This library is usable under no_std.

Dependencies

~355–600KB
~13K SLoC