Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
ML_DSA_Keys.cs
1namespace Waher.Security.PQC
2{
6 public class ML_DSA_Keys
7 {
15 public ML_DSA_Keys(uint[,][] Â, byte[] PublicKey, byte[] PrivateKey, byte[] Seed)
16 {
17 this. = Â;
18 this.PublicKey = PublicKey;
19 this.PrivateKey = PrivateKey;
20 this.Seed = Seed;
21 }
22
26 public uint[,][] Â
27 {
28 get;
29 internal set;
30 }
31
35 public byte[] PublicKey { get; }
36
40 public byte[] PrivateKey { get; }
41
45 public bool HasPrivateKey => (this.PrivateKey?.Length ?? 0) > 0;
46
50 public byte[] Seed { get; }
51
57 public static ML_DSA_Keys FromPublicKey(byte[] PublicKey)
58 {
59 return new ML_DSA_Keys(null, PublicKey, null, null);
60 }
61
68 {
69 return new ML_DSA_Keys(null, null, PrivateKey, null);
70 }
71 }
72}
ML-DSA public and private keys, as defined in §6.1.
Definition: ML_DSA_Keys.cs:7
byte[] Seed
Seed that generated key, if available.
Definition: ML_DSA_Keys.cs:50
uint[,][] Â
Matrix of encryption keys, as defined in §6.1.
Definition: ML_DSA_Keys.cs:27
static ML_DSA_Keys FromPublicKey(byte[] PublicKey)
Creates a key object instance from a public key.
Definition: ML_DSA_Keys.cs:57
ML_DSA_Keys(uint[,][] Â, byte[] PublicKey, byte[] PrivateKey, byte[] Seed)
ML-DSA public and private keys, as defined in §6.1.
Definition: ML_DSA_Keys.cs:15
bool HasPrivateKey
If the key contains a private key.
Definition: ML_DSA_Keys.cs:45
byte[] PublicKey
Encoded public key, as defined in §6.1.
Definition: ML_DSA_Keys.cs:35
static ML_DSA_Keys FromPrivateKey(byte[] PrivateKey)
Creates a key object instance from a private key.
Definition: ML_DSA_Keys.cs:67
byte[] PrivateKey
Encoded private key, as defined in §6.1.
Definition: ML_DSA_Keys.cs:40