Feature refactor crypto 11

YEAH! /cc @pquerna @bnoordhuis @isaacs