Data is encrypted before it reaches the Alodium platform, and only the dataset’s Owner and a buyer the Owner approved can open it. The platform still stores, collects payment, and delivers, but holds no decryption key. Tested on Solana devnet, not yet in production.
You have labeled a few thousand items on Humanbased. Your work is combined with other people’s into a dataset and sold to an AI company that trains models. Every sale pays you according to your share.
That income depends on the data going only to buyers who paid. The platform handles every step: storage, payment, and delivery. If the platform held the key that decrypts the data, it could bypass the dataset’s owner and hand the data to someone who never paid. If its servers were breached, the data would leak with them. Either way, your share would earn nothing, and data that has already leaked cannot be pulled back.
Alodium lets the platform keep storing, collecting payment, and delivering while never holding a key that opens the data. The platform also cannot give the data to anyone the dataset’s owner has not approved.
Current status: The flow in this post completed one full paid delivery on the Solana devnet using test USDC. It is not yet available in production, and Humanbased has not yet integrated with it. The escrow contract is deployed only on testnet and has not been tested with real funds.
Who handles the data
| Role | Who it is on Humanbased | What it does |
|---|---|---|
| Contributor | A user who does data work on Humanbased | Earns a share of the sales revenue |
| Data source | The party holding the raw data, such as Humanbased; the Owner, when the Owner has the data | Encrypts the data before publishing |
| Owner | The party that controls the dataset’s on-chain identity | Approves publishing and decides who can buy |
| Alodium platform | Alodium’s storage, trading, and delivery services | Keeps ciphertext, passes materials along, collects payment |
| Buyer | The AI company buying the data | Decrypts the data on its own machine after paying |
Every dataset sits under an on-chain identity. That identity is a DID, an identifier recorded on the blockchain.¹ Whichever wallet controls the identifier is the Owner.
The Owner and the contributors are not necessarily the same party. The Owner decides who the data is sold to, and the money goes to contributors according to their shares in the contribution list. The list records who did which work and how large each share is.²
This design protects against the Alodium platform only. If a user lets an App hold their DID, the App is the Owner, and trust between the user and the App is outside the scope of this design.
Publishing: the Owner decides who encrypts
What is public and what is encrypted
A dataset version has two parts.
- Contribution list: who did which work and how large each share is. It is public, so anyone can check that the money is split correctly. It contains no data content.
- Data content: annotations, collected samples, and so on. It is encrypted before upload.
The key used to encrypt the content is called the data key. Every published version gets a new data key. Once the content is encrypted with it, the platform receives only ciphertext.
The data key itself must also be kept, or nobody could ever open the data again. It is encrypted once more so that only the Owner can unlock it. This small encrypted piece is called the recovery envelope. The platform keeps the recovery envelope but cannot open it.
This relies on public and private keys. A public key can be shared, and others use it to encrypt. Only the matching private key, which stays with its holder, can decrypt. The recovery envelope is encrypted to the Owner’s public key. The wallet the Owner signs with and the private key the Owner decrypts with are two separate things.
Encrypt it yourself, or authorize Humanbased
The Owner decides who generates the data key. Either way, the Alodium platform never gets it.
Encrypt it yourself: the Owner downloads the raw data from Humanbased to their own machine. With Alodium’s command-line tool, the Owner generates the data key, encrypts the data, and seals the recovery envelope, then uploads the ciphertext. The data key exists only on the Owner’s machine. Humanbased already has the raw data, though, so this mode does not protect against Humanbased. It only means Humanbased never holds a data key that could open the published ciphertext. The cost is that the data travels two extra times, and the Owner must be online while publishing. This is the mode that ran on testnet.
Authorize Humanbased to encrypt: the Owner signs a publication authorization, and Humanbased generates the data key and encrypts. Humanbased already has the raw data, so encrypting on the Owner’s behalf tells it nothing new. The Owner moves no data and can go offline after signing. Humanbased has not yet started integrating this mode.
A trusted execution environment (TEE) could later combine the benefits of both. A TEE is an isolated area on a server whose contents even the server’s operators cannot see. The Owner would generate the data key locally and hand it only to that area on Humanbased’s server for encryption. Humanbased would never get the key, and the Owner would not need to download the data. The cost is trusting the hardware vendor and the encryption program running inside. This is only a direction; it has not been designed or built.
How authorizing Humanbased works
- Humanbased uploads the contribution list.
- The Owner reviews the list and signs a publication authorization. It contains the list’s fingerprint and the Owner’s public key. The fingerprint is a code computed from the list’s content; change one character and the fingerprint changes.
- Humanbased fetches the authorization, connects to the blockchain itself, and checks that the signer is the current Owner.
- If the check passes, Humanbased generates the data key, encrypts the data, seals the data key in the recovery envelope, then deletes the data key.
- Humanbased uploads the ciphertext and the recovery envelope, and the platform checks the authorization again.
The authorization contains the contribution list’s fingerprint. If the platform swapped the list, the fingerprint would not match, the Owner would not sign, and Humanbased would not encrypt.
The authorization also carries the Owner’s public key, so the platform cannot substitute one. If Humanbased learned the Owner’s public key from the platform, the platform could swap in its own key and then open the recovery envelope. So the public key must be in the authorization the Owner signed, and Humanbased must check the signature on chain itself instead of trusting a result relayed by the platform.
The platform checks the authorization too, but that check only blocks publishing the Owner never approved. It cannot stop the platform itself.
The Owner can spot-check
When Humanbased encrypts, the Owner cannot see the process. If Humanbased sealed the wrong key, nobody would find out until a buyer failed to decrypt.
Alodium’s command-line tool includes a verification step. The Owner downloads the published ciphertext, opens the recovery envelope, and uses the data key inside to check the whole dataset piece by piece. If any piece fails, verification fails. This step is not required for publishing; the Owner runs it when they choose.
Selling: only the buyer can open it
The buyer registers a public key on chain
To buy data, an AI company first needs its own DID with a public key registered on it for receiving data. The buyer’s own wallet does the registration and pays the fee.
When preparing a delivery, the Owner reads this public key from the chain directly, not through the platform. The reason is the same as in publishing: if the key came from the platform, the platform could swap in its own and get the data key.
The Owner seals a copy of the data key for the buyer
The Owner opens the recovery envelope, takes out the data key, and seals it again with the buyer’s public key. This ciphertext, which only that buyer can open, is the buyer envelope. The Owner also signs an access grant stating which buyer may receive which version, and the access grant is recorded on chain.
The platform passes along the buyer envelope and the encrypted data but can open neither. Once the buyer has them, it opens the buyer envelope on its own machine and uses the data key inside to decrypt the data.
The buyer envelope is bound to this dataset version, this access grant, and this buyer public key. If the buyer later changes its public key, the old envelope still opens only with the old private key. To use the new key, the buyer requests a new quote.
The buyer’s money goes into escrow first
The AI company pays in USDC, a stablecoin pegged to the US dollar. The money goes to no one directly; it is held in an on-chain escrow contract.
- The Owner signs a delivery declaration stating that the materials are ready to deliver. It does not prove the data content is correct.
- During the inspection period, the buyer can accept or open a dispute. If the period ends without a dispute, anyone can trigger settlement.
- At settlement, the money goes to Alodium’s revenue-split contract. The platform takes a single fee at the rate locked when the buyer paid, and the rest is credited to contributors according to the contribution list. Contributors claim it themselves later. Fee changes after payment do not affect that order.
- If the delivery deadline passes with no delivery declaration, anyone can refund the full amount to the buyer.
- In a dispute, the adjudicator named in the order decides; by default that is the platform. The adjudicator has only two choices: settle normally or refund in full.
Two delivery modes
There are two modes for when the platform may hand the buyer envelope to the buyer. The Owner sets the mode in their own program, and the platform cannot change it.
Prepared in advance (default): the Owner hands the buyer envelope to the platform at quote time. After the buyer pays, the platform waits until both the payment and the access grant are confirmed on chain and can no longer be reversed, then delivers. The Owner can go offline once everything is prepared.
The cost is that the envelope reaches the platform early. The platform cannot open it, and giving it to anyone else is useless. But a platform that broke the rules could give it to this buyer before payment, or after the access grant expired or was revoked. So this mode controls who receives the envelope, but not when.
Owner-verified: the Owner’s program holds the buyer envelope and checks the payment amount and token on chain itself. Only after the payment and the access grant are both confirmed and can no longer be reversed does it hand the envelope to the platform. The Owner controls the timing, at the cost of keeping the program online at that point.
What this design cannot do
Delivered data cannot be recalled
Once the buyer has the data key, it can keep the decrypted data or pass it on. Encryption covers only the steps before delivery. Revoking an access grant only stops future deliveries; what has already been delivered cannot be pulled back. Each new version uses a new data key, so a revoked buyer cannot read later versions.
Selling to unknown buyers needs an Owner program online
Known buyers, meaning buyers whose envelope the Owner already prepared at quote time, can be served in prepared mode, and the Owner can be offline afterward.
Unknown buyers need a program controlled by the Owner to be online. That can be the Owner working by hand, or a background service or AI agent the Owner runs. The background service handles purchase requests automatically against a fixed quote the Owner wrote in advance; requests that do not match wait for the Owner. When an agent runs, private keys, data keys, and raw data never enter the language model’s context.
If the private key is lost, the platform cannot help
The Owner backs up their own decryption private key; the platform keeps no copy. Alodium’s command-line tool can export a password-protected backup file.
If the private key is lost, versions this Owner already published can never be sold to new buyers, except buyers whose envelope was already prepared at quote time. Buyers who already purchased are unaffected, and versions published later are unaffected.
If a buyer loses its own private key after paying, the Owner must come online once and seal a new buyer envelope for the same access grant.
When control changes hands, old data needs the previous controller
When the DID’s controlling wallet changes, the DID itself stays the same. The system cannot tell whether the same person switched wallets or a different person took over, so nothing happens automatically.
- If the new controller has the same decryption private key, everything continues as before.
- Otherwise, the previous controller must come online once and reseal every recovery envelope to the new controller. Without that step, old versions can no longer be sold to new buyers, and the new controller can only publish new versions.
- Data keys the previous controller already knows cannot be taken back.
Technical details
Algorithms and keys
- Recovery envelopes and buyer envelopes both use HPKE,³ with the suite
DHKEM(X25519, HKDF-SHA256),HKDF-SHA256, andAES-256-GCM, implemented with Go’s standard librarycrypto/hpke. - All encryption keys are X25519 keys generated separately by
alodium-cli. They are not derived from wallets, and there is no Ed25519-to-X25519 conversion. RFC 9180 registers no secp256k1 KEM and Go has no implementation of one, so a secp256k1 wallet key is not reused. - The Owner’s encryption public key is not written into the DID document. It travels only with the publication authorization and does not depend on the address that controls the DID.
- The data key (DEK) is a random 32-byte key, one per version.
Publication authorization
The publication authorization is a Solana transaction signature.⁴ The signer must be the current ownerOf(assemblerDidId); contract wallets use a program-wallet signature check.⁵ The signature binds the assembler DID, the dataset, the version number, the SHA-256 of the contribution list (Publication snapshot), the Owner’s encryption public key, and a deadline. Each version is signed once.
The data source verifies the signature through its own configured RPC node. The platform’s Cloud service also verifies it and checks that the public-key fingerprint in the recovery envelope (the SHA-256 of the raw 32-byte X25519 public key) matches the one in the authorization.
Ciphertext format
Plaintext is split into 1 MiB frames, and each frame is encrypted with AES-256-GCM. A 100-byte header records the dataset ID, version number, assembler DID, Owner address, and total plaintext length. Each frame’s additional authenticated data includes the full header and the frame index, so truncating, appending, reordering frames, or altering the header’s identity fields all make decryption fail.
The recovery envelope’s HPKE info field binds the dataset, version, DID, Owner address, and public-key fingerprint, so it will not open for any other version. Cloud can check the identity fields, the public-key fingerprint, and lengths, but without the data key it cannot verify the GCM authentication tags. The Owner’s verification command is alodium publication verify-published. It verifies frame by frame and leaves no partial output if any frame fails.
Recipient keys and delivery conditions
- The buyer runs
alodium key publishto write its recipient public key into its on-chain DID document underkeyAgreement.⁶ A buyer withoutkeyAgreementgets no quote; the system does not fall back to signing keys underassertionMethod. - The Owner process reads the recipient public key by calling
DIDRegistry.getDidDocumentthrough its own configured RPC node. DID resolvers, subgraphs, and Cloud are not in the trust chain. - Delivery requires both the payment transaction and the on-chain access grant record to reach RPC
finalizeddepth. - The release mode is set in the Owner process configuration. The default is
prepared(prepared in advance); the other mode isowner-verified.
References
- Alodium Protocol Docs — Identity. How wallet addresses, W3C DIDs, and identity relate. docs.alodium.xyz/concepts/core-systems/identity
- Alodium Protocol Docs — Royalty Engine. How revenue is split among contributors by ownership share. docs.alodium.xyz/concepts/core-systems/royalty-engine
- RFC 9180 — Hybrid Public Key Encryption. The public-key encryption standard used for recovery and buyer envelopes. rfc-editor.org/rfc/rfc9180
- Solana transaction signatures. The signature format of the publication authorization. solana.com/docs/core/transactions
- Program-wallet signature checks. How a program wallet validates a signature. solana.com/docs/core/transactions
- W3C — Decentralized Identifiers (DIDs) v1.0, keyAgreement. The DID document field for public keys used in encrypted communication. w3.org/TR/did-core/#key-agreement