Movatterモバイル変換


[0]ホーム

URL:


Skip toContent

Java Cryptography Architecture (JCA) Oracle Providers Documentation for JDK 8

The following topics are covered:

Note:Java Cryptography Architecture (JCA) Standard Algorithm Name Documentation for JDK 8 contains more information about the standardnames used in this document.

Introduction

The Java platform defines a set of APIs spanning major securityareas, including cryptography, public key infrastructure,authentication, secure communication, and access control. TheseAPIs allow developers to easily integrate security mechanisms intotheir application code. TheJavaCryptography Architecture (JCA) and itsProvider Architecture isa core concept of the Java Development Kit (JDK). It is assumedreaders have a solid understanding of this architecture.

This document describes the technical details of the providersshipped as part of Oracle's Java Environment.

Reminder: Cryptographic implementations in the JDK aredistributed through several different providers (SUN,SunJSSE,SunJCE,SunRsaSign) for bothhistorical reasons and by the types of services provided. General purposeapplicationsSHOULD NOT request cryptographic services fromspecific providers.That is:

getInstance("...","SunJCE");  // not recommended

versus

getInstance("...");            // recommended

Otherwise, applications are tied to specific providers that maynot be available on other Java implementations. They also might notbe able to take advantage of available optimized providers (forexample, hardware accelerators via PKCS11 or native OSimplementations such as Microsoft's MSCAPI) that have a higherpreference order than the specific requested provider.

Import Limits on Cryptographic Algorithms

By default, an application can use cryptographic algorithms of any strength.However, due to import regulations in some locations, you may have to limit thestrength of those algorithms. The JDK provides two different sets of jurisdictionpolicy files, "limited" and "unlimited", in the directory<java-home>/jre/lib/security/policythat determine the strength of cryptographic algorithms. Information aboutjurisdiction policy files and how to activate them is available inAppendix C: Cryptographic Strength Configuration.

Consult your export/import control counsel or attorney to determine the exactrequirements for your location.

For the "limited" configuration, the following table lists the maximum key sizesallowed by the "limited" set of jurisdiction policy files:

AlgorithmMaximum Keysize
DES64
DESede*
RC2128
RC4128
RC5128
RSA*
all others128

CipherTransformations

Thejavax.crypto.Cipher.getInstance(Stringtransformation) factory method generatesCiphers using transformations of the formalgorithm/mode/padding. If the mode/padding areomitted, theSunJCE andSunPKCS11 providers useECB as the default mode and PKCS5Padding as the default padding for manysymmetric ciphers.

It is recommended to use transformations that fully specify thealgorithm, mode, and padding instead of relying on thedefaults.


Note: ECB works well for single blocks of dataand can be parallelized, but absolutely should not be used formultiple blocks of data.


SecureRandomImplementations

The following table lists the default preference order of theavailableSecureRandom implementations.

OSAlgorithm NameProvider Name
Solaris1. PKCS11*SunPKCS11
2. NativePRNG**Sun
3. SHA1PRNG**Sun
4. NativePRNGBlockingSun
5. NativePRNGNonBlockingSun
Linux1. NativePRNG**Sun
2. SHA1PRNG**Sun
3. NativePRNGBlockingSun
4. NativePRNGNonBlockingSun
macOS1. NativePRNG**Sun
2. SHA1PRNG**Sun
3. NativePRNGBlockingSun
4. NativePRNGNonBlockingSun
Windows1. SHA1PRNGSun
2. Windows-PRNG***SunMSCAPI

* TheSunPKCS11 provider is available on all platforms, but isonly enabled by default on Solaris as it is the only OS with anative PKCS11 implementation automatically installed andconfigured. On other platforms, applications or deployers mustspecifically install and configure a native PKCS11 library, andthen configure and enable theSunPKCS11 provider to use it.

** On Solaris, Linux, and macOS, if theentropy gatheringdevice injava.security is set tofile:/dev/urandom orfile:/dev/random,then NativePRNG is preferred to SHA1PRNG. Otherwise, SHA1PRNG ispreferred.

*** There is currently no NativePRNG on Windows. Access to theequivalent functionality is via theSunMSCAPI provider.

If there are noSecureRandom implementationsregistered in the JCA framework,java.security.SecureRandom will use the hardcodedSHA1PRNG.

TheSunPKCS11 Provider

The Cryptographic Token Interface Standard (PKCS#11) provides nativeprogramming interfaces to cryptographic mechanisms, such ashardware cryptographic accelerators and Smart Cards. When properlyconfigured, theSunPKCS11 provider enablesapplications to use the standard JCA/JCE APIs to access nativePKCS#11 libraries.TheSunPKCS11 provider itselfdoes not contain cryptographic functionality, it is simply aconduit between the Java environment and the native PKCS11providers. TheJava PKCS#11 ReferenceGuide has a much more detailed treatment of this provider.

TheSUN Provider

JDK 1.1 introduced theProvider architecture. Thefirst JDK provider was namedSUN, and contained twotypes of cryptographic services (MessageDigests andSignatures). In later releases, other mechanisms wereadded (SecureRandom number generators,KeyPairGenerators,KeyFactorys, and soon.).

United States export regulations in effect at the time placedsignificant restrictions on the type of cryptographic functionalitythat could be made available internationally in the JDK. For thisreason, theSUN provider has historically containedcryptographic engines that did not directly encrypt or decryptdata.

The following algorithms are available in theSUNprovider:

EngineAlgorithm Names
AlgorithmParameterGeneratorDSA
AlgorithmParametersDSA
CertificateFactoryX.509
CertPathBuilderPKIX
CertPathValidatorPKIX
CertStoreCollection
LDAP
ConfigurationJavaLoginConfig
KeyFactoryDSA
KeyPairGeneratorDSA
KeyStoreJKS
DKS
MessageDigestMD2
MD5
SHA-1
SHA-224
SHA-256
SHA-384
SHA-512
SHA-512/224
SHA-512/256
PolicyJavaPolicy
SecureRandomSHA1PRNG (Initial seeding is currently done via a combinationof system attributes and thejava.security entropygathering device)
NativePRNG (nextBytes() uses/dev/urandom,generateSeed() uses/dev/random)
NativePRNGBlocking (nextBytes() andgenerateSeed() use/dev/random)
NativePRNGNonBlocking (nextBytes() andgenerateSeed() use/dev/urandom)
SignatureNONEwithDSA
SHA1withDSA
SHA224withDSA
SHA256withDSA

Note: For signature generation, if the security strength ofthe digest algorithm is weaker than the security strength of the key used tosign the signature (for example, using (2048, 256)-bit DSA keys with theSHA1withDSA signature), then the operation will fail with the error message:"The security strength of SHA1 digest algorithm is not sufficient for this keysize."

The following table lists OIDs associated with SHA MessageDigests:

SHA Message DigestOID
SHA-2242.16.840.1.101.3.4.2.4
SHA-2562.16.840.1.101.3.4.2.1
SHA-3842.16.840.1.101.3.4.2.2
SHA-5122.16.840.1.101.3.4.2.3
SHA-512/2242.16.840.1.101.3.4.2.5
SHA-512/2562.16.840.1.101.3.4.2.6

The following table lists OIDs associated with DSASignatures:

DSA SignatureOID
SHA1withDSA1.2.840.10040.4.3
1.3.14.3.2.13
1.3.14.3.2.27
SHA224withDSA2.16.840.1.101.3.4.3.1
SHA256withDSA2.16.840.1.101.3.4.3.2

Keysize Restrictions

TheSUN provider uses the following defaultkeysizes (in bits) and enforces the following restrictions:

KeyPairGenerator

Alg. NameDefault KeysizeRestrictions/Comments
DSA2048Keysize must be a multiple of 64, ranging from 512 to 1024(inclusive), or 2048.

AlgorithmParameterGenerator

Alg. NameDefault KeysizeRestrictions/Comments
DSA2048Keysize must be a multiple of 64, ranging from 512 to 1024(inclusive), or 2048.

CertificateFactory/CertPathBuilder/CertPathValidator/CertStoreImplementations

Additional details on theSUN providerimplementations forCertificateFactory,CertPathBuilder,CertPathValidator andCertStore are documented inAppendix B of the PKIProgrammer's Guide.

TheSunRsaSign Provider

TheSunRsaSign provider was introduced in JDK 1.3as an enhanced replacement for the RSA signatures in theSunJSSE provider.

The following algorithms are available in theSunRsaSign provider:

EngineAlgorithm Names
AlgorithmParametersRSASSA-PSS
KeyFactoryRSA
RSASSA-PSS
KeyPairGeneratorRSA
RSASSA-PSS
SignatureMD2withRSA
MD5withRSA
RSASSA-PSS
SHA1withRSA
SHA224withRSA
SHA256withRSA
SHA384withRSA
SHA512withRSA
SHA512/224withRSA
SHA512/256withRSA

Keysize Restrictions

TheSunRsaSign provider uses the following defaultkeysize (in bits) and enforces the following restriction:

KeyPairGenerator

Alg. NameDefault KeysizeRestrictions/Comments
RSA and RSASSA-PSS2048Keysize must range between 512 and 16384 bits. If the key size exceeds 3072,then the public exponent length cannot exceed 64 bits.

TheSunJSSE Provider

The Java Secure Socket Extension (JSSE) was originally releasedas a separate "Optional Package" (also briefly known as a "StandardExtension"), and was available for JDK 1.2.n and1.3.n. TheSunJSSE provider was introduced aspart of this release.

In earlier JDK releases, there were no RSA signature providersavailable in the JDK, thereforeSunJSSE had to provideits own RSA implementation in order to use commonly availableRSA-based certificates. JDK 5 introduced theSunRsaSign provider, which provides all thefunctionality (and more) of theSunJSSE provider.Applications targeted at JDK 5.0 and later should request instancesof theSunRsaSign provider instead. For backwardcompatibility, the RSA algorithms are still available through thisprovider, but are actually implemented in theSunRsaSign provider.

Algorithms

The following algorithms are available in theSunJSSE provider:

EngineAlgorithm Name(s)
KeyFactoryRSA
KeyManagerFactory

SunX509: A factory forX509ExtendedKeyManagerinstances that manage X.509 certificate-based key pairs for localside authentication according to the rules defined by the IETF PKIXworking group inRFC3280 or its successor. ThisKeyManagerFactorysupports initialization using aKeystore object, butdoes not currently support initialization using the classjavax.net.ssl.ManagerFactoryParameters.

PKIX: A factory forX509ExtendedKeyManagerinstances that manage X.509 certificate-based key pairs for localside authentication according to the rules defined by the IETF PKIXworking group inRFC3280 or its successor. ThisKeyManagerFactorycurrently supports initialization using aKeyStoreobject orjavax.net.ssl.KeyStoreBuilderParameters.

KeyPairGeneratorRSA
KeyStorePKCS12Footnote 1
SignatureMD2withRSA
MD5withRSA
SHA1withRSA
SSLContextSSLv3
TLSv1
TLSv1.1
TLSv1.2
TrustManagerFactory

SunX509: A factory forX509ExtendedTrustManagerinstances that validate certificate chains according to the rulesdefined by the IETF PKIX working group inRFC 3280 or itssuccessor. ThisTrustManagerFactory supportsinitialization using aKeystore object, but does notcurrently support initialization using the classjavax.net.ssl.ManagerFactoryParameters.

PKIX: A factory forX509ExtendedTrustManagerinstances that validate certificate chains according to the rulesdefined by the IETF PKIX working group inRFC 3280 or itssuccessor. ThisTrustManagerFactory currently supportsinitialization using aKeyStore object orjavax.net.ssl.CertPathTrustManagerParameters.

Footnote 1 The PKCS12KeyStore implementation does not support theKeyBag type.

Protocols

The following table lists theprotocol parameters that theSunJSSE provider supports:

ProtocolEnabled by Default for ClientEnabled by Default for Server
SSLv3NoNo
TLSv1Footnote 1NoNo
TLSv1.1Footnote 1NoNo
TLSv1.2YesYes
TLSv1.3YesYes
SSLv2HelloFootnote 2NoYes

Footnote 1 -TLS 1.0 and 1.1 are versions of the TLS protocol that are no longerconsidered secure and have been superseded by more secure and modern versions(TLS 1.2 and 1.3). These versions have now been disabled by default. If youencounter issues, you can, at your own risk, re-enable the versions by removingTLSv1 or TLSv1.1 from thejdk.tls.disabledAlgorithms SecurityProperty in thejava.security configuration file.

Footnote 2 -The SSLv3, TLSv1, TLSv1.1 andTLSv1.2 protocols allow you to send SSLv3, TLSv1, TLSv1.1 andTLSv1.2 ClientHellos encapsulated in an SSLv2 format hello by usingthe SSLv2Hello pseudo-protocol. The following table illustrateswhich connection combinations are possible when usingSSLv2Hellos:

ClientServerConnection
enabledenabledY
disabledenabledY (most interoperable:SunJSSE default)
enableddisabledN
disableddisabledY

Note: The protocols available by default in a JDK releasechange as new protocols are developed and old protocols are found to be lesseffective than previously thought. The JDK uses two mechanisms to restrict theavailability of these protocols:


Cipher Suites

The following are the currently implemented SunJSSE cipher suites for thisJDK release, sorted by order of preference. Not all of these cipher suites areavailable for use by default.

Tighter Checking ofEncryptedPreMasterSecret Version Numbers

Prior to the JDK 7 release, the SSL/TLS implementation did notcheck the version number in PreMasterSecret, and the SSL/TLS clientdid not send the correct version number by default. Unless thesystem propertycom.sun.net.ssl.rsaPreMasterSecretFixis set totrue, the TLS client sends the activenegotiated version, but not the expected maximum version supportedby the client.

For compatibility, this behavior is preserved for SSL version3.0 and TLS version 1.0. However, for TLS version 1.1 or later, theimplementation tightens checking the PreMasterSecret versionnumbers as required byRFC 5246. Clients alwayssend the correct version number, and servers check the versionnumber strictly. The system property,com.sun.net.ssl.rsaPreMasterSecretFix, is not used inTLS 1.1 or later.

TheSunJCE Provider

As described briefly inTheSUN Provider, US export regulations at the timerestricted the type of cryptographic functionality that could bemade available in the JDK. A separate API and referenceimplementation was developed that allowed applications toencrypt/decrypt data. The Java Cryptographic Extension (JCE) wasreleased as a separate "Optional Package" (also briefly known as a"Standard Extension"), and was available for JDK 1.2.x and 1.3.x.During the development of JDK 1.4, regulations were relaxed enoughthat JCE (and SunJSSE) could be bundled as part of the JDK.

The following algorithms are available in theSunJCEprovider:

EngineAlgorithm Names
AlgorithmParameterGeneratorDiffieHellman
AlgorithmParametersAES
Blowfish
DES
DESede
DiffieHellman
OAEP
PBE
PBES2
PBEWithHmacSHA1AndAES_128
PBEWithHmacSHA224AndAES_128
PBEWithHmacSHA256AndAES_128
PBEWithHmacSHA384AndAES_128
PBEWithHmacSHA512AndAES_128
PBEWithHmacSHA1AndAES_256
PBEWithHmacSHA224AndAES_256
PBEWithHmacSHA256AndAES_256
PBEWithHmacSHA384AndAES_256
PBEWithHmacSHA512AndAES_256
PBEWithMD5AndDES
PBEWithMD5AndTripleDES
PBEWithSHA1AndDESede
PBEWithSHA1AndRC2_40
PBEWithSHA1AndRC2_128
PBEWithSHA1AndRC4_40
PBEWithSHA1AndPC4_128
RC2
CipherSee theCipher table.
KeyAgreementDiffieHellman
KeyFactoryDiffieHellman
KeyGeneratorAES
ARCFOUR
Blowfish
DES
DESede
HmacMD5
HmacSHA1
HmacSHA224
HmacSHA256
HmacSHA384
HmacSHA512
RC2
KeyPairGeneratorDiffieHellman
KeyStoreJCEKS
MacHmacMD5
HmacSHA1
HmacSHA224
HmacSHA256
HmacSHA384
HmacSHA512
HmacPBESHA1
PBEWithHmacSHA1
PBEWithHmacSHA224
PBEWithHmacSHA256
PBEWithHmacSHA384
PBEWithHmacSHA512
SecretKeyFactoryDES
DESede
PBEWithMD5AndDES
PBEWithMD5AndTripleDES
PBEWithSHA1AndDESede
PBEWithSHA1AndRC2_40
PBEWithSHA1AndRC2_128
PBEWithSHA1AndRC4_40
PBEWithSHA1AndRC4_128
PBKDF2WithHmacSHA1
PBKDF2WithHmacSHA224
PBKDF2WithHmacSHA256
PBKDF2WithHmacSHA384
PBKDF2WithHmacSHA512
PBEWithHmacSHA1AndAES_128
PBEWithHmacSHA224AndAES_128
PBEWithHmacSHA256AndAES_128
PBEWithHmacSHA384AndAES_128
PBEWithHmacSHA512AndAES_128
PBEWithHmacSHA1AndAES_256
PBEWithHmacSHA224AndAES_256
PBEWithHmacSHA256AndAES_256
PBEWithHmacSHA384AndAES_256
PBEWithHmacSHA512AndAES_256

The following table listscipher algorithms available in theSunJCE provider.

Algorithm NameModesPaddings
AESECB, CBC, PCBC, CTR, CTS, CFB, CFB8..CFB128, OFB,OFB8..OFB128NoPadding, PKCS5Padding, ISO10126PaddingFootnote 1
AESGCMNoPadding
AESWrapECBNoPadding
ARCFOURECBNoPadding
Blowfish, DES, DESede, RC2ECB, CBC, PCBC, CTR, CTS, CFB, CFB8..CFB64, OFB,OFB8..OFB64NoPadding, PKCS5Padding, ISO10126Padding
DESedeWrapCBCNoPadding
PBEWithMD5AndDES,
PBEWithMD5AndTripleDESFootnote 2,
PBEWithSHA1AndDESede,
PBEWithSHA1AndRC2_40,
PBEWithSHA1AndRC2_128,
PBEWithSHA1AndRC4_40,
PBEWithSHA1AndRC4_128,
PBEWithHmacSHA1AndAES_128,
PBEWithHmacSHA224AndAES_128,
PBEWithHmacSHA256AndAES_128,
PBEWithHmacSHA384AndAES_128,
PBEWithHmacSHA512AndAES_128,
PBEWithHmacSHA1AndAES_256,
PBEWithHmacSHA224AndAES_256,
PBEWithHmacSHA256AndAES_256,
PBEWithHmacSHA384AndAES_256,
PBEWithHmacSHA512AndAES_256
CBCPKCS5Padding
RSAECBNoPadding,
PKCS1Padding,
OAEPWithMD5AndMGF1Padding,
OAEPWithSHA1AndMGF1Padding,
OAEPWithSHA-1AndMGF1Padding,
OAEPWithSHA-224AndMGF1Padding,
OAEPWithSHA-256AndMGF1Padding,
OAEPWithSHA-384AndMGF1Padding,
OAEPWithSHA-512AndMGF1Padding
OAEPWithSHA-512/224AndMGF1Padding,
OAEPWithSHA-512/2256ndMGF1Padding

Footnote 1Though the standard doesn't specify or require the padding bytes to be random,the Java SE ISO10126Padding implementation pads with random bytes (until thelast byte, which provides the length of padding, as specified).

Footnote 2PBEWithMD5AndTripleDES is a proprietary algorithm that has not beenstandardized.

Keysize Restrictions

TheSunJCE provider uses the following default keysizes (inbits) and enforces the following restrictions:

KeyGenerator

Algorithm NameDefault KeysizeRestrictions/Comments
AES128Keysize must be equal to 128, 192, or 256.
ARCFOUR (RC4)128Keysize must range between 40 and 1024 (inclusive).
Blowfish128Keysize must be a multiple of 8, ranging from 32 to 448(inclusive).
DES56Keysize must be equal to 56.
DESede (Triple DES)168Keysize must be equal to 112 or 168.

A keysize of 112 will generate a Triple DES key with 2intermediate keys, and a keysize of 168 will generate a Triple DESkey with 3 intermediate keys.

Due to the "Meet-In-The-Middle" problem, even though 112 or 168bits of key material are used, theeffective keysize is 80or 112 bits respectively.

HmacMD5512No keysize restriction.
HmacSHA1512No keysize restriction.
HmacSHA224224No keysize restriction.
HmacSHA256256No keysize restriction.
HmacSHA384384No keysize restriction.
HmacSHA512512No keysize restriction.
RC2128Keysize must range between 40 and 1024 (inclusive).

Note: The various Password-Based Encryption (PBE)algorithms use various algorithms to generate key data, andultimately depends on the targeted Cipher algorithm. For example,"PBEWithMD5AndDES" will always generate 56-bit keys.


KeyPairGenerator

Algorithm NameDefault KeysizeRestrictions/Comments
Diffie-Hellman (DH)2048Keysize must be a multiple of 64, ranging from 512 to 2048(inclusive).

AlgorithmParameterGenerator

Alg. NameDefault KeysizeRestrictions/Comments
Diffie-Hellman (DH)2048Keysize must be a multiple of 64, ranging from 512 to 2048(inclusive).

TheSunJGSS Provider

The following algorithms are available in theSunJGSS provider:

OIDName
1.2.840.113554.1.2.2Kerberos v5
1.3.6.1.5.5.2SPNEGO

TheSunSASL Provider

The following algorithms are available in theSunSASL provider:

EngineAlgorithm Names
SaslClientCRAM-MD5
DIGEST-MD5
EXTERNAL
GSSAPI
NTLM
PLAIN
SaslServerCRAM-MD5
DIGEST-MD5
GSSAPI
NTLM

TheXMLDSig Provider

The following algorithms are available in theXMLDSig provider:

EngineAlgorithm Names
KeyInfoFactoryDOM
TransformServicehttp://www.w3.org/TR/2001/REC-xml-c14n-20010315 -(CanonicalizationMethod.INCLUSIVE)
http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments -(CanonicalizationMethod.INCLUSIVE_WITH_COMMENTS)
http://www.w3.org/2001/10/xml-exc-c14n# -(CanonicalizationMethod.EXCLUSIVE)
http://www.w3.org/2001/10/xml-exc-c14n#WithComments -(CanonicalizationMethod.EXCLUSIVE_WITH_COMMENTS)
http://www.w3.org/2000/09/xmldsig#base64 -(Transform.BASE64)
http://www.w3.org/2000/09/xmldsig#enveloped-signature -(Transform.ENVELOPED)
http://www.w3.org/TR/1999/REC-xpath-19991116 -(Transform.XPATH)
http://www.w3.org/2002/06/xmldsig-filter2 -(Transform.XPATH2)
http://www.w3.org/TR/1999/REC-xslt-19991116 -(Transform.XSLT)
XMLSignatureFactoryDOM

TheSunPCSC Provider

TheSunPCSC provider enables applications to use theJava Smart Card I/OAPI to interact with the PC/SC Smart Card stack of theunderlying operating system. On some operating systems, it may benecessary to enable and configure the PC/SC stack before it isusable. Consult your operating system documentation fordetails.

On Solaris and Linux platforms,SunPCSC accesses the PC/SC stackvia thelibpcsclite.so library. It looks for thislibrary in the directories/usr/$LIBISA and/usr/local/$LIBISA, where$LIBISA isexpanded tolib on 32-bit platforms,lib/64 on 64-bit Solaris platforms, andlib64 on 64-bit Linux platforms. The system propertysun.security.smartcardio.library may also be set tothe full filename of an alternatelibpcsclite.soimplementation. On Windows platforms,SunPCSC always calls intowinscard.dll and no Java-level configuration isnecessary or possible.

If PC/SC is available on the host platform, theSunPCSCimplementation can be obtained viaTerminalFactory.getDefault() andTerminalFactory.getInstance("PC/SC"). If PC/SC is notavailable or not correctly configured, agetInstance()call will fail with aNoSuchAlgorithmException andgetDefault() will return a JRE built-in implementationthat does not support any terminals.

The following algorithms are available in theSunPCSC provider:

EngineAlgorithm Names
TerminalFactoryPC/SC

TheSunMSCAPI Provider

TheSunMSCAPI provider enables applications to use the standardJCA/JCE APIs to access the native cryptographic libraries,certificates stores and key containers on the Microsoft Windowsplatform. TheSunMSCAPI provider itself does not containcryptographic functionality, it is simply a conduit between theJava environment and the native cryptographic services onWindows.

The following algorithms are available in theSunMSCAPI provider:

EngineAlgorithm Names
CipherRSARSA/ECB/PKCS1Padding only
KeyPairGeneratorRSA
KeyStoreWindows-MY

The keystore type that identifies the native Microsoft WindowsMY keystore. It contains the user's personal certificates andassociated private keys.

Windows-ROOT

The keystore type that identifies the native Microsoft WindowsROOT keystore. It contains the certificates of Root certificateauthorities and other self-signed trusted certificates.

SecureRandomWindows-PRNG

The name of the native pseudo-random number generation (PRNG)algorithm.

SignatureMD5withRSA
MD2withRSA
NONEwithRSA
RSASSA-PSS
SHA1withRSA
SHA256withRSA
SHA384withRSA
SHA512withRSA
SHA1withECDSA
SHA224withECDSA
SHA256withECDSA
SHA384withECDSA
SHA512withECDSA

Keysize Restrictions

TheSunMSCAPI provider uses the following default keysizes (inbits) and enforce the following restrictions:

KeyGenerator

Alg. NameDefault KeysizeRestrictions/Comments
RSA2048Keysize ranges from 512 bits to 16,384 bits (depending on theunderlying Microsoft Windows cryptographic service provider).

TheSunECProvider

TheSunEC provider implements Elliptical Curve Cryptography(ECC). Compared to traditional cryptosystems such as RSA, ECC offersequivalent security with smaller key sizes, which results in fastercomputations, lower power consumption, and memory and bandwidth savings.Applications can use the standard JCA/JCE APIs to access ECC functionalitywithout the dependency on external ECC libraries (throughSunPKCS11).

The following algorithms are available in theSunECprovider:

EngineAlgorithm Name(s)
AlgorithmParametersEC
KeyAgreementECDHFootnote 1
KeyFactoryEC
KeyPairGeneratorECFootnote 1
SignatureNONEwithECDSAFootnote 1
SHA1withECDSAFootnote 1
SHA224withECDSAFootnote 1
SHA256withECDSAFootnote 1
SHA384withECDSAFootnote 1
SHA512withECDSAFootnote 1

Footnote 1This algorithm won't be available from the SunEC provider through theJCA/JCE APIs if you delete theSunEC provider's native library.SeeEffect ofRemoving SunEC Provider's Native Library.

Effect ofRemoving SunEC Provider's Native Library

TheSunEC provider uses a native library to provide someECC functionality. If you don't want to use this native library, thendelete the following files (depending on your operating system):

If you delete the native library, then the algorithms with a footnotein the previous table won't be available from theSunECprovider through the JCA/JCE APIs.


Note: Other installed providers (for example,SunPCKS11) may still provide these algorithms.


Libraries and tools (for example, JSSE, XML Digital Signature, andkeytool) that use these algorithms may have reduced functionality.For example, JSSE may no longer be able to generate EC keypairs,use EC-based peer certificates, or perform ECDH/ECDHE key agreements forSSL/TLS connections. Ciphersuites such as TLS_*_ECDSA and TLS_ECDHE_* maybe unavailable. SSL/TLS connections can still use alternate algorithms tosecure connections, such as RSA-/DSA-based certificates and key agreementsbased on DH/DHE (RFC 2631) or FFDHE (RFC 7919).

Even if the native library is removed, the rest of the algorithms (thealgorithms without a footnote) are still available from the SunECprovider, as they are not implemented in the native library code.

Keysize Restrictions

TheSunEC provider uses the following default keysizes(in bits) and enforces the following restrictions:

KeyPairGenerator

Alg. NameDefault KeysizeRestrictions/Comments
EC256Keysize must range from 112 to 571 (inclusive).

Supported Elliptic Curve Names

TheSunEC provider includes implementations of variouselliptic curves for use with the EC, Elliptic-Curve Diffie-Hellman (ECDH),and Elliptic Curve Digital Signature Algorithm (ECDSA) algorithms. Some ofthese curves have been implemented using modern formulas and techniquesthat are valuable for preventing side-channel attacks. The others arelegacy curves that might be more vulnerable to attacks and should not beused. The tables below list the curves that fall into each of thesecategories.

In the following tables, the first column, Curve Name, lists the namethat SunEC implements. The second column, Object Identifier, specifies theEC name's object identifier. The third column, Additional Names/Aliases,specifies any additional names or aliases for that curve. All strings thatappear in one row refer to the same curve. For example, the stringssecp256r1,1.2.840.10045.3.1.7,NIST P-256, andX9.62 prime256v1 refer to the samecurve. You can use the curve names to create parameter specifications forEC parameter generation with theECGenParameterSpec class.

Recommended Curves

The following table lists the elliptic curves that are provided by theSunEC provider and are implemented using modern formulas andtechniques. These curves are recommended and should be preferred over thecurves listed in the sectionLegacy Curves Retained for Compatibility.

Curve NameObject IdentifierAdditional Names/Aliases
secp256r11.2.840.10045.3.1.7NIST P-256, X9.62 prime256v1
secp384r11.3.132.0.34NIST P-384
secp521r11.3.132.0.35NIST P-521

Legacy Curves Retained for Compatibility

It is recommended that you migrate to newer curves.

The following table lists elliptic curves that are provided by theSunEC provider and are not implemented using modern formulasand techniques. These curves remain available for compatibility reasons toafford legacy systems time to migrate to newer curves. Theseimplementations will be removed or replaced in a future version of the JDK.

Curve NameObject IdentifierAdditional Names/Aliases
secp112r11.3.132.0.6N/A
secp112r21.3.132.0.7N/A
secp128r11.3.132.0.28N/A
secp128r21.3.132.0.29N/A
secp160k11.3.132.0.9N/A
secp160r11.3.132.0.8N/A
secp160r21.3.132.0.30N/A
secp192k11.3.132.0.31N/A
secp192r11.2.840.10045.3.1.1NIST P-192, X9.62 prime192v1
secp224k11.3.132.0.32N/A
secp224r11.3.132.0.33NIST P-224
secp256k11.3.132.0.10N/A
sect113r11.3.132.0.4N/A
sect113r21.3.132.0.5N/A
sect131r11.3.132.0.22N/A
sect131r21.3.132.0.23N/A
sect163k11.3.132.0.1NIST K-163
sect163r11.3.132.0.2N/A
sect163r21.3.132.0.15NIST B-163
sect193r11.3.132.0.24N/A
sect193r21.3.132.0.25N/A
sect233k11.3.132.0.26NIST K-233
sect233r11.3.132.0.27NIST B-233
sect239k11.3.132.0.3N/A
sect283k11.3.132.0.16NIST K-283
sect283r11.3.132.0.17NIST B-283
sect409k11.3.132.0.36NIST K-409
sect409r11.3.132.0.37NIST B-409
sect571k11.3.132.0.38NIST K-571
sect571r11.3.132.0.39NIST B-571
X9.62 c2tnb191v11.2.840.10045.3.0.5N/A
X9.62 c2tnb191v21.2.840.10045.3.0.6N/A
X9.62 c2tnb191v31.2.840.10045.3.0.7N/A
X9.62 c2tnb239v11.2.840.10045.3.0.11N/A
X9.62 c2tnb239v21.2.840.10045.3.0.12N/A
X9.62 c2tnb239v31.2.840.10045.3.0.13N/A
X9.62 c2tnb359v11.2.840.10045.3.0.18N/A
X9.62 c2tnb431r11.2.840.10045.3.0.20N/A
X9.62 prime192v21.2.840.10045.3.1.2N/A
X9.62 prime192v31.2.840.10045.3.1.3N/A
X9.62 prime239v11.2.840.10045.3.1.4N/A
X9.62 prime239v21.2.840.10045.3.1.5N/A
X9.62 prime239v31.2.840.10045.3.1.6N/A

TheOracleUcrypto Provider

The Solaris-only security providerOracleUcryptoleverages the Solaris Ucrypto library to offload and delegatecryptographic operations supported by the Oracle SPARC T4 basedon-core cryptographic instructions. TheOracleUcryptoprovider itself does not contain cryptographic functionality; it issimply a conduit between the Java environment and the SolarisUcrypto library.

If the underlying Solaris Ucrypto library does not support aparticular algorithm, then theOracleUcrypto provider will notsupport it either. Consequently, at runtime, the supportedalgorithms consists of the intersection of those that the SolarisUcrypto library supports and those that theOracleUcrypto provider recognizes.

Note that theOracleUcrypto provider is includedonly in Oracle's JDK. It is not part of OpenJDK.

The following algorithms are available in theOracleUcrypto provider:

EngineAlgorithm Name(s)
CipherAES
RSA
AES/ECB/NoPadding
AES/ECB/PKCS5Padding
AES/CBC/NoPadding
AES/CBC/PKCS5Padding
AES/CTR/NoPadding
AES/GCM/NoPadding
AES/CFB128/NoPadding
AES/CFB128/PKCS5Padding
RSA/ECB/PKCS1Padding
RSA/ECB/NoPadding
SignatureMD5withRSA
SHA1withRSA
SHA256withRSA
SHA384withRSA
SHA512withRSA
MessageDigestMD5
SHA
SHA-256
SHA-384
SHA-512

Keysize Restrictions

TheOracleUcrypto provider does not specify anydefault keysizes or keysize restrictions; these are specified bythe underlying Solaris Ucrypto library.

OracleUcrypto Provider Configuration File

TheOracleUcrypto provider has a configuration filenameducrypto-solaris.cfg that resides in the$JAVA_HOME/lib/security directory. Modify thisconfiguration file to specify which algorithms to disable bydefault. For example, the following configuration file disables AESwith CFB128 mode by default:

## Configuration file for the OracleUcrypto provider#disabledServices = {  Cipher.AES/CFB128/PKCS5Padding  Cipher.AES/CFB128/NoPadding}

The Apple Provider

TheApple provider implements ajava.security.KeyStore that provides access to the macOS Keychain.

The following algorithms are available in theAppleprovider:

EngineAlgorithm Name(s)
KeyStoreKeychainStore

Copyright © 1993, 2025, Oracleand/or its affiliates. All rights reserved.
Contact Us

[8]ページ先頭

©2009-2025 Movatter.jp