Closed makew0rld closed 5 months ago
secretstream
, or use the attr
CLI tool against our AA instance to verify the encryption type by looking at the encryption_type
attribute.decrypt -i bafy2... -k bafy2....key -o my_clear_file
and the decrypted file is now available.secretstream
, they can be sure the encrypted file bytes were not modified or truncated, and the decrypted output is the whole original file unmodified.Do they get a final step to verify against bafy1...
?
Good point. I was assuming they wouldn't have access to bafy1...
as it is secret. But even without access, they can perform a final verification step by creating a CID for their decrypted file, and comparing that against the CID of the original plaintext file, bafy1...
. This CID will be available to them in AA, for example listed as a parent relationship of bafy2...
.
Due to the secretstream
encryption algorithm, there should be no scenario where the decrypted file does not match the original. However checking the hash is still important, in case Starling Lab accidentally sent the wrong encrypted file, or the verifier accidentally decrypted the wrong one.
@benhylau
(Optional) The user runsgenkey file
and an encryption key is stored in the key folder with the name<cid>.key
encrypt bafy1...
, encrypting the file with a new random key. The encrypted file is stored under its CID (bafy2...
) in the encrypted files folder.bafy2....key
.encryption_type: secretstream
.upload drive:/foo bafy2...
. The encrypted file is uploaded to Google Drive. That upload is logged to AA under the encrypted file's CID, under the attributeuploads
.