Function starknet_crypto::sign

source ·
pub fn sign(
    private_key: &FieldElement,
    message: &FieldElement,
    k: &FieldElement
) -> Result<ExtendedSignature, SignError>
Expand description

Computes ECDSA signature given a Stark private key and message hash.

§Arguments

  • private_key: The private key
  • message: The message hash
  • k: A random k value. You MUST NOT use the same k on different signatures