inblockio / mediawiki-extensions-Aqua

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
7 stars 6 forks source link

Content Hash is empty when content should be string of empty string. #346

Closed FantasticoFox closed 1 month ago

FantasticoFox commented 1 year ago

The content hash should be the sha3 hash for empty string

A6 9F 73 CC A2 3A 9A C5 C8 B5 67 DC 18 5A 75 6E 97 C9 82 16 4F E2 58 59 E0 D1 DC C1 47 5C 80 A6 15 B2 12 3A F1 F5 F9 4C 11 E3 E9 40 2C 3A C5 58

https://csrc.nist.gov/csrc/media/projects/cryptographic-standards-and-guidelines/documents/examples/sha3-512_msg0.pdf

rob9315 commented 1 year ago
[rob9315@laptop aqua-verifier-rs]$ aqua-verifier --file ~/Downloads/e68ffbc8f0_Empty_Page.json 
Verifying 1 Revisions for Empty_Page
1. Verification of ca81f0869b51e4e0e740dd116b6b8439a7078795cf9c619540a67b57197b2b8da086630fff145a2cb2462719e84af7a8261f88910b4459a1d947c6d14c4dd257
VerifyResult {
    metadata: true,
    file_hash: None,
    content: false,
    prev_signature: None,
    prev_witness: None,
    witness: None,
    signature: None,
    verification: true,
} 16.098µs
Failed to verify: /home/rob9315/Downloads/e68ffbc8f0_Empty_Page.json

for the example file here