This MediaWiki extension includes the Aqua implementation. Turning MediaWiki into a powerful versioned notary service with API's for import and export of Data in JSON format.
GNU General Public License v3.0
6
stars
6
forks
source link
[Protocol Upgrade] Hash hashes as binary instead of hex representation #386
Currently the hasher is using strings which are concatenated and then hashed again.
We would like to change this behavior to use the binary representation of the hashes instead.
If a hash is not present (like signature or witness as optional input hashes) they are not added to the hasher-digest (input hashes for the verifiction_hash).
Example: using binary-representation of hashes and using a SHA3 hasher like this one to hash it.
metadata {
"AQUA" (exactly this),
version (exactly 4 characters / version number / string),
time ("YYYYMMDDhhmmss" / numbers only / string),
domain (variable length, maximum of 64 bytes / hex encoded / string),
}
Currently the hasher is using strings which are concatenated and then hashed again. We would like to change this behavior to use the binary representation of the hashes instead.
If a hash is not present (like signature or witness as optional input hashes) they are not added to the hasher-digest (input hashes for the verifiction_hash).
Example: using binary-representation of hashes and using a SHA3 hasher like this one to hash it.
In PHP this is done via:
When calculating the different hashes we choose binary input or string input as follows.
binary
text