Table of Contents

Class LmsContext

Namespace
Org.BouncyCastle.Pqc.Crypto.Lms
Assembly
BouncyCastle.Cryptography.dll
public sealed class LmsContext : IDigest
Inheritance
LmsContext
Implements
Inherited Members

Constructors

LmsContext(LMOtsPrivateKey, LMSigParameters, IDigest, byte[], byte[][])

public LmsContext(LMOtsPrivateKey privateKey, LMSigParameters sigParams, IDigest digest, byte[] C, byte[][] path)

Parameters

privateKey LMOtsPrivateKey
sigParams LMSigParameters
digest IDigest
C byte[]
path byte[][]

LmsContext(LMOtsPublicKey, object, IDigest)

public LmsContext(LMOtsPublicKey publicKey, object signature, IDigest digest)

Parameters

publicKey LMOtsPublicKey
signature object
digest IDigest

Properties

AlgorithmName

The algorithm name.

public string AlgorithmName { get; }

Property Value

string

C

public byte[] C { get; }

Property Value

byte[]

PublicKey

public LMOtsPublicKey PublicKey { get; }

Property Value

LMOtsPublicKey

Signature

public object Signature { get; }

Property Value

object

Methods

BlockUpdate(byte[], int, int)

Update the message digest with a block of bytes.

public void BlockUpdate(byte[] input, int inOff, int len)

Parameters

input byte[]

The byte array containing the data.

inOff int

The offset into the byte array where the data starts.

len int

BlockUpdate(ReadOnlySpan<byte>)

Update the message digest with a span of bytes.

public void BlockUpdate(ReadOnlySpan<byte> input)

Parameters

input ReadOnlySpan<byte>

The span containing the data.

DoFinal(byte[], int)

Close the digest, producing the final digest value.

public int DoFinal(byte[] output, int outOff)

Parameters

output byte[]

The byte array the digest is to be copied into.

outOff int

The offset into the byte array the digest is to start at.

Returns

int

The number of bytes written.

Remarks

This call leaves the digest reset.

DoFinal(Span<byte>)

Close the digest, producing the final digest value.

public int DoFinal(Span<byte> output)

Parameters

output Span<byte>

The span the digest is to be copied into.

Returns

int

The number of bytes written.

Remarks

This call leaves the digest reset.

GetByteLength()

Return the size, in bytes, of the internal buffer used by this digest.

public int GetByteLength()

Returns

int

The size, in bytes, of the internal buffer used by this digest.

GetDigestSize()

Return the size, in bytes, of the digest produced by this message digest.

public int GetDigestSize()

Returns

int

The size, in bytes, of the digest produced by this message digest.

GetQ()

public byte[] GetQ()

Returns

byte[]

Reset()

Reset the digest back to its initial state.

public void Reset()

Update(byte)

Update the message digest with a single byte.

public void Update(byte input)

Parameters

input byte

The input byte to be entered.