Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
NistP384.cs
1using System;
2using System.Numerics;
3
5{
10 public class NistP384 : NistPrimeCurve
11 {
12 private static readonly BigInteger p0 = BigInteger.Pow(2, 384) - BigInteger.Pow(2, 128) - BigInteger.Pow(2, 96) + BigInteger.Pow(2, 32) - 1;
13 private static readonly BigInteger n0 = BigInteger.Parse("39402006196394479212279040100143613805079739270465446667946905279627659399113263569398956308152294913554433653942643");
14 private static readonly BigInteger BasePointX = ToBigInteger(new uint[]
15 {
16 0xaa87ca22, 0xbe8b0537, 0x8eb1c71e, 0xf320ad74, 0x6e1d3b62, 0x8ba79b98, 0x59f741e0, 0x82542a38, 0x5502f25d, 0xbf55296c, 0x3a545e38, 0x72760ab7
17 });
18 private static readonly BigInteger BasePointY = ToBigInteger(new uint[]
19 {
20 0x3617de4a, 0x96262c6f, 0x5d9e98bf, 0x9292dc29, 0xf8f41dbd, 0x289a147c, 0xe9da3113, 0xb5f0b8c0, 0x0a60b1ce, 0x1d7e819d, 0x7a431d7c, 0x90ea0e5f
21 });
22
27 public NistP384()
28 : base(p0, new PointOnCurve(BasePointX, BasePointY), n0)
29 {
30 }
31
37 public NistP384(byte[] Secret)
38 : base(p0, new PointOnCurve(BasePointX, BasePointY), n0, Secret)
39 {
40 }
41
45 public override string CurveName => "NIST P-384";
46
50 public override Security.HashFunction HashFunction => Security.HashFunction.SHA512;
51 }
52}
NIST P-384 Elliptic Curve, as defined in NIST FIPS BUB 186-4: https://nvlpubs.nist....
Definition: NistP384.cs:11
NistP384(byte[] Secret)
NIST P-384 Elliptic Curve, as defined in NIST FIPS BUB 186-4: https://nvlpubs.nist....
Definition: NistP384.cs:37
NistP384()
NIST P-384 Elliptic Curve, as defined in NIST FIPS BUB 186-4: https://nvlpubs.nist....
Definition: NistP384.cs:27
override string CurveName
Name of curve.
Definition: NistP384.cs:45
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.
HashFunction
Hash method enumeration.
Definition: Hashes.cs:28
Represents a point on a curve.
Definition: PointOnCurve.cs:11