de.flexiprovider.pqc.hbc.cmss
Class SPRNodeCalc
java.lang.Object
|
+--de.flexiprovider.pqc.hbc.cmss.SPRNodeCalc
- All Implemented Interfaces:
- NodeCalc
- public class SPRNodeCalc
- extends java.lang.Object
- implements NodeCalc
This class provides an implementation of the NodeCalc interface,
which calculates nodes in a way, that the use of SPR Hash Functions is
secure.
|
Method Summary |
byte[] |
computeParent(byte[] leftNode,
byte[] rightNode,
int height)
Calculates the parent node of two children. |
byte[] |
getLeaf(byte[] vkey)
Calculates the leaf of a tree from the verification key. |
| Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SPRNodeCalc
public SPRNodeCalc(MessageDigest md,
byte[][][] masks,
int otsMdSize)
- Constructs a new
SPRNodeCalc object, that uses the given
MessageDigest and masks to calculate the nodes.
The size of the MessageDigest, that the OTS uses, is necessary
to calculate the leafs properly.
- Parameters:
md - masks - otsMdSize -
computeParent
public byte[] computeParent(byte[] leftNode,
byte[] rightNode,
int height)
- Description copied from interface:
NodeCalc
- Calculates the parent node of two children.
- Specified by:
computeParent in interface NodeCalc
- Following copied from interface:
de.flexiprovider.pqc.hbc.cmss.NodeCalc
- Parameters:
leftNode - the left childrightNode - the right childheight - the height of the children- Returns:
- the parent node
getLeaf
public byte[] getLeaf(byte[] vkey)
- Description copied from interface:
NodeCalc
- Calculates the leaf of a tree from the verification key.
- Specified by:
getLeaf in interface NodeCalc
- Following copied from interface:
de.flexiprovider.pqc.hbc.cmss.NodeCalc
- Parameters:
vkey - the verification key to calculate the leaf from.- Returns:
- the leaf