Returns a signature of the hash provide.

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>[]()[][]
Signature.

Implements

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

Remarks

This is IEE P1363 primitive ECSP-NR: Elliptic Curve Signature Primitive, Nyberg-Rueppel version. On entry, rand should be a random number as byte array with bit length this.BitLength + 4. E.g. for curve 1 is BitLength is 160 bit, thus random data length must be 164 bit or 21 bytes. Random bytes are used in msb first order.

Exceptions

See Also