Manufacturer
Register and manage medicine batches. Generates canonical MG01 records, builds balanced Merkle Trees, and produces individual unit QR references.
Pharmacist
Inspect and verify medicine records. Evaluates MGP1 cryptographic proofs against manufacturer root commitments with complete path transparency.
Customer
Check a medicine's digital record against an authorized batch root. Demonstrates client-side Merkle proof verification for pharmaceutical packages.
Batch Registration
Manufacturer compiles individual medicine units with unique identifiers into canonical MG01 binary structures.
Root Commitment
The C/WASM engine constructs a Merkle Tree, generating a single 32-byte cryptographic root committing all units.
Unit QR References
Each package receives an encoded QR reference with its unit serial, batch root, and compact MGP1 sibling path.
Instant Verification
Pharmacist or customer inspects the proof in O(log N) time without requiring a centralized record database.
MedicineGuard implements strict domain separation (RFC 6962) with a 0x00 prefix on leaf nodes and 0x01 on internal parents to mathematically rule out second-preimage collision attacks. Odd nodes are promoted deterministically without duplicating data, preventing Bitcoin-style tree duplication vulnerabilities.
Enter batch production parameters. When submitted, the WebAssembly engine serializes all individual medicine units into canonical MG01 binary structures, builds a balanced Merkle Tree with odd-node promotion, and computes the tamper-evident 32-byte Merkle Root.
Licensed pharmacists use this portal to inspect individual medicine packages (blister packs, vials, cartons) and verify their digital record membership against trusted Merkle Roots using native C11/WebAssembly cryptographic proofs.
History is retained strictly in browser-session memory and cleared upon page reload. Entries are recorded only when an actual cryptographic verification executes through the native C WebAssembly engine.
| Timestamp | Unit Serial ID | Batch ID | Verification Result | C Engine Status | Action |
|---|---|---|---|---|---|
| No medicine verification attempts recorded in this browser session yet. | |||||
Immutable cryptographic verification logs recorded in the distributed backend database for tamper-evident compliance.
| Timestamp | Unit Serial ID | Batch ID | Pharmacist | Client Result | Server Result |
|---|---|---|---|---|---|
| No server audit logs recorded yet. | |||||
Verify individual medicine packages directly against registered Merkle Tree cryptographic commitments on the shared trusted registry. No account or login required.
Camera QR Scanner
Scan the serialized verification QR code printed on your medicine carton or blister pack.
Uses device rear-facing camera. Zero remote video upload.
If you do not have a camera or the QR code is damaged, enter the 32-character hexadecimal verification code printed under the QR code:
MedicineGuard executes its core algorithms using standard C11 compiled to WebAssembly (wasm32) via the Emscripten toolchain, ensuring native cryptographic performance and bit-for-bit mathematical parity between client browsers and backend systems.
The diagnostic below executes a live FIPS 180-4 SHA-256 computation directly inside the loaded WebAssembly engine to verify linear memory safety and exported C function invocation:
Inspect the cryptographic structure of medicine batches. Click any leaf node (unit) to trace its O(log N) verification path up to the Merkle Root, highlighting sibling nodes, odd-node promotion paths, and domain separation prefixes.
Select a batch to inspect its cryptographic tree
Registers and unit proof paths will appear here with bit-for-bit math breakdown.
| Component | Implementation Standard | Algorithmic Property |
|---|---|---|
| Hash Function | FIPS 180-4 SHA-256 | 256-bit collision resistance, 64-round compression loop |
| Domain Separation | RFC 6962 Standard | Prefix 0x00 for leaves, 0x01 for parents; prevents second-preimage attack |
| Record Wire Format | MG01 Binary Protocol | Deterministic serialization with 32-bit big-endian field lengths |
| Tree Structure | Binary Merkle Tree | Balanced tree with deterministic odd-node promotion |
| Proof Wire Format | MGP1 Binary Protocol | 14-byte header + 33-byte step records (32B hash + 1B direction) |
| Proof Verification | Constant-time crypto_memcmp | O(log N) path traversal; immune to timing side-channel attacks |
Manage authorized system users, provisioning Manufacturer and Pharmacist accounts, toggling account statuses, and performing administrative password resets.
| User Email | Role | Status | Created At | Actions |
|---|---|---|---|---|
| Loading users... | ||||