crypto: Refactored all functions to use async functionality