feat: Added Kolmar cipher operation#2657
Open
1mpuser wants to merge 2 commits into
Open
Conversation
|
Alexei Baranov seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a new operation, "Kolmar Cipher" (Encode/Decode), based on a custom Russian-language
substitution cipher originally created and published at kolmarchik.ru. The cipher derives a
grid of "boxes" from user-supplied Russian code word(s) (via syllable splitting and a digit-based
capacity rule per letter), then distributes the plaintext's Cyrillic letters into that grid in a
round-robin fill order, dynamically opening new rows as needed. Decode reverses the process to
recover the original letter sequence (spaces are not preserved, matching the original site's
behaviour).
Options added:
Existing Issue
N/A — this is not tied to an existing issue.
AI disclosure
I used Claude (Anthropic) to help port the algorithm into CyberChef's operation structure/
conventions (Operation class boilerplate, args config, following the pattern of existing cipher
operations like ROT13.mjs/VigenereEncode.mjs) and to help draft the test cases. The cipher
algorithm itself was not designed or written by AI — it's a pre-existing algorithm from
kolmarchik.ru, which I reverse-engineered/ported (with the original source's own JS as reference)
rather than having AI invent the cipher logic. I've reviewed the implementation myself and can
answer questions about how it works.
Test Coverage
Added tests in tests/operations/KolmarCipher.mjs covering: basic encode/decode round-trip,
manual syllable splitting via hyphen, multi-row/multi-codeword output, non-Cyrillic character
stripping, empty input, and missing code words on decode.