JH is a SHA-3 finalist designed by Hongjun Wu. A 1024-bit state is regrouped into 256 four-bit elements and driven through 42 rounds of S-box substitution, a maximum distance separable mixing layer and a permutation. This is the 512-bit variant of the round-three design.
| Property | Value |
|---|---|
| Category | Hash Functions |
| Sub-category | SHA-3 Candidate |
| Security status | Not classified |
| Complexity | Not specified |
| Inventor | Hongjun Wu |
| Year | 2011 |
| Origin | 🇨🇳 China |
| Source | algorithms/hash/jh.js |
| Parameter | Supported values |
|---|---|
| Output sizes | 64 bytes (512 bits) |
| Hash sizes | 64 bytes (512 bits) |
Status: not classified — treat as unverified.
| Issue | Description | Mitigation |
|---|---|---|
| Preimage attacks on reduced rounds | Preimage and semi-free-start results exist against JH cut down to a fraction of its 42 rounds. The full function has no published break, but SHA-3 went to Keccak instead. | — |
7 vectors ship with this algorithm and run in the test suite. Byte values are hexadecimal.
Vector 1 — NIST SHA-3 KAT Len=0 - empty message, one combined padding block
| Field | Value |
|---|---|
input |
(empty) |
expected |
90ecf2f76f9d2c8017d979ad5ab96b87 d58fc8fc4b83060f3f900774faa2c8fa be69c5f4ff1ec2b61d6b316941cedee1 17fb04b1f4c5bc1b919ae841c50eec4f |
Vector 2 — NIST SHA-3 KAT Len=8 - one byte
| Field | Value |
|---|---|
input |
cc |
expected |
277c93806945992a7f10102f28471af2 783fe32003b3f63320810e74f1bc233b f8669ab4b922db9ef13fcdcd4d31193b 731eedde98fc87c129c04a4a1071f66f |
Vector 3 — NIST SHA-3 KAT Len=504 - 63 bytes, one under the block size
| Field | Value |
|---|---|
input |
f57c64006d9ea761892e145c99df1b24 640883da79d9ed5262859dcda8c3c32e 05b03d984f1ab4a230242ab6b78d368d c5aaa1e6d3498d53371e84b0c1d4ba |
expected |
197514abfb2c85c94566b72beeb9b95f 6a4fb2d19306579f1e64241c4751b3df 09a04dc77d7cb19d38baba36d23d7343 8a7c92bcbace65fad3586f9b7621205a |
Vector 4 — NIST SHA-3 KAT Len=512 - 64 bytes, exactly the block size
| Field | Value |
|---|---|
input |
e926ae8b0af6e53176dbffcc2a6b88c6 bd765f939d3d178a9bde9ef3aa131c61 e31c1e42cdfaf4b4dcde579a37e150ef bef5555b4c1cb40439d835a724e2fae7 |
expected |
d1dbacb16c6a88bea992cd34f92d1375 f05215037cf989e155d324d6d1e42043 20cf18c1ad6bf11019cdd112bac3c7cb 73e41a94254b8c5af3db8245318ffc70 |
Vector 5 — NIST SHA-3 KAT Len=520 - 65 bytes, one over the block size
| Field | Value |
|---|---|
input |
16e8b3d8f988e9bb04de9c96f2627811 c973ce4a5296b4772ca3eefeb80a652b df21f50df79f32db23f9f73d393b2d57 d9a0297f7a2f2e79cfda39fa393df1ac 00 |
expected |
726a9b558ee790de5f0f9b7f6a06c163 c1f2352f2a5a61e4316e5a17174be886 d9b0d0e194cc05eca1708e4e1f42749a c279ccf42d97a86b917141357bce8db3 |
Vector 6 — NIST SHA-3 KAT Len=1016 - 127 bytes, one under two blocks
| Field | Value |
|---|---|
input |
a62fc595b4096e6336e53fcdfc8d1cc1 75d71dac9d750a6133d23199eaac2882 07944cea6b16d27631915b4619f743da 2e30a0c00bbdb1bbb35ab852ef3b9aec 6b0a8dcc6e9e1abaa3ad62ac0a6c5de7 65de2c3711b769e3fde44a74016fff82 ac46fa8f1797d3b2a726b696e3dea553 0439acee3a45c2a51bc32dd055650b |
expected |
72c91078e9237b996f7ddc0936a4e69b a28c37fff2d11061601cf04915ff5dec 31e530a3aefa09141fc9061b3baf2fb2 ee7a841d5350b16dbe63ed50897fa2f7 |
Vector 7 — NIST SHA-3 KAT Len=1024 - 128 bytes, an exact multiple of the block size
| Field | Value |
|---|---|
input |
2b6db7ced8665ebe9deb080295218426 bdaa7c6da9add2088932cdffbaa1c141 29bccdd70f369efb149285858d2b1d15 5d14de2fdb680a8b027284055182a0ca e275234cc9c92863c1b4ab66f304cf06 21cd54565f5bff461d3b461bd40df281 98e3732501b4860eadd503d26d6e6933 8f4e0456e9e9baf3d827ae685fb1d817 |
expected |
9ec6669f30f482a65d93fe7811923b6b df3a1bde032502e0b1a064c9d893c035 07576fc4fbc745d458c1402ba76f7d4c 4539c4dfed7c058596fa270416865162 |