Returns a 42-byte signature of the 20-byte hash.

Namespace: BasicCard.Crypto.EC
Assembly: BasicCard (in BasicCard.dll) Version: 2.5.2.0 (2.5.2.0)

Syntax

C#
public byte[] Sign(
	byte[] PrivateKey,
	byte[] hash,
	byte[] rand
)
Visual Basic
Public Function Sign ( 
	PrivateKey As Byte(),
	hash As Byte(),
	rand As Byte()
) As Byte()
Visual C++
public:
virtual array<unsigned char>^ Sign(
	array<unsigned char>^ PrivateKey, 
	array<unsigned char>^ hash, 
	array<unsigned char>^ rand
) sealed
F#
abstract Sign : 
        PrivateKey : byte[] * 
        hash : byte[] * 
        rand : byte[] -> byte[] 
override Sign : 
        PrivateKey : byte[] * 
        hash : byte[] * 
        rand : byte[] -> byte[] 

Parameters

PrivateKey
Type: array<System..::..Byte>[]()[][]
Private key.
hash
Type: array<System..::..Byte>[]()[][]
Hash to sign.
rand
Type: array<System..::..Byte>[]()[][]
Random data to use.

Return Value

Type: array<Byte>[]()[][]
42 byte signature.

Implements

EllipticCurve..::..Sign(array<Byte>[]()[][], array<Byte>[]()[][], array<Byte>[]()[][])

Remarks

On entry, rand should be a 160-bit random number (i.e. uniformly distributed between 0 and 2^160-1) using msb first order.

Exceptions

See Also