# Re: LibTomCrypt

*From*: "Tom St Denis" <tomstdenis@xxxxxxxxx>*Date*: 27 Jun 2006 17:01:10 -0700

mm wrote:

Tom St Denis a écrit :

Pascal is an inferior [hehehehe] language. I imagine you could write a

Sorry, I nearly missed this one :-)

Seriously dropping the ball man...

Consider the following code (It was in your file "ecc.c" and I have to

thank you for having suppressed it from your lib since, now, I can talk

about it):

I supressed it because I didn't want Certicom suing me.

Assuming p is prime, p = 3 mod 4 and pt is a valid point on the curve,

how do you explain that *all* the previous C code can be replaced by a

*single* Pascal (this inferior language) instruction?

Yeah that's nice and all. Except not all of the curves are 3 mod 4.

Result := (1 - Jacobi(pt.y,p)) shr 1;

I didn't have a Jacobi function at the time IIRC. I also don't see

what that does.

SQRTs are a^(p+1)/4 when p is 3 mod 4. Jacobi is congruent to

a^(p-1)/2 which is not the same thing.

All Jacobi will do is tell us whether the y in

y^2 = x^3 - 3x + b

is a QR or not. What we want to know is which root of (x^3 - 3x + b)

is y.

Personally I can see only one explanation: what makes a program is good

or not is much less the language used than the way it is used.

Maybe you should explain your math a bit more.

Tom

.

**Follow-Ups**:**Re: LibTomCrypt***From:*mm

**References**:**LibTomCrypt***From:*Matthijs Hebly

**Re: LibTomCrypt***From:*Tom St Denis

**Re: LibTomCrypt***From:*mm

- Prev by Date:
**Re: CRC32 - as good as 32bit checksums get?** - Next by Date:
**Re: DES advocacy** - Previous by thread:
**Re: LibTomCrypt** - Next by thread:
**Re: LibTomCrypt** - Index(es):