Class BCLMSPrivateKey
java.lang.Object
org.bouncycastle.pqc.jcajce.provider.lms.BCLMSPrivateKey
- All Implemented Interfaces:
Serializable, AsymmetricKey, DEREncodablePREVIEW, Key, PrivateKey, Destroyable, LMSKey, LMSPrivateKey, LMSKey, LMSPrivateKey
Deprecated.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionBCLMSPrivateKey(PrivateKeyInfo keyInfo) Deprecated.BCLMSPrivateKey(LMSKeyParameters keyParams) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()Deprecated.Destroy this key, zeroizing the secret key material it holds.booleanDeprecated.extractKeyShard(int usageCount) Deprecated.Return a key representing a shard of the key space that can be used usageCount times.Deprecated.byte[]Deprecated.Deprecated.longgetIndex()Deprecated.Return the index of the next signature.intDeprecated.Return the number of levels (L) associated with the key.longDeprecated.Return the number of usages left for the private key.inthashCode()Deprecated.booleanDeprecated.Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface AsymmetricKey
getParams
-
Constructor Details
-
BCLMSPrivateKey
Deprecated. -
BCLMSPrivateKey
-
-
Method Details
-
getIndex
public long getIndex()Deprecated.Description copied from interface:LMSPrivateKeyReturn the index of the next signature.- Specified by:
getIndexin interfaceLMSPrivateKey- Returns:
- the index number for the next signature.
-
getUsagesRemaining
public long getUsagesRemaining()Deprecated.Description copied from interface:LMSPrivateKeyReturn the number of usages left for the private key.- Specified by:
getUsagesRemainingin interfaceLMSPrivateKey- Returns:
- the number of times the key can be used before it is exhausted.
-
extractKeyShard
Deprecated.Description copied from interface:LMSPrivateKeyReturn a key representing a shard of the key space that can be used usageCount times.Note: this will use the range [index...index + usageCount) for the current key.
- Specified by:
extractKeyShardin interfaceLMSPrivateKey- Specified by:
extractKeyShardin interfaceLMSPrivateKey- Parameters:
usageCount- the number of usages the key should have.- Returns:
- a key based on the current key that can be used usageCount times.
-
getAlgorithm
-
getFormat
-
getEncoded
-
equals
-
hashCode
-
getLevels
-
destroy
public void destroy()Deprecated.Destroy this key, zeroizing the secret key material it holds.The master secret of every tree in the hierarchy is zeroized; the key identifiers, indexes, chaining signatures and cached tree nodes are retained, so
getIndex(),getUsagesRemaining()andgetLevels()keep working. After destructionisDestroyed()returns true,getEncoded()andextractKeyShard(int)throwIllegalStateException, the key can no longer be serialized, and a Signature refuses it at initSign. Shards extracted before destruction are independent copies and are unaffected. As the underlyingHSSPrivateKeyParametersobject is destroyed, keys sharing it are invalidated too.- Specified by:
destroyin interfaceDestroyable
-
isDestroyed
-
BCLMSPrivateKeyinstead.