Has it been Pwned
ImplementationLimited impact

Bouncy Castle fixes invalid-ciphertext handling in three NTRU-family KEMs

Bouncy Castle Java 1.87 fixes how SNTRU Prime and NTRU LPRime produce fallback secrets for rejected ciphertexts, and changes NTRU+ to signal rejection. These are distinct errors in how the library handled invalid inputs to decapsulation.

Added 18 Nov 2026. Source review: 18 Nov 2026. Checked the Java 1.87 release and tagged notes for both failure paths. No independent decapsulation tests or review of downstream implementations. Corrections.

Read the November 18 story about Bouncy Castle →

Broken implementation. The underlying math is not broken by this. The failure is in code, hardware, or how the primitive is used.

Background

Decapsulation uses a private key and a ciphertext to derive a shared secret. With implicit rejection, invalid ciphertexts also produce an output secret, derived along a fallback path. In SNTRU Prime and NTRU LPRime, Bouncy Castle used the re-encrypted value on that path, so different invalid inputs that decrypted to the same message received the same fallback secret. The vendor says version 1.87 preserves outputs for valid ciphertexts.

NTRU+ incorrectly returned a secret for rejected ciphertexts, either all zero or derived from the decrypted message. In version 1.87, extractSecret() throws for a rejected ciphertext and the implementation refuses non-canonical encodings.

Sources

  1. primary disclosureBouncy Castle Java 1.87 tagged release notesBouncy Castle, github.com
  2. primary disclosureBouncy Castle Java release downloads and notesBouncy Castle, bouncycastle.org