Fix SIGSEGV inside of rsa.nim and ecnist.nim.
Add PublicKey and Signature types to daemonapi. Add more tests for crypto.nim