pub fn sign(secret: &K256PrivateKey, message: &Message) -> Result<Signature, Error> {
    let context = &SECP256K1;
    let s = context.sign_ecdsa_recoverable(&SecpMessage::from_slice(&message[..])?, &secret.0);
    let (rec_id, data) = s.serialize_compact();
    let mut data_arr = [0; 65];

    // no need to check if s is low, it always is
    data_arr[0..64].copy_from_slice(&data[0..64]);
    data_arr[64] = rec_id.to_i32() as u8;
    Ok(Signature(data_arr))
}
Signs message with the given secret key.
Returns the corresponding signature.
core/lib/crypto_primitives/src/ecdsa_signature.rs