crypto: basic crypto functions

Added some basic crypto functions

TODO:

- [ ] Remove crypto code from `__init__.py`.
- [ ] Remove `.directory` file.
- [ ] Review the code and documentation.
- [ ] Fix the doctests to match the Matrix printing in master.
- [ ] Add the crypto module to the Sphinx documentation.