The Bouncy Castle JCE Provider carry a propagation bug
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| org.bouncycastle:bcprov-jdk14 Maven |
|
|
| org.bouncycastle:bcprov-jdk15 Maven |
|
|
| org.bouncycastle:bcprov-jdk15on |
| Product | Affected | Fixed in |
|---|---|---|
| org.bouncycastle:bcprov-jdk14 Maven |
|
|
| org.bouncycastle:bcprov-jdk15 Maven |
|
|
| org.bouncycastle:bcprov-jdk15on |
|
|
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.
From the CVE record · mitre
Bouncy Castle JCE Provider versions 1.51–1.55 have a carry-propagation bug in raw math squaring that can rarely produce incorrect elliptic-curve scalar multiplication results. The input does not establish an attacker action or specify network access, authentication, or user-interaction conditions; scalar-multiplier output validation would detect these errors with high probability.
Engineers using Maven packages org.bouncycastle:bcprov-jdk14, org.bouncycastle:bcprov-jdk15, or org.bouncycastle:bcprov-jdk15on at versions 1.51 through 1.55 should check their dependencies.