Table of Contents

Interface IDsa

Namespace
Org.BouncyCastle.Crypto
Assembly
BouncyCastle.Cryptography.dll

Interface for classes implementing the Digital Signature Algorithm

public interface IDsa

Properties

AlgorithmName

The algorithm name.

string AlgorithmName { get; }

Property Value

string

Order

The order of the group that the r, s values in signatures belong to.

BigInteger Order { get; }

Property Value

BigInteger

Methods

GenerateSignature(byte[])

Sign the passed in message (usually the output of a hash function).

BigInteger[] GenerateSignature(byte[] message)

Parameters

message byte[]

the message to be signed.

Returns

BigInteger[]

two big integers representing the r and s values respectively.

Init(bool, ICipherParameters)

Initialise the signer for signature generation or signature verification.

void Init(bool forSigning, ICipherParameters parameters)

Parameters

forSigning bool

true if we are generating a signature, false otherwise.

parameters ICipherParameters

key parameters for signature generation.

VerifySignature(byte[], BigInteger, BigInteger)

Verify the message message against the signature values r and s.

bool VerifySignature(byte[] message, BigInteger r, BigInteger s)

Parameters

message byte[]

the message that was supposed to have been signed.

r BigInteger

the r signature value.

s BigInteger

the s signature value.

Returns

bool