Here are the latest numbers for hoax's code:
Javascript needs 3.6ms/getPublicKey
Javascript needs 6.9ms/sign
Javascript needs 7.8ms/verify
Nice job!
Could I kindly ask you to run test also on my code?
It was the Bitcointalk forum that inspired us to create Bitcointalksearch.org - Bitcointalk is an excellent site that should be the default page for anybody dealing in cryptocurrency, since it is a virtual gold-mine of data. However, our experience and user feedback led us create our site; Bitcointalk's search is slow, and difficult to get the results you need, because you need to log in first to find anything useful - furthermore, there are rate limiters for their search functionality.
The aim of our project is to create a faster website that yields more results and faster without having to create an account and eliminate the need to log in - your personal data, therefore, will never be in jeopardy since we are not asking for any of your data and you don't need to provide them to use our site with all of its capabilities.
We created this website with the sole purpose of users being able to search quickly and efficiently in the field of cryptocurrency so they will have access to the latest and most accurate information and thereby assisting the crypto-community at large.
Javascript needs 3.6ms/getPublicKey
Javascript needs 6.9ms/sign
Javascript needs 7.8ms/verify
testCurveKeygen: 764.000ms
testCurveSign: 0.000ms
testCurveVerify: 1200.000ms
testCryptoKey: 703.000ms
testCryptoSign: 1498.000ms (~~ 15ms/sign)
Javascript needs 3.6ms/getPublicKey
Javascript needs 6.9ms/sign
Javascript needs 7.8ms/verify
Javascript needs 3.6ms/getPublicKey
Javascript needs 6.9ms/sign
Javascript needs 7.8ms/verify
curveSelfTest : ok
sign time: 25.000ms
verify time: 16.000ms
sign+verify time: 41.000ms
verified? true
doing 20 signs
sigs20: 396.000ms
doing 20 verifies
verify20: 307.000ms
true,true,true,true,true,true,true,true,false,true,true,true,true,false,true,true,true,false,true,false
curveSelfTest : ok
sign time: 25.000ms
verify time: 16.000ms
sign+verify time: 41.000ms
verified? true
doing 20 signs
sigs20: 396.000ms
doing 20 verifies
verify20: 307.000ms
true,true,true,true,true,true,true,true,false,true,true,true,true,false,true,true,true,false,true,false
function crypto_sign(privKey, messageHash)
{
var pubAndS = this.c.genPubWithS(privKey);
var sess = pubAndS.s;
var x = SHA256(...);
var Y = this.c.genPub(x).key;
var h = SHA256(...);
var vh = this.c.sign(h, x, sess);
return {sig: vh, key: pubAndS.key};
}
/* checks if x is "negative", requires reduced input */
function is_negative(x)
{
return x[0] & 0xFF >= 0x80;
}
Javascript needs 12.22ms/getPublicKey
Javascript needs 26.24ms/sign
Javascript needs 21.18ms/verify
Javascript needs 12.22ms/getPublicKey
Javascript needs 26.24ms/sign
Javascript needs 21.18ms/verify
/* checks if x is "negative", requires reduced input */
function is_negative(x)
{
return x[0] & 0xFF >= 0x80;
}
SHA256_write(m, m.length);
/* checks if x is "negative", requires reduced input */
function is_negative(x)
{
return x[0] & 0xFF >= 0x80;
}
Javascript needs 5.5ms/getPublicKey
Javascript needs 12ms/sign
Javascript needs 9.5ms/verify
Javascript needs 12.22ms/getPublicKey
Javascript needs 26.24ms/sign
Javascript needs 21.18ms/verify
Javascript needs 16.6ms/getPublicKey
Javascript needs 33.8ms/sign
Javascript needs 27ms/verify