WS: Implementing An Elliptic Curve in Go

DEF CON 25

Presented by: George Tankersley
Date: Saturday July 29, 2017
Time: 11:00 - 12:30
Location: Florentine Ballroom 3
Track: Crypto and Privacy Village

Elliptic curve implementations - dark magic, right? We all copy the mysterious bit twiddles andhave mechanically ported nacl everywhere. But what the hell are we actuallydoing?

I recently implemented Ed25519 from scratch in both pure Go and(dramatically faster) amd64 assembly, spending a frankly pathological amount of time to be sure I understood what I was doing, for a change. Now I'd like to share that. I'll explain the code (mine, and by extension ref10, donna, and amd64-51-30k from SUPERCOP) and the underlying concepts / design decisions behind it all. Then I'll talk about how I made the code fast- endianness tricks with Big.Ints, why assembly doesn't always mean faster, how the inlining model of the compiler works, and some tools you can use to make writing Plan9 asm less awful. Talk MAY use the “make it Go fast”joke but implementers SHOULD avoid the temptation.

George Tankersley

George Tankersley is a cryptography engineer at Cloudflare working on anonymous credentials, certificate transparency, and crypto at scale. For fun he works on anonymity tools and - very occasionally - even does some things that *don't* involve teaching eldritch geometry to thinking machines. Twitter handle ofpresenter(s): @gtank__ Website of presenter(s) or content: https://gtank.cc


KhanFu - Mobile schedules for INFOSEC conferences.
Mobile interface | Alternate Formats