Global Feed Post Login
Replying to Avatar Mike Dilger ☑️

So I've heard that ed25519 is a faster curve than secp256k1 and I've always believed it.

I just compared the signature verification performance of rust secp256k1 (which uses Pieter Ruille's secp256k1 c library) against the signature verification performance of rust ed25519-dalek (pure rust). They are similar. Over one million sequential signature verifications, I get these results:

Time per secp256k1 verification: 26826ns

Time per ed25519 verification: 24634ns

There are a few things about ed25519 to pay attention to though:

1) It uses SHA-512, not SHA-256 because RFC 8032 for ed25519 specifies only SHA-512. This might be why it wasn't much faster.

2) All random bitstrings make valid keys

3) The code is safe against power analysis and timing attacks (might also be true of secp256k1)

4) The dalek library does secure-erase of memory as it drops (might also be true of secp256k1)

Avatar
Nuh 1y ago

all details about ed25519 vs secp256k1 are red herring, except one; Mainline DHT uses the former.

Reply to this note

Please Login to reply.

Discussion

No replies yet.