Class GordianLMSKeySpec
java.lang.Object
io.github.tonywasher.joceanus.gordianknot.api.keypair.GordianLMSKeySpec
LMS KeyTypes.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classHSS keySpec.static enumLMS hash.static enumLMS height.static enumLMS Width. -
Constructor Summary
ConstructorsConstructorDescriptionGordianLMSKeySpec(GordianLMSKeySpec.GordianLMSHash pHashType, GordianLMSKeySpec.GordianLMSHeight pHeight, GordianLMSKeySpec.GordianLMSWidth pWidth, GordianLength pLength) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic GordianLMSKeySpecdetermineKeySpec(org.bouncycastle.pqc.crypto.lms.LMSigParameters pSigParams, org.bouncycastle.pqc.crypto.lms.LMOtsParameters pOtsParams) Match keySpec against LMSParameters.booleangetHash()Obtain the hash.Obtain the width.Obtain the legth.org.bouncycastle.pqc.crypto.lms.LMSParametersObtain the parameters.getWidth()Obtain the width.inthashCode()booleanisHigh()Is the keySpec high (height ≥ 15)?booleanisValid()Is the keySpec valid?static List<GordianLMSKeySpec> Obtain a list of all possible specs.toString()
-
Constructor Details
-
GordianLMSKeySpec
public GordianLMSKeySpec(GordianLMSKeySpec.GordianLMSHash pHashType, GordianLMSKeySpec.GordianLMSHeight pHeight, GordianLMSKeySpec.GordianLMSWidth pWidth, GordianLength pLength) Constructor.- Parameters:
pHashType- the hashTypepHeight- the heightpWidth- the widthpLength- the length
-
-
Method Details
-
getHash
Obtain the hash.- Returns:
- the hash
-
getHeight
Obtain the width.- Returns:
- the width
-
getWidth
Obtain the width.- Returns:
- the width
-
getLength
Obtain the legth.- Returns:
- the width
-
getParameters
public org.bouncycastle.pqc.crypto.lms.LMSParameters getParameters()Obtain the parameters.- Returns:
- the parameters
-
isHigh
public boolean isHigh()Is the keySpec high (height ≥ 15)?- Returns:
- true/false.
-
isValid
public boolean isValid()Is the keySpec valid?- Returns:
- true/false.
-
toString
-
equals
-
hashCode
public int hashCode() -
listPossibleKeySpecs
Obtain a list of all possible specs.- Returns:
- the list
-
determineKeySpec
public static GordianLMSKeySpec determineKeySpec(org.bouncycastle.pqc.crypto.lms.LMSigParameters pSigParams, org.bouncycastle.pqc.crypto.lms.LMOtsParameters pOtsParams) Match keySpec against LMSParameters.- Parameters:
pSigParams- the sigParameterspOtsParams- the otsParameters- Returns:
- the matching keySpec
-