org.bouncycastle.pqc.jcajce.interfaces
Interface LMSPrivateKey
- All Superinterfaces:
- java.security.Key, LMSKey, java.security.PrivateKey, java.io.Serializable
- public interface LMSPrivateKey
- extends LMSKey, java.security.PrivateKey
Base interface for an LMS private key
Fields inherited from interface java.security.Key |
serialVersionUID |
Fields inherited from interface java.security.PrivateKey |
serialVersionUID |
Method Summary |
LMSPrivateKey |
extractKeyShard(int usageCount)
Return a key representing a shard of the key space that can be used usageCount times. |
long |
getIndex()
Return the index of the next signature. |
long |
getUsagesRemaining()
Return the number of usages left for the private key. |
Methods inherited from interface org.bouncycastle.pqc.jcajce.interfaces.LMSKey |
getLevels |
Methods inherited from interface java.security.Key |
getAlgorithm, getEncoded, getFormat |
getIndex
public long getIndex()
- Return the index of the next signature.
- Returns:
- the index number for the next signature.
getUsagesRemaining
public long getUsagesRemaining()
- Return the number of usages left for the private key.
- Returns:
- the number of times the key can be used before it is exhausted.
extractKeyShard
public LMSPrivateKey extractKeyShard(int usageCount)
- Return 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.
- Parameters:
usageCount
- the number of usages the key should have.- Returns:
- a key based on the current key that can be used usageCount times.