Logging
Extract encode method for signature. Implement signing for ECDSA.