document crypto

and encapsulation

Closes #40