Package org.bouncycastle.pqc.crypto.lms
Class HSSPrivateKeyParameters
java.lang.Object
org.bouncycastle.crypto.params.AsymmetricKeyParameter
org.bouncycastle.pqc.crypto.lms.LMSKeyParameters
org.bouncycastle.pqc.crypto.lms.HSSPrivateKeyParameters
- All Implemented Interfaces:
CipherParameters
,LMSContextBasedSigner
,Encodable
-
Constructor Summary
ConstructorDescriptionHSSPrivateKeyParameters
(int l, List<LMSPrivateKeyParameters> keys, List<org.bouncycastle.pqc.crypto.lms.LMSSignature> sig, long index, long indexLimit) -
Method Summary
Modifier and TypeMethodDescriptionprotected Object
clone()
boolean
extractKeyShard
(int usageCount) Return a key that can be used usageCount times.byte[]
generateSignature
(LMSContext context) byte[]
Return a byte array representing the implementing object.long
getIndex()
static HSSPrivateKeyParameters
getInstance
(byte[] privEnc, byte[] pubEnc) static HSSPrivateKeyParameters
getInstance
(Object src) int
getL()
long
int
hashCode()
protected void
updateHierarchy
(LMSPrivateKeyParameters[] newKeys, org.bouncycastle.pqc.crypto.lms.LMSSignature[] newSig) Methods inherited from class org.bouncycastle.crypto.params.AsymmetricKeyParameter
isPrivate
-
Constructor Details
-
HSSPrivateKeyParameters
public HSSPrivateKeyParameters(int l, List<LMSPrivateKeyParameters> keys, List<org.bouncycastle.pqc.crypto.lms.LMSSignature> sig, long index, long indexLimit)
-
-
Method Details
-
getInstance
- Throws:
IOException
-
getInstance
- Throws:
IOException
-
getL
public int getL() -
getIndex
public long getIndex() -
getLMSParameters
-
updateHierarchy
protected void updateHierarchy(LMSPrivateKeyParameters[] newKeys, org.bouncycastle.pqc.crypto.lms.LMSSignature[] newSig) -
getUsagesRemaining
public long getUsagesRemaining()- Specified by:
getUsagesRemaining
in interfaceLMSContextBasedSigner
-
extractKeyShard
Return a key that can be used usageCount times.Note: this will use the range [index...index + usageCount) for the current key.
- Parameters:
usageCount
- the number of usages the key should have.- Returns:
- a key based on the current key that can be used usageCount times.
-
getPublicKey
-
equals
-
getEncoded
Description copied from interface:Encodable
Return a byte array representing the implementing object.- Specified by:
getEncoded
in interfaceEncodable
- Specified by:
getEncoded
in classLMSKeyParameters
- Returns:
- a byte array representing the encoding.
- Throws:
IOException
- if an issue arises generation the encoding.
-
hashCode
public int hashCode() -
clone
- Overrides:
clone
in classObject
- Throws:
CloneNotSupportedException
-
generateLMSContext
- Specified by:
generateLMSContext
in interfaceLMSContextBasedSigner
-
generateSignature
- Specified by:
generateSignature
in interfaceLMSContextBasedSigner
-