Dilithium#
Supported parameters#
Dilithium has three parameter sets: these are supported and defined by Paramset
.
Test a signing function#
- crypto_condor.primitives.Dilithium.test_sign(sign, parameter_set)#
Tests a function that signs with Dilithium.
Signs messages with the given function and compares to the expected signature.
Test a verifying function#
- crypto_condor.primitives.Dilithium.test_verify(verify, parameter_set)#
Tests a function that verifies Dilithium signatures.
Run a wrapper#
Note
Available wrappers are defined by Wrapper
.
- crypto_condor.primitives.Dilithium.run_wrapper(language, parameter_set, run_sign, run_verify)#
Runs the corresponding wrapper.
- Parameters:
- Returns:
A dictionary of results, one for sign, one for verify. The keys are
sign
andverify
.- Return type:
Protocols#
- protocol crypto_condor.primitives.Dilithium.Sign#
Represents a function that signs messages with Dilithium.
Classes that implement this protocol must have the following methods / attributes:
- __call__(secret_key, message)#
Signs a message with Dilithium.
- Parameters:
secret_key (bytes) – The key to use for signing.
message (bytes) – The message to sign.
- Returns:
The signature.
- Return type:
bytes
- protocol crypto_condor.primitives.Dilithium.Verify#
Represents a function that verifies Dilithium signatures.
Classes that implement this protocol must have the following methods / attributes:
- __call__(public_key, message, signature)#
Verifies a Dilithium signature.
- Parameters:
public_key (bytes) – The public part of the key used to sign the message.
message (bytes) – The signed message.
signature (bytes) – The signature to verify.
- Returns:
True if the signature is valid for the given key and message.
- Return type:
bool