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

pub struct Sig { /* fields omitted */ }
Expand description

Signature scheme

Example

use oqs;
oqs::init();
let scheme = oqs::sig::Sig::new(oqs::sig::Algorithm::Dilithium2).unwrap();
let message = [0u8; 100];
let (pk, sk) = scheme.keypair().unwrap();
let signature = scheme.sign(&message, &sk).unwrap();
assert!(scheme.verify(&message, &signature, &pk).is_ok());

Implementations

Construct a new algorithm

May fail if the algorithm is not available

Get the algorithm used by this Sig

Get the version of the implementation

Obtain the claimed nist level

Is this algorithm EUF-CMA?

Length of the public key

Length of the secret key

Maximum length of a signature

Construct a secret key object from bytes

Construct a public key object from bytes

Construct a signature object from bytes

Generate a new keypair

Sign a message

Verify a message

Trait Implementations

Executes the destructor for this type. Read more

The type returned in the event of a conversion error.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.