Blockchain Drive supports client-side encryption so that file contents are never readable on the server or on IPFS without the correct password. The encryption API exposes the same algorithms used by the upload UI, allowing programmatic workflows that need to encrypt or decrypt files independently.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ankit-bista/Final-Project/llms.txt
Use this file to discover all available pages before exploring further.
Most users encrypt files through the upload UI, which calls these endpoints automatically. You only need to call them directly if you are building a custom integration or performing bulk operations outside the browser client.
/api/encryption prefix. They do not require authentication — but they are stateless utilities; encrypting a file here does not upload it to IPFS.
GET /api/encryption/methods
Returns the list of encryption algorithms supported by the platform.Algorithm identifier:
AES-128 or AES-256.Effective key length in bits. Both methods use a 32-byte (256-bit) derived key internally; the value reflects the security tier (
256 for both).PBKDF2-SHA256 iteration count for key derivation.
10000 for AES-128, 100000 for AES-256.Estimated throughput in MB/s on reference hardware.
80 for AES-128, 45 for AES-256.POST /api/encryption/validate-password
Checks whether a password meets the platform’s strength requirements and returns a detailed breakdown.The candidate password to evaluate.
true when 4 or more of the 5 checks pass.Number of checks passed, from
0 to 5.Per-check pass/fail flags:
minLength (≥ 12 chars), uppercase, lowercase, number, special.POST /api/encryption/encrypt
Encrypts a file buffer with the chosen algorithm and returns the ciphertext and metadata needed to decrypt later. The request must bemultipart/form-data.
The raw file to encrypt. Use the multipart field name
file.Encryption password. The key is derived via PBKDF2 using the iteration count for the selected method.
Algorithm to use. One of
AES-128 or AES-256. Defaults to AES-256.encryption field body when calling POST /upload.
Original file name, preserved for display after decryption.
Plaintext size in bytes.
400 file or password missing, 400 unknown method (INVALID_METHOD), 500 encryption failure.
POST /api/encryption/decrypt
Decrypts a previously encrypted payload and returns the plaintext as a base64-encoded string.The same password used during encryption.
POST /api/encryption/encrypt (algorithm, IV, salt, ciphertext, etc.).
Base64-encoded plaintext bytes. Decode and save to restore the original file.
Size of the recovered plaintext in bytes.
400 wrong password or corrupted ciphertext (DECRYPT_FAILED), 400 unknown method (INVALID_METHOD).
GET /api/encryption/estimate-time
Estimates how long encryption or decryption will take for a file of a given size.File size in bytes to estimate for.
Algorithm:
AES-128 or AES-256. Defaults to AES-256.The resolved algorithm name (e.g.
AES-256).The file size used for the estimate (echoes the
bytes query param).Estimated processing time in milliseconds.
POST /api/encryption/compare-methods
Compares estimated performance of AES-128 vs AES-256 for a given file size.File size in bytes to use for the comparison.
GET /api/encryption/estimate-time.