Appending to bucket index
Adding files/content to a bucket is done by encrypting the content and adding it to the storage layer, then adding an immutable reference to it to the index. Files are expected to be DIDComm Encrypted messages, but in contrast to messages for SKB distribution only have a single recipient: the PKB.
The contributor generates a unique CEK.
The contributor encrypts the m using the CEK with symmetric encryption, resulting in the ciphertext m*.
The contributor encrypts the CEK with the PKB, resulting in the encrypted key CEK*.
CEK* is combined with m* as well as information on which key and algorithms to use, yielding a DIDcomm/JWE message.
The DIDcomm message is stored in the storage layer.
An immutable reference to the storage location, including a digest (hash) of the file is added to the bucket index by submitting a blockchain transaction. This can only succeed if the contributor has been granted write access.
Last updated