C# Класс Granados.PKI.EllipticCurve

Abstract class for elliptic curve parameters.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
TestKeyPair ( ) : void
TestPKV ( ) : void
TestPointMultiplication ( ) : void
TestSignatureVerification ( ) : void

Описание методов

ConvertPointToOctetString() публичный Метод

Convert a point to the octet string.
public ConvertPointToOctetString ( ECPoint point ) : byte[]
point ECPoint point
Результат byte[]

FindByName() публичный статический Метод

Find curve by identifier
public static FindByName ( string name ) : EllipticCurve
name string curve identifier
Результат EllipticCurve

FindByOID() публичный статический Метод

Find curve by OID
public static FindByOID ( string oid ) : EllipticCurve
oid string
Результат EllipticCurve

GenerateKeyPair() публичный Метод

Generates new key pair.
public GenerateKeyPair ( ) : ECDSAKeyPair
Результат ECDSAKeyPair

GenerateKeyPair() публичный Метод

Generates new key pair.
public GenerateKeyPair ( RandomNumberGenerator rng ) : ECDSAKeyPair
rng System.Security.Cryptography.RandomNumberGenerator random number generator
Результат ECDSAKeyPair

PointAdd() публичный абстрактный Метод

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 . ///
Результат ECPoint

PointMul() публичный абстрактный Метод

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 . ///
Результат ECPoint

PointMul() публичный абстрактный Метод

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 . ///
Результат ECPoint

ValidatePoint() публичный абстрактный Метод

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
Результат bool

ValidatePoint() публичный Метод

Validates if the point satisfies the equation of the elliptic curve.
public ValidatePoint ( ECPoint t ) : bool
t ECPoint point
Результат bool