floodyberry / ed25519-donna

Implementations of a fast Elliptic-curve Digital Signature Algorithm
169 stars 47 forks source link

Failed tests #11

Closed ghost closed 10 years ago

ghost commented 10 years ago

Considering my other questions, it's pretty easy to see how noob I am.

So here's a noob question: how can the library be properly compiled so that it passes the tests?

Here's my commands:

gcc ed25519.c -m64 -O3 -c gcc ed25519.o test.c -lssl -lcrypto -m64 -O3 ./a.out

This is my output:

60861 ticks/public key generation 64257 ticks/signature 221073 ticks/signature verification 59238 ticks/curve25519 basepoint scalarmult failed to generate expected result want: 51,e7,68,e0,f7,a1,88,45,de,a1,cb,d9,37,d4,78,53,1b,95,db,be,66,59,29,3b,94,51,2f,bc,0d,66,ba,3f, got : 49,b5,f9,d6,81,7e,da,9e,00,c8,83,81,bc,42,dc,75,08,db,e2,e6,63,70,35,1c,a5,35,6d,35,8d,29,51,61, diff: 18,52,91,36,76,df,52,db,de,69,48,58,8b,96,a4,26,13,4e,39,58,05,29,1c,27,31,64,42,89,80,4f,eb,5e,

This happens no matter what order the compiler arguments are.

test-internals.c reports "success".

Thank you so much for writing this lib!

Sorry! Should've read the directions more closely! :/

jaekwon commented 10 years ago

Wait, @JoeCoderGuy, what was the problem? I'm running into it.

jaekwon commented 10 years ago

Ah, you need to add the -DED25519_TEST flag when compiling.

gcc ed25519.c -m64 -O3 -c -DED25519_TEST gcc ed25519.o test.c -lssl -lcrypto -m64 -O3 -o test ./test