A .NET interface to CryptoSys PQC.
| Class | Description |
|---|---|
| Dsa | Digital Signature Algorithm (DSA) methods. |
| General | Get general diagnostic info about the core native DLL. |
| HexExtension | Extension methods for hex conversion |
| Kem | Key-Encapsulation Mechanism (KEM) methods. |
| PqcErrorException | PQC custom exception. |
| Rng | Random Number Generator to NIST SP800-90 |
| Structure | Description |
|---|---|
| Dsa.KeyPair | Object to hold a DSA key pair. |
| Kem.EncapOutput | Object to hold output from KEM encapsulation. |
| Kem.KeyPair | Object to hold a KEM key pair. |
| Enumeration | Description |
|---|---|
| Dsa.Alg | Digital Signature Algorithm (DSA) algorithm. |
| Dsa.PreHashAlg | Hash function identifiers for pre-hash signing. |
| Dsa.SigOpts | Signature options. |
| Kem.Alg | Key-Encapsulation Mechanism (KEM) algorithm. |
Digital Signature Algorithm (DSA) methods.
System.Object
CryptoSysPQC.Dsa
Namespace: CryptoSysPQC
Assembly: diCrSysPQCNet (in diCrSysPQCNet.dll) Version:
1.0.0.0 (1.0.0.0)
public class DsaThe Dsa type exposes the following members.
| Name | Description |
|---|---|
| AlgName | Get the algorithm name from its code |
| KeyGen | Generate a DSA signing key pair (pk, sk). |
| PrivateKeySize | Return length in bytes of (expanded) private key for the given DSA algorithm. |
| PublicKeyFromPrivate | Extract the public key from a private key. |
| PublicKeySize | Return length in bytes of public key for the given DSA algorithm. |
| Sign | Generate a DSA signature over a message. |
| SignatureSize | Return length in bytes of signature for the given DSA algorithm. |
| SignPreHash | Generate a DSA signature over a pre-hashed message. |
| Verify | Verify a DSA signature over a message. |
| VerifyPreHash | Verify a DSA signature over a pre-hashed message. |
Get the algorithm name from its code
Namespace: CryptoSysPQC
Assembly: diCrSysPQCNet (in diCrSysPQCNet.dll) Version:
1.0.0.0 (1.0.0.0)
public static string AlgName(
Dsa.Alg alg
)DSA signature algorithm
String
Algorithm name
Dsa Class
CryptoSysPQC Namespace
Generate a DSA signing key pair (pk, sk).
Namespace: CryptoSysPQC
Assembly: diCrSysPQCNet (in diCrSysPQCNet.dll) Version:
1.0.0.0 (1.0.0.0)
public static Dsa.KeyPair KeyGen(
Dsa.Alg alg,
string paramstr = ""
)DSA signature algorithm
Optional parameters string.
Dsa.KeyPair
Keypair (pk, sk) in a Dsa.KeyPair
object.
Use paramstr to pass known test random material encoded
in hexadecimal. For SLH-DSA this must represent exactly 3*n
bytes (48/72/96 bytes) and for ML-DSA exactly 32 bytes. [default = add
fresh randomness]
Dsa Class
CryptoSysPQC Namespace
Return length in bytes of (expanded) private key for the given DSA algorithm.
Namespace: CryptoSysPQC
Assembly: diCrSysPQCNet (in diCrSysPQCNet.dll) Version:
1.0.0.0 (1.0.0.0)
public static int PrivateKeySize(
Dsa.Alg alg
)DSA signature algorithm
Int32
Length of key in bytes
Dsa Class
CryptoSysPQC Namespace
Extract the public key from a private key.
Namespace: CryptoSysPQC
Assembly: diCrSysPQCNet (in diCrSysPQCNet.dll) Version:
1.0.0.0 (1.0.0.0)
public static byte[] PublicKeyFromPrivate(
Dsa.Alg alg,
byte[] sk
)DSA signature algorithm.
Private key.
Byte[]
Public key pk .
| Exception | Condition |
|---|---|
| PqcErrorException | If parameters are bad, wrong lengths, etc. |
Dsa Class
CryptoSysPQC Namespace
Return length in bytes of public key for the given DSA algorithm.
Namespace: CryptoSysPQC
Assembly: diCrSysPQCNet (in diCrSysPQCNet.dll) Version:
1.0.0.0 (1.0.0.0)
public static int PublicKeySize(
Dsa.Alg alg
)DSA signature algorithm
Int32
Length of key in bytes
Dsa Class
CryptoSysPQC Namespace
Generate a DSA signature over a message.
Namespace: CryptoSysPQC
Assembly: diCrSysPQCNet (in diCrSysPQCNet.dll) Version:
1.0.0.0 (1.0.0.0)
public static byte[] Sign(
Dsa.Alg alg,
byte[] msg,
byte[] sk,
Dsa.SigOpts opts = Dsa.SigOpts.Default,
byte[] context = null,
string paramstr = ""
)DSA signature algorithm.
Message to be signed.
Private key.
Signature options.
Optional context string in byte array (maximum 255 bytes).
Optional parameters string.
Byte[]
Signature in a byte array.
Use paramstr to pass known test random material encoded
in hexadecimal [default = "" = add fresh randomness if in
hedged mode]. For SLH-DSA this must represent exactly n
bytes (16/24/32 bytes) and for ML-DSA exactly 32 bytes.
When using the ExternalMu-ML-DSA.Sign option (ExternalMu), pass the value of
mu instead of the message. This must be exactly 64 bytes
long. Caller is responsible for computing the value of mu
independently prior to input.
For ML-DSA, the private key sk may be passed in expanded
form (2560|4032|4896 bytes) or as a 32-byte seed. The key form is
detected automatically by its length.
Dsa Class
CryptoSysPQC Namespace
Return length in bytes of signature for the given DSA algorithm.
Namespace: CryptoSysPQC
Assembly: diCrSysPQCNet (in diCrSysPQCNet.dll) Version:
1.0.0.0 (1.0.0.0)
public static int SignatureSize(
Dsa.Alg alg
)DSA signature algorithm
Int32
Length of signature in bytes
Dsa Class
CryptoSysPQC Namespace
Generate a DSA signature over a pre-hashed message.
Namespace: CryptoSysPQC
Assembly: diCrSysPQCNet (in diCrSysPQCNet.dll) Version:
1.0.0.0 (1.0.0.0)
public static byte[] SignPreHash(
Dsa.Alg alg,
byte[] msg,
Dsa.PreHashAlg hashAlg,
byte[] sk,
Dsa.SigOpts opts = Dsa.SigOpts.Default,
byte[] context = null,
string paramstr = ""
)DSA signature algorithm.
Hash digest of message to be signed PH_M = PH(M).
Pre-hash function used to create hash digest.
Private key.
Signature options.
Optional context string in byte array (maximum 255 bytes).
Optional parameters string.
Byte[]
Signature in a byte array.
Use paramstr to pass known test random material encoded
in hexadecimal [default = "" = add fresh randomness if in
hedged mode]. For SLH-DSA this must represent exactly n
bytes (16/24/32 bytes) and for ML-DSA exactly 32 bytes. For the pre-hash
version, the hash digest of the message is passed instead of the message
itself. Caller is responsible for computing the hash digest
independently prior to input. The hash function used must be identifed
in the hashAlg parameter.
For ML-DSA, the private key sk may be passed in expanded
form (2560|4032|4896 bytes) or as a 32-byte seed. The key form is
detected automatically by its length.
Dsa Class
CryptoSysPQC Namespace
Verify a DSA signature over a message.
Namespace: CryptoSysPQC
Assembly: diCrSysPQCNet (in diCrSysPQCNet.dll) Version:
1.0.0.0 (1.0.0.0)
public static bool Verify(
Dsa.Alg alg,
byte[] sig,
byte[] msg,
byte[] pk,
byte[] context = null,
Dsa.SigOpts opts = Dsa.SigOpts.Default
)DSA signature algorithm.
Signature value.
Message to be verified.
Public key.
Optional context string in byte array to match context string used when signing.
Verify options.
Boolean
True if signature verifies.
| Exception | Condition |
|---|---|
| PqcErrorException | If parameters are bad, wrong lengths, etc. |
When using the ExternalMu-ML-DSA.Verify option (ExternalMu), pass the value of
mu instead of the message. This must be exactly 64 bytes
long. Caller is responsible for computing the value of mu
independently prior to input.
Dsa Class
CryptoSysPQC Namespace
Verify a DSA signature over a pre-hashed message.
Namespace: CryptoSysPQC
Assembly: diCrSysPQCNet (in diCrSysPQCNet.dll) Version:
1.0.0.0 (1.0.0.0)
public static bool VerifyPreHash(
Dsa.Alg alg,
byte[] sig,
byte[] msg,
Dsa.PreHashAlg hashAlg,
byte[] pk,
byte[] context = null,
string paramstr = ""
)DSA signature algorithm.
Signature value.
Hash digest of message to be verified PH_M = PH(M).
Pre-hash function used to create hash digest.
Public key.
Optional context string in byte array to match context string used when signing.
Optional parameters string.
Boolean
True if signature verifies.
| Exception | Condition |
|---|---|
| PqcErrorException | If parameters are bad, wrong lengths, etc. |
For the pre-hash version, the hash digest of the message is passed
instead of the message itself. Caller is responsible for computing the
hash digest independently prior to input. The hash function used must be
identifed in the hashAlg parameter.
Dsa Class
CryptoSysPQC Namespace
Get general diagnostic info about the core native DLL.
System.Object
CryptoSysPQC.General
Namespace: CryptoSysPQC
Assembly: diCrSysPQCNet (in diCrSysPQCNet.dll) Version:
1.0.0.0 (1.0.0.0)
public class GeneralThe General type exposes the following members.
| Name | Description |
|---|---|
| DllInfo | Get information about the core native DLL. |
| ErrorLookup | Return a description of an error code. |
| ModuleName | Return full path name of core native DLL module being used. |
| NetVersion | Return the version of this .NET module. |
| Version | Get version number of core native diCrPQC DLL. |
Get information about the core native DLL.
Namespace: CryptoSysPQC
Assembly: diCrSysPQCNet (in diCrSysPQCNet.dll) Version:
1.0.0.0 (1.0.0.0)
public static string DllInfo()String
String in the form
Platform=Win32|X64;Compiled=DDD;Licence=D|T
Platform is the platform the core native DLL was compiled for:
Win32 or X64.
"Platform=X64;Compiled=Apr 2 2025 19:13:31;Licence=T"
General Class
CryptoSysPQC Namespace
Return a description of an error code.
Namespace: CryptoSysPQC
Assembly: diCrSysPQCNet (in diCrSysPQCNet.dll) Version:
1.0.0.0 (1.0.0.0)
public static string ErrorLookup(
int errCode
)Code number (may be positive or negative)
String
Corresponding error message.
General Class
CryptoSysPQC Namespace
Return full path name of core native DLL module being used.
Namespace: CryptoSysPQC
Assembly: diCrSysPQCNet (in diCrSysPQCNet.dll) Version:
1.0.0.0 (1.0.0.0)
public static string ModuleName()String
File name.
Note C:\WINDOWS\SYSTEM32\ may be returned even if it is
really C:\WINDOWS\SYSWOW64\. Use General.DllInfo() to find out exactly which
platform is being used (Win32 or X64).
General Class
CryptoSysPQC Namespace
Return the version of this .NET module.
Namespace: CryptoSysPQC
Assembly: diCrSysPQCNet (in diCrSysPQCNet.dll) Version:
1.0.0.0 (1.0.0.0)
public static string NetVersion()String
Version string, e.g. "01.00.42"
General Class
CryptoSysPQC Namespace
Get version number of core native diCrPQC DLL.
Namespace: CryptoSysPQC
Assembly: diCrSysPQCNet (in diCrSysPQCNet.dll) Version:
1.0.0.0 (1.0.0.0)
public static int Version()Int32
Version number in form Major * 10000 + Minor * 100 + Release
E.g. version 1.2.3 returns 10203
General Class
CryptoSysPQC Namespace
Extension methods for hex conversion
System.Object
CryptoSysPQC.HexExtension
Namespace: CryptoSysPQC
Assembly: diCrSysPQCNet (in diCrSysPQCNet.dll) Version:
1.0.0.0 (1.0.0.0)
public static class HexExtensionThe HexExtension type exposes the following members.
| Name | Description |
|---|---|
| FromHex | Decode a hex-encoded string |
| ToHex | Encode a byte array in hexadecimal |
Decode a hex-encoded string
Namespace: CryptoSysPQC
Assembly: diCrSysPQCNet (in diCrSysPQCNet.dll) Version:
1.0.0.0 (1.0.0.0)
public static byte[] FromHex(
this string s
)Input string of hex characters
Byte[]
Decoded byte array #### Usage Note In Visual Basic and C#, you can call
this method as an instance method on any object of type String. When you
use instance method syntax to call this method, omit the first
parameter. For more information, see Extension
Methods (Visual Basic) or Extension
Methods (C# Programming Guide).
byte[] b = "00010203".FromHex(); // { 0x00, 0x01, 0x02, 0x03 }HexExtension Class
CryptoSysPQC Namespace
Encode a byte array in hexadecimal
Namespace: CryptoSysPQC
Assembly: diCrSysPQCNet (in diCrSysPQCNet.dll) Version:
1.0.0.0 (1.0.0.0)
public static string ToHex(
this byte[] b
)Input byte array
String
Hex-encoded string #### Usage Note In Visual Basic and C#, you can call
this method as an instance method on any object of type Byte[]. When you
use instance method syntax to call this method, omit the first
parameter. For more information, see Extension
Methods (Visual Basic) or Extension
Methods (C# Programming Guide).
byte[] b = { 0x00, 0x01, 0x02, 0x03 };
string s = b.ToHex()); // "00010203"HexExtension Class
CryptoSysPQC Namespace
Key-Encapsulation Mechanism (KEM) methods.
System.Object
CryptoSysPQC.Kem
Namespace: CryptoSysPQC
Assembly: diCrSysPQCNet (in diCrSysPQCNet.dll) Version:
1.0.0.0 (1.0.0.0)
public class KemThe Kem type exposes the following members.
| Name | Description |
|---|---|
| AlgName | Get the algorithm name from its Alg code |
| CipherTextSize | Return length in bytes of ciphertext for the given KEM algorithm. |
| DecapKeySize | Return length in bytes of expanded decapsulation key (“private key”) for the given KEM algorithm. |
| Decaps | Carry out the ML-KEM decapsulation algorithm:
(ss')<--Decaps(ct,dk) |
| EncapKeySize | Return length in bytes of encapsulation key (“public key”) for the given KEM algorithm. |
| Encaps | Carry out the ML-KEM encapsulation algorithm:
(ct,ss)<--Encaps(ek) |
| KeyGen | Generate an encapsulation/decapsulation key pair (ek, dk):
(ek,dk)<--KeyGen() |
| SharedKeySize | Return length in bytes of the shared key for the given KEM algorithm. |
Get the algorithm name from its Alg code
Namespace: CryptoSysPQC
Assembly: diCrSysPQCNet (in diCrSysPQCNet.dll) Version:
1.0.0.0 (1.0.0.0)
public static string AlgName(
Kem.Alg alg
)KEM algorithm
String
Algorithm name
Console.WriteLine("alg=[{0}]", Kem.AlgName(Kem.Alg.ML_KEM_512));
// alg=[ML-KEM-512]Kem Class
CryptoSysPQC Namespace
Return length in bytes of ciphertext for the given KEM algorithm.
Namespace: CryptoSysPQC
Assembly: diCrSysPQCNet (in diCrSysPQCNet.dll) Version:
1.0.0.0 (1.0.0.0)
public static int CipherTextSize(
Kem.Alg alg
)KEM algorithm
Int32
Length of ciphertext in bytes
Console.WriteLine(Kem.CipherTextSize(Kem.Alg.ML_KEM_512)); // 768
Console.WriteLine(Kem.CipherTextSize(Kem.Alg.ML_KEM_768)); // 1088
Console.WriteLine(Kem.CipherTextSize(Kem.Alg.ML_KEM_1024)); // 1568Kem Class
CryptoSysPQC Namespace
Return length in bytes of expanded decapsulation key (“private key”) for the given KEM algorithm.
Namespace: CryptoSysPQC
Assembly: diCrSysPQCNet (in diCrSysPQCNet.dll) Version:
1.0.0.0 (1.0.0.0)
public static int DecapKeySize(
Kem.Alg alg
)KEM algorithm
Int32
Length of key in bytes
Console.WriteLine(Kem.DecapKeySize(Kem.Alg.ML_KEM_512)); // 1632
Console.WriteLine(Kem.DecapKeySize(Kem.Alg.ML_KEM_768)); // 2400
Console.WriteLine(Kem.DecapKeySize(Kem.Alg.ML_KEM_1024)); // 3168Kem Class
CryptoSysPQC Namespace
Carry out the ML-KEM decapsulation algorithm:
(ss')<--Decaps(ct,dk)
Namespace: CryptoSysPQC
Assembly: diCrSysPQCNet (in diCrSysPQCNet.dll) Version:
1.0.0.0 (1.0.0.0)
public static byte[] Decaps(
Kem.Alg alg,
byte[] ct,
byte[] dk
)KEM algorithm.
Ciphertext
Decapsulation key (either in expanded or “seed” form).
Byte[]
Shared secret key ss. On failure, ss will contain a pseudo-random
value.
Kem Class
CryptoSysPQC Namespace
Return length in bytes of encapsulation key (“public key”) for the given KEM algorithm.
Namespace: CryptoSysPQC
Assembly: diCrSysPQCNet (in diCrSysPQCNet.dll) Version:
1.0.0.0 (1.0.0.0)
public static int EncapKeySize(
Kem.Alg alg
)KEM algorithm
Int32
Length of key in bytes
Console.WriteLine(Kem.EncapKeySize(Kem.Alg.ML_KEM_512)); // 800
Console.WriteLine(Kem.EncapKeySize(Kem.Alg.ML_KEM_768)); // 1184
Console.WriteLine(Kem.EncapKeySize(Kem.Alg.ML_KEM_1024)); // 1568Kem Class
CryptoSysPQC Namespace
Carry out the ML-KEM encapsulation algorithm:
(ct,ss)<--Encaps(ek)
Namespace: CryptoSysPQC
Assembly: diCrSysPQCNet (in diCrSysPQCNet.dll) Version:
1.0.0.0 (1.0.0.0)
public static Kem.EncapOutput Encaps(
Kem.Alg alg,
byte[] ek,
string paramstr = ""
)KEM algorithm.
Encapsulation key.
Optional parameters string. Use to pass a known test random seed encoded in hexadecimal. If provided, this must represent exactly 32 bytes.
Kem.EncapOutput
Shared secret key (ss) and ciphertext (ct) in a Kem.EncapOutput object.
Kem Class
CryptoSysPQC Namespace
Generate an encapsulation/decapsulation key pair (ek, dk):
(ek,dk)<--KeyGen()
Namespace: CryptoSysPQC
Assembly: diCrSysPQCNet (in diCrSysPQCNet.dll) Version:
1.0.0.0 (1.0.0.0)
public static Kem.KeyPair KeyGen(
Kem.Alg alg,
string paramstr = ""
)KEM algorithm.
Optional parameters string. Use to pass a known test random seed
(d||z) representing exactly 64 bytes encoded in
hexadecimal. [Default = use a fresh random value]
Kem.KeyPair
Keypair (ek, dk) in a Kem.KeyPair
object, where ek is the encapsulation (“public”) key and dk the
decapsulation (“private”) key.
If provided, the known test seed (d||z) must consist of
two concatenated 32-byte values where d is the 32-byte
“randomness” for the key generation and z is the 32-byte
“implicit rejection value” to be used on a Decaps failure.
// 1. Use known test vector seed = deterministic
Kem.KeyPair kp = Kem.KeyGen(Kem.Alg.ML_KEM_512,
"2CB843A02EF02EE109305F39119FABF49AB90A57FFECB3A0E75E179450F52761"
+ "84CC9121AE56FBF39E67ADBD83AD2D3E3BB80843645206BDD9F2F629E3CC49B7");
// 2. Use fresh randomness
Kem.KeyPair kp = Kem.KeyGen(Kem.Alg.ML_KEM_512);Kem Class
CryptoSysPQC Namespace
Return length in bytes of the shared key for the given KEM algorithm.
Namespace: CryptoSysPQC
Assembly: diCrSysPQCNet (in diCrSysPQCNet.dll) Version:
1.0.0.0 (1.0.0.0)
public static int SharedKeySize(
Kem.Alg alg
)KEM algorithm
Int32
Length of key in bytes
Console.WriteLine(Kem.SharedKeySize(Kem.Alg.ML_KEM_512)); // 32
Console.WriteLine(Kem.SharedKeySize(Kem.Alg.ML_KEM_768)); // 32
Console.WriteLine(Kem.SharedKeySize(Kem.Alg.ML_KEM_1024)); // 32Kem Class
CryptoSysPQC Namespace
PQC custom exception.
System.Object
System.Exception
CryptoSysPQC.PqcErrorException
Namespace: CryptoSysPQC
Assembly: diCrSysPQCNet (in diCrSysPQCNet.dll) Version:
1.0.0.0 (1.0.0.0)
public class PqcErrorException : ExceptionThe PqcErrorException type exposes the following members.
| Name | Description |
|---|---|
| PqcErrorException() | PQC error exception |
| PqcErrorException(Int32) | PQC error exception |
| PqcErrorException(String) | PQC error exception |
PQC error exception
Namespace: CryptoSysPQC
Assembly: diCrSysPQCNet (in diCrSysPQCNet.dll) Version:
1.0.0.0 (1.0.0.0)
| Name | Description |
|---|---|
| PqcErrorException() | PQC error exception |
| PqcErrorException(Int32) | PQC error exception |
| PqcErrorException(String) | PQC error exception |
public PqcErrorException(
int errcode
)Error code
PqcErrorException
Class
CryptoSysPQC Namespace
PQC error exception
Namespace: CryptoSysPQC
Assembly: diCrSysPQCNet (in diCrSysPQCNet.dll) Version:
1.0.0.0 (1.0.0.0)
| Name | Description |
|---|---|
| PqcErrorException() | PQC error exception |
| PqcErrorException(Int32) | PQC error exception |
| PqcErrorException(String) | PQC error exception |
public PqcErrorException(
string message
)Message string
PqcErrorException
Class
CryptoSysPQC Namespace
Random Number Generator to NIST SP800-90
System.Object
CryptoSysPQC.Rng
Namespace: CryptoSysPQC
Assembly: diCrSysPQCNet (in diCrSysPQCNet.dll) Version:
1.0.0.0 (1.0.0.0)
public class RngThe Rng type exposes the following members.
| Name | Description |
|---|---|
| Bytes | Generate an array of random bytes. |
Generate an array of random bytes.
Namespace: CryptoSysPQC
Assembly: diCrSysPQCNet (in diCrSysPQCNet.dll) Version:
1.0.0.0 (1.0.0.0)
public static byte[] Bytes(
int numBytes
)Required number of random bytes
Byte[]
Array of random bytes
Rng Class
CryptoSysPQC Namespace
Object to hold a DSA key pair.
System.Object
System.ValueType
CryptoSysPQC.Dsa.KeyPair
Namespace: CryptoSysPQC
Assembly: diCrSysPQCNet (in diCrSysPQCNet.dll) Version:
1.0.0.0 (1.0.0.0)
public struct KeyPairThe Dsa.KeyPair type exposes the following members.
| Name | Description |
|---|---|
| pk | Public key |
| sk | Private key |
Public key
Namespace: CryptoSysPQC
Assembly: diCrSysPQCNet (in diCrSysPQCNet.dll) Version:
1.0.0.0 (1.0.0.0)
public byte[] pkByte[]
Dsa.KeyPair Structure
CryptoSysPQC Namespace
Private key
Namespace: CryptoSysPQC
Assembly: diCrSysPQCNet (in diCrSysPQCNet.dll) Version:
1.0.0.0 (1.0.0.0)
public byte[] skByte[]
Dsa.KeyPair Structure
CryptoSysPQC Namespace
Object to hold output from KEM encapsulation.
System.Object
System.ValueType
CryptoSysPQC.Kem.EncapOutput
Namespace: CryptoSysPQC
Assembly: diCrSysPQCNet (in diCrSysPQCNet.dll) Version:
1.0.0.0 (1.0.0.0)
public struct EncapOutputThe Kem.EncapOutput type exposes the following members.
| Name | Description |
|---|---|
| ct | Ciphertext, ct |
| ss | Shared secret key, ss |
Ciphertext, ct
Namespace: CryptoSysPQC
Assembly: diCrSysPQCNet (in diCrSysPQCNet.dll) Version:
1.0.0.0 (1.0.0.0)
public byte[] ctByte[]
Kem.EncapOutput
Structure
CryptoSysPQC Namespace
Shared secret key, ss
Namespace: CryptoSysPQC
Assembly: diCrSysPQCNet (in diCrSysPQCNet.dll) Version:
1.0.0.0 (1.0.0.0)
public byte[] ssByte[]
Kem.EncapOutput
Structure
CryptoSysPQC Namespace
Object to hold a KEM key pair.
System.Object
System.ValueType
CryptoSysPQC.Kem.KeyPair
Namespace: CryptoSysPQC
Assembly: diCrSysPQCNet (in diCrSysPQCNet.dll) Version:
1.0.0.0 (1.0.0.0)
public struct KeyPairThe Kem.KeyPair type exposes the following members.
| Name | Description |
|---|---|
| dk | Decapsulation key (“private” key) |
| ek | Encapsulation key (“public” key) |
Decapsulation key (“private” key)
Namespace: CryptoSysPQC
Assembly: diCrSysPQCNet (in diCrSysPQCNet.dll) Version:
1.0.0.0 (1.0.0.0)
public byte[] dkByte[]
Kem.KeyPair Structure
CryptoSysPQC Namespace
Encapsulation key (“public” key)
Namespace: CryptoSysPQC
Assembly: diCrSysPQCNet (in diCrSysPQCNet.dll) Version:
1.0.0.0 (1.0.0.0)
public byte[] ekByte[]
Kem.KeyPair Structure
CryptoSysPQC Namespace
Digital Signature Algorithm (DSA) algorithm.
Namespace: CryptoSysPQC
Assembly: diCrSysPQCNet (in diCrSysPQCNet.dll) Version:
1.0.0.0 (1.0.0.0)
public enum Alg| Member name | Description |
|---|---|
| ML_DSA_44 | ML-DSA-44 from FIPS.204 |
| ML_DSA_65 | ML-DSA-65 from FIPS.204 |
| ML_DSA_87 | ML-DSA-87 from FIPS.204 |
| SLH_DSA_SHA2_128S | SLH-DSA-SHA2-128s from FIPS.205 |
| SLH_DSA_SHA2_128F | SLH-DSA-SHA2-128f from FIPS.205 |
| SLH_DSA_SHA2_192S | SLH-DSA-SHA2-192s from FIPS.205 |
| SLH_DSA_SHA2_192F | SLH-DSA-SHA2-192f from FIPS.205 |
| SLH_DSA_SHA2_256S | SLH-DSA-SHA2-256s from FIPS.205 |
| SLH_DSA_SHA2_256F | SLH-DSA-SHA2-256f from FIPS.205 |
| SLH_DSA_SHAKE_128S | SLH-DSA-SHAKE-128s from FIPS.205 |
| SLH_DSA_SHAKE_128F | SLH-DSA-SHAKE-128f from FIPS.205 |
| SLH_DSA_SHAKE_192S | SLH-DSA-SHAKE-192s from FIPS.205 |
| SLH_DSA_SHAKE_192F | SLH-DSA-SHAKE-192f from FIPS.205 |
| SLH_DSA_SHAKE_256S | SLH-DSA-SHAKE-256s from FIPS.205 |
| SLH_DSA_SHAKE_256F | SLH-DSA-SHAKE-256f from FIPS.205 |
Hash function identifiers for pre-hash signing.
Namespace: CryptoSysPQC
Assembly: diCrSysPQCNet (in diCrSysPQCNet.dll) Version:
1.0.0.0 (1.0.0.0)
public enum PreHashAlg| Member name | Description |
|---|---|
| Sha256 | SHA-256 from FIPS.180-4 |
| Sha384 | SHA-384 from FIPS.180-4 |
| Sha512 | SHA-512 from FIPS.180-4 |
| Sha224 | SHA-224 from FIPS.180-4 |
| Sha512_224 | SHA-512/224 from FIPS.180-4 |
| Sha512_256 | SHA-512/256 from FIPS.180-4 |
| Sha3_224 | SHA3-224 from FIPS.202 |
| Sha3_256 | SHA3-256 from FIPS.202 |
| Sha3_384 | SHA3-384 from FIPS.202 |
| Sha3_512 | SHA3-512 from FIPS.202 |
| Shake128_256 | SHAKE-128-256 from FIPS.202 |
| Shake256_512 | SHAKE-256-512 from FIPS.202 |
Signature options.
Namespace: CryptoSysPQC
Assembly: diCrSysPQCNet (in diCrSysPQCNet.dll) Version:
1.0.0.0 (1.0.0.0)
[FlagsAttribute]
public enum SigOpts| Member name | Description |
|---|---|
| Default | Default options |
| Deterministic | Use the deterministic variant when signing [default = hedged, add fresh randomness] |
| Internal | Use Sign_internal or Verify_internal
algorithm (for testing purposes). |
| ExternalMu | Use ExternalMu-ML-DSA.Sign or
ExternalMu-ML-DSA.Verify algorithm (ML-DSA only). |
Key-Encapsulation Mechanism (KEM) algorithm.
Namespace: CryptoSysPQC
Assembly: diCrSysPQCNet (in diCrSysPQCNet.dll) Version:
1.0.0.0 (1.0.0.0)
public enum Alg| Member name | Description |
|---|---|
| ML_KEM_512 | ML_KEM_512 from FIPS.203 (based on Kyber512) |
| ML_KEM_768 | ML_KEM_768 from FIPS.203 (based on Kyber768) |
| ML_KEM_1024 | ML_KEM_1024 from FIPS.203 (based on Kyber1024) |
Created: 2025-10-20 20:08:57
Copyright (C) 2025 D.I. Management Services Pty Ltd t/a CryptoSys https://cryptosys.net