Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aienux/blob/main/vendor/signature/src/prehash_signature.rs # aienux Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `aienux / vendor / signature / src / prehash_signature.rs` 31 lines ยท 1063 bytes Raw Blame History 1 //! `PrehashSignature` trait. 2 3 /// For intra-doc link resolution. 4 #[allow(unused_imports)] 5 use crate::{ 6 signer::{DigestSigner, Signer}, 7 verifier::{DigestVerifier, Verifier}, 8 }; 9 10 /// Marker trait for `Signature` types computable as `๐’(๐‡(๐’Ž))` 11 /// i.e. ones which prehash a message to be signed as `๐‡(๐’Ž)` 12 /// 13 /// Where: 14 /// 15 /// - `๐’`: signature algorithm 16 /// - `๐‡`: hash (a.k.a. digest) function 17 /// - `๐’Ž`: message 18 /// 19 /// This approach is relatively common in signature schemes based on the 20 /// [Fiat-Shamir heuristic]. 21 /// 22 /// For signature types that implement this trait, when the `derive` crate 23 /// feature is enabled a custom derive for [`Signer`] is available for any 24 /// types that impl [`DigestSigner`], and likewise for deriving [`Verifier`] for 25 /// types which impl [`DigestVerifier`]. 26 /// 27 /// [Fiat-Shamir heuristic]: https://en.wikipedia.org/wiki/Fiat%E2%80%93Shamir_heuristic 28 pub trait PrehashSignature { 29 /// Preferred `Digest` algorithm to use when computing this signature type. 30 type Digest: digest::Digest; 31 }