![JAR search and dependency download from the Maven repository](/logo.png)
org.bouncycastle.crypto.internal.pqc.lms.HSSKeyGenerationParameters Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bc-fips-debug Show documentation
Show all versions of bc-fips-debug Show documentation
The FIPS 140-2 Bouncy Castle Crypto package is a Java implementation of cryptographic algorithms certified to FIPS 140-2 level 1. This jar contains the debug version JCE provider and low-level API for the BC-FJA version 1.0.2.3, FIPS Certificate #3514. Please note the debug jar is not certified.
/***************************************************************/
/****** DO NOT EDIT THIS CLASS bc-java SOURCE FILE ******/
/***************************************************************/
package org.bouncycastle.crypto.internal.pqc.lms;
import java.security.SecureRandom;
import org.bouncycastle.crypto.internal.KeyGenerationParameters;
public class HSSKeyGenerationParameters
extends KeyGenerationParameters
{
private final LMSParameters[] lmsParameters;
/**
* Base constructor - parameters and a source of randomness.
*
* @param lmsParameters array of LMS parameters, one per level in the hierarchy (up to 8 levels).
* @param random the random byte source.
*/
public HSSKeyGenerationParameters(
LMSParameters[] lmsParameters,
SecureRandom random)
{
super(random, LmsUtils.calculateStrength(lmsParameters[0]));
if (lmsParameters.length == 0 || lmsParameters.length > 8) // RFC 8554, Section 6.
{
throw new IllegalArgumentException("lmsParameters length should be between 1 and 8 inclusive");
}
this.lmsParameters = lmsParameters;
}
public int getDepth()
{
return lmsParameters.length;
}
public LMSParameters[] getLmsParameters()
{
return lmsParameters;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy