EasyPQC.Signatures
This uses Dilithium for creating fingerprints, commonly used for ensuring data hasn't been tampered!
Methods
CreateKeys()
Creates a public and private key asynchronously (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: Task<(Dictionary<string, byte[]>, Dictionary<string, byte[]>)>
CreateSignature (Dictionary<string, byte[]> privatekeyBytes, string input)
Creates a signature asynchronously through a private key and an input.
-
Parameters:
- privatekeyBytes: The private key in byte array form.
- input: The string meant to be signed,
-
Returns: Task<byte[]>
VerifySignature(Dictionary<string, byte[]> publickeyBytes, byte[] signature, string input)
Verifies the input data using the public key, the saved signature and a reference input as a string.
-
Parameters:
- publickeyBytes: The public key in byte array form.
- signature: The Dilithium signature created with CreateSignature()..
- input: The string meant to be validated,
-
Returns: Task
VerifySignature(Dictionary<string, byte[]> publickeyBytes, byte[] signature, byte[] inputBytes)
Verifies the input data using the public key, the saved signature and a reference input as a byte array.
-
Parameters:
- publickeyBytes: The public key in byte array form.
- signature: The Dilithium signature created with CreateSignature()..
- input: The byte array meant to be validated,
-
Returns: Task