#[non_exhaustive]pub enum SignatureAlgorithm {
EcdsaP256,
EcdsaP384,
RsaPss2048,
Ed25519,
}Expand description
Signature algorithm for delegation links.
Default recommendation: SignatureAlgorithm::EcdsaP256 — compact
signature (~64 bytes), fast verify on edge hardware.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
EcdsaP256
ECDSA with P-256 + SHA-256, fixed-length encoding (64-byte sig).
EcdsaP384
ECDSA with P-384 + SHA-384, fixed-length encoding (96-byte sig).
RsaPss2048
RSA-PSS with a 2048-bit key + SHA-256 (256-byte sig).
Ed25519
Ed25519 (64-byte sig).
Implementations§
Source§impl SignatureAlgorithm
impl SignatureAlgorithm
Sourcepub const fn from_wire_id(id: u8) -> Option<Self>
pub const fn from_wire_id(id: u8) -> Option<Self>
Decode from the wire ID; None for an unknown algorithm.
Sourcepub const fn expected_signature_len(self) -> Option<usize>
pub const fn expected_signature_len(self) -> Option<usize>
Expected signature length in bytes (fixed) or None for
variable (RSA-PSS depending on key size — we fix it at 2048
and thus 256 bytes).
Trait Implementations§
Source§impl Clone for SignatureAlgorithm
impl Clone for SignatureAlgorithm
Source§fn clone(&self) -> SignatureAlgorithm
fn clone(&self) -> SignatureAlgorithm
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SignatureAlgorithm
Source§impl Debug for SignatureAlgorithm
impl Debug for SignatureAlgorithm
impl Eq for SignatureAlgorithm
Source§impl Hash for SignatureAlgorithm
impl Hash for SignatureAlgorithm
Source§impl PartialEq for SignatureAlgorithm
impl PartialEq for SignatureAlgorithm
impl StructuralPartialEq for SignatureAlgorithm
Auto Trait Implementations§
impl Freeze for SignatureAlgorithm
impl RefUnwindSafe for SignatureAlgorithm
impl Send for SignatureAlgorithm
impl Sync for SignatureAlgorithm
impl Unpin for SignatureAlgorithm
impl UnsafeUnpin for SignatureAlgorithm
impl UnwindSafe for SignatureAlgorithm
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more