Re: using ECCurve.FP for a supersingular curve

Peter Dettman <[email protected]> Mon, 17 Jun 2019 11:11:49 +0700
Newsgroups gmane.comp.encryption.bouncy-castle.devel
Message-ID <[email protected]>
Hi Paul,

On 14/6/19 10:14 pm, Haggerty, Paul wrote:
> Hi,
> 
> I’m trying to figure out how to use  BC ECCurve.FP  to construct a
> supersingular elliptic curve over F_p
<snip>
> 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.

Regards,
Pete Dettman