I understand that the public key (Q) can be extracted from a signature (r,s), but I'm having trouble understanding this line:
if (!key.Recover(hash, &vchSig, (vchSig - 27) & ~4))
The third variable is called "rec" and must 0 through 3.
What is the purpose of this parameter (3rd one)?
Why is the signature starting a byte1 and not ? Perhaps I'm not properly understanding "where" r and s is located in the Bitcoin signature.
By any chance is the signature format encapsulated in any standard? PKCS..? etc.