Stay organized with collections
Save and categorize content based on your preferences.
javax.crypto.spec
Provides classes and interfaces for key specifications and algorithm
parameter specifications.
A key specification is a transparent representation of the key
material that constitutes a key. A key may be specified in an
algorithm-specific way, or in an algorithm-independent encoding format
(such as ASN.1). This package contains key specifications for
Diffie-Hellman public and private keys, as well as key specifications for DES,
Triple DES, and PBE secret keys.
An algorithm parameter specification is a transparent representation
of the sets of parameters used with an algorithm. This package contains
algorithm parameter specifications for parameters used with the
Diffie-Hellman, DES, Triple DES, PBE, RC2 and RC5 algorithms.
Package Specification
- PKCS #3: Diffie-Hellman Key-Agreement Standard, Version 1.4,
November 1993.
- PKCS #5: Password-Based Encryption Standard, Version 1.5,
November 1993.
- Federal Information Processing Standards Publication (FIPS PUB) 46-2:
Data Encryption Standard (DES)
For documentation that includes information about algorithm parameter
and key specifications, please see:
Classes
ChaCha20ParameterSpec |
This class specifies the parameters used with the
ChaCha20
algorithm.
|
DESedeKeySpec |
This class specifies a DES-EDE ("triple-DES") key.
|
DESKeySpec |
This class specifies a DES key.
|
DHGenParameterSpec |
This class specifies the set of parameters used for generating
Diffie-Hellman (system) parameters for use in Diffie-Hellman key
agreement.
|
DHParameterSpec |
This class specifies the set of parameters used with the Diffie-Hellman
algorithm, as specified in PKCS #3: Diffie-Hellman Key-Agreement
Standard.
|
DHPrivateKeySpec |
This class specifies a Diffie-Hellman private key with its associated
parameters.
|
DHPublicKeySpec |
This class specifies a Diffie-Hellman public key with its associated
parameters.
|
GCMParameterSpec |
Specifies the set of parameters required by a Cipher using the Galois/Counter Mode (GCM) mode.
|
IvParameterSpec |
This class specifies an initialization vector (IV).
|
OAEPParameterSpec |
This class specifies the set of parameters used with OAEP Padding,
as defined in the
PKCS #1
standard.
|
PBEKeySpec |
A user-chosen password that can be used with password-based encryption
(PBE).
|
PBEParameterSpec |
This class specifies the set of parameters used with password-based
encryption (PBE), as defined in the
PKCS #5
standard.
|
PSource |
This class specifies the source for encoding input P in OAEP Padding,
as defined in the
PKCS #1
standard.
|
PSource.PSpecified |
This class is used to explicitly specify the value for
encoding input P in OAEP Padding.
|
RC2ParameterSpec |
This class specifies the parameters used with the
RC2
algorithm.
|
RC5ParameterSpec |
This class specifies the parameters used with the
RC5
algorithm.
|
SecretKeySpec |
This class specifies a secret key in a provider-independent fashion.
|
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# javax.crypto.spec\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\njavax.crypto.spec\n=================\n\nProvides classes and interfaces for key specifications and algorithm parameter specifications.\n\nA key specification is a transparent representation of the key\nmaterial that constitutes a key. A key may be specified in an\nalgorithm-specific way, or in an algorithm-independent encoding format\n(such as ASN.1). This package contains key specifications for\nDiffie-Hellman public and private keys, as well as key specifications for DES,\nTriple DES, and PBE secret keys.\n\nAn algorithm parameter specification is a transparent representation\nof the sets of parameters used with an algorithm. This package contains\nalgorithm parameter specifications for parameters used with the\nDiffie-Hellman, DES, Triple DES, PBE, RC2 and RC5 algorithms.\n\nPackage Specification\n---------------------\n\n- PKCS #3: Diffie-Hellman Key-Agreement Standard, Version 1.4, November 1993.\n- PKCS #5: Password-Based Encryption Standard, Version 1.5, November 1993.\n- Federal Information Processing Standards Publication (FIPS PUB) 46-2: Data Encryption Standard (DES)\n\nRelated Documentation\n---------------------\n\nFor documentation that includes information about algorithm parameter and key specifications, please see:\n\n- [**Java^TM^\n Cryptography Architecture API Specification and Reference**](//../technotes/guides/security/crypto/CryptoSpec.html)\n- [**How to Implement a Provider for the\n Java^TM^ Cryptography Architecture**](//../technotes/guides/security/crypto/HowToImplAProvider.html)\n\nClasses\n-------\n\n|-----------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [ChaCha20ParameterSpec](/reference/javax/crypto/spec/ChaCha20ParameterSpec) | This class specifies the parameters used with the [*ChaCha20*](https://tools.ietf.org/html/rfc7539) algorithm. |\n| [DESedeKeySpec](/reference/javax/crypto/spec/DESedeKeySpec) | This class specifies a DES-EDE (\"triple-DES\") key. |\n| [DESKeySpec](/reference/javax/crypto/spec/DESKeySpec) | This class specifies a DES key. |\n| [DHGenParameterSpec](/reference/javax/crypto/spec/DHGenParameterSpec) | This class specifies the set of parameters used for generating Diffie-Hellman (system) parameters for use in Diffie-Hellman key agreement. |\n| [DHParameterSpec](/reference/javax/crypto/spec/DHParameterSpec) | This class specifies the set of parameters used with the Diffie-Hellman algorithm, as specified in PKCS #3: *Diffie-Hellman Key-Agreement Standard*. |\n| [DHPrivateKeySpec](/reference/javax/crypto/spec/DHPrivateKeySpec) | This class specifies a Diffie-Hellman private key with its associated parameters. |\n| [DHPublicKeySpec](/reference/javax/crypto/spec/DHPublicKeySpec) | This class specifies a Diffie-Hellman public key with its associated parameters. |\n| [GCMParameterSpec](/reference/javax/crypto/spec/GCMParameterSpec) | Specifies the set of parameters required by a [Cipher](/reference/javax/crypto/Cipher) using the Galois/Counter Mode (GCM) mode. |\n| [IvParameterSpec](/reference/javax/crypto/spec/IvParameterSpec) | This class specifies an *initialization vector* (IV). |\n| [OAEPParameterSpec](/reference/javax/crypto/spec/OAEPParameterSpec) | This class specifies the set of parameters used with OAEP Padding, as defined in the [PKCS #1](http://www.ietf.org/rfc/rfc3447.txt) standard. |\n| [PBEKeySpec](/reference/javax/crypto/spec/PBEKeySpec) | A user-chosen password that can be used with password-based encryption (*PBE*). |\n| [PBEParameterSpec](/reference/javax/crypto/spec/PBEParameterSpec) | This class specifies the set of parameters used with password-based encryption (PBE), as defined in the [PKCS #5](http://www.ietf.org/rfc/rfc2898.txt) standard. |\n| [PSource](/reference/javax/crypto/spec/PSource) | This class specifies the source for encoding input P in OAEP Padding, as defined in the [PKCS #1](http://www.ietf.org/rfc/rfc3447.txt) standard. |\n| [PSource.PSpecified](/reference/javax/crypto/spec/PSource.PSpecified) | This class is used to explicitly specify the value for encoding input P in OAEP Padding. |\n| [RC2ParameterSpec](/reference/javax/crypto/spec/RC2ParameterSpec) | This class specifies the parameters used with the [*RC2*](http://www.ietf.org/rfc/rfc2268.txt) algorithm. |\n| [RC5ParameterSpec](/reference/javax/crypto/spec/RC5ParameterSpec) | This class specifies the parameters used with the [*RC5*](http://www.ietf.org/rfc/rfc2040.txt) algorithm. |\n| [SecretKeySpec](/reference/javax/crypto/spec/SecretKeySpec) | This class specifies a secret key in a provider-independent fashion. |\n\n-\n\n Classes\n -------\n\n - [ChaCha20ParameterSpec](/reference/javax/crypto/spec/ChaCha20ParameterSpec)\n - [DESedeKeySpec](/reference/javax/crypto/spec/DESedeKeySpec)\n - [DESKeySpec](/reference/javax/crypto/spec/DESKeySpec)\n - [DHGenParameterSpec](/reference/javax/crypto/spec/DHGenParameterSpec)\n - [DHParameterSpec](/reference/javax/crypto/spec/DHParameterSpec)\n - [DHPrivateKeySpec](/reference/javax/crypto/spec/DHPrivateKeySpec)\n - [DHPublicKeySpec](/reference/javax/crypto/spec/DHPublicKeySpec)\n - [GCMParameterSpec](/reference/javax/crypto/spec/GCMParameterSpec)\n - [IvParameterSpec](/reference/javax/crypto/spec/IvParameterSpec)\n - [OAEPParameterSpec](/reference/javax/crypto/spec/OAEPParameterSpec)\n - [PBEKeySpec](/reference/javax/crypto/spec/PBEKeySpec)\n - [PBEParameterSpec](/reference/javax/crypto/spec/PBEParameterSpec)\n - [PSource](/reference/javax/crypto/spec/PSource)\n - [PSource.PSpecified](/reference/javax/crypto/spec/PSource.PSpecified)\n - [RC2ParameterSpec](/reference/javax/crypto/spec/RC2ParameterSpec)\n - [RC5ParameterSpec](/reference/javax/crypto/spec/RC5ParameterSpec)\n - [SecretKeySpec](/reference/javax/crypto/spec/SecretKeySpec)"]]