[−][src]Struct oqs::sig::Sig
Algorithm wrapper
Implementations
impl Sig
[src]
pub fn new(algorithm: Algorithm) -> Result<Self>
[src]
Construct a new algorithm
May fail if the algorithm is not available
pub fn name(&self) -> Cow<'_, str>
[src]
Get the name of this signature algorithm
pub fn version(&self) -> Cow<'_, str>
[src]
Version of this implementation
pub fn claimed_nist_level(&self) -> u8
[src]
Obtain the claimed nist level
pub fn is_euf_cma(&self) -> bool
[src]
Is this algorithm EUF-CMA?
pub fn length_public_key(&self) -> usize
[src]
Length of the public key
pub fn length_secret_key(&self) -> usize
[src]
Length of the secret key
pub fn length_signature(&self) -> usize
[src]
Maximum length of a signature
pub fn secret_key_from_bytes<'a>(&self, buf: &'a [u8]) -> SecretKeyRef<'a>
[src]
Construct a secret key object from bytes
pub fn public_key_from_bytes<'a>(&self, buf: &'a [u8]) -> PublicKeyRef<'a>
[src]
Construct a public key object from bytes
pub fn signature_from_bytes<'a>(&self, buf: &'a [u8]) -> SignatureRef<'a>
[src]
Construct a signature object from bytes
pub fn keypair(&self) -> Result<(PublicKey, SecretKey)>
[src]
Generate a new keypair
pub fn sign<'a, S: Into<SecretKeyRef<'a>>>(
&self,
message: &Message,
sk: S
) -> Result<Signature>
[src]
&self,
message: &Message,
sk: S
) -> Result<Signature>
Sign a message
pub fn verify<'a, 'b>(
&self,
message: &Message,
signature: impl Into<SignatureRef<'a>>,
pk: impl Into<PublicKeyRef<'b>>
) -> Result<()>
[src]
&self,
message: &Message,
signature: impl Into<SignatureRef<'a>>,
pk: impl Into<PublicKeyRef<'b>>
) -> Result<()>
Verify a message
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Sig
impl !Send for Sig
impl !Sync for Sig
impl Unpin for Sig
impl UnwindSafe for Sig
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,