Table of Contents

Interface IDsaEncoding

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

An interface for different encoding formats for DSA signatures.

public interface IDsaEncoding

Methods

Decode(BigInteger, byte[])

Decode the (r, s) pair of a DSA signature.

BigInteger[] Decode(BigInteger n, byte[] encoding)

Parameters

n BigInteger

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

encoding byte[]

An encoding of the (r, s) pair of a DSA signature.

Returns

BigInteger[]

The (r, s) of a DSA signature, stored in an array of exactly two elements, r followed by s.

Encode(BigInteger, BigInteger, BigInteger)

Encode the (r, s) pair of a DSA signature.

byte[] Encode(BigInteger n, BigInteger r, BigInteger s)

Parameters

n BigInteger

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

r BigInteger

The r value of a DSA signature.

s BigInteger

The s value of a DSA signature.

Returns

byte[]

An encoding of the DSA signature given by the provided (r, s) pair.

Encode(BigInteger, BigInteger, BigInteger, Span<byte>)

int Encode(BigInteger n, BigInteger r, BigInteger s, Span<byte> output)

Parameters

n BigInteger
r BigInteger
s BigInteger
output Span<byte>

Returns

int

GetMaxEncodingSize(BigInteger)

int GetMaxEncodingSize(BigInteger n)

Parameters

n BigInteger

Returns

int