public class HSSPrivateKeyParameters extends LMSKeyParameters implements LMSContextBasedSigner, javax.security.auth.Destroyable
| Constructor and Description |
|---|
HSSPrivateKeyParameters(int l,
java.util.List<LMSPrivateKeyParameters> keys,
java.util.List<LMSSignature> sig,
long index,
long indexLimit) |
HSSPrivateKeyParameters(LMSPrivateKeyParameters key,
long index,
long indexLimit) |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.Object |
clone() |
void |
destroy()
Destroy this key, zeroizing the master secret of every tree in the hierarchy.
|
boolean |
equals(java.lang.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() |
long |
getIndexLimit()
Return the index one past the last this key may sign with.
|
static HSSPrivateKeyParameters |
getInstance(byte[] privEnc,
byte[] pubEnc) |
static HSSPrivateKeyParameters |
getInstance(java.lang.Object src) |
int |
getL() |
LMSParameters[] |
getLMSParameters() |
HSSPublicKeyParameters |
getPublicKey() |
long |
getUsagesRemaining() |
int |
hashCode() |
boolean |
isDestroyed() |
boolean |
isShard()
Return true if this key was split off another with
extractKeyShard(int) and so
covers a sub-range of that key's indexes. |
isPrivatepublic HSSPrivateKeyParameters(LMSPrivateKeyParameters key, long index, long indexLimit)
public HSSPrivateKeyParameters(int l,
java.util.List<LMSPrivateKeyParameters> keys,
java.util.List<LMSSignature> sig,
long index,
long indexLimit)
public static HSSPrivateKeyParameters getInstance(byte[] privEnc, byte[] pubEnc) throws java.io.IOException
java.io.IOExceptionpublic static HSSPrivateKeyParameters getInstance(java.lang.Object src) throws java.io.IOException
java.io.IOExceptionpublic int getL()
public long getIndex()
public LMSParameters[] getLMSParameters()
public boolean isShard()
extractKeyShard(int) and so
covers a sub-range of that key's indexes.public long getIndexLimit()
public long getUsagesRemaining()
getUsagesRemaining in interface LMSContextBasedSignerpublic 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 boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic byte[] getEncoded()
throws java.io.IOException
EncodablegetEncoded in interface EncodablegetEncoded in class LMSKeyParametersjava.io.IOException - if an issue arises generation the encoding.public int hashCode()
hashCode in class java.lang.Objectprotected java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedExceptionpublic LMSContext generateLMSContext()
generateLMSContext in interface LMSContextBasedSignerpublic byte[] generateSignature(LMSContext context)
generateSignature in interface LMSContextBasedSignerpublic void destroy()
The chaining signatures, the indexes and the component keys' identifiers and cached tree
nodes are retained - none of them is secret, and the public key stays derivable where the
root tree's root node is already cached. After destruction isDestroyed() returns
true and getEncoded(), generateLMSContext() and
extractKeyShard(int) throw IllegalStateException; a signature attempt
fails before its index is claimed. Shards split off this key before it was destroyed are
independent copies and are unaffected.
destroy in interface javax.security.auth.Destroyablepublic boolean isDestroyed()
isDestroyed in interface javax.security.auth.Destroyable