Mehr's Unique Voucher (MUV)
Constant 64-character activation token protocol with 16-byte product options block, zero-nonce AES-256-SIV encryption, and offline node isolation.
Core Design Principles
`muv` strikes the balance between cryptographic security, constant-width ergonomics, and product payload capacity.
Constant 64-Char Footprint
Every token strictly encodes to 64 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.
16-Byte Options Block
Dedicated 128-bit order_opts block provides ample room for 1,000,432 GB quotas, 100-day durations, speed caps, and flags without schema changes.
Offline Nonce Isolation
The 2-byte provider_id partitions order sequences, allowing disconnected cold nodes to issue vouchers offline without colliding on order_id.
Binary Payload Specification (31 Bytes)
Arranged in strict big-endian network byte order.
| Offset | Size | Field Name | Type | Description / Range |
|---|---|---|---|---|
| 0 | 1 Byte | contract_id |
uint8 |
Schema version (e.g., 0x01) |
| 1–4 | 4 Bytes | created_ts |
uint32 |
Seconds elapsed since fixed epoch (1790022600) |
| 5–6 | 2 Bytes | expiry_hr |
uint16 |
Voucher claim window in hours (0 = never, up to ~7.48 yrs) |
| 7–8 | 2 Bytes | provider_id |
uint16 |
Cold node / reseller identifier (0–65,535) |
| 9–10 | 2 Bytes | product_id |
uint16 |
SKU / product tier identifier (0–65,535) |
| 11–14 | 4 Bytes | order_id |
uint32 |
Provider-specific sequence nonce (0–4,294,967,295) |
| 15–30 | 16 Bytes | order_opts |
bytes16 |
128-bit product options block (quota, duration, limits, flags) |
Epoch & Cryptographic Pipeline
RFC 5297 provides misuse-resistant authenticated encryption with a single shared symmetric key.
Fixed Epoch Reference
Base timestamp: 2026-09-22 00:00:00 (UTC+3:30) = Unix timestamp 1790022600.
created_ts = unix_now - 1790022600 is_claimable = unix_now <= 1790022600 + created_ts + (expiry_hr * 3600)
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(31B Payload)) 2. CT (31B) = AES-CTR(K_ctr, IV=Tag, 31B Payload) 3. 47B Stream = Tag || CT → 64-char Base62
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 03 c3 0f c0 02 d0 00 2a 03 e9 00 00 22 89 00 0f 43 f0 00 02 32 80 00 00 00 00 00 00 00 00
72 3e f9 42 89 b9 36 13 fd 08 cd a7 26 b5 41 03 [-- 16B SIV Tag --] c1 5b 30 f9 b7 bc f3 57 9d f5 b3 50 c0 57 48 e0 [-- 31B Ciphertext --] 5b c4 55 20 1b d1 bd 41 c5 be d5 01 35 72 cb
0P7sZnozonZcLRmeNRYNHILHdqnIFP6A69hbyJxbhUvLyA4XZEOKd6oLCH4xcbDZ
The Distant Voucher Model
How MUV enables uncoordinated VPN provisioning and account recharges during nationwide internet blackouts (such as Iran's National Information Network / SHOMA).
Stateless Foreign Issuance
Foreign Telegram bots or payment stores issue vouchers upon Stripe/Crypto checkout without needing database connections to Iranian VPS servers. The token is the self-contained state courier.
Single-SMS URL Sizing
https://hub.example.ir/bootstrap/{token} is exactly 97 characters. It arrives intact in a single 160-char Latin SMS with 63 characters left for instructions, avoiding dropped multi-part segments.
DPI & Keyword Evasion
AES-256-SIV encrypts the 31-byte payload into uniform Base62. Telecom SMS sniffers cannot see quotas, durations, or keywords like "VPN", bypassing keyword drop filters.
Zero-VPN Self-Bootstrap
Censored users have no initial international access. The domestic panel on the national intranet decrypts the token, creates the user, and provisions their VLESS/Trojan profile in O(1).
Dual-Mode Top-Ups & Multi-Plan Stacking
When users need more data or time, they open https://hub.example.ir/topup/{accountId}/{voucher_token}. Products can interpret order_opts to support two ISP renewal models:
total = current + new). The package with the shortest remaining lifespan is consumed first.
/sub/{accountId}) remains accessible over the domestic intranet, showing live usage in client apps and providing the direct renewal gateway.
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 64-char voucher ./muv.py issue --provider 42 --product 1001 --order 8841 --expiry-hr 720 --opts 000f43f0000232800000000000000000 # Verify a voucher token ./muv.py verify 0P7sZnozonZcLRmeNRYNHILHdqnIFP6A69hbyJxbhUvLyA4XZEOKd6oLCH4xcbDZ
# Generate a 64-byte master key node muv.js keygen # Run self-test node muv.js test # Issue a 64-char voucher node muv.js issue 42 1001 8841 720 000f43f0000232800000000000000000 # Verify a voucher token node muv.js verify 0P7sZnozonZcLRmeNRYNHILHdqnIFP6A69hbyJxbhUvLyA4XZEOKd6oLCH4xcbDZ
# Generate a 64-byte master key php muv.php keygen # Run self-test php muv.php test # Issue a 64-char voucher php muv.php issue 42 1001 8841 720 000f43f0000232800000000000000000 # Verify a voucher token php muv.php verify 0P7sZnozonZcLRmeNRYNHILHdqnIFP6A69hbyJxbhUvLyA4XZEOKd6oLCH4xcbDZ