Top Description Fields Constructors Methods
org.bouncycastle.pqc.legacy.crypto.gmss.util

public Class WinternitzOTSVerify

extends Object
Class Inheritance
Imports
org.bouncycastle.crypto.Digest

This class implements signature verification of the Winternitz one-time signature scheme (OTSS), described in C.Dods, N.P. Smart, and M. Stam, "Hash Based Digital Signature Schemes", LNCS 3796, pages 96–115, 2005. The class is used by the GMSS classes.

Field Summary

Modifier and TypeField and Description
private int
private Digest
private int
w

The Winternitz parameter

Constructor Summary

AccessConstructor and Description
public
WinternitzOTSVerify(Digest
the name of the hash function used by the OTS and the provider name of the hash function
digest
,
int
the Winternitz parameter
w
)

The constructor

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

The least integer greater or equal to the logarithm to the base 256 of intValue
getLog
(int
an integer
intValue
)

This method returns the least integer that is greater or equal to the logarithm to the base 2 of an integer intValue.

public int

Returns:

The length of the one-time signature
getSignatureLength
()

private void
hashSignatureBlock(byte[] sig, int sigOff, int rounds, byte[] buf, int bufOff)

public byte[]

Returns:

The public OTS key
Verify
(byte[]
the message
message
,
byte[]
the one-time signature
signature
)

This method computes the public OTS key from the one-time signature of a message.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

mdsizeback to summary
private int mdsize
messDigestOTSback to summary
private Digest messDigestOTS
wback to summary
private int w

The Winternitz parameter

Constructor Detail

WinternitzOTSVerifyback to summary
public WinternitzOTSVerify(Digest digest, int w)

The constructor

Parameters
digest:Digest

the name of the hash function used by the OTS and the provider name of the hash function

w:int

the Winternitz parameter

Method Detail

getLogback to summary
public int getLog(int intValue)

This method returns the least integer that is greater or equal to the logarithm to the base 2 of an integer intValue.

Parameters
intValue:int

an integer

Returns:int

The least integer greater or equal to the logarithm to the base 256 of intValue

getSignatureLengthback to summary
public int getSignatureLength()
Returns:int

The length of the one-time signature

hashSignatureBlockback to summary
private void hashSignatureBlock(byte[] sig, int sigOff, int rounds, byte[] buf, int bufOff)
Verifyback to summary
public byte[] Verify(byte[] message, byte[] signature)

This method computes the public OTS key from the one-time signature of a message. This is *NOT* a complete OTS signature verification, but it suffices for usage with CMSS.

Parameters
message:byte[]

the message

signature:byte[]

the one-time signature

Returns:byte[]

The public OTS key