C# Class libaxolotl.ecc.Curve25519

Mostra file Open project: kwailo888/AxolotlTestApp Class Usage Examples

Public Methods

Method Description
calculateAgreement ( byte publicKey, byte privateKey ) : byte[]

Calculates an ECDH agreement.

calculateSignature ( byte privateKey, byte message ) : byte[]

Calculates a Curve25519 signature.

generateKeyPair ( ) : Curve25519KeyPair

Generates a Curve25519 keypair.

getInstance ( Curve25519ProviderType type ) : Curve25519

Accesses the currently in use Curve25519 provider, according to the type requested.

isNative ( ) : bool

Curve25519 is backed by a WinRT implementation of curve25519. Returns true for native.

verifySignature ( byte publicKey, byte message, byte signature ) : bool

Verify a Curve25519 signature.

Private Methods

Method Description
Curve25519 ( ) : System.Security.Cryptography

Method Details

calculateAgreement() public method

Calculates an ECDH agreement.
public calculateAgreement ( byte publicKey, byte privateKey ) : byte[]
publicKey byte The Curve25519 (typically remote party's) public key.
privateKey byte The Curve25519 (typically yours) private key.
return byte[]

calculateSignature() public method

Calculates a Curve25519 signature.
public calculateSignature ( byte privateKey, byte message ) : byte[]
privateKey byte The private Curve25519 key to create the signature with.
message byte The message to sign.
return byte[]

generateKeyPair() public method

Generates a Curve25519 keypair.
public generateKeyPair ( ) : Curve25519KeyPair
return Curve25519KeyPair

getInstance() public static method

Accesses the currently in use Curve25519 provider, according to the type requested.
public static getInstance ( Curve25519ProviderType type ) : Curve25519
type Curve25519ProviderType Type of provider requested.
return Curve25519

isNative() public method

Curve25519 is backed by a WinRT implementation of curve25519. Returns true for native.
public isNative ( ) : bool
return bool

verifySignature() public method

Verify a Curve25519 signature.
public verifySignature ( byte publicKey, byte message, byte signature ) : bool
publicKey byte The Curve25519 public key the signature belongs to.
message byte The message that was signed.
signature byte The signature to verify.
return bool