public class SettingsSLHDSAAlgorithmParameterSpec extends Object implements AlgorithmParameterSpec
Use useRandomizedSigning(boolean)
to use either randomized or deterministic signing.
Use setContext(byte[])
to set the context for the sign/verify operation.
Signature slhdsa = Signature.getInstance("SLHDSA", IaikPq.getInstance()); slhdsa.setParameter(new SettingsSLHDSAAlgorithmParameterSpec()); slhdsa.initSign(...);
Constructor and Description |
---|
SettingsSLHDSAAlgorithmParameterSpec()
Creates a default SettingsSLHDSAAlgorithmParameterspec.
|
SettingsSLHDSAAlgorithmParameterSpec(boolean randomizedSigning)
Creates an SettingsSLHDSAAlgorithmParameterspec specifying if the signature is generated deterministicly or with additional randomness.
|
SettingsSLHDSAAlgorithmParameterSpec(byte[] context)
Creates an SettingsSLHDSAAlgorithmParameterspec using the pre-hashing context.
|
SettingsSLHDSAAlgorithmParameterSpec(byte[] context,
boolean randomizedSigning)
Creates an SettingsSLHDSAAlgorithmParameterspec using the pre-hashing context and specifying if the signature is generated deterministicly or with additional randomness.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
getContext()
Getter for the currently set context.
|
boolean |
isRandomizedSigning()
Getter for current signing mode.
|
void |
setContext(byte[] ctx)
Sets the context to be used while signing.
|
void |
useRandomizedSigning(boolean randomizedSigning)
Determines if the signature should be randomized or deterministic.
|
public SettingsSLHDSAAlgorithmParameterSpec()
public SettingsSLHDSAAlgorithmParameterSpec(byte[] context) throws PQException
context
- pre-hashing contextPQException
- for an invalid contextpublic SettingsSLHDSAAlgorithmParameterSpec(boolean randomizedSigning)
randomizedSigning
- randomized or deterministic signingpublic SettingsSLHDSAAlgorithmParameterSpec(byte[] context, boolean randomizedSigning) throws PQException
context
- pre-hashing contextrandomizedSigning
- randomized or deterministic signingPQException
- for an invalid contextpublic void setContext(byte[] ctx) throws PQException
ctx
- context with a maximum of 255 bytesPQException
public byte[] getContext()
public void useRandomizedSigning(boolean randomizedSigning)
randomizedSigning
- randomized or deterministic signingpublic boolean isRandomizedSigning()
Copyright © 2020–2025 Stiftung SIC. All rights reserved.