Mehr's Unique Voucher (MUV)
Ultra-compact, constant-width activation token protocol designed for offline cold nodes and central domestic verification systems.
Core Design Principles
`muv` replaces bloated JSON tokens with an unpadded, immutable 48-character string, maximizing copy-paste convenience and offline security.
Constant 48-Char Footprint
Every token strictly encodes to 48 characters (0-9a-zA-Z). Strict UI validation ensures immediate format checking before network roundtrips.
Zero-Nonce AES-256-SIV
Standard AEAD (GCM) wastes 12–16 bytes on nonces. AES-SIV synthesizes the IV tag directly from the message via AES-CMAC, requiring 0 bytes of transmitted nonce.
Single Master Key (O(1))
A shared symmetric key allows instant decryption and integrity verification in O(1) without per-provider trial decryptions or key lookup loops.
19-Byte Pure Binary Payload
All operational identifiers, 4-byte custom options, and relative timestamps pack into 19 raw unparsed bytes in Network Byte Order (Big-Endian).
Binary Payload Specification
Exactly 19 bytes (152 bits) arranged in strict big-endian network byte order.
| Offset | Size | Field Name | Type | Description / Range |
|---|---|---|---|---|
| 0 | 1 Byte | contract_id |
uint8 |
Schema contract version (e.g., 0x01) |
| 1 | 1 Byte | provider_id |
uint8 |
Cold node identifier (0–255) matched against authorized product tiers |
| 2–3 | 2 Bytes | product_id |
uint16 |
SKU / product tier identifier (0–65,535, Big-Endian) |
| 4–7 | 4 Bytes | product_opts |
uint32 |
Application-defined options or bitmask flags |
| 8–11 | 4 Bytes | order_id |
uint32 |
Provider-specific order nonce for replay protection |
| 12–15 | 4 Bytes | created_ts |
uint32 |
Seconds elapsed since fixed epoch (1790022600) |
| 16–18 | 3 Bytes | expires_min |
uint24 |
Duration in minutes from creation (0 = permanent, up to ~31.9 yrs) |
Epoch & Cryptographic Pipeline
Relative epoch offsets conserve 4 bytes per voucher while RFC 5297 provides misuse-resistant authenticated encryption.
Fixed Epoch Reference
Base timestamp: 2026-09-22 00:00:00 (UTC+3:30) = Unix timestamp 1790022600.
created_ts = unix_now - 1790022600 is_valid = unix_now <= 1790022600 + created_ts + (expires_min * 60)
AES-256-SIV Pipeline
Uses a 512-bit (64-byte) master key. AES-CMAC produces a 16-byte tag that serves as CTR mode IV.
1. Tag (16B) = AES-CMAC(K_mac, S2V(Payload)) 2. CT (19B) = AES-CTR(K_ctr, IV=Tag, Payload) 3. 35B Stream = Tag || CT
End-to-End Walkthrough Example
Every implementation validates against these exact bit-for-bit test vectors:
00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f
01 2a 03 e9 de ad be ef 00 00 22 89 03 c3 0f c0 00 a8 c0
74 b0 8c bf c0 6b ff 64 65 8b 1d 4a 6c d1 4d e3 [-- 16B SIV Tag --] 33 a0 93 41 07 1d d9 55 b9 db f2 94 5f 80 d3 13 [-- 19B Ciphertext --] b3 50 94
0vpTn7oJ1fqwsdY9sxnX9EKoE2Wf5uJDzVSxJQDDO6LIV0kA
Reference Code & Tooling
Minimal reference scripts with built-in self-testing and CLI keygen.
# Generate a 64-byte master key ./muv.py keygen # Run self-test against RFC 5297 vectors ./muv.py test # Issue a voucher ./muv.py issue --provider 42 --product 1001 --opts 0xDEADBEEF --order 8841 --expires-min 43200 # Verify a voucher token ./muv.py verify 0vpTn7oJ1fqwsdY9sxnX9EKoE2Wf5uJDzVSxJQDDO6LIV0kA
# Generate a 64-byte master key node muv.js keygen # Run self-test node muv.js test # Issue a voucher node muv.js issue 42 1001 0xdeadbeef 8841 63115200 43200 # Verify a voucher token node muv.js verify 0vpTn7oJ1fqwsdY9sxnX9EKoE2Wf5uJDzVSxJQDDO6LIV0kA
# Generate a 64-byte master key php muv.php keygen # Run self-test php muv.php test # Issue a voucher php muv.php issue 42 1001 deadbeef 8841 63115200 43200 # Verify a voucher token php muv.php verify 0vpTn7oJ1fqwsdY9sxnX9EKoE2Wf5uJDzVSxJQDDO6LIV0kA