Signing a Request Using RSA
For successful completion, follow the steps and examples below.
How to compute the signature with RSA
Prepare the payload
Convert the data to be signed (signature payload) into ASCII format. This payload typically includes all relevant request parameters or fields.
Generate the binary signature
Use the RSASSA-PKCS1-v1_5 signing algorithm with the SHA-256 hash function and your RSA private key to create a binary signature.
Encode the signature
Convert the binary output of the signature to a Base64 string (RFC 2045).
How to send a signed API request
Once the signature has been created, you can include it in your API request:
Add the Signature to the request header
Use the Base64-encoded signature generated in the previous step.
Include your API Key
Add your Quentrade API Key in the header alongside the Signature.
Send the request
Make the request to a SIGNED endpoint. Ensure the payload, headers, and method match the data used to compute the signature to avoid mismatches.
Examples & Interactive Generator
Below is a real-world example of signing a request using RSA with Quentrade API endpoints, along with an interactive calculator tool.
The following is a step-by-step guide for generating a valid RSA signature and sending a signed payload using Linux openssl, cURL, or the interactive tool below.
Request Parameters
Generating the Signature
After running the command, you'll get the signature: