refactor siacrypto