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.Numerics;
2
4{
9 public class NistP384 : NistPrimeCurve
10 {
11 private static readonly BigInteger p0 = BigInteger.Pow(2, 384) - BigInteger.Pow(2, 128) - BigInteger.Pow(2, 96) + BigInteger.Pow(2, 32) - 1;
12 private static readonly BigInteger n0 = BigInteger.Parse("39402006196394479212279040100143613805079739270465446667946905279627659399113263569398956308152294913554433653942643");
13 private static readonly BigInteger B0 = ToBigInteger(new uint[]
14 {
15 0xb3312fa7, 0xe23ee7e4, 0x988e056b, 0xe3f82d19, 0x181d9c6e, 0xfe814112,
16 0x0314088f, 0x5013875a, 0xc656398d, 0x8a2ed19d, 0x2a85c8ed, 0xd3ec2aef
17 });
18 private static readonly BigInteger BasePointX = ToBigInteger(new uint[]
19 {
20 0xaa87ca22, 0xbe8b0537, 0x8eb1c71e, 0xf320ad74, 0x6e1d3b62, 0x8ba79b98, 0x59f741e0, 0x82542a38, 0x5502f25d, 0xbf55296c, 0x3a545e38, 0x72760ab7
21 });
22 private static readonly BigInteger BasePointY = ToBigInteger(new uint[]
23 {
24 0x3617de4a, 0x96262c6f, 0x5d9e98bf, 0x9292dc29, 0xf8f41dbd, 0x289a147c, 0xe9da3113, 0xb5f0b8c0, 0x0a60b1ce, 0x1d7e819d, 0x7a431d7c, 0x90ea0e5f
25 });
26
31 public NistP384()
32 : base(p0, new PointOnCurve(BasePointX, BasePointY), B0, n0)
33 {
34 }
35
41 public NistP384(byte[] Secret)
42 : base(p0, new PointOnCurve(BasePointX, BasePointY), B0, n0, Secret)
43 {
44 }
45
49 public override string CurveName => "NIST P-384";
50
55
60 }
61}
NIST P-384 Elliptic Curve, as defined in NIST FIPS BUB 186-4: https://nvlpubs.nist....
Definition: NistP384.cs:10
override HashFunctionStream HashFunctionStream
Hash function to use in signatures for data streams.
Definition: NistP384.cs:59
NistP384(byte[] Secret)
NIST P-384 Elliptic Curve, as defined in NIST FIPS BUB 186-4: https://nvlpubs.nist....
Definition: NistP384.cs:41
NistP384()
NIST P-384 Elliptic Curve, as defined in NIST FIPS BUB 186-4: https://nvlpubs.nist....
Definition: NistP384.cs:31
override string CurveName
Name of curve.
Definition: NistP384.cs:49
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.
Contains methods for simple hash calculations.
Definition: Hashes.cs:57
static byte[] ComputeSHA512Hash(byte[] Data)
Computes the SHA-512 hash of a block of binary data.
Definition: Hashes.cs:577
delegate byte[] HashFunctionArray(byte[] Data)
Delegate to hash function.
HashFunction
Hash method enumeration.
Definition: Hashes.cs:26
Represents a point on a curve.
Definition: PointOnCurve.cs:10