miden_lib/auth.rs
1use alloc::vec::Vec;
2
3use miden_objects::crypto::dsa::rpo_falcon512;
4
5/// Defines authentication schemes available to standard and faucet accounts.
6pub enum AuthScheme {
7 /// A single-key authentication scheme which relies RPO Falcon512 signatures. RPO Falcon512 is
8 /// a variant of the [Falcon](https://falcon-sign.info/) signature scheme. This variant differs from
9 /// the standard in that instead of using SHAKE256 hash function in the hash-to-point algorithm
10 /// we use RPO256. This makes the signature more efficient to verify in Miden VM.
11 RpoFalcon512 { pub_key: rpo_falcon512::PublicKey },
12 /// A multi-signature authentication scheme using RPO Falcon512 signatures.
13 /// Requires a threshold number of signatures from the provided public keys.
14 RpoFalcon512Multisig {
15 threshold: u32,
16 pub_keys: Vec<rpo_falcon512::PublicKey>,
17 },
18 /// A minimal authentication scheme that provides no cryptographic authentication.
19 /// It only increments the nonce if the account state has actually changed during
20 /// transaction execution, avoiding unnecessary nonce increments for transactions
21 /// that don't modify the account state.
22 NoAuth,
23 /// A non-standard authentication scheme.
24 Unknown,
25}