Skip to content

mveytsman/cryptopals

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cryptopals (in LiveBook!)

Introduction

Ah... cryptopals! See this comment by tptacek for a rundown of their history. Hard to believe these have been kicking around for 10+ years and I'm only now taking a serious crack at them.

Bleichenbacher aside, though, really what you're seeing is a snapshot of au courant crypto attacks from 2010. Away from the libsodium world we live in now, CBC and unauthenticated encryption were quite common, and you still had to convince developers to fix them.

I suspect Elixir/LiveBook is a killer combination for doing cryptopals in, and this is my attempt to prove this to myself.

Why do I think this?

  1. LiveBook is a joy to work with! You can get a feel for what's possible by watching Jose Valim's Advent of Code livestreams. It's what made me want to take on a project like this.
  2. Binary pattern matching. The <<>> special form is extrememly powerful, and a lot of the complexity of the bit/byte fiddling crypto attacks require becomes extremely elegant with it.
  3. Erlang's crypto library. Erlang's crypto library is old and has a lot of warts, but for this purpose they are features (see comment above).
  4. Bignums by default.

Hopefully, I'll learn some crypto engineering along the way.

Table of Contents