org.bouncycastle.pqc.crypto.gmss
Class GMSSPrivateKeyParameters
java.lang.Object
org.bouncycastle.crypto.params.AsymmetricKeyParameter
org.bouncycastle.pqc.crypto.gmss.GMSSKeyParameters
org.bouncycastle.pqc.crypto.gmss.GMSSPrivateKeyParameters
- All Implemented Interfaces:
- CipherParameters
public class GMSSPrivateKeyParameters
- extends GMSSKeyParameters
This class provides a specification for a GMSS private key.
Constructor Summary |
GMSSPrivateKeyParameters(byte[][] currentSeed,
byte[][] nextNextSeed,
byte[][][] currentAuthPath,
byte[][][] nextAuthPath,
Treehash[][] currentTreehash,
Treehash[][] nextTreehash,
java.util.Vector[] currentStack,
java.util.Vector[] nextStack,
java.util.Vector[][] currentRetain,
java.util.Vector[][] nextRetain,
byte[][] nextRoot,
byte[][] currentRootSig,
GMSSParameters gmssParameterset,
GMSSDigestProvider digestProvider)
Generates a new GMSS private key |
GMSSPrivateKeyParameters(int[] index,
byte[][] currentSeeds,
byte[][] nextNextSeeds,
byte[][][] currentAuthPaths,
byte[][][] nextAuthPaths,
byte[][][] keep,
Treehash[][] currentTreehash,
Treehash[][] nextTreehash,
java.util.Vector[] currentStack,
java.util.Vector[] nextStack,
java.util.Vector[][] currentRetain,
java.util.Vector[][] nextRetain,
GMSSLeaf[] nextNextLeaf,
GMSSLeaf[] upperLeaf,
GMSSLeaf[] upperTreehashLeaf,
int[] minTreehash,
byte[][] nextRoot,
GMSSRootCalc[] nextNextRoot,
byte[][] currentRootSig,
GMSSRootSig[] nextRootSig,
GMSSParameters gmssParameterset,
GMSSDigestProvider digestProvider)
/** |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GMSSPrivateKeyParameters
public GMSSPrivateKeyParameters(byte[][] currentSeed,
byte[][] nextNextSeed,
byte[][][] currentAuthPath,
byte[][][] nextAuthPath,
Treehash[][] currentTreehash,
Treehash[][] nextTreehash,
java.util.Vector[] currentStack,
java.util.Vector[] nextStack,
java.util.Vector[][] currentRetain,
java.util.Vector[][] nextRetain,
byte[][] nextRoot,
byte[][] currentRootSig,
GMSSParameters gmssParameterset,
GMSSDigestProvider digestProvider)
- Generates a new GMSS private key
- Parameters:
currentSeed
- seed for the generation of private OTS keys for the
current subtreesnextNextSeed
- seed for the generation of private OTS keys for the next
subtreescurrentAuthPath
- array of current authentication pathsnextAuthPath
- array of next authentication pathscurrentTreehash
- array of current treehash instancesnextTreehash
- array of next treehash instancescurrentStack
- array of current shared stacksnextStack
- array of next shared stackscurrentRetain
- array of current retain stacksnextRetain
- array of next retain stacksnextRoot
- the roots of the next subtreecurrentRootSig
- array of signatures of the roots of the current subtreesgmssParameterset
- the GMSS Parametersetdigest
- An array of strings, containing the name of the used hash
function and the name of the corresponding provider- See Also:
GMSSKeyPairGenerator
GMSSPrivateKeyParameters
public GMSSPrivateKeyParameters(int[] index,
byte[][] currentSeeds,
byte[][] nextNextSeeds,
byte[][][] currentAuthPaths,
byte[][][] nextAuthPaths,
byte[][][] keep,
Treehash[][] currentTreehash,
Treehash[][] nextTreehash,
java.util.Vector[] currentStack,
java.util.Vector[] nextStack,
java.util.Vector[][] currentRetain,
java.util.Vector[][] nextRetain,
GMSSLeaf[] nextNextLeaf,
GMSSLeaf[] upperLeaf,
GMSSLeaf[] upperTreehashLeaf,
int[] minTreehash,
byte[][] nextRoot,
GMSSRootCalc[] nextNextRoot,
byte[][] currentRootSig,
GMSSRootSig[] nextRootSig,
GMSSParameters gmssParameterset,
GMSSDigestProvider digestProvider)
- /**
- Parameters:
index
- tree indicescurrentSeed
- seed for the generation of private OTS keys for the
current subtrees (TREE)nextNextSeed
- seed for the generation of private OTS keys for the
subtrees after next (TREE++)currentAuthPath
- array of current authentication paths (AUTHPATH)nextAuthPath
- array of next authentication paths (AUTHPATH+)keep
- keep array for the authPath algorithmcurrentTreehash
- treehash for authPath algorithm of current treenextTreehash
- treehash for authPath algorithm of next tree (TREE+)currentStack
- shared stack for authPath algorithm of current treenextStack
- shared stack for authPath algorithm of next tree (TREE+)currentRetain
- retain stack for authPath algorithm of current treenextRetain
- retain stack for authPath algorithm of next tree (TREE+)nextNextLeaf
- array of upcoming leafs of the tree after next (LEAF++) of
each layerupperLeaf
- needed for precomputation of upper nodesupperTreehashLeaf
- needed for precomputation of upper treehash nodesminTreehash
- index of next treehash instance to receive an updatenextRoot
- the roots of the next trees (ROOT+)nextNextRoot
- the roots of the tree after next (ROOT++)currentRootSig
- array of signatures of the roots of the current subtrees
(SIG)nextRootSig
- array of signatures of the roots of the next subtree
(SIG+)gmssParameterset
- the GMSS ParametersetdigestClass
- An array of strings, containing the name of the used hash
function and the name of the corresponding provider
nextKey
public void nextKey(int layer)
- This method updates the GMSS private key for the next signature
- Parameters:
layer
- the layer where the next key is processed
getIndex
public int[] getIndex()
getIndex
public int getIndex(int i)
- Returns:
- The current index of layer i
getCurrentSeeds
public byte[][] getCurrentSeeds()
getNextNextSeeds
public byte[][] getNextNextSeeds()
getCurrentAuthPaths
public byte[][][] getCurrentAuthPaths()
getNextAuthPaths
public byte[][][] getNextAuthPaths()
getCurrentTreehash
public Treehash[][] getCurrentTreehash()
getNextTreehash
public Treehash[][] getNextTreehash()
getKeep
public byte[][][] getKeep()
getCurrentStack
public java.util.Vector[] getCurrentStack()
getNextStack
public java.util.Vector[] getNextStack()
getCurrentRetain
public java.util.Vector[][] getCurrentRetain()
getNextRetain
public java.util.Vector[][] getNextRetain()
getNextNextLeaf
public GMSSLeaf[] getNextNextLeaf()
getUpperLeaf
public GMSSLeaf[] getUpperLeaf()
getUpperTreehashLeaf
public GMSSLeaf[] getUpperTreehashLeaf()
getMinTreehash
public int[] getMinTreehash()
getNextRootSig
public GMSSRootSig[] getNextRootSig()
getNextRoot
public byte[][] getNextRoot()
getNextNextRoot
public GMSSRootCalc[] getNextNextRoot()
getCurrentRootSig
public byte[][] getCurrentRootSig()
getSubtreeRootSig
public byte[] getSubtreeRootSig(int i)
- Returns:
- The one-time signature of the root of the current subtree
getName
public GMSSDigestProvider getName()
getNumLeafs
public int getNumLeafs(int i)
- Returns:
- The number of leafs of each tree of layer i
getNumLeafs
public int[] getNumLeafs()
- Returns:
- The array of number of leafs of a tree of each layer