publicKey parameter for requests for eIdentification and eSigning
Evrotrust encrypts the signed documents with your public key, and only you can decrypt them with your private key.
Step 1: Generate an RSA 2048-bit key pair once
Step 1: Generate an RSA 2048-bit key pair once
Store the private key securely. It never leaves your system.
openssl genrsa -out private.pem 2048<br />
openssl rsa -in private.pem -pubout -out public.pem
Step 2: Base64-encode the entire public key PEM file
Step 2: Base64-encode the entire public key PEM file
Base64-encode the entire public key PEM file, including the -----BEGIN PUBLIC KEY----- and -----END PUBLIC KEY----- lines and line breaks.
base64 -w 0 public.pem
Step 3: Put the result into the publicKey field of the JSON request
Step 3: Put the result into the publicKey field of the JSON request
Then calculate the Authorization header over that final JSON, including this field.
Step 4: After signing, download the encrypted documents and decrypt them with private.pem as explained here.
If you lose the private key, you can’t read documents encrypted with its public key.
