Implementation
Technical steps to implement the API
Implementation Guide
Overview
Security Model
Deployment Options


Implementation Steps
Step 0 - Generate Temporary Token (Recommended)
ML-KEM - Establishing Shared Secrets
Optional - AES via API
AES-256 - Step 1 (By encryptor):
AES-256 - Step 2 (By decryptor):
ML-DSA - Digital Signatures
Next Steps
Parameters: expiry_time (optional), expire_after_attempts (optional)
Headers: Authorization token
Response: { 'new_token': string }
Documentation: This API endpoint generates a temporary token, that lasts a set amount of time and can be used for a set amount of attempts.
3001Successful Response
Validation Error
No content
Parameters: None
Headers: Authorization token
Response: { 'pk': string, 'verification_key': string }
Documentation: This API endpoint generates a key pair, a public key (pk) and a secret key (sk). It also generates a verification key and a signature for digital verification purposes. The public key can be sent over to the message sender for encapsulation. The secret key gets stored privately for later retrieval.
Successful Response
Successful Response
No content
Body: pk, signature, verif_key
Headers: Authorization token
Response: { 'cipher': string, 'shared_key': string }
Documentation: This API endpoint uses the public key to encapsulate the key, which generates a random cipher and a shared secret. The cipher can be sent back to the message sender to use for decapsulation.
Successful Response
Validation Error
No content
Parameters: cipher, pk
Headers: Authorization token
Response: { 'shared_key': string }
Documentation: This API endpoint uses the the random cipher to generate a shared secret. If done correctly, this shared secret will now be only in the possession of the message sender and receiver and can be used as a symmetrical key to encrypt and decrypt any further data communication.
Successful Response
Validation Error
No content
Body: data
Headers: Authorization token
Response: { 'signature': string, 'pk': string }
Documentation: This API endpoint generates a digital signature on the data.
Successful Response
Validation Error
No content
body: data, pk, signature
Headers: Authorization token
Response: { 'verified': boolean }
Documentation: This API endpoint uses the signature and a public key to verify the origin of the data
Successful Response
Validation Error
No content
Body: unencrypted
Headers: Authorization token
Response: Encrypted message text
Documentation: This API endpoint uses the shared key to perform an AES encryption on a string (can be base64 or hex).
Successful Response
Validation Error
No content
Body: key, ciphertext
Headers: Authorization token
Response: Decrypted message text
Documentation: This API endpoint uses the shared key to perform an AES decryption on a fstringile.
Successful Response
Validation Error
No content
Last updated