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

org.bouncycastle.pqc.legacy.crypto.qtesla.QTESLAKeyGenerationParameters Maven / Gradle / Ivy

Go to download

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.

The newest version!
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;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy