Table of Contents

Class DsaSigner

Namespace
Org.BouncyCastle.Crypto.Signers
Assembly
BouncyCastle.Cryptography.dll
public class DsaSigner : IDsa
Inheritance
DsaSigner
Implements
Inherited Members

Constructors

DsaSigner()

public DsaSigner()

DsaSigner(IDsaKCalculator)

public DsaSigner(IDsaKCalculator kCalculator)

Parameters

kCalculator IDsaKCalculator

Fields

kCalculator

protected readonly IDsaKCalculator kCalculator

Field Value

IDsaKCalculator

key

protected DsaKeyParameters key

Field Value

DsaKeyParameters

random

protected SecureRandom random

Field Value

SecureRandom

Properties

AlgorithmName

The algorithm name.

public virtual string AlgorithmName { get; }

Property Value

string

Order

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

public virtual BigInteger Order { get; }

Property Value

BigInteger

Methods

CalculateE(BigInteger, byte[])

protected virtual BigInteger CalculateE(BigInteger n, byte[] message)

Parameters

n BigInteger
message byte[]

Returns

BigInteger

GenerateSignature(byte[])

public virtual BigInteger[] GenerateSignature(byte[] message)

Parameters

message byte[]

Returns

BigInteger[]

Init(bool, ICipherParameters)

Initialise the signer for signature generation or signature verification.

public virtual 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.

InitSecureRandom(bool, SecureRandom)

protected virtual SecureRandom InitSecureRandom(bool needed, SecureRandom provided)

Parameters

needed bool
provided SecureRandom

Returns

SecureRandom

VerifySignature(byte[], BigInteger, BigInteger)

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

Parameters

message byte[]
r BigInteger
s BigInteger

Returns

bool