Class FalconPrivateKeyParameters
java.lang.Object
org.bouncycastle.crypto.params.AsymmetricKeyParameter
org.bouncycastle.pqc.crypto.falcon.FalconKeyParameters
org.bouncycastle.pqc.crypto.falcon.FalconPrivateKeyParameters
- All Implemented Interfaces:
CipherParameters
-
Constructor Summary
ConstructorsConstructorDescriptionFalconPrivateKeyParameters(FalconParameters parameters, byte[] f, byte[] g, byte[] F, byte[] pk_encoded) -
Method Summary
Modifier and TypeMethodDescriptionbyte[]byte[]getG()byte[]Return the encoded public key for this private key.Return the matchingFalconPublicKeyParametersfor this private key, mirroringMLDSAPrivateKeyParameters.getPublicKeyParameters().byte[]byte[]Methods inherited from class FalconKeyParameters
getParametersMethods inherited from class AsymmetricKeyParameter
isPrivate
-
Constructor Details
-
FalconPrivateKeyParameters
public FalconPrivateKeyParameters(FalconParameters parameters, byte[] f, byte[] g, byte[] F, byte[] pk_encoded)
-
-
Method Details
-
getEncoded
public byte[] getEncoded() -
getPublicKey
public byte[] getPublicKey()Return the encoded public key for this private key.When this instance still carries the encoded public key (the usual case for a freshly generated key) that encoding is returned directly. When it does not — e.g. the key was reconstructed from only its private encoding (f ‖ g ‖ F), with no public key bytes retained — the public key h is recomputed from the private polynomials (h = g * f-1 mod (q, xn+1)) (github #2297).
-
getPublicKeyParameters
Return the matchingFalconPublicKeyParametersfor this private key, mirroringMLDSAPrivateKeyParameters.getPublicKeyParameters(). Lets wallet / HSM code recover the public key from a stored private key without re-running keygen; seegetPublicKey()for how the key is recovered when no public key bytes were retained (github #2297). -
getSpolyf
public byte[] getSpolyf() -
getG
public byte[] getG() -
getSpolyF
public byte[] getSpolyF()
-