anoma / anoma-archive

Reference implementation of the Anoma protocols in Rust.
https://anoma.net
GNU General Public License v3.0
425 stars 176 forks source link

Update to transaction hashing and encryption. #1237

Open IdaTucker opened 2 years ago

IdaTucker commented 2 years ago

main points: Instead of signing the hash of the whole transaction: Sign(Hash( (code || data || timestamp))), one now signs the hash of the hash of the code, concatenated to the data and timestamp: Sign(Hash( (Hash(code) || data || timestamp))),

This is so that we can pass the code hash to the device instead of the whole code field.

We also encrypt in parts, so that we can work with unencrypted data