@hoax: I don't think your version of is_negative is compatible with the java version, or is it?
/* checks if x is "negative", requires reduced input */
function is_negative(x)
{
return x[0] & 0xFF >= 0x80;
}
This check for overflow. Tested on Jaguar0625 tests(generated from Java) and get 100/100 passed, so... You can correct me if i'm wrong.
Hmmm.....you didn't understand what I was trying to say, so here we go again.
Your code: is_negative(1) returns 0 (hopefully the & operator gets executed before >= operator).
Java code: is_negative(1) returns 1.
Since u use
your is_negativ for
both siging and verifying, it works.
But if u sign with your code and try to verify with the java code, it should fail sometimes (didn't test that but it really should fail).