Sharing an Encrypted File
Overview
Files are encrypted on your side before they are uploaded. Konfidant stores only the ciphertext and never receives the content, the file name or the key. See Zero-Knowledge Encryption for the model and the KNF1 format.
With an official SDK, sharing a file is one call:
The SDKs also expose the individual steps (createFileUpload, uploadCiphertext and completeFileUpload, or
their equivalents in each language) if you need to control the upload yourself.
The file flow step by step
Without an SDK, you must encrypt the file as KNF1 yourself and then make three requests.
1. Create an upload
Compute the exact size of the KNF1 ciphertext and request an upload slot. ttl_hours is optional and defaults to
your plan’s maximum.
The request is rejected with 400 if the size exceeds your plan’s file size limit, and with 403 if your monthly
upload quota or API share allowance is used up.
2. Upload the ciphertext
PUT the KNF1 bytes to upload_url with exactly the headers in upload_headers, within upload_expires_in
seconds. The body must be exactly ciphertext_size bytes; storage rejects any other size. Do not send your API key
to this URL.
3. Complete the share
The response is immediate: there is no server-side encryption step to wait for and no status endpoint to poll.
Completion succeeds exactly once per upload. file_id is null unless your organization has verified burn enabled.
4. Build the share link
Append the key to the fragment and send the result to the recipient:
The recipient can open the link once, until expires_at. The ciphertext is deleted as soon as it has been
delivered.
