Skip to content

feat: Add ZUC stream cipher operation - #2666

Open
NihaoKangkang wants to merge 4 commits into
gchq:masterfrom
NihaoKangkang:feature/zuc-cipher-3656552422777355745
Open

feat: Add ZUC stream cipher operation#2666
NihaoKangkang wants to merge 4 commits into
gchq:masterfrom
NihaoKangkang:feature/zuc-cipher-3656552422777355745

Conversation

@NihaoKangkang

Copy link
Copy Markdown

Implements the ZUC stream cipher in pure JavaScript based on the 3GPP confidentiality algorithm 128-EEA3/EIA3 specifications. Registers the cipher as a new Operation within CyberChef and includes test vectors to ensure correctness.

Author: Kyi Wong
Copyright: Crown Copyright 2026
License: Apache-2.0

Description
This PR adds the ZUC stream cipher to CyberChef. ZUC is a stream cipher designed by the Chinese Academy of Sciences and forms the core of the 3GPP confidentiality algorithm 128-EEA3 and the 3GPP integrity algorithm 128-EIA3.

The implementation strictly follows the 3GPP TS 35.221 specification, handling the 128-bit Key and 128-bit Initialization Vector (IV) to generate the keystream.

Existing Issue
None

Screenshots
image

AI disclosure
AI tools (Google Labs Jules) were used to assist in translating the cryptographic algorithm mathematically safely into JavaScript and structuring the module according to the CONTRIBUTING.md guidelines. The code has been thoroughly reviewed and manually tested to guarantee cryptographic correctness and performance without external dependencies.

Test Coverage
Official Test Vectors (from the 3GPP standard specification) have been integrated into the Node API testing suite (tests/node/tests/operations.mjs) to guarantee strictly standardized keystream output. All tests pass locally (npm run test). And by the way, I developed ZUC in python before and I check these two results manually.

NihaoKangkang and others added 3 commits July 13, 2026 13:25
Implements the ZUC stream cipher in pure JavaScript based on the 3GPP confidentiality algorithm 128-EEA3/EIA3 specifications. Registers the cipher as a new Operation within CyberChef and includes test vectors to ensure correctness.

Author: Kyi Wong
Copyright: Crown Copyright 2026
License: Apache-2.0

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Implements the ZUC stream cipher in pure JavaScript based on the 3GPP confidentiality algorithm 128-EEA3/EIA3 specifications. Registers the cipher as a new Operation within CyberChef and includes test vectors to ensure correctness.

Author: Kyi Wong
Copyright: Crown Copyright 2026
License: Apache-2.0

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Implements the ZUC stream cipher in pure JavaScript based on the 3GPP confidentiality algorithm 128-EEA3/EIA3 specifications. Registers the cipher as a new Operation within CyberChef and includes test vectors to ensure correctness.

Author: Kyi Wong
Copyright: Crown Copyright 2026
License: Apache-2.0

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
@NihaoKangkang

Copy link
Copy Markdown
Author

Reference paper / official specification: https://www.gsma.com/about-us/wp-content/uploads/2014/12/eea3eia3zucv16.pdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant