Enhanced signature and key exchange functions for blockchain and crypto applications, including post-quantum algorithms