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 SPHINCSPlusPrivateKeyParameters | |
| private SPHINCSPlusPublicKeyParameters | |
| 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. |
| 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. |
| privKey | back to summary |
|---|---|
| private SPHINCSPlusPrivateKeyParameters privKey | |
| pubKey | back to summary |
|---|---|
| private SPHINCSPlusPublicKeyParameters pubKey | |
| random | back to summary |
|---|---|
| private SecureRandom random | |
| SPHINCSPlusSigner | back to summary |
|---|---|
| public SPHINCSPlusSigner() 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.
| |
| verifySignature | back to summary |
|---|---|
| public boolean verifySignature(byte[] message, byte[] signature) Implements org. Doc from org. verify the message message against the signature value.
| |