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/keypair.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 / keypair.rs` 29 lines ยท 881 bytes Raw Blame History 1 //! Signing keypairs. 2 3 /// Signing keypair with an associated verifying key. 4 /// 5 /// This represents a type which holds both a signing key and a verifying key. 6 pub trait Keypair { 7 /// Verifying key type for this keypair. 8 type VerifyingKey: Clone; 9 10 /// Get the verifying key which can verify signatures produced by the 11 /// signing key portion of this keypair. 12 fn verifying_key(&self) -> Self::VerifyingKey; 13 } 14 15 /// Signing keypair with an associated verifying key. 16 /// 17 /// This represents a type which holds both a signing key and a verifying key. 18 pub trait KeypairRef: AsRef { 19 /// Verifying key type for this keypair. 20 type VerifyingKey: Clone; 21 } 22 23 impl Keypair for K { 24 type VerifyingKey = ::VerifyingKey; 25 26 fn verifying_key(&self) -> Self::VerifyingKey { 27 self.as_ref().clone() 28 } 29 }