Utility functions for Bitcoin ECC