Encrypt data using ECDH key exchange.
This API encrypts plaintext health data using ECDH shared secret derivation. A shared secret is derived from the sender’s private key and the receiver’s public key. The IV and salt are computed from the XOR of sender and receiver nonces, and the data is encrypted using AES-256-GCM.
Algorithm details:
The response includes the base64-encoded encrypted data and the public key material to share with the receiver.
For more details, refer to the ABDM Encryption and Decryption Guide.
The API requires a Bearer token (JWT) for authentication.
Plaintext data to encrypt
Nonce associated with the receiver's key pair
Base64-encoded public key of the receiver
Nonce associated with the sender's key pair
Base64-encoded private key of the sender
Base64-encoded public key of the sender
OK
Base64-encoded encrypted data
Public key material to share with the receiver