C# Class Granados.PKI.EllipticCurve

Abstract class for elliptic curve parameters.
ファイルを表示 Open project: poderosaproject/poderosa Class Usage Examples

Public Methods

Method Description
ConvertPointToOctetString ( ECPoint point ) : byte[]

Convert a point to the octet string.

FindByName ( string name ) : EllipticCurve

Find curve by identifier

FindByOID ( string oid ) : EllipticCurve

Find curve by OID

GenerateKeyPair ( ) : ECDSAKeyPair

Generates new key pair.

GenerateKeyPair ( RandomNumberGenerator rng ) : ECDSAKeyPair

Generates new key pair.

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

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

ValidatePoint ( ECPoint t ) : bool

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

Private Methods

Method Description
TestKeyPair ( ) : void
TestPKV ( ) : void
TestPointMultiplication ( ) : void
TestSignatureVerification ( ) : void

Method Details

ConvertPointToOctetString() public method

Convert a point to the octet string.
public ConvertPointToOctetString ( ECPoint point ) : byte[]
point ECPoint point
return byte[]

FindByName() public static method

Find curve by identifier
public static FindByName ( string name ) : EllipticCurve
name string curve identifier
return EllipticCurve

FindByOID() public static method

Find curve by OID
public static FindByOID ( string oid ) : EllipticCurve
oid string
return EllipticCurve

GenerateKeyPair() public method

Generates new key pair.
public GenerateKeyPair ( ) : ECDSAKeyPair
return ECDSAKeyPair

GenerateKeyPair() public method

Generates new key pair.
public GenerateKeyPair ( RandomNumberGenerator rng ) : ECDSAKeyPair
rng System.Security.Cryptography.RandomNumberGenerator random number generator
return ECDSAKeyPair

PointAdd() public abstract method

Calculate point addition
public abstract 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 abstract method

Calculate point multiplication
public abstract 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 abstract method

Calculate point multiplication
public abstract 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 abstract method

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

ValidatePoint() public method

Validates if the point satisfies the equation of the elliptic curve.
public ValidatePoint ( ECPoint t ) : bool
t ECPoint point
return bool