Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
CustomWeierstrassCurve.cs
1using System.Numerics;
2
4{
9 {
10 private readonly string curveName;
11 private readonly HashFunctionArray hashFunction;
12 private readonly HashFunctionStream hashFunctionStream;
13
28 public CustomWeierstrassCurve(string CurveName, BigInteger Prime,
29 PointOnCurve BasePoint, BigInteger a, BigInteger b,
32 : this(CurveName, Prime, BasePoint, a, b, Order, Cofactor,
33 (byte[])null, HashFunction, HashFunctionStream)
34 {
35 }
36
52 public CustomWeierstrassCurve(string CurveName, BigInteger Prime,
53 PointOnCurve BasePoint, BigInteger a, BigInteger b,
54 BigInteger Order, int Cofactor, byte[] Secret, HashFunctionArray HashFunction,
56 : base(Prime, BasePoint, a, b, Order, Cofactor, Secret)
57 {
58 this.curveName = CurveName;
59 this.hashFunction = HashFunction;
60 this.hashFunctionStream = HashFunctionStream;
61 }
62
78 public CustomWeierstrassCurve(string CurveName, BigInteger Prime,
79 PointOnCurve BasePoint, BigInteger a, BigInteger b, BigInteger Order,
80 int Cofactor, uint[] Secret, HashFunctionArray HashFunction,
82 : base(Prime, BasePoint, a, b, Order, Cofactor, Secret)
83 {
84 this.curveName = CurveName;
85 this.hashFunction = HashFunction;
86 this.hashFunctionStream = HashFunctionStream;
87 }
88
100 public CustomWeierstrassCurve(string CurveName, BigInteger Prime,
101 PointOnCurve BasePoint, BigInteger a, BigInteger b,
102 BigInteger Order, int Cofactor, HashFunction HashFunction)
103 : this(CurveName, Prime, BasePoint, a, b, Order, Cofactor, (byte[])null,
104 Hashes.GetHashFunctionArray(HashFunction),
105 Hashes.GetHashFunctionStream(HashFunction))
106 {
107 }
108
121 public CustomWeierstrassCurve(string CurveName, BigInteger Prime,
122 PointOnCurve BasePoint, BigInteger a, BigInteger b,
123 BigInteger Order, int Cofactor, byte[] Secret, HashFunction HashFunction)
124 : this(CurveName, Prime, BasePoint, a, b, Order, Cofactor, Secret,
125 Hashes.GetHashFunctionArray(HashFunction),
126 Hashes.GetHashFunctionStream(HashFunction))
127 {
128 }
129
142 public CustomWeierstrassCurve(string CurveName, BigInteger Prime,
143 PointOnCurve BasePoint, BigInteger a, BigInteger b, BigInteger Order,
144 int Cofactor, uint[] Secret, HashFunction HashFunction)
145 : this(CurveName, Prime, BasePoint, a, b, Order, Cofactor, Secret,
146 Hashes.GetHashFunctionArray(HashFunction),
147 Hashes.GetHashFunctionStream(HashFunction))
148 {
149 }
150
154 public override string CurveName => this.curveName;
155
159 public override HashFunctionArray HashFunction => this.hashFunction;
160
164 public override HashFunctionStream HashFunctionStream => this.hashFunctionStream;
165 }
166}
Custom Weierstrass curves (y²=x³+ax+b) over a prime field.
CustomWeierstrassCurve(string CurveName, BigInteger Prime, PointOnCurve BasePoint, BigInteger a, BigInteger b, BigInteger Order, int Cofactor, HashFunction HashFunction)
Custom Weierstrass curves (y²=x³+ax+b) over a prime field.
CustomWeierstrassCurve(string CurveName, BigInteger Prime, PointOnCurve BasePoint, BigInteger a, BigInteger b, BigInteger Order, int Cofactor, byte[] Secret, HashFunctionArray HashFunction, HashFunctionStream HashFunctionStream)
Custom Weierstrass curves (y²=x³+ax+b) over a prime field.
override HashFunctionStream HashFunctionStream
Hash function to use in signatures for data streams.
CustomWeierstrassCurve(string CurveName, BigInteger Prime, PointOnCurve BasePoint, BigInteger a, BigInteger b, BigInteger Order, int Cofactor, byte[] Secret, HashFunction HashFunction)
Custom Weierstrass curves (y²=x³+ax+b) over a prime field.
override HashFunctionArray HashFunction
Hash function to use in signatures for binary blocks of data in memory.
CustomWeierstrassCurve(string CurveName, BigInteger Prime, PointOnCurve BasePoint, BigInteger a, BigInteger b, BigInteger Order, int Cofactor, uint[] Secret, HashFunction HashFunction)
Custom Weierstrass curves (y²=x³+ax+b) over a prime field.
CustomWeierstrassCurve(string CurveName, BigInteger Prime, PointOnCurve BasePoint, BigInteger a, BigInteger b, BigInteger Order, int Cofactor, uint[] Secret, HashFunctionArray HashFunction, HashFunctionStream HashFunctionStream)
Custom Weierstrass curves (y²=x³+ax+b) over a prime field.
CustomWeierstrassCurve(string CurveName, BigInteger Prime, PointOnCurve BasePoint, BigInteger a, BigInteger b, BigInteger Order, int Cofactor, HashFunctionArray HashFunction, HashFunctionStream HashFunctionStream)
Custom Weierstrass curves (y²=x³+ax+b) over a prime field.
PointOnCurve BasePoint
Base-point of curve.
Base class of Weierstrass curves (y²=x³+ax+b) over a prime field.
Contains methods for simple hash calculations.
Definition: Hashes.cs:57
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