Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
NistP521.cs
1using System.Numerics;
2
4{
9 public class NistP521 : NistPrimeCurve
10 {
11 private static readonly BigInteger p0 = BigInteger.Pow(2, 521) - 1;
12 private static readonly BigInteger n0 = BigInteger.Parse("6864797660130609714981900799081393217269435300143305409394463459185543183397655394245057746333217197532963996371363321113864768612440380340372808892707005449");
13 private static readonly BigInteger B0 = ToBigInteger(new uint[]
14 {
15 0x51, 0x953eb961, 0x8e1c9a1f, 0x929a21a0, 0xb68540ee, 0xa2da725b,
16 0x99b315f3, 0xb8b48991, 0x8ef109e1, 0x56193951, 0xec7e937b, 0x1652c0bd,
17 0x3bb1bf07, 0x3573df88, 0x3d2c34f1, 0xef451fd4, 0x6b503f00
18 });
19 private static readonly BigInteger BasePointX = ToBigInteger(new uint[]
20 {
21 0xc6, 0x858e06b7, 0x0404e9cd, 0x9e3ecb66, 0x2395b442, 0x9c648139, 0x053fb521, 0xf828af60, 0x6b4d3dba,
22 0xa14b5e77, 0xefe75928, 0xfe1dc127, 0xa2ffa8de, 0x3348b3c1, 0x856a429b, 0xf97e7e31, 0xc2e5bd66
23 });
24 private static readonly BigInteger BasePointY = ToBigInteger(new uint[]
25 {
26 0x118, 0x39296a78, 0x9a3bc004, 0x5c8a5fb4, 0x2c7d1bd9, 0x98f54449, 0x579b4468, 0x17afbd17, 0x273e662c,
27 0x97ee7299, 0x5ef42640, 0xc550b901, 0x3fad0761, 0x353c7086, 0xa272c240, 0x88be9476, 0x9fd16650
28 });
29
34 public NistP521()
35 : base(p0, new PointOnCurve(BasePointX, BasePointY), B0, n0)
36 {
37 }
38
44 public NistP521(byte[] Secret)
45 : base(p0, new PointOnCurve(BasePointX, BasePointY), B0, n0, Secret)
46 {
47 }
48
52 public override string CurveName => "NIST P-521";
53
58
63 }
64}
NIST P-521 Elliptic Curve, as defined in NIST FIPS BUB 186-4: https://nvlpubs.nist....
Definition: NistP521.cs:10
override string CurveName
Name of curve.
Definition: NistP521.cs:52
NistP521(byte[] Secret)
NIST P-521 Elliptic Curve, as defined in NIST FIPS BUB 186-4: https://nvlpubs.nist....
Definition: NistP521.cs:44
override HashFunctionStream HashFunctionStream
Hash function to use in signatures for data streams.
Definition: NistP521.cs:62
NistP521()
NIST P-521 Elliptic Curve, as defined in NIST FIPS BUB 186-4: https://nvlpubs.nist....
Definition: NistP521.cs:34
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