EasyPQC.Keys
This uses KYBERS CRYSTAL for handling secrets; this is great for one time passes, exchanges, etc.
Types
KeyAndEncryptedText
Holds AES-GCM encrypted data and its associated IV.
- Fields:
- byte[] key: Kyber Encapsulated Secret.
- byte[] text: Kyber Encapsulation Data
Methods
Initiate()
Creates a public and private key (tuple.Item1, tuple.Item2). The public key should be shared, but the private key should only be on the the device that made/called the function.
- Returns: Dictionary<string, byte[]>, Dictionary<string, byte[]>
CreateSecret (Dictionary<string, byte[]> givenkey)
Creates a secret using the public key, returning a KeyAndEncryptedText object; check this when fixing example section
-
Parameters:
- givenkey: The public key, encoded as a KyberPublicKeyParameters.
-
Returns: Task<byte[]>
CreateSecretTwo(Dictionary<string, byte[]> privkey, byte[] cipher)
Creates a second secret using the private key and a cipher (within the KeyAndEncryptedText object as key).
-
Parameters:
- privkey: The private key, encoded as a KyberPrivateKeyParameters .
- cipher: The Dilithium signature created with CreateSignature()..
-
Returns: Task