org.bouncycastle.pqc.math.ntru.parameters.NTRUHRSSParameterSet Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bcprov-debug-jdk15to18 Show documentation
Show all versions of bcprov-debug-jdk15to18 Show documentation
The Bouncy Castle Crypto package is a Java implementation of cryptographic algorithms. This jar contains JCE provider and lightweight API for the Bouncy Castle Cryptography APIs for JDK 1.5 to JDK 1.8.
package org.bouncycastle.pqc.math.ntru.parameters;
import org.bouncycastle.pqc.math.ntru.HRSSPolynomial;
import org.bouncycastle.pqc.math.ntru.Polynomial;
/**
* Abstract class for NTRU-HRSS parameter classes.
*
* The naming convention for the classes is {@code NTRUHRSS[n]}. e.g. {@link NTRUHRSS701} has n = 701.
*
* @see NTRUHRSS701
* @see NTRU specification document section 1.3.3
*/
public abstract class NTRUHRSSParameterSet
extends NTRUParameterSet
{
NTRUHRSSParameterSet(int n, int logQ, int seedBytes, int prfKeyBytes, int sharedKeyBytes)
{
super(n, logQ, seedBytes, prfKeyBytes, sharedKeyBytes);
}
@Override
public Polynomial createPolynomial()
{
return new HRSSPolynomial(this);
}
@Override
public int sampleFgBytes()
{
return 2 * sampleIidBytes();
}
@Override
public int sampleRmBytes()
{
return 2 * sampleIidBytes();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy