Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
NistP224.cs
1using System.Numerics;
2
4{
9 public class NistP224 : NistPrimeCurve
10 {
11 private static readonly BigInteger p0 = BigInteger.Pow(2, 224) - BigInteger.Pow(2, 96) + 1;
12 private static readonly BigInteger n0 = BigInteger.Parse("26959946667150639794667015087019625940457807714424391721682722368061");
13 private static readonly BigInteger B0 = ToBigInteger(new uint[]
14 {
15 0xb4050a85, 0x0c04b3ab, 0xf5413256, 0x5044b0b7, 0xd7bfd8ba, 0x270b3943,
16 0x2355ffb4
17 });
18 private static readonly BigInteger BasePointX = ToBigInteger(new uint[]
19 {
20 0xb70e0cbd, 0x6bb4bf7f, 0x321390b9, 0x4a03c1d3, 0x56c21122, 0x343280d6, 0x115c1d21
21 });
22 private static readonly BigInteger BasePointY = ToBigInteger(new uint[]
23 {
24 0xbd376388, 0xb5f723fb, 0x4c22dfe6, 0xcd4375a0, 0x5a074764, 0x44d58199, 0x85007e34
25 });
26
31 public NistP224()
32 : base(p0, new PointOnCurve(BasePointX, BasePointY), B0, n0)
33 {
34 }
35
41 public NistP224(byte[] Secret)
42 : base(p0, new PointOnCurve(BasePointX, BasePointY), B0, n0, Secret)
43 {
44 }
45
49 public override string CurveName => "NIST P-224";
50 }
51}
NIST P-224 Elliptic Curve, as defined in NIST FIPS BUB 186-4: https://nvlpubs.nist....
Definition: NistP224.cs:10
override string CurveName
Name of curve.
Definition: NistP224.cs:49
NistP224()
NIST P-224 Elliptic Curve, as defined in NIST FIPS BUB 186-4: https://nvlpubs.nist....
Definition: NistP224.cs:31
NistP224(byte[] Secret)
NIST P-224 Elliptic Curve, as defined in NIST FIPS BUB 186-4: https://nvlpubs.nist....
Definition: NistP224.cs:41
Base class of Elliptic curves over a prime field defined by NIST.
static BigInteger ToBigInteger(uint[] BigEndianDWords)
Converts a sequence of unsigned 32-bit integers to a BigInteger.
Represents a point on a curve.
Definition: PointOnCurve.cs:10