arrow-up-from-bracketUpload

Sending files into blockchain via Aetrna

Allows you to efficiently store any type of files inside EVM (and Arweave for big files).

The simplified idea is this:

Options available:

  1. Encryption — symmetrical (password) and asymmetrical (ECIES / MLKEM):

    1. Implemented ECIESarrow-up-right with post-quantum option of MLKEM (Kyber-1024 per FIPS-203arrow-up-right). For encryption, the elegancy of implementation allows the user to establish a shared secret without private key.

    2. To avoid the exposure of private keys during decryption, MLKEM is a safer alternative -- allows you to generate a separate keypair and declare it on-chain for future use (effectively binding your Ethereum address with MLKEM keypair). We also provide a standalone open source tool for offline decryptionarrow-up-right.

    3. Password (Argon2id -> AES-256) encryption is also implemented, will require to share the decryption keys off-chain.

  2. Shortcut mint — adds an NFT to the web3 wallet, this will contain the permanent access key in the metadata, so you can reconstruct / access the files even if the app goes offline.

  3. Relayer (EIP-2771arrow-up-right) — upload files by backend, so you dont have to accept dozens of Metamask popups and potentially break the wallet extension (see known bugs below).

  4. Simulation — allows to simulate the uplad for a specific file with specific options to get a near-perfect estimation for the gas costs. It is done via Tenderlyarrow-up-right.

  5. Redact name — changes the name of the file to "Redacted" on-chain. On download, the original name is getting restored.

  6. Data avalibility — transactions, blobs (EIP-4844arrow-up-right / 7594arrow-up-right) or Arweave storage

After upload, the user can access their files in Library and share the access keys with others.

Steps

On high level (as of late 2025), the system does the following:

  1. Compression via zlib per RFC 1950arrow-up-right / RFC 1951arrow-up-right (DEFLATE algo with 32k sliding window)

  2. Metadata addition in format:file_name + separator :: + file_content

  3. (If enabled) Encryption with Password, ECIES or MLKEM (this will have a separate page due to complexity).

  4. Data is split into chunks of 3900 x 32-bytes on L1, 1800 x 32-byte on L2 and is not split on Arweave DA.

  5. Upload routes:

    1. Relayer route — asks for initialization signature via Metamask and then does the meta-transactions (per EIP-2771arrow-up-right) on behalf of the user via Forwarder -> Manager -> Storage contracts. The user's address is mapped to the balance in Forwarder, which pays for internal calls. The backend is orchestrating the transactions.

    2. Metamask route (deprecated due to Metamask freezing itself).

  6. After the process is done, the system collects an access key which could be minted in ERC-1155 token aka NFT, but also is accessible in the contract storage for later use

The explaination of the NFT is in File Shortcuts page.

Last updated