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:
ParametersWithContext,ParametersWithIDorParametersWithUKM- a signature context string (ML-DSA, SLH-DSA and similar), a signer identity (SM2, SM9), or the user keying material of the GOST 28147 wrap engines and the VKO key agreement, consumed by the signer, wrap engine or agreement.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.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)), an ML-DSA signer takes Context(Random(privateKey)), and a
GOST 28147 wrap engine takes UKM(Random(SBox(key))). The GOST 28147 wrap engines also
still accept the earlier Random(UKM(SBox(key))).
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.
Rejecting other nestings is intended. New code should accept the order above and nothing else.
Accepting an alternative order is a compatibility measure, and is justified only where existing
callers are known to build it, as with the earlier Random(UKM(..)) of the GOST 28147 wrap
engines. An alternative added speculatively becomes a second form that every caller, wrapper and
port then has to keep supporting.
-
ClassDescriptionConfiguration parameters for the
Argon2 PBKDF.Fluent builder forArgon2Parameters.Blake3 Parameters.Family identifier for BLS signature schemes — currently the BLS12-381 pairing-friendly curve fromdraft-irtf-cfrg-pairing-friendly-curves.Private-key parameters for a BLS signature scheme.Public-key parameters for a BLS signature scheme.Deprecated.use AEADParametersDeprecated.Now believed unsafe to use - will be removed in a future release.Deprecated.Now believed unsafe to use - will be removed in a future release.Deprecated.Now believed unsafe to use - will be removed in a future release.Deprecated.Now believed unsafe to use - will be removed in a future release.Deprecated.Now believed unsafe to use - will be removed in a future release.Parameters holder for private unified static/ephemeral agreement as described in NIST SP 800-56A.Parameters holder for static/ephemeral agreement as described in NIST SP 800-56A.Parameters for ECCSI key generation.Represents the private key parameters for the Elliptic Curve-based Certificateless Signature Infrastructure (ECCSI) scheme as defined in RFC 6507.Represents the public key parameters for the Elliptic Curve-based Certificateless Signature Infrastructure (ECCSI) scheme as defined in RFC 6507.Parameters holder for private unified static/ephemeral agreement as described in NIST SP 800-56A.Parameters holder for public unified static/ephemeral agreement as described in NIST SP 800-56A using EC DH/CDH.Parameter sets for FrodoKEM as standardised in ISO/IEC 18033-2:2006/Amd 2:2026, Clause 14.Parameter class for the HKDFBytesGenerator class.parameters for using an integrated cipher in stream mode.parameters for Key derivation functions for ISO-18033This KDF has been defined by the publicly available NIST SP 800-108 specification.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.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.Parameters for the key derivation functions that derive keying material from a shared secret and an optional block of additional input: KDF1 and KDF2 of IEEE P1363a / ISO 18033-2 (KDF2 being the ANSI X9.63 KDF, where the additional input is the SharedInfo), and the NIST SP 800-56A concatenation KDF (where it is the OtherInfo).An LMS parameter set: the LMS tree parameters paired with the LM-OTS parameters of its one-time keys.parameters for mask derivation functions.Parameters for NaccacheStern public private key generation.Public key parameters for NaccacheStern cipher.Private key parameters for NaccacheStern cipher.Cipher parameters with a fixed salt value associated with them.Wrapper class for parameters which include User Keying Material (UKM).Implemented by the parameter set classes of the post-quantum algorithms to report where a parameter set sits in the NIST post-quantum security categories (NIST IR 8547, Table 1) and the classical security strength NIST assigns to it (NIST IR 8547, Tables 3 and 5), so that a policy such as "category 3 or better" can be applied without a per-algorithm table.Variant parameters for the RSA Blind Signature Scheme with Appendix (RSABSSA) defined in RFC 9474.Represents a private key for the Sakai-Kasahara Key Encryption (SAKKE) scheme, as defined in RFC 6508.Represents the public parameters for the SAKKE (Sakai-Kasahara Key Encryption) scheme as defined in RFC 6508.Parameters for the Skein hash function - a series of byte[] strings identified by integer tags.A builder forSkeinParameters.Private parameters for an SM2 key exchange.Public parameters for an SM2 key exchange.SM9 encryption master private key ke (GM/T 0044.4-2016).SM9 encryption master public key P_pub-e = [ke]P1, a point of G1 (GM/T 0044.4-2016).A user's SM9 encryption private key de = [t2]P2, a point of G2 (GM/T 0044.4-2016).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).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).SM9 signature master private key ks (GM/T 0044.2-2016).SM9 signature master public key P_pub-s = [ks]P2, a point of G2 (GM/T 0044.2-2016).A user's SM9 signature private key ds_A = [t2]P1, a point of G1 (GM/T 0044.2-2016).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).Parameters for tweakable block ciphers.Parameters holder for private unified static/ephemeral agreement using Edwards Curves.Parameters holder for public unified static/ephemeral agreement using Edwards Curves.XMSS key-pair generation parameters.XMSS^MT key-pair generation parameters.XMSS^MT Parameters.XMSS^MT Private Key.XMSS^MT Public Key.XMSS Parameters.XMSS Private Key.XMSS Public Key.