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
ConstructorsConstructorDescriptionHSSPrivateKeyParameters(int l, List<LMSPrivateKeyParameters> keys, List<org.bouncycastle.pqc.crypto.lms.LMSSignature> sig, long index, long indexLimit) HSSPrivateKeyParameters(LMSPrivateKeyParameters key, long index, long indexLimit) -
Method Summary
Modifier and TypeMethodDescriptionprotected Objectclone()booleanextractKeyShard(int usageCount) Return a key that can be used usageCount times.byte[]generateSignature(LMSContext context) byte[]Return a byte array representing the implementing object.longgetIndex()static HSSPrivateKeyParametersgetInstance(byte[] privEnc, byte[] pubEnc) static HSSPrivateKeyParametersgetInstance(Object src) intgetL()longinthashCode()protected voidupdateHierarchy(LMSPrivateKeyParameters[] newKeys, org.bouncycastle.pqc.crypto.lms.LMSSignature[] newSig) Methods inherited from class org.bouncycastle.crypto.params.AsymmetricKeyParameter
isPrivate
-
Constructor Details
-
HSSPrivateKeyParameters
-
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:
getUsagesRemainingin 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:EncodableReturn a byte array representing the implementing object.- Specified by:
getEncodedin interfaceEncodable- Specified by:
getEncodedin classLMSKeyParameters- Returns:
- a byte array representing the encoding.
- Throws:
IOException- if an issue arises generation the encoding.
-
hashCode
public int hashCode() -
clone
- Overrides:
clonein classObject- Throws:
CloneNotSupportedException
-
generateLMSContext
- Specified by:
generateLMSContextin interfaceLMSContextBasedSigner
-
generateSignature
- Specified by:
generateSignaturein interfaceLMSContextBasedSigner
-