All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.gatling.recorder.internal.bouncycastle.pqc.math.ntru.parameters.NTRUHPSParameterSet Maven / Gradle / Ivy

package io.gatling.recorder.internal.bouncycastle.pqc.math.ntru.parameters;

import io.gatling.recorder.internal.bouncycastle.pqc.math.ntru.HPSPolynomial;
import io.gatling.recorder.internal.bouncycastle.pqc.math.ntru.Polynomial;

/**
 * Abstract class for NTRU-HPS parameter classes.
 * 

* The naming convention for the classes is {@code NTRUHPS[q][n]}. e.g. {@link NTRUHPS2048509} has n = 509 and q = 2048. * * @see NTRUHPS2048509 * @see NTRUHPS2048677 * @see NTRUHPS4096821 * @see NTRU specification document section 1.3.2 */ public abstract class NTRUHPSParameterSet extends NTRUParameterSet { NTRUHPSParameterSet(int n, int logQ, int seedBytes, int prfKeyBytes, int sharedKeyBytes) { super(n, logQ, seedBytes, prfKeyBytes, sharedKeyBytes); } @Override public Polynomial createPolynomial() { return new HPSPolynomial(this); } @Override public int sampleFgBytes() { return sampleIidBytes() + sampleFixedTypeBytes(); } @Override public int sampleRmBytes() { return sampleIidBytes() + sampleFixedTypeBytes(); } public int weight() { return q() / 8 - 2; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy