Package org.bouncycastle.crypto.params
Several parameter types in this package are wrappers: each carries one extra value and a
getParameters() link to the CipherParameters it decorates,
so a caller supplies a nested chain ending in a key. The wrappers are
ParametersWithContext,
ParametersWithID,
ParametersWithRandom,
ParametersWithUKM,
ParametersWithIV,
ParametersWithSBox and
ParametersWithSalt.
There is no enforced nesting order, but the implementations share a de facto one. A component unwraps only the wrapper it consumes and passes the remainder down, so a wrapper sits outside everything consumed further down the stack. Outermost first, the order used throughout the lightweight API and by the JCE provider when it builds these chains is:
ParametersWithContextorParametersWithID- a signature context string (ML-DSA, SLH-DSA and similar) or a signer identity (SM2, SM9), consumed by the signer.ParametersWithRandom- consumed by the outermost component that needs randomness: a signer, an asymmetric encoding, a wrap engine, or a padded buffered cipher. Block cipher modes and stream ciphers do not unwrap it, so it must not be nested inside an IV.ParametersWithUKM- the user keying material of the GOST 28147 wrap engines.ParametersWithIV- the IV or nonce, consumed by the cipher mode, stream cipher or MAC.ParametersWithSBox- the GOST 28147 S-box, consumed by the engine and so placed directly around the key.- the key itself:
KeyParameteror anAsymmetricKeyParameter.
IV(SBox(key)), a padded CBC cipher takes
Random(IV(key)), and an ML-DSA signer takes Context(Random(privateKey)).
ParametersWithSalt is used only by
ISO9796d2PSSSigner, which accepts it as an alternative
to ParametersWithRandom rather than nested with it. A few GOST classes
(GOST28147Mac in particular) accept their wrappers in any
order; most implementations do not, and a chain nested against the order above is usually
rejected with an IllegalArgumentException or a ClassCastException.
AEADParameters is a self-contained alternative to
ParametersWithIV for AEAD modes and combines key, nonce, tag length and associated data
without nesting.
-
Interface Summary Interface Description SM9EncUserKeyParametersGenerator A master key capable of the KGC user-key extraction for an identity-based encryption-family scheme: deriving a user's private key from the user's identity and the private-key generation function identifier hid the KGC chose (GM/T 0044.3/0044.4-2016 for SM9, where one encryption master key serves key exchange, KEM and public-key encryption, distinguished by hid).SM9SigUserKeyParametersGenerator A master key capable of the KGC user-key extraction for an identity-based signature scheme: deriving a user's signature private key from the user's identity (GM/T 0044.2-2016 for SM9, where the signature private-key generation function identifier hid is applied internally). -
Class Summary Class Description AEADParameters Argon2Parameters Configuration parameters for theArgon2 PBKDF.Argon2Parameters.Builder Fluent builder forArgon2Parameters.AsymmetricKeyParameter Blake3Parameters Blake3 Parameters.BLSKeyGenerationParameters BLSKeyParameters BLSParameters Family identifier for BLS signature schemes — currently the BLS12-381 pairing-friendly curve fromdraft-irtf-cfrg-pairing-friendly-curves.BLSPrivateKeyParameters Private-key parameters for a BLS signature scheme.BLSPublicKeyParameters Public-key parameters for a BLS signature scheme.CCMParameters Deprecated. use AEADParametersCMCEKeyGenerationParameters CMCEKeyParameters CMCEParameters Parameter sets for the Classic McEliece KEM as standardised in ISO/IEC 18033-2:2006/Amd 2:2026, Clause 13.CMCEPrivateKeyParameters CMCEPublicKeyParameters CramerShoupKeyGenerationParameters CramerShoupKeyParameters CramerShoupParameters CramerShoupPrivateKeyParameters CramerShoupPublicKeyParameters DESedeParameters DESParameters DHKeyGenerationParameters DHKeyParameters DHMQVPrivateParameters DHMQVPublicParameters DHParameters DHPrivateKeyParameters DHPublicKeyParameters DHUPrivateParameters Parameters holder for private unified static/ephemeral agreement as described in NIST SP 800-56A.DHUPublicParameters Parameters holder for static/ephemeral agreement as described in NIST SP 800-56A.DHValidationParameters DSAKeyGenerationParameters DSAKeyParameters DSAParameterGenerationParameters DSAParameters DSAPrivateKeyParameters DSAPublicKeyParameters DSAValidationParameters DSTU4145Parameters ECCSIKeyGenerationParameters Parameters for ECCSI key generation.ECCSIPrivateKeyParameters Represents the private key parameters for the Elliptic Curve-based Certificateless Signature Infrastructure (ECCSI) scheme as defined in RFC 6507.ECCSIPublicKeyParameters Represents the public key parameters for the Elliptic Curve-based Certificateless Signature Infrastructure (ECCSI) scheme as defined in RFC 6507.ECDHUPrivateParameters Parameters holder for private unified static/ephemeral agreement as described in NIST SP 800-56A.ECDHUPublicParameters Parameters holder for public unified static/ephemeral agreement as described in NIST SP 800-56A using EC DH/CDH.ECDomainParameters ECGOST3410Parameters ECKeyGenerationParameters ECKeyParameters ECNamedDomainParameters ECPrivateKeyParameters ECPublicKeyParameters Ed25519KeyGenerationParameters Ed25519PrivateKeyParameters Ed25519PublicKeyParameters Ed448KeyGenerationParameters Ed448PrivateKeyParameters Ed448PublicKeyParameters ElGamalKeyGenerationParameters ElGamalKeyParameters ElGamalParameters ElGamalPrivateKeyParameters ElGamalPublicKeyParameters FPEParameters FrodoKEMKeyGenerationParameters FrodoKEMKeyParameters FrodoKEMParameters Parameter sets for FrodoKEM as standardised in ISO/IEC 18033-2:2006/Amd 2:2026, Clause 14.FrodoKEMPrivateKeyParameters FrodoKEMPublicKeyParameters GOST3410KeyGenerationParameters GOST3410KeyParameters GOST3410Parameters GOST3410PrivateKeyParameters GOST3410PublicKeyParameters GOST3410ValidationParameters HKDFParameters Parameter class for the HKDFBytesGenerator class.HSSKeyGenerationParameters HSSPrivateKeyParameters HSSPublicKeyParameters IESParameters parameters for using an integrated cipher in stream mode.IESWithCipherParameters ISO18033KDFParameters parameters for Key derivation functions for ISO-18033KDFCounterParameters This KDF has been defined by the publicly available NIST SP 800-108 specification.KDFDoublePipelineIterationParameters Note that counter is only supported at the location presented in the NIST SP 800-108 specification, not in the additional locations present in the CAVP test vectors.KDFFeedbackParameters Note that counter is only supported at the location presented in the NIST SP 800-108 specification, not in the additional locations present in the CAVP test vectors.KDFParameters parameters for Key derivation functions for IEEE P1363aKeyParameter LMOtsParameters LMSigParameters LMSKeyGenerationParameters LMSKeyParameters LMSParameters LMSPrivateKeyParameters LMSPublicKeyParameters MGFParameters parameters for mask derivation functions.MLDSAKeyGenerationParameters MLDSAKeyParameters MLDSAParameters MLDSAPrivateKeyParameters MLDSAPublicKeyParameters MLKEMKeyGenerationParameters MLKEMKeyParameters MLKEMParameters MLKEMPrivateKeyParameters MLKEMPublicKeyParameters MQVPrivateParameters MQVPublicParameters NaccacheSternKeyGenerationParameters Parameters for NaccacheStern public private key generation.NaccacheSternKeyParameters Public key parameters for NaccacheStern cipher.NaccacheSternPrivateKeyParameters Private key parameters for NaccacheStern cipher.ParametersWithContext ParametersWithID ParametersWithIV ParametersWithRandom ParametersWithSalt Cipher parameters with a fixed salt value associated with them.ParametersWithSBox ParametersWithUKM RC2Parameters RC5Parameters RSABlindingParameters RSABlindSignatureParameters Variant parameters for the RSA Blind Signature Scheme with Appendix (RSABSSA) defined in RFC 9474.RSAKeyGenerationParameters RSAKeyParameters RSAPrivateCrtKeyParameters SAKKEPrivateKeyParameters Represents a private key for the Sakai-Kasahara Key Encryption (SAKKE) scheme, as defined in RFC 6508.SAKKEPublicKeyParameters Represents the public parameters for the SAKKE (Sakai-Kasahara Key Encryption) scheme as defined in RFC 6508.SkeinParameters Parameters for the Skein hash function - a series of byte[] strings identified by integer tags.SkeinParameters.Builder A builder forSkeinParameters.SLHDSAKeyGenerationParameters SLHDSAKeyParameters SLHDSAParameters SLHDSAPrivateKeyParameters SLHDSAPublicKeyParameters SM2KeyExchangePrivateParameters Private parameters for an SM2 key exchange.SM2KeyExchangePublicParameters Public parameters for an SM2 key exchange.SM9EncMasterPrivateKeyParameters SM9 encryption master private key ke (GM/T 0044.4-2016).SM9EncMasterPublicKeyParameters SM9 encryption master public key P_pub-e = [ke]P1, a point of G1 (GM/T 0044.4-2016).SM9EncPrivateKeyParameters A user's SM9 encryption private key de = [t2]P2, a point of G2 (GM/T 0044.4-2016).SM9EncPublicKeyParameters An SM9 recipient's encryption public key: the identity together with the encryption master public key from which the recipient point Q is derived (GM/T 0044.4-2016).SM9SigMasterPrivateKeyParameters SM9 signature master private key ks (GM/T 0044.2-2016).SM9SigMasterPublicKeyParameters SM9 signature master public key P_pub-s = [ks]P2, a point of G2 (GM/T 0044.2-2016).SM9SigPrivateKeyParameters A user's SM9 signature private key ds_A = [t2]P1, a point of G1 (GM/T 0044.2-2016).SRP6GroupParameters TweakableBlockCipherParameters Parameters for tweakable block ciphers.X25519KeyGenerationParameters X25519PrivateKeyParameters X25519PublicKeyParameters X448KeyGenerationParameters X448PrivateKeyParameters X448PublicKeyParameters XDHUPrivateParameters Parameters holder for private unified static/ephemeral agreement using Edwards Curves.XDHUPublicParameters Parameters holder for public unified static/ephemeral agreement using Edwards Curves.XMSSKeyGenerationParameters XMSS key-pair generation parameters.XMSSKeyParameters XMSSMTKeyGenerationParameters XMSS^MT key-pair generation parameters.XMSSMTKeyParameters XMSSMTParameters XMSS^MT Parameters.XMSSMTPrivateKeyParameters XMSS^MT Private Key.XMSSMTPrivateKeyParameters.Builder XMSSMTPublicKeyParameters XMSS^MT Public Key.XMSSMTPublicKeyParameters.Builder XMSSParameters XMSS Parameters.XMSSPrivateKeyParameters XMSS Private Key.XMSSPrivateKeyParameters.Builder XMSSPublicKeyParameters XMSS Public Key.XMSSPublicKeyParameters.Builder