JDK 22 Security Enhancements

20 Mar 2024

JDK 22 was released on March 19, 2024! As with my previous blogs, I have compiled a list of what I think are the most interesting and useful security enhancements in this release. I have also grouped them into appropriate categories (crypto, TLS, etc) which should make it easier to find out what has changed in each specific area. The JDK 22 release notes also contain further details on these and other enhancements.

Highlights of this release include a new security category for the java -XshowSettings option and several new root CA certificates.

Table of Contents

  1. Crypto
  2. PKI
  3. TLS
  4. XML Signature
  5. Tools

Crypto

PKI

Each of these root certificates have also been added to the cacerts keystore in Oracle’s JDK 21.0.2, 17.0.10, 11.0.22, 8u401, and 7u411 releases.

TLS

XML Signature

Tools



    $ java -XshowSettings:security:providers
    Security provider static configuration: (in order of preference)
        ----------------------------------------
        Provider name: SUN
        Provider information: SUN (DSA key/parameter generation; DSA signing;
            SHA-1, MD5 digests; SecureRandom; X.509 certificates; PKCS12, JKS &
            DKS keystores; PKIX CertPathValidator; PKIX CertPathBuilder; LDAP,
            Collection CertStores, JavaPolicy Policy; JavaLoginConfig
            Configuration)
        Provider services: (type : algorithm)
            AlgorithmParameterGenerator.DSA
              aliases: [OID.1.2.840.10040.4.1, 1.3.14.3.2.12, 1.2.840.10040.4.1]
            AlgorithmParameters.DSA
              aliases: [OID.1.2.840.10040.4.1, 1.3.14.3.2.12, 1.2.840.10040.4.1]
            CertPathBuilder.PKIX
            CertPathValidator.PKIX
            CertStore.Collection
            CertStore.com.sun.security.IndexedCollection
            CertificateFactory.X.509
              aliases: [X509]
            Configuration.JavaLoginConfig
            KeyFactory.DSA
              aliases: [1.3.14.3.2.12, 1.2.840.10040.4.1, OID.1.2.840.10040.4.1]
            KeyFactory.HSS/LMS
              aliases: [OID.1.2.840.113549.1.9.16.3.17,
                1.2.840.113549.1.9.16.3.17]
            KeyPairGenerator.DSA
              aliases: [1.2.840.10040.4.1, OID.1.2.840.10040.4.1, 1.3.14.3.2.12]
            KeyStore.CaseExactJKS
            KeyStore.DKS
            KeyStore.JKS
            KeyStore.PKCS12
            MessageDigest.MD2
              aliases: [OID.1.2.840.113549.2.2, 1.2.840.113549.2.2]
            MessageDigest.MD5 
              aliases: [OID.1.2.840.113549.2.5, 1.2.840.113549.2.5]
            MessageDigest.SHA-1
              aliases: [SHA1, SHA, 1.3.14.3.2.26, OID.1.3.14.3.2.26]
            MessageDigest.SHA-224
              aliases: [OID.2.16.840.1.101.3.4.2.4, SHA224,
                2.16.840.1.101.3.4.2.4]
            MessageDigest.SHA-256
              aliases: [SHA256, OID.2.16.840.1.101.3.4.2.1,
                2.16.840.1.101.3.4.2.1]
            MessageDigest.SHA-384
              aliases: [OID.2.16.840.1.101.3.4.2.2, SHA384,
                2.16.840.1.101.3.4.2.2]
            MessageDigest.SHA-512
              aliases: [OID.2.16.840.1.101.3.4.2.3, 2.16.840.1.101.3.4.2.3,
                SHA512]
            MessageDigest.SHA-512/224
              aliases: [SHA512/224, OID.2.16.840.1.101.3.4.2.5,
                2.16.840.1.101.3.4.2.5]
            MessageDigest.SHA-512/256
              aliases: [SHA512/256, OID.2.16.840.1.101.3.4.2.6,
                2.16.840.1.101.3.4.2.6]
            MessageDigest.SHA3-224
              aliases: [OID.2.16.840.1.101.3.4.2.7, 2.16.840.1.101.3.4.2.7]
            MessageDigest.SHA3-256
              aliases: [OID.2.16.840.1.101.3.4.2.8, 2.16.840.1.101.3.4.2.8]
            MessageDigest.SHA3-384
              aliases: [OID.2.16.840.1.101.3.4.2.9, 2.16.840.1.101.3.4.2.9]
            MessageDigest.SHA3-512
              aliases: [2.16.840.1.101.3.4.2.10, OID.2.16.840.1.101.3.4.2.10]
            SecureRandom.DRBG
            SecureRandom.NativePRNG
            SecureRandom.NativePRNGBlocking
            SecureRandom.NativePRNGNonBlocking
            SecureRandom.SHA1PRNG
            Signature.HSS/LMS
              aliases: [1.2.840.113549.1.9.16.3.17,
                OID.1.2.840.113549.1.9.16.3.17]
            Signature.NONEwithDSA
              aliases: [RawDSA]
            Signature.NONEwithDSAinP1363Format
            Signature.SHA1withDSA
              aliases: [DSS, 1.3.14.3.2.13, OID.1.2.840.10040.4.3, SHA1/DSA, DSA,
                SHA-1/DSA, SHAwithDSA, DSAWithSHA1, SHA/DSA, 1.2.840.10040.4.3,
                1.3.14.3.2.27]
            Signature.SHA1withDSAinP1363Format
            Signature.SHA224withDSA
              aliases: [2.16.840.1.101.3.4.3.1, OID.2.16.840.1.101.3.4.3.1]
            Signature.SHA224withDSAinP1363Format
            Signature.SHA256withDSA
              aliases: [2.16.840.1.101.3.4.3.2, OID.2.16.840.1.101.3.4.3.2]
            Signature.SHA256withDSAinP1363Format
            Signature.SHA3-224withDSA
              aliases: [2.16.840.1.101.3.4.3.5, OID.2.16.840.1.101.3.4.3.5]
            Signature.SHA3-224withDSAinP1363Format
            Signature.SHA3-256withDSA
              aliases: [2.16.840.1.101.3.4.3.6, OID.2.16.840.1.101.3.4.3.6]
            Signature.SHA3-256withDSAinP1363Format
            Signature.SHA3-384withDSA
              aliases: [2.16.840.1.101.3.4.3.7, OID.2.16.840.1.101.3.4.3.7]
            Signature.SHA3-384withDSAinP1363Format
            Signature.SHA3-512withDSA
              aliases: [2.16.840.1.101.3.4.3.8, OID.2.16.840.1.101.3.4.3.8]
            Signature.SHA3-512withDSAinP1363Format
            Signature.SHA384withDSA
              aliases: [2.16.840.1.101.3.4.3.3, OID.2.16.840.1.101.3.4.3.3]
            Signature.SHA384withDSAinP1363Format
            Signature.SHA512withDSA
              aliases: [2.16.840.1.101.3.4.3.4, OID.2.16.840.1.101.3.4.3.4]
            Signature.SHA512withDSAinP1363Format
    <remaining output snipped>

---
---
    $ java -XshowSettings:security:tls
    Security TLS configuration (SunJSSE provider):
        Enabled Protocols:
            TLSv1.3
            TLSv1.2

        Enabled Cipher Suites:
            TLS_AES_256_GCM_SHA384
            TLS_AES_128_GCM_SHA256
            TLS_CHACHA20_POLY1305_SHA256
            TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
            TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
            TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256
            TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
            TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256
            TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
            TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
            TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256
            TLS_DHE_DSS_WITH_AES_256_GCM_SHA384
            TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
            TLS_DHE_DSS_WITH_AES_128_GCM_SHA256
            TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
            TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
            TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
            TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
            TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
            TLS_DHE_DSS_WITH_AES_256_CBC_SHA256
            TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
            TLS_DHE_DSS_WITH_AES_128_CBC_SHA256
            TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
            TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
            TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
            TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
            TLS_DHE_RSA_WITH_AES_256_CBC_SHA
            TLS_DHE_DSS_WITH_AES_256_CBC_SHA
            TLS_DHE_RSA_WITH_AES_128_CBC_SHA
            TLS_DHE_DSS_WITH_AES_128_CBC_SHA
            TLS_RSA_WITH_AES_256_GCM_SHA384
            TLS_RSA_WITH_AES_128_GCM_SHA256
            TLS_RSA_WITH_AES_256_CBC_SHA256
            TLS_RSA_WITH_AES_128_CBC_SHA256
            TLS_RSA_WITH_AES_256_CBC_SHA
            TLS_RSA_WITH_AES_128_CBC_SHA
            TLS_EMPTY_RENEGOTIATION_INFO_SCSV

--- 

Issue: [JDK-8281658](https://bugs.openjdk.org/browse/JDK-8281658)