{"id":165,"date":"2012-02-11T13:12:35","date_gmt":"2012-02-11T21:12:35","guid":{"rendered":"http:\/\/blog.mozilla.org\/warner\/?p=165"},"modified":"2012-07-26T12:19:17","modified_gmt":"2012-07-26T20:19:17","slug":"new-ed25519-ref10-implementation-available-20x-faster","status":"publish","type":"post","link":"https:\/\/blog.mozilla.org\/warner\/2012\/02\/11\/new-ed25519-ref10-implementation-available-20x-faster\/","title":{"rendered":"New Ed25519 &#8220;ref10&#8221; implementation available: 20x faster"},"content":{"rendered":"<p>&#8220;Dcoder&#8221; on the #tahoe-lafs IRC channel was kind enough to point me at the latest SUPERCOP benchmark-suite release: <a title=\"http:\/\/hyperelliptic.org\/ebats\/supercop-20120210.tar.bz2\" href=\"http:\/\/hyperelliptic.org\/ebats\/supercop-20120210.tar.bz2\">http:\/\/hyperelliptic.org\/ebats\/supercop-20120210.tar.bz2<\/a> , which includes a new portable-C reference version of the Ed25519 signature code named &#8220;ref10&#8221;. I added this into python-ed25519 in the &#8220;ref10&#8221; branch (at <a title=\"https:\/\/github.com\/warner\/python-ed25519\/tree\/ref10\" href=\"https:\/\/github.com\/warner\/python-ed25519\/tree\/ref10\">https:\/\/github.com\/warner\/python-ed25519\/tree\/ref10<\/a>) and did some quick speed comparisons.<\/p>\n<p>I&#8217;m delighted to see that the new code is roughly 20x faster than the previous version, without using processor-specific non-portable assembly language. The old &#8220;ref&#8221; code, on my 2008 laptop (2.53GHz Core2Duo), makes signatures in 2ms and verifies them in 7ms. The &#8220;ref10&#8221; code signs in 120us and verifies in 307us. That&#8217;s over 8300 signatures per second! The ref10 version also includes the batch-verification function, which (thanks to some tricks in the design of Ed25519) makes it faster to verify many signatures at once. Interestingly, this requires random numbers on the *verification* side (since it&#8217;s doing statistical verification: if the attacker knew which random numbers you were going to use, they could craft a set of message that would appear valid when checked by the batch verifier, but were invalid when checked individually).<\/p>\n<p>Naturally, this release came exactly one day after I finally published python-ed25519 1.0 :-). But 1.1 will have the speedups.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8220;Dcoder&#8221; on the #tahoe-lafs IRC channel was kind enough to point me at the latest SUPERCOP benchmark-suite release: http:\/\/hyperelliptic.org\/ebats\/supercop-20120210.tar.bz2 , which includes a new portable-C reference version of the Ed25519 signature code named &#8220;ref10&#8221;. I added this into python-ed25519 in the &#8220;ref10&#8221; branch (at https:\/\/github.com\/warner\/python-ed25519\/tree\/ref10) and did some quick speed comparisons. I&#8217;m delighted to see [&hellip;]<\/p>\n","protected":false},"author":328,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10479],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.mozilla.org\/warner\/wp-json\/wp\/v2\/posts\/165"}],"collection":[{"href":"https:\/\/blog.mozilla.org\/warner\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.mozilla.org\/warner\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/warner\/wp-json\/wp\/v2\/users\/328"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/warner\/wp-json\/wp\/v2\/comments?post=165"}],"version-history":[{"count":0,"href":"https:\/\/blog.mozilla.org\/warner\/wp-json\/wp\/v2\/posts\/165\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.mozilla.org\/warner\/wp-json\/wp\/v2\/media?parent=165"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mozilla.org\/warner\/wp-json\/wp\/v2\/categories?post=165"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mozilla.org\/warner\/wp-json\/wp\/v2\/tags?post=165"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}