Encrypt Data
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:
- Key Agreement: ECDH on Curve25519 (Weierstrass form)
- Key Derivation: HKDF-SHA256
- Symmetric Encryption: AES-256-GCM
- Nonce Handling: IV and salt are derived from XOR of sender and receiver nonces
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.
Authorizations
The API requires a Bearer token (JWT) for authentication.
Body
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
Response
OK
Base64-encoded encrypted data
Public key material to share with the receiver

