This version is based on the 3rd submission with deference to the updated reference implementation on github as at November 9th 2021. This version includes the changes for the countermeasure for the long-message second preimage attack - see "https://github.com/sphincs/sphincsplus/commit/61cd2695c6f984b4f4d6ed675378ed9a486cbede" for further details.
| Modifier and Type | Field and Description |
|---|---|
| private static final byte[] | |
| private byte[] | |
| private SLHDSAPrivateKeyParameters | |
| private SLHDSAPublicKeyParameters | |
| private SecureRandom |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public byte[] | generateSignature(byte[]
the message to be signed. message)Implements org. sign the passed in message (usually the output of a hash function). |
| public void | init(boolean
true if we are generating a signature, false
otherwise. forSigning, CipherParameters key parameters for signature generation. param)Implements org. initialise the signer for signature generation or signature verification. |
| protected byte[] | |
| private static byte[] | internalGenerateSignature(SLHDSAPrivateKeyParameters privKey, byte[] msgPrefix, byte[] msg, byte[] optRand)
|
| protected boolean | |
| private static boolean | internalVerifySignature(SLHDSAPublicKeyParameters pubKey, byte[] msgPrefix, byte[] msg, byte[] signature)
|
| public boolean | verifySignature(byte[]
the message that was supposed to have been signed. message, byte[] the signature of the message signature)Implements org. verify the message message against the signature value. |
| DEFAULT_PREFIX | back to summary |
|---|---|
| private static final byte[] DEFAULT_PREFIX | |
| msgPrefix | back to summary |
|---|---|
| private byte[] msgPrefix | |
| privKey | back to summary |
|---|---|
| private SLHDSAPrivateKeyParameters privKey | |
| pubKey | back to summary |
|---|---|
| private SLHDSAPublicKeyParameters pubKey | |
| random | back to summary |
|---|---|
| private SecureRandom random | |
| SLHDSASigner | back to summary |
|---|---|
| public SLHDSASigner() Base constructor. | |
| generateSignature | back to summary |
|---|---|
| public byte[] generateSignature(byte[] message) Implements org. Doc from org. sign the passed in message (usually the output of a hash function).
| |
| init | back to summary |
|---|---|
| public void init(boolean forSigning, CipherParameters param) Implements org. Doc from org. initialise the signer for signature generation or signature verification.
| |
| internalGenerateSignature | back to summary |
|---|---|
| protected byte[] internalGenerateSignature(byte[] message, byte[] optRand) | |
| internalGenerateSignature | back to summary |
|---|---|
| private static byte[] internalGenerateSignature(SLHDSAPrivateKeyParameters privKey, byte[] msgPrefix, byte[] msg, byte[] optRand) | |
| internalVerifySignature | back to summary |
|---|---|
| protected boolean internalVerifySignature(byte[] message, byte[] signature) | |
| internalVerifySignature | back to summary |
|---|---|
| private static boolean internalVerifySignature(SLHDSAPublicKeyParameters pubKey, byte[] msgPrefix, byte[] msg, byte[] signature) | |
| verifySignature | back to summary |
|---|---|
| public boolean verifySignature(byte[] message, byte[] signature) Implements org. Doc from org. verify the message message against the signature value.
| |