Does anyone know how the signature verification is done mathematically in this TX?
The signature verification process is the same for all transactions (TX). If you want a comprehensive explanation, I recommend checking out this detailed resource:
https://cryptobook.nakov.com/digital-signatures/ecdsa-sign-verify-messagesBut in short you need to calculate the Proof of signature s
In short, the proof of signature involves verifying the mathematical relationship between the transaction message, the public key, and the provided signature. Here's a simplified breakdown of the process:
Calculate z is the double SHA-256 hash of the transaction message.
Use the nonce k is a randomly generated ephemeral private key that ensures uniqueness for each signature.
There is a z = double sha256 of the message
There is a Nonce K (like another ephemeral private key)
Compute R and extract r:
R = k * G (where G is the curve's generator point).
Take the x-coordinate of R to get r.
Calculate s (the proof of signature)
s= k^-1 * (z + r * privatekey) mod N
It's important to note that in cryptography, we use s (the computed part of the signature) to ensure the validity of the private key's influence on the signed message. Occasionally, you'll see -s (negative s) in verification contexts. This happens because ECDSA signatures are valid in both positive and negative forms due to the symmetry of elliptic curves. Verification software typically normalizes the signature by ensuring that s is the smaller of the two possible values (s or -s mod N)
The critical takeaway is that the process guarantees that only the holder of the correct private key could have generated the signature, ensuring authenticity. If you'd like me to expand on any specific step or provide further details, feel free to ask!