|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--de.flexiprovider.common.math.polynomials.ProductFormConvolutionPolynomial
This class represents product form polynomials in Z(X)/(X^N-1), i.e. polynomials of the form f1*f2+f3, where f1, f2, and f3 are sparse binary polynomials.
The fields have package visibility so that they can be accessed by
ModQConvolutionPolynomial.
SparseBinaryConvolutionPolynomial| Field Summary | |
(package private) SparseBinaryConvolutionPolynomial |
f1
The three sparse binary polynomials |
(package private) SparseBinaryConvolutionPolynomial |
f2
The three sparse binary polynomials |
(package private) SparseBinaryConvolutionPolynomial |
f3
The three sparse binary polynomials |
(package private) int |
N
The degree of the reduction polynomial |
| Constructor Summary | |
ProductFormConvolutionPolynomial(int N,
int d1,
int d2,
int d3,
SecureRandom sr)
Construct a random product form polynomial. |
|
ProductFormConvolutionPolynomial(ProductFormConvolutionPolynomial other)
Copy constructor. |
|
ProductFormConvolutionPolynomial(SparseBinaryConvolutionPolynomial f1,
SparseBinaryConvolutionPolynomial f2,
SparseBinaryConvolutionPolynomial f3)
Construct a product form polynomial out of the three given sparse binary polynomials. |
|
| Method Summary | |
boolean |
equals(java.lang.Object other)
Compare this polynomial with the given object. |
int |
hashCode()
|
static ProductFormConvolutionPolynomial |
OS2REP(int N,
int q,
int d1,
int d2,
int d3,
byte[] encoded)
Decode a byte array into a product form polynomial. |
byte[] |
RE2OSP(int N)
Encode this polynomial as a byte array. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|
| Field Detail |
int N
SparseBinaryConvolutionPolynomial f1
SparseBinaryConvolutionPolynomial f2
SparseBinaryConvolutionPolynomial f3
| Constructor Detail |
public ProductFormConvolutionPolynomial(int N,
int d1,
int d2,
int d3,
SecureRandom sr)
N - the degree of the reduction polynomiald1 - the number of non-zero coefficients of the first sparse
binary polynomiald2 - the number of non-zero coefficients of the second sparse
binary polynomiald3 - the number of non-zero coefficients of the third sparse
binary polynomialsr - the source of randomness used for creating the sparse
binary polynomial
public ProductFormConvolutionPolynomial(SparseBinaryConvolutionPolynomial f1,
SparseBinaryConvolutionPolynomial f2,
SparseBinaryConvolutionPolynomial f3)
throws java.lang.ArithmeticException
f1 - the first sparse binary polynomialf2 - the second sparse binary polynomialf3 - the third sparse binary polynomialjava.lang.ArithmeticException - if the sparse binary polynomials are not elements of the
same ringpublic ProductFormConvolutionPolynomial(ProductFormConvolutionPolynomial other)
other - another ModQPolynomialProductForm| Method Detail |
public byte[] RE2OSP(int N)
throws java.lang.ArithmeticException
N - the degree of the reduction polynomialjava.lang.ArithmeticException - if this polynomial is not a binary element of
Z(X)/(X^N-1).
public static ProductFormConvolutionPolynomial OS2REP(int N,
int q,
int d1,
int d2,
int d3,
byte[] encoded)
throws java.lang.IllegalArgumentException
N - -
the degree of the reduction polynomialq - -
the modulusd1 - -
the number of non-zero coefficients of the first sparse
binary polynomiald2 - -
the number of non-zero coefficients of the second sparse
binary polynomiald3 - -
the number of non-zero coefficients of the third sparse
binary polynomialencoded - -
the encoded polynomialjava.lang.IllegalArgumentException - if the encoded polynomial has wrong length.public boolean equals(java.lang.Object other)
equals in class java.lang.Objectother - the other objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||