de.flexiprovider.pqc.tss
Class TSSVectorSerial

java.lang.Object
  |
  +--de.flexiprovider.pqc.tss.TSSVectorSerial

public class TSSVectorSerial
extends java.lang.Object

Parses a Vector of GFPPolynomial to a byte Array and vice versa This Class is primarily used for LMOTS and TSS, an equivalent functionality can be accomplished with use of ASN.1, but usage of this class should be slightly more efficient for this specific purpose. format is as follows: For Reference, the f polynomial, the p parameter and the actual polynomial of the first GFPPolynomial are always inserted first, those parameters are only included afterwards individually if they differ from the first. Each GFPPolynomial is prefixed by an identifier to note the information included. Only the last 3 bits of the identifier are used, the least significant bit denotes usage of the Polynomial itself, this bit is not set only if the Polynomial is identical to the first Polynomial, which should rarely happen. the second least significant bit denotes the usage of the f polynomial and the third bit denotes usage for the parameter p. Both of these parameters are usually the same for all GFPPolynomial, so these bits are usually not set. The actual Polynomials are transformed by prefixing the length of the polynomial in 2 bytes and then all values of the polynomial with a static length intdimension, set in this class (default value 8) for each value. The Parameter p is transformed to a single value with the default length of bytes, without any prefix.


Constructor Summary
TSSVectorSerial(byte[] b)
          Constructor for a byte Array (probably useless)
TSSVectorSerial(java.util.Vector v)
          Constructor for a Vector
 
Method Summary
 byte[] getArrayRepresentation()
           
 java.util.Vector getVectorRepresentation()
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TSSVectorSerial

public TSSVectorSerial(byte[] b)
Constructor for a byte Array (probably useless)
Parameters:
b - a byte Array containing Vector information corresponding to format in class description
Throws:
java.lang.Exception -  

TSSVectorSerial

public TSSVectorSerial(java.util.Vector v)
Constructor for a Vector
Parameters:
v - a Vector containing GFPPolynomial
Method Detail

getArrayRepresentation

public byte[] getArrayRepresentation()

getVectorRepresentation

public java.util.Vector getVectorRepresentation()