de.flexiprovider.pqc.hbc.cmss
Class CRNodeCalc

java.lang.Object
  |
  +--de.flexiprovider.pqc.hbc.cmss.CRNodeCalc
All Implemented Interfaces:
NodeCalc

public class CRNodeCalc
extends java.lang.Object
implements NodeCalc

This class provides an implementation of the NodeCalc interface, that calculates the nodes in the classical way without use of SPR.


Constructor Summary
CRNodeCalc(MessageDigest md)
          Constructs a new CRNodeCalc object, that uses the given MessageDigest to calculate the nodes.
 
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
 

Constructor Detail

CRNodeCalc

public CRNodeCalc(MessageDigest md)
Constructs a new CRNodeCalc object, that uses the given MessageDigest to calculate the nodes.
Parameters:
md - the MessageDigest to use
Method Detail

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 child
rightNode - the right child
height - 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