refactor to remove usage of ursa module, just straight crypto for core