Improve crypto_util coverage

This PR includes commits from #126.