diff options
Diffstat (limited to 'crypto/src/pqc/crypto/sike/SIKEParameters.cs')
-rw-r--r-- | crypto/src/pqc/crypto/sike/SIKEParameters.cs | 43 |
1 files changed, 20 insertions, 23 deletions
diff --git a/crypto/src/pqc/crypto/sike/SIKEParameters.cs b/crypto/src/pqc/crypto/sike/SIKEParameters.cs index d687871ec..3aa332341 100644 --- a/crypto/src/pqc/crypto/sike/SIKEParameters.cs +++ b/crypto/src/pqc/crypto/sike/SIKEParameters.cs @@ -1,33 +1,30 @@ namespace Org.BouncyCastle.Pqc.Crypto.Sike { -public class SIKEParameters -{ + public sealed class SikeParameters + { + public static readonly SikeParameters sikep434 = new SikeParameters(434, false, "sikep434"); + public static readonly SikeParameters sikep503 = new SikeParameters(503, false, "sikep503"); + public static readonly SikeParameters sikep610 = new SikeParameters(610, false, "sikep610"); + public static readonly SikeParameters sikep751 = new SikeParameters(751, false, "sikep751"); - public static SIKEParameters sikep434 = new SIKEParameters(434, false,"sikep434"); - public static SIKEParameters sikep503 = new SIKEParameters(503, false,"sikep503"); - public static SIKEParameters sikep610 = new SIKEParameters(610, false,"sikep610"); - public static SIKEParameters sikep751 = new SIKEParameters(751, false,"sikep751"); + public static readonly SikeParameters sikep434_compressed = new SikeParameters(434, true, "sikep434_compressed"); + public static readonly SikeParameters sikep503_compressed = new SikeParameters(503, true, "sikep503_compressed"); + public static readonly SikeParameters sikep610_compressed = new SikeParameters(610, true, "sikep610_compressed"); + public static readonly SikeParameters sikep751_compressed = new SikeParameters(751, true, "sikep751_compressed"); - public static SIKEParameters sikep434_compressed = new SIKEParameters(434, true,"sikep434_compressed"); - public static SIKEParameters sikep503_compressed = new SIKEParameters(503, true,"sikep503_compressed"); - public static SIKEParameters sikep610_compressed = new SIKEParameters(610, true,"sikep610_compressed"); - public static SIKEParameters sikep751_compressed = new SIKEParameters(751, true,"sikep751_compressed"); + private readonly string name; + private readonly SikeEngine engine; - private string name; - private SIKEEngine engine; - public SIKEParameters(int ver, bool isCompressed, string name) - { - this.name = name; - this.engine = new SIKEEngine(ver, isCompressed, null); - } + public SikeParameters(int ver, bool isCompressed, string name) + { + this.name = name; + this.engine = new SikeEngine(ver, isCompressed, null); + } - internal SIKEEngine GetEngine() - { - return engine; - } + internal SikeEngine Engine => engine; public string Name => name; + public int DefaultKeySize => (int)this.engine.GetDefaultSessionKeySize(); } - -} \ No newline at end of file +} |