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[1], (vchSig[0] - 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 [0]? 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.