Location: src/RnNoirModule.ts:54-82 (trusted setup), src/RnNoirModule.ts:113-147 (bytecode)
Issue: Circuit bytecode and the UltraPlonk trusted setup are downloaded from Google Cloud Storage with no checksum or hash check:
// Trusted setup — no hash check
const url =
'https://storage.googleapis.com/rarimo-store/trusted-setups/ultraPlonkTrustedSetup.dat';
await downloadResumable.downloadAsync();
// Bytecode — same pattern, no hash check
await downloadResumable.downloadAsync();
Impact: A compromised GCS bucket, CDN cache poisoning, or future supply-chain compromise could silently serve malicious bytecode that generates proofs with manipulated public inputs (e.g., wrong nullifiers, wrong citizenship claims). The user's device would compute and submit a proof they believe is correct but isn't.
Fix: Embed a hardcoded SHA-256 or BLAKE3 hash for each known-good file version. After download, compute the hash and reject mismatches before calling prove.
Location:
src/RnNoirModule.ts:54-82(trusted setup),src/RnNoirModule.ts:113-147(bytecode)Issue: Circuit bytecode and the UltraPlonk trusted setup are downloaded from Google Cloud Storage with no checksum or hash check:
Impact: A compromised GCS bucket, CDN cache poisoning, or future supply-chain compromise could silently serve malicious bytecode that generates proofs with manipulated public inputs (e.g., wrong nullifiers, wrong citizenship claims). The user's device would compute and submit a proof they believe is correct but isn't.
Fix: Embed a hardcoded SHA-256 or BLAKE3 hash for each known-good file version. After download, compute the hash and reject mismatches before calling prove.