Security › hash-32 · Constant-time review · Performance: x86_1 · arm_1
ZC-EDMC (hash-32)
| Candidate | ZC-EDMC |
|---|---|
| Family | Symmetric (sponge) |
| Archive | ZC-EDMC.zip (SHA-256: 235157f178c0ec885dad4062ee232cdc0d16e95474f05c6f93038fd951ca3712) |
| Specification | hash-32-spec.pdf PDF |
| Performance | x86_1 · arm_1 |
hash-32-1: The specified and implemented ZC-EDMC mappings differ
| Severity | Low |
|---|---|
| Scope | design |
| Status | Confirmed |
| Affected | All six ZC-EDMC parameter sets |
| Discovery | Trivial |
| Exploitation | Trivial |
| Credit | Cryptanalysts001, Institute of Software, Chinese Academy of Sciences yufei2021@iscas.ac.cn |
| Date | 2026-09-22 |
Original source: CryptHashForum report
The construction prose and Algorithm 3 define the compression mapping with two different six-round halves, h(g(X) xor (0^r || X_c)). A displayed equation instead uses h(h(X) xor ...), and the reference implementation invokes the same last-six-round function twice. It therefore implements the displayed equation rather than Algorithm 3.
The submitted permutation constants introduce a second deterministic mismatch: rounds 5--7 and 9--11 of the code's twelve-round schedule are permuted relative to the specification table. The submitters independently modeled the code schedule and reproduced its KATs, and report that changing the inner call from h to g changes all 22 tested digests for each of the six instances. This is an interoperability and analysis-target defect, not a demonstrated collision or preimage attack.
Reproducing
Commands below run in a checkout of the ngcc-harness repository with the candidate built (see its README).
The local checker verifies both calls in every reference instance and the exact submitted constant schedule:
make -C hash-32 reproduce-forum
hash-32-2: Message modification gives a conditional 2^288 collision estimate
| Severity | Critical |
|---|---|
| Scope | design |
| Status | Lead |
| Affected | ZC-EDMC-1536-768 and -1024; full-round attacks remain conditional |
| Discovery | Non-trivial |
| Exploitation | Conditional 2^288 later-round candidate tests for -768 after affine three-round message modification; no full-round collision |
| Credit | Qinghe Crypto Group; three-round message-modification extension by Markku-Juhani O. Saarinen markku-juhani.saarinen@tuni.fi, with AI assistance |
| Date | 2026-09-29 |
Original source: Qinghe Crypto Group's CryptHash Forum post
For ZC-1536, the input difference Delta A_0[0] = 0x1111111111111111 survives the linear layer. At each of its 16 active bit positions, the sequential χ mapping preserves the difference exactly when the two other input bits are 0,1, a probability of 1/4; the one-round trail therefore has weight 32. The intermediate capacity feed-forward leaves this rate difference unchanged, and later message-block differences can cancel it and merge the states. The same local trail applies to both mappings present in the archived specification and implementation because it is independent of the round constants and of whether the first six-round half is named g or h.
The original post's independent-round model gives 2^224, 2^352, and 2^384 for 7, 11, and 12 rounds. Further extension: rate-only linear message modification enforces the first three trail rounds. For ZC-EDMC-1536-768, a prefix satisfying 16 capacity conditions and a valid-message collision of the reduced two-plus-two-round hash were demonstrated from the zero IV; a later message block merges the states. For -1024, the systems are soluble on tested chaining states after imposing 32 capacity conditions, but no corresponding prefix was constructed. Assuming independent 2^-32 transitions over rounds 4–12 gives about 2^288 accepted pairs needed for a collision. The later-round and full-round steps remain open. For the -768 rate, each prefix costs about 2^16 trials and its affine solution space has 153 free bits; all 300 sampled pairs held the first three rounds. Sampling from that space adds only polynomial work per pair, while fresh prefixes supply further spaces. The conditional 2^288 later-round test estimate is therefore below the 384-bit collision target, hence Critical / Lead. No full-round collision was demonstrated.
Follow-up: Niu, Peyrin, Zhang, and Zhou's issue #36, posted 2026-11-01, supplies a reachable first-three-round certificate for the submitted -768 EDMC implementation's repeated last-six-round schedule. Its attached verifier reconstructs the certificate and proves at least 2^415 distinct three-round pairs. That is enough candidate supply, but its specified sampler uses at most 2^64 three-round proposals per accepted pair in expectation. For that separate sampler, 2^288 accepted pairs could take up to 2^352 proposals in expectation before full-round tests. This does not price the affine message-modification generator above. It does not cover the specification's alternative h(g(X) xor ...) schedule or show a full-round collision.
Reproducing
Commands below run in a checkout of the ngcc-harness repository with the candidate built (see its README).
python3 security/zc_iterative_differential.py
The certificate exhausts the three-bit χ inputs and checks both reported masks against the linear rotations: the 16-active-position mask used above has weight 32 per round, while the all-ones mask used for the reported ZC-1280 reduced-round trail has 64 active positions and weight 128 per round. It then prints the unresolved multi-round limitation.
Run python3 security/zc_message_modification.py for the extension's rate-only systems and a replay of the reduced-round collision against the submitted permutation. The witness does not rerun the long search. Its reduced rounds use the reference code's last-round-constant convention, not the first four rounds of the full schedule.
hash-32-3: Sparse ZC-1280 trail gives a conditional 2^144 collision estimate
| Severity | Critical |
|---|---|
| Scope | design |
| Status | Lead |
| Affected | Submitted ZC-EDMC-1280-512 implementation; the alternate specified mapping and larger-output instances are not covered |
| Discovery | Non-trivial |
| Exploitation | Conditional 2^144 candidate trials with polynomial generation and storage; no twelve-round collision |
| Credit | Zhongfeng Niu, Thomas Peyrin, Liu Zhang, and Chunning Zhou |
| Date | 2026-11-02 |
Original source: Niu, Peyrin, Zhang, and Zhou's issue #37 Follow-up source: CryptHash Forum post
The submitted ZC-EDMC-1280-512 implementation uses h(h(X) XOR cap(X)), where both h calls use the last six submitted round constants. The reported rate-only difference occupies eight distinct χ columns and is fixed by the linear layer. Its exact one-round rate on a uniform state is 2^-16. A legal common prefix from the zero IV fixes eight capacity conditions; an exact affine construction enforces the first three rounds of the inner half, leaving a 278-dimensional family, or 2^277 distinct unordered pairs. Sampling it costs polynomial work per pair.
The midpoint capacity feed-forward preserves the difference, but changes the absolute condition bits; the attachment includes this adjustment. If each of the nine remaining rounds, across both halves, passes its actual 16-bit condition with conditional probability 2^-16 on the constructed family, the expected cost is 2^144 candidates. A later rate-block difference then merges the states, giving a collision below the 2^256 digest birthday bound. The tail probability is unproved, so this is a Lead without a full-round collision. The attachment shows a collision only for an explicitly defined two-plus-two-round reduction; its saved messages have different full twelve-round digests. This analysis does not resolve the submitted specification's different inner-function mapping.
Reproducing
Commands below run in a checkout of the ngcc-harness repository with the candidate built (see its README).
python3 security/zc1280_issue37.py
The hash-pinned verifier checks the full-schedule three-round family and the reduced hash with padding and merging. The wrapper also checks saved full-round digests against the submitted native C implementation. No check establishes the remaining-round probability or a twelve-round collision.
hash-32-4: Six round constants are applied in a different order from Table 1.1
| Severity | Low |
|---|---|
| Scope | implementation |
| Status | Confirmed |
| Affected | All six ZC-EDMC instances (ZC-1280 and ZC-1536 at 512, 768 and 1024 bits); reference implementation and the shared permutation headers |
| Discovery | Moderate |
| Exploitation | An implementation that follows the specification computes a different function and reproduces none of the KATs; the twelve constants stay distinct, and no security consequence was identified |
| Credit | Markku-Juhani O. Saarinen markku-juhani.saarinen@tuni.fi, with AI assistance |
| Date | 2026-11-19 |
Table 1.1 (physical p. 11) lists the twelve round constants, and ι XORs c_i into A0[0] in round i = −11, …, 0 (Algorithms 1 and 2, Figure 1.3). The shared permutation headers (lib/low/ZuD-1280/ZuD1280.h:25–36, ZuD-1536/ZuD1536.h:25–36) define rc8, rc7, rc6 = 0x120, 0x14, 0x60 and rc4, rc3, rc2 = 0x380, 0xF0, 0x1A0, and the permutation applies rc12 down to rc1. So c_−7, c_−6, c_−5 and c_−3, c_−2, c_−1 are each rotated by one position against the table's 0x60, 0x120, 0x14 and 0xF0, 0x1A0, 0x380; the other six constants agree.
As shipped, every instance reproduces all 4,097 KAT_2_12 vectors. With only those six definitions put in the Table 1.1 order, every instance reproduces none.
Reproducing
Commands below run in a checkout of the ngcc-harness repository with the candidate built (see its README).
sh hash-32/reproduce_spec_mismatch.sh
The witness regenerates each KAT_2_12 file with the shipped NGCC generator and uses it only if its canonical SHA-256 equals the official file's entry in hash-32/kat.sha256.