summaryrefslogtreecommitdiffstats
path: root/bcprov/src/main/java/org/bouncycastle/pqc/math/ntru/polynomial/TernaryPolynomial.java
blob: 822b64b467c513d1df3ace13688c0b1550f8c6b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package org.bouncycastle.pqc.math.ntru.polynomial;

/**
 * A polynomial whose coefficients are all equal to -1, 0, or 1
 */
public interface TernaryPolynomial
    extends Polynomial
{

    /**
     * Multiplies the polynomial by an <code>IntegerPolynomial</code>, taking the indices mod N
     */
    IntegerPolynomial mult(IntegerPolynomial poly2);

    int[] getOnes();

    int[] getNegOnes();

    /**
     * Returns the maximum number of coefficients the polynomial can have
     */
    int size();

    void clear();
}