On 14/6/19 10:14 pm, Haggerty, Paul wrote:
> I’m trying to figure out how to use BC ECCurve.FP to construct a
> supersingular elliptic curve over F_p
> However the negative coefficient is causing an exception to be thrown.
> Caused by: java.lang.IllegalArgumentException: x value invalid in Fp
> field element
It needs a non-negative number, so instead of THREE.negate(), use
p.subtract(THREE) (i.e. -3 mod p).
> So there are two questions.
> 1. is it possible to create this curve with Bouncy Castle?
> 2. If so, any guidance would be appreciated
It should work fine, just ask again if you run into further trouble.