Skip to main content
POST
/
abdm
/
v1
/
ecdh
/
encrypt
cURL
curl --request POST \
  --url https://api.eka.care/abdm/v1/ecdh/encrypt \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "plain_text_data": "<string>",
  "receiver_nonce": "<string>",
  "receiver_public_key": "<string>",
  "sender_nonce": "<string>",
  "sender_private_key": "<string>",
  "sender_public_key": "<string>"
}
'
{
  "encrypted_data": "<string>",
  "key_to_share": "<string>"
}

Authorizations

Authorization
string
header
required

The API requires a Bearer token (JWT) for authentication.

Body

application/json
plain_text_data
string

Plaintext data to encrypt

receiver_nonce
string

Nonce associated with the receiver's key pair

receiver_public_key
string

Base64-encoded public key of the receiver

sender_nonce
string

Nonce associated with the sender's key pair

sender_private_key
string

Base64-encoded private key of the sender

sender_public_key
string

Base64-encoded public key of the sender

Response

OK

encrypted_data
string

Base64-encoded encrypted data

key_to_share
string

Public key material to share with the receiver