Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package org.bouncycastle.pqc.crypto.mceliece;
  
  
 
     extends McElieceCCA2KeyParameters
 {
 
     // the OID of the algorithm
     private String oid;
 
     // the length of the code
     private int n;
 
     // the dimension of the code
     private int k;
 
     // the finte field GF(2^m)
     private GF2mField field;
 
     // the irreducible Goppa polynomial
     private PolynomialGF2mSmallM goppaPoly;
 
     // the permutation
     private Permutation p;
 
     // the canonical check matrix
     private GF2Matrix h;
 
     // the matrix used to compute square roots in (GF(2^m))^t
     private PolynomialGF2mSmallM[] qInv;

    
Constructor.

Parameters:
n the length of the code
k the dimension of the code
field the finite field GF(2m)
gp the irreducible Goppa polynomial
p the permutation
h the canonical check matrix
qInv the matrix used to compute square roots in (GF(2^m))^t
params McElieceCCA2Parameters
 
     public McElieceCCA2PrivateKeyParameters(String oidint nint kGF2mField field,
                                             PolynomialGF2mSmallM gpPermutation pGF2Matrix h,
                                             PolynomialGF2mSmallM[] qInvMcElieceCCA2Parameters params)
     {
         super(trueparams);
         this. = oid;
         this. = n;
         this. = k;
         this. = field;
         this. = gp;
         this. = p;
         this. = h;
         this. = qInv;
     }

    
Constructor used by the McElieceKeyFactory.

Parameters:
n the length of the code
k the dimension of the code
encFieldPoly the encoded field polynomial defining the finite field GF(2m)
encGoppaPoly the encoded irreducible Goppa polynomial
encP the encoded permutation
encH the encoded canonical check matrix
encQInv the encoded matrix used to compute square roots in (GF(2^m))^t
params McElieceCCA2Parameters
 
     public McElieceCCA2PrivateKeyParameters(String oidint nint kbyte[] encFieldPoly,
                                             byte[] encGoppaPolybyte[] encPbyte[] encHbyte[][] encQInvMcElieceCCA2Parameters params)
     {
         super(trueparams);
         this. = oid;
         this. = n;
         this. = k;
          = new GF2mField(encFieldPoly);
          = new PolynomialGF2mSmallM(encGoppaPoly);
          = new Permutation(encP);
          = new GF2Matrix(encH);
          = new PolynomialGF2mSmallM[encQInv.length];
         for (int i = 0; i < encQInv.lengthi++)
         {
             [i] = new PolynomialGF2mSmallM(encQInv[i]);
         }
    }

    

Returns:
the length of the code
    public int getN()
    {
        return ;
    }

    

Returns:
the dimension of the code
    public int getK()
    {
        return ;
    }

    

Returns:
the degree of the Goppa polynomial (error correcting capability)
    public int getT()
    {
        return .getDegree();
    }

    

Returns:
the finite field
    public GF2mField getField()
    {
        return ;
    }

    

Returns:
the irreducible Goppa polynomial
    {
        return ;
    }

    

Returns:
the permutation P
    public Permutation getP()
    {
        return ;
    }

    

Returns:
the canonical check matrix H
    public GF2Matrix getH()
    {
        return ;
    }

    

Returns:
the matrix used to compute square roots in (GF(2^m))^t
    public PolynomialGF2mSmallM[] getQInv()
    {
        return ;
    }
    public String getOIDString()
    {
        return ;
    }
New to GrepCode? Check out our FAQ X