public class HSSPrivateKeyParameters extends LMSKeyParameters implements LMSContextBasedSigner
Constructor and Description |
---|
HSSPrivateKeyParameters(int l,
List<LMSPrivateKeyParameters> keys,
List<org.bouncycastle.pqc.crypto.lms.LMSSignature> sig,
long index,
long indexLimit) |
Modifier and Type | Method and Description |
---|---|
protected Object |
clone() |
boolean |
equals(Object o) |
HSSPrivateKeyParameters |
extractKeyShard(int usageCount)
Return a key that can be used usageCount times.
|
LMSContext |
generateLMSContext() |
byte[] |
generateSignature(LMSContext context) |
byte[] |
getEncoded()
Return a byte array representing the implementing object.
|
long |
getIndex() |
static HSSPrivateKeyParameters |
getInstance(byte[] privEnc,
byte[] pubEnc) |
static HSSPrivateKeyParameters |
getInstance(Object src) |
int |
getL() |
LMSParameters[] |
getLMSParameters() |
HSSPublicKeyParameters |
getPublicKey() |
long |
getUsagesRemaining() |
int |
hashCode() |
protected void |
updateHierarchy(LMSPrivateKeyParameters[] newKeys,
org.bouncycastle.pqc.crypto.lms.LMSSignature[] newSig) |
isPrivate
public HSSPrivateKeyParameters(int l, List<LMSPrivateKeyParameters> keys, List<org.bouncycastle.pqc.crypto.lms.LMSSignature> sig, long index, long indexLimit)
public static HSSPrivateKeyParameters getInstance(byte[] privEnc, byte[] pubEnc) throws IOException
IOException
public static HSSPrivateKeyParameters getInstance(Object src) throws IOException
IOException
public int getL()
public long getIndex()
public LMSParameters[] getLMSParameters()
protected void updateHierarchy(LMSPrivateKeyParameters[] newKeys, org.bouncycastle.pqc.crypto.lms.LMSSignature[] newSig)
public long getUsagesRemaining()
getUsagesRemaining
in interface LMSContextBasedSigner
public HSSPrivateKeyParameters extractKeyShard(int usageCount)
Note: this will use the range [index...index + usageCount) for the current key.
usageCount
- the number of usages the key should have.public HSSPublicKeyParameters getPublicKey()
public byte[] getEncoded() throws IOException
Encodable
getEncoded
in interface Encodable
getEncoded
in class LMSKeyParameters
IOException
- if an issue arises generation the encoding.protected Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
public LMSContext generateLMSContext()
generateLMSContext
in interface LMSContextBasedSigner
public byte[] generateSignature(LMSContext context)
generateSignature
in interface LMSContextBasedSigner
Copyright © 2021 BouncyCastle.org. All rights reserved.