Security

How Java Card 3.2 and JCDK 26.1 Harden Secure Elements with Post-Quantum Cryptography (ML-KEM & ML-DSA)

On November 23, 2026, Oracle released Java Card Development Kit 26.1 alongside Preview APIs in Java Card 3.2 for FIPS 203 ML-KEM and FIPS 204 ML-DSA. Built for passports, automotive eSIMs, and IoT Secure Elements, the design uses 32-byte and 64-byte compact seeds to cut provisioning overhead dramatically compared to expanded private keys.

By 0xScorPionSon

7 min read

How Java Card 3.2 and JCDK 26.1 Harden Secure Elements with Post-Quantum Cryptography (ML-KEM & ML-DSA)

Java Card PQC APIs architecture showing 32-byte and 64-byte compact seeds, Secure Element JCRE, and ML-KEM / ML-DSA operations

Executive Summary

On November 23, 2026, Oracle released Java Card Development Kit (JCDK) 26.1 alongside three Preview Features in the Java Card 3.2 specifications bringing standardized post-quantum cryptography (PQC) to Secure Elements (Oracle JCDK 26.1; Oracle Java Card PQC).

Designed for long-lived hardware trust anchors—including electronic passports, automotive eSIMs, smart meters, medical devices, and smartphone payment chips—the new APIs implement FIPS 203 (ML-KEM-512/768/1024) and FIPS 204 (ML-DSA-44/65/87) while addressing the tight RAM, EEPROM/flash, and APDU bandwidth limits of embedded Secure Elements (Oracle Java Card PQC).

Key architectural takeaways:

  • Massive Provisioning Savings via Compact Seeds: Storing private keys as 32-byte (ML-DSA) or 64-byte (ML-KEM) seeds instead of multi-kilobyte expanded encodings cuts factory personalization payloads dramatically—provisioning 10 ML-DSA-87 private keys requires 320 bytes of seed material versus 48,960 bytes expanded (Oracle Java Card PQC).
  • Shared-State & Transaction Safety: Stateless JCRE-owned KEM instances (javacardx.crypto.kem.KEM) can be shared across applets, while Java Card transactions guarantee all-or-nothing key-rotation updates if contactless power is lost mid-write (Oracle Java Card PQC).
  • Preview Status Caveat: Because these APIs ship as Preview Features in JCDK 26.1's Simulator, signatures and behavior may evolve before becoming permanent platform specifications—making them ready for architectural prototyping today, not yet frozen silicon sign-off (Oracle JCDK 26.1).

Trust Model & Architecture

Secure Elements cannot simply be swapped out in the field after deployment. As NIST IR 8547 (finalized October 27, 2026) and Oracle's security guidance emphasize, long-lived devices face two distinct post-quantum threats: "harvest now, decrypt later" against classical key establishment, and future signature forgery against long-lived device trust anchors (Oracle Java Card PQC; NIST IR 8547).

To fit multi-kilobyte lattice cryptography onto smart-card hardware without vendor-specific API lock-in, Java Card 3.2 defines three interoperable Preview Features:

Application Need Preview Feature Primary Java Card API Supported Algorithms / Parameter Sets
Create, provision & clear keys Module-Lattice-Based Keys javacardx.security.pqc (PQCKeyFactory, EncodableKey) ML-KEM-512/768/1024, ML-DSA-44/65/87
Establish shared secrets Key Encapsulation Mechanism (KEM) javacardx.crypto.kem.KEM ML-KEM-512/768/1024 (FIPS 203) & DHKEM (RFC 9180: P-256/384/521, X25519, X448)
Sign & verify data ML-DSA Signatures javacard.security.Signature / Signature.OneShot ML-DSA-44/65/87 (FIPS 204)

Seed vs. Expanded Key Storage Trade-Off

In FIPS 203 and FIPS 204, lattice keys are far larger than RSA or ECC keys. Java Card 3.2 separates key-object allocation from key-material representation so applets can optimize for storage at personalization time or speed at runtime (Oracle Java Card PQC):

Parameter Set Public Key (Bytes) Expanded Private Key (Bytes) Private-Key Seed (Bytes)
ML-KEM-768 (FIPS 203) 1,184 2,400 64
ML-DSA-87 (FIPS 204) 2,592 4,896 32
flowchart LR
    A[Host / Personalization Server] -->|32B or 64B Seed via APDU| B[Secure Element Persistent Memory]
    B -->|PQCKeyFactory / MODE_EXPAND| C[JCRE Stateless KEM or Signature Instance]
    A -->|Large Message -> External mu 64B| C
    C -->|ML-KEM Shared Secret / ML-DSA Sig| D[Authenticated & Confidential Channel]

For large messages, Signature also supports an external mu mode (SIG_CIPHER_ML_DSA_EXTERNAL_MU and SIG_CIPHER_ML_DSA_EXTERNAL_MU_EXPAND_SEED), allowing the host to compute the 64-byte FIPS 204 message representative outside the Secure Element to minimize APDU traffic (Oracle Java Card PQC).


What Researchers & Analysts Say

Standards Alignment: NIST IR 8547, FIPS 203/204, and GlobalPlatform SCP12

On October 27, 2026, NIST published the final version of NIST IR 8547 (Transition to Post-Quantum Cryptography Standards), supporting Executive Order 14412 and OMB Memorandum M-26-15 to accelerate migration away from quantum-vulnerable RSA and elliptic-curve algorithms (NIST IR 8547).

Two architectural points from NIST and Oracle's standards guidance directly shape Secure Element deployments:

  1. Hybrid Key Establishment & Dual Signatures: NIST IR 8547 notes that hybrid schemes—such as combining classical ECDHE with ML-KEM encapsulation, or dual digital signatures—are accommodated under existing NIST guidelines as long as at least one component algorithm is NIST-approved, though security properties require careful analysis (NIST IR 8547 PDF; Oracle Java Card PQC). Java Card's unified KEM API supports both ML-KEM and classical DHKEM (RFC 9180), while GlobalPlatform is developing SCP12 to standardize post-quantum and hybrid secure-channel management (Oracle Java Card PQC).
  2. Protocol Completeness Boundary: Oracle explicitly notes that a KEM is not a complete authenticated encryption protocol on its own—applets and host services must still implement key derivation, hybrid secret combination, and certificate-based authentication (Oracle Java Card PQC).

Known Limitations & Evaluation Caveats

  • Preview API Stability: All three PQC APIs in Java Card 3.2 / JCDK 26.1 are Preview Features intended for evaluation in the JCDK Simulator (which now includes interactive JShell scripting, Eclipse debugging, and up to 10 Windows PC/SC reader instances) and may change before final standardization (Oracle JCDK 26.1).
  • RAM vs. Flash Trade-Off: Expanding a seed on-the-fly (MODE_EXPAND for KEM or SIG_CIPHER_ML_DSA_EXPAND_SEED for signatures) saves persistent storage when many keys are provisioned, but still requires reserving working RAM inside the cryptographic instance (Oracle Java Card PQC).

Hardening & Implementation Blueprint

Compact Seed Provisioning & Transaction-Safe Key Rotation

When provisioning keys or rotating credentials on contactless Secure Elements (which can lose power if a card leaves an NFC field mid-operation), Java Card guarantees that a key is never marked initialized with half-written material. Wrapping key generation and application version-record updates inside a JCSystem transaction ensures all-or-nothing rollback on power loss (Oracle Java Card PQC):

// Provision a compact 64-byte ML-KEM-768 seed and derive the 1,184-byte public key
MLKEMPrivateKey seedKey = (MLKEMPrivateKey) PQCKeyFactory.buildKey(
    NamedParameterSpec.ML_KEM_768,
    (short) (KeyBuilder.ATTR_PRIVATE
           | JCSystem.MEMORY_TYPE_PERSISTENT
           | PQCKeyFactory.ATTR_SEED)
);
seedKey.setEncoded(seedBuffer, seedOffset, (short) 64);

// Retrieve public key directly from the seed without allocating a separate public-key object
short publicKeyEnd = seedKey.getPublicKey(publicKeyBuffer, (short) 0);

// Sign a challenge using on-the-fly seed expansion with an explicit application context
Signature signer = Signature.getInstance(
    MessageDigest.ALG_NULL,
    Signature.SIG_CIPHER_ML_DSA_EXPAND_SEED,
    Cipher.PAD_NULL,
    false
);
byte[] context = { 0x41, 0x55, 0x54, 0x48 }; // "AUTH"
signer.init(mldsaSeedKey, Signature.MODE_SIGN, context, (short) 0, (short) context.length);
short sigLen = signer.sign(challengeBuf, (short) 0, challengeLen, sigBuf, (short) 0);

Operational Overhead & Deployment Checklist

  1. Audit Seed vs. Expanded Keys by Lifecycle Stage: Provision 32-byte (ML-DSA) or 64-byte (ML-KEM) seeds at the factory to cut APDU transfer time, then expand only high-frequency keys at runtime (Oracle Java Card PQC).
  2. Offload Large-Message Hashing: Use SIG_CIPHER_ML_DSA_EXTERNAL_MU when signing documents larger than a short auth challenge to avoid pushing full payloads over APDU links (Oracle Java Card PQC).
  3. Reuse JCRE Shared KEM Instances: Because KEM.getInstance(...) returns a stateless JCRE-owned Entry Point Object, share one configured instance across applets while keeping keys isolated per applet context (Oracle Java Card PQC).

Frequently Asked Questions

1. Which post-quantum algorithms does Java Card 3.2 / JCDK 26.1 support?

The Preview Features support ML-KEM-512, ML-KEM-768, and ML-KEM-1024 (FIPS 203) for key encapsulation, alongside ML-DSA-44, ML-DSA-65, and ML-DSA-87 (FIPS 204) for digital signatures, plus classical DHKEM (RFC 9180) through the same KEM API (Oracle Java Card PQC).

2. Why do compact seeds matter for Secure Elements?

Expanded PQC private keys are several kilobytes (2,400 bytes for ML-KEM-768, 4,896 bytes for ML-DSA-87). Storing keys as 64-byte or 32-byte seeds reduces flash footprint and speeds up factory/field personalization over slow APDU links (Oracle Java Card PQC).

3. Are the Java Card PQC APIs finalized for production silicon?

No. They are released as Preview Features in the latest Java Card 3.2 specifications and implemented in the JCDK 26.1 Simulator for evaluation and feedback; APIs may evolve before becoming permanent platform specifications (Oracle JCDK 26.1).

4. How does Java Card prevent corrupted keys if a contactless card loses power?

Java Card guarantees that a key is never marked initialized with partial data, and developers can wrap key-pair generation and application-state updates inside a JCSystem transaction for all-or-nothing commit/abort behavior (Oracle Java Card PQC).

5. Can Java Card applets update to PQC without re-provisioning all existing data?

JCDK 26.1 also adds GlobalPlatform Executable Load File Upgrade v1.1 (org.globalplatform.upgrade / MANAGE ELF UPGRADE), allowing applets to save selected instance state before a code upgrade and restore it afterward (Oracle JCDK 26.1).


Sources

  1. Oracle Java Blog (Primary): "Post-Quantum Cryptography on Java Card: APIs Designed for Secure Elements" by Nicolas Ponsini — https://blogs.oracle.com/java/post-quantum-cryptography-on-java-card-apis-designed-for-secure-elements (November 23, 2026)
  2. Oracle Java Blog (Primary): "Java Card Development Kit 26.1: Post-Quantum Cryptography and a More Interactive Development Workflow" by Nicolas Ponsini — https://blogs.oracle.com/java/java-card-development-kit-26-1-post-quantum-cryptography-and-a-more-interactive-development-workflow (November 23, 2026)
  3. NIST CSRC (Primary Standard): NIST IR 8547 — Transition to Post-Quantum Cryptography Standards (Final) — https://csrc.nist.gov/pubs/ir/8547/final (October 27, 2026)
  4. NIST CSRC (Primary Standard): FIPS 203 (ML-KEM) & FIPS 204 (ML-DSA) — https://csrc.nist.gov/pubs/fips/203/final | https://csrc.nist.gov/pubs/fips/204/final (August 13, 2024)

More on Security

Security

OpenAI and Cisco Shirudo: Cryptographically Signed eBPF Shields, TPM Attestation, and Linux Kernel Requirements

Launched on November 23–24, 2026 by OpenAI and Cisco under a BSD-2-Clause license, Shirudo is an open-source eBPF Linux runtime that lets AI agents generate, test, and load cryptographically signed kernel shields without restarting running services. Learn how its TPM-backed trust model works, how it blocked Java4Shell in testing, and why its 5 unmerged bpf-next kernel patches matter.

6 min read

Security

CrowdStrike and Zscaler ($43.9B): Unifying Endpoint Telemetry and Inline Zero Trust SASE for AI Agents

Announced on November 23, 2026, CrowdStrike's $43.9 billion all-stock acquisition of Zscaler aims to unite Falcon endpoint and cloud workload sensors with Zscaler's inline Zero Trust Exchange across 200+ locations. Here is how the combined control plane targets agentic AI traffic, what the SEC filing discloses, and which integration and lock-in trade-offs architects face before the FY2028 close.

7 min read

Tell us what is not working

A thirty-minute call, no deck and no obligation. You will leave with a straight answer about whether this is worth building - including if that answer is no.

Start a project

Direct line

hello@codebumble.net
Dhaka, Bangladesh  :   local timeCalls in English or Bangla