For Simplified Tax Invoices and their associated notes, the ECDSA signature of the cryptographic stamp’s public key by ZATCA’s technical CA
The way I understood this is:
I take the public key (The same public key that is in tag 8) as raw bytes
I sign those raw bytes somehow. Do I need to hash the bytes in any way first? Perhaps the same way I signed the invoice hash for tag 7
a. Get the invoice hash as a hexdigest (a hexadecimal string, not bytes)
b. ECDSA-sign that hexdigest.
Is my understanding correct? Should I simply get a hexdigest of tag 8 and sign it?
To generate a digital signature, please follow these steps:
1-Generate private key from CSR config file (you can refer to openssl commands, or readme file on SDK).
Sign the generated invoice hash (in SHA-256 format "hexadecimal ") with ECDSA using the private key (output).
@MAl-tamimi Thank you for your comment. It helped me a lot. For the past few days, I was stuck with the “certificate signature does not match with QR certificate signature value” error. I was unable to identify the issue, but I followed these steps and it is now working fine.