org.bouncycastle.pqc.legacy.crypto.qtesla.QTESLAKeyGenerationParameters Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bcprov-jdk15to18 Show documentation
Show all versions of bcprov-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.legacy.crypto.qtesla;
import java.security.SecureRandom;
import org.bouncycastle.crypto.KeyGenerationParameters;
/**
* qTESLA key-pair generation parameters.
*/
public class QTESLAKeyGenerationParameters
extends KeyGenerationParameters
{
private final int securityCategory;
/**
* Base constructor - provide the qTESLA security category and a source of randomness.
*
* @param securityCategory the security category to generate the parameters for.
* @param random the random byte source.
*/
public QTESLAKeyGenerationParameters(int securityCategory, SecureRandom random)
{
super(random, -1);
QTESLASecurityCategory.getPrivateSize(securityCategory); // check the category is valid
this.securityCategory = securityCategory;
}
/**
* Return the security category for these parameters.
*
* @return the security category for keys generated using these parameters.
*/
public int getSecurityCategory()
{
return securityCategory;
}
}