C# Class Granados.PKI.EllipticCurveFp

Elliptic curve domain parameters over Fp
Inheritance: EllipticCurve
Mostrar archivo Open project: poderosaproject/poderosa Class Usage Examples

Public Properties

Property Type Description
G ECPoint
a Granados.Mono.Math.BigInteger
b Granados.Mono.Math.BigInteger
h Granados.Mono.Math.BigInteger
n Granados.Mono.Math.BigInteger
p Granados.Mono.Math.BigInteger

Public Methods

Method Description
EllipticCurveFp ( PublicKeyAlgorithm algorithm, string curveName, BigInteger p, BigInteger a, BigInteger b, ECPoint G, BigInteger n, BigInteger h ) : Granados.Crypto

Constructor

PointAdd ( ECPoint t1, ECPoint t2, bool infinityToNull ) : ECPoint

Calculate point addition

PointMul ( BigInteger k1, BigInteger k2, ECPoint t, bool infinityToNull ) : ECPoint

Calculate point multiplication

PointMul ( BigInteger k, ECPoint t, bool infinityToNull ) : ECPoint

Calculate point multiplication

ValidatePoint ( BigInteger x, BigInteger y ) : bool

Validate if the point satisfies the equation of the elliptic curve.

Private Methods

Method Description
PointAdd ( BigInteger ring, ECPoint p1, ECPoint p2, ECPoint &p3 ) : bool

Point addition over the curve

PointDouble ( BigInteger ring, ECPoint p1, ECPoint &p3 ) : bool

Point dooubling over the curve

PointMul ( BigInteger ring, ECPoint p1, BigInteger k, ECPoint &p2 ) : bool

Point multiplication over the curve

Method Details

EllipticCurveFp() public method

Constructor
public EllipticCurveFp ( PublicKeyAlgorithm algorithm, string curveName, BigInteger p, BigInteger a, BigInteger b, ECPoint G, BigInteger n, BigInteger h ) : Granados.Crypto
algorithm PublicKeyAlgorithm public key algorithm which uses this curve
curveName string curve name
p Granados.Mono.Math.BigInteger odd prime
a Granados.Mono.Math.BigInteger curve parameter
b Granados.Mono.Math.BigInteger curve parameter
G ECPoint base point
n Granados.Mono.Math.BigInteger order n of G
h Granados.Mono.Math.BigInteger cofactor
return Granados.Crypto

PointAdd() public method

Calculate point addition
public PointAdd ( ECPoint t1, ECPoint t2, bool infinityToNull ) : ECPoint
t1 ECPoint point
t2 ECPoint point
infinityToNull bool /// if result was point-at-infinity, and this parameter was true, /// null is returned instead of . ///
return ECPoint

PointMul() public method

Calculate point multiplication
public PointMul ( BigInteger k1, BigInteger k2, ECPoint t, bool infinityToNull ) : ECPoint
k1 Granados.Mono.Math.BigInteger scalar
k2 Granados.Mono.Math.BigInteger scalar
t ECPoint point
infinityToNull bool /// if result was point-at-infinity, and this parameter was true, /// null is returned instead of . ///
return ECPoint

PointMul() public method

Calculate point multiplication
public PointMul ( BigInteger k, ECPoint t, bool infinityToNull ) : ECPoint
k Granados.Mono.Math.BigInteger scalar
t ECPoint point
infinityToNull bool /// if result was point-at-infinity, and this parameter was true, /// null is returned instead of . ///
return ECPoint

ValidatePoint() public method

Validate if the point satisfies the equation of the elliptic curve.
public ValidatePoint ( BigInteger x, BigInteger y ) : bool
x Granados.Mono.Math.BigInteger value of X
y Granados.Mono.Math.BigInteger value of Y
return bool

Property Details

G public_oe property

Base point
public ECPoint G
return ECPoint

a public_oe property

Curve parameter
public BigInteger,Granados.Mono.Math a
return Granados.Mono.Math.BigInteger

b public_oe property

Curve parameter
public BigInteger,Granados.Mono.Math b
return Granados.Mono.Math.BigInteger

h public_oe property

Cofactor
public BigInteger,Granados.Mono.Math h
return Granados.Mono.Math.BigInteger

n public_oe property

Order n of G
public BigInteger,Granados.Mono.Math n
return Granados.Mono.Math.BigInteger

p public_oe property

Odd prime
public BigInteger,Granados.Mono.Math p
return Granados.Mono.Math.BigInteger