Operators#
cuPQC-PK operators are used to describe the operation to be performed, and configure the execution.
They are combined via addition (+) to form a cuPQC-PK descriptor.
Description Operators#
Algorithm#
Sets the algorithm Alg to use. Valid values are:
-
enum algorithm#
There is no default value.
SecurityCategory#
-
template<unsigned int Category>
SecurityCategory()#
Sets the NIST security category, which determines the parameter set of the algorithm to be used.
The valid values of Category depend on the value of the Algorithm operator.
There is no default value.
Convenience aliases are provided for the valid combinations: for example
ML_KEM_512() is equivalent to Algorithm<algorithm::ML_KEM>() + SecurityCategory<1>().
Valid combinations and alias constructor functions are:
Family |
Name |
Alias |
||
|---|---|---|---|---|
ML-KEM-512 |
|
|
||
ML-KEM |
ML-KEM-768 |
|
|
|
ML-KEM-1024 |
|
|
||
ML-DSA-44 |
|
|
||
ML-DSA |
ML-DSA-65 |
|
|
|
ML-DSA-87 |
|
|
Function#
Sets the function Fn to use. Valid values are:
-
enum function#
-
enumerator Keygen#
Generate public and secret keys. Valid for both
algorithm::ML_KEMandalgorithm::ML_DSA
-
enumerator Encaps#
Encapsulation: generate shared secret and ciphertext from public key. Valid only for
algorithm::ML_KEM.
-
enumerator Decaps#
Decapsulation: derive shared secret from ciphertext and secret key. Valid only for
algorithm::ML_KEM.
-
enumerator Sign#
Generate a signature from a message using the secret key. Valid only for
algorithm::ML_DSA.
-
enumerator Verify#
Verify the signature of message using the public key. Valid only for
algorithm::ML_DSA.
-
enumerator Keygen#
There is no default value.
Execution Operators#
Block#
-
Block()#
Specifies that the operator will execute in a single CUDA block: all threads in the block must call execute(...) with the same arguments.
Requires the BlockDim operator.
This is currently the only mode of execution supported.
BlockDim#
-
template<unsigned int X, unsigned int Y = 1, unsigned int Z = 1>
BlockDim(
Specifies that the block dimensions of the kernel when using Block() operator. Currently supported values of X are 32, 64, 128, and 256.
Currently Y and Z must be 1.
The default value is BlockDim<128, 1, 1>; this is an implementation dependent value.
The values of X, Y and Z can be accessed from the descriptor from via the BlockDim() accessor.