[][src]Struct oqs::sig::Sig

pub struct Sig { /* fields omitted */ }

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]

Sign a message

pub fn verify<'a, 'b>(
    &self,
    message: &Message,
    signature: impl Into<SignatureRef<'a>>,
    pk: impl Into<PublicKeyRef<'b>>
) -> Result<()>
[src]

Verify a message

Trait Implementations

impl Drop for Sig[src]

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.