add 'mock'
make 'key' fixture reusable and refactor crypto helpers