As I could understand, we can recover the R and the S values from any transaction following the ScriptSig where we have DER serialization.
- Segwit transactions, where the signature will be in the witness section, recovering R and S follow the same steps?
- If I use the compressed public key (starting with 0x02 or 0x03) how can I verify the signature, since I don't have the Y coordinate of the public key?
- For multi-sig transactions using P2SH as I understand we need to sign with the first key, then get the output transaction with the first signature and sign it with the other key, but using the signature math we use the hash of the message which is the txId, but on segwit the txid will not change after signing since the witness is not counting as part of the hash for txid?
Any other thing that I should look when signing a transaction?