de.flexiprovider.pqc.hbc.cmss
Class BDSAuthPath

java.lang.Object
  |
  +--de.flexiprovider.pqc.hbc.cmss.BDSAuthPath

public class BDSAuthPath
extends java.lang.Object


Field Summary
protected  MessageDigest md
           
protected  OTS ots
           
protected  PRNG prng
           
 
Constructor Summary
BDSAuthPath(codec.asn1.ASN1Sequence authData)
           
BDSAuthPath(int H, int K)
           
 
Method Summary
 void copy(BDSAuthPath otherAuth)
           
 boolean equals(BDSAuthPath otherAuth)
           
 codec.asn1.ASN1Sequence getASN1()
          Return the data to encode the authentication path in SubjectPublicKeyInfo structure.
 byte[][] getAuthPath()
           
 byte[] initializationFinalize()
           
 void initializationSetup()
           
 void initializationUpdate(int i, byte[] initialSeed)
           
 byte[] initialize(byte[] initialSeed)
           
 void setLeftLeaf(byte[] leftLeaf)
           
 void setup(MessageDigest md, OTS ots, PRNG prng, NodeCalc pc)
           
 java.lang.String toString()
           
 byte[][] update(int s)
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

md

protected MessageDigest md

ots

protected OTS ots

prng

protected PRNG prng
Constructor Detail

BDSAuthPath

public BDSAuthPath(codec.asn1.ASN1Sequence authData)

BDSAuthPath

public BDSAuthPath(int H,
                   int K)
Method Detail

setup

public void setup(MessageDigest md,
                  OTS ots,
                  PRNG prng,
                  NodeCalc pc)

initialize

public byte[] initialize(byte[] initialSeed)

initializationSetup

public void initializationSetup()

initializationUpdate

public void initializationUpdate(int i,
                                 byte[] initialSeed)

initializationFinalize

public byte[] initializationFinalize()

update

public byte[][] update(int s)

setLeftLeaf

public void setLeftLeaf(byte[] leftLeaf)

getAuthPath

public byte[][] getAuthPath()

copy

public void copy(BDSAuthPath otherAuth)

equals

public boolean equals(BDSAuthPath otherAuth)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
a human readable form of the authentication path

getASN1

public codec.asn1.ASN1Sequence getASN1()
Return the data to encode the authentication path in SubjectPublicKeyInfo structure.

The ASN.1 definition of BDSAuthPath

    BDSAuthPath ::= SEQUENCE {
      H                             INTEGER                     -- height of tree
      K                             INTEGER                     -- nodes close to root to store    
      auth                          SEQUENCE OF OCTET STRING    -- current authentication path
      seed                          SEQUENCE OF OCTET STRING    -- current seeds to compute upcoming right nodes
      stack                         STACK                       -- stack
      treehash                      SEQUENCE OF TREEHASH        -- treehash instances
      retain                        SEQUENCE OF STACK           -- right nodes close to the root
      keep                          SEQUENCE OF OCTET STRING    -- nodes to efficiently compute left nodes
      leftLeaf                      OCTET STRING                -- stored left leaf to efficiently compute left nodes
      tmpNode                       OCTET STRING                -- temp node to construct tree
      tmpStack                      SEQUENCE OF OCTET STRING    -- temp stack to construct tree
      params                        SEQUENCE OF INTEGER         -- to decide which nodes to store during initialization
    }
      
    TREEHASH ::= SEQUENCE {
      node                          NODE                        -- node stored by this instance
      seed                          OCTET STRING                -- seed to compute next leaf
      currentHeight                 INTEGER                     -- height of lowest tailnode stored by this instance
      targetHeight                  INTEGER                     -- height of authentication node computed by this instance
      nodesOnStack                  INTEGER                     -- number of nodes stored on stack by this instance
    }
    
    STACK ::= SEQUENCE {
      tailnodes                     SEQUENCE OF NODE            -- tailnodes
      index                         INTEGER                     -- index of top node on stack
    }
    
    NODE ::= SEQUENCE {
      value                         OCTET STRING                -- node value
      height                        INTEGER                     -- height of node in tree
    }
    
 
Returns:
the keyData to encode in the SubjectPublicKeyInfo structure