Z is Raku app to visualize the unsolved z340 cipher and perform different operations (Transpose, Rotate, Flip ...) in attempt to have better understanding of the cipher.
The main cipher window consist of the cipher symbols, with each transposition, the grams count ( bi-grams, tri-grams, ... and so on, if any. Separated by a space ) will be printed to the status bar. if a count has : it means before colon is the  unique-grams, after colon is the total grams"
If you are familiar with vi, working with Z should be easy, as Z mimics some of vi commands. like visual mode for selection , copy/paste, replace (or decipher symbol). Mouse works as well.
Transpositions can be applied to the whole cipher or a selection of the cipher, Full list of transpositions can be found in the Examples section here
Z is a visualising tool, it's not a bruteforce tool. Once you are happy with a transposition you can save it and use other tools to bruteforc it.
Z is a GTK+ app, requires P6-GtkPlus, Since P6-GtkPlus is not in the ecosystem yet, Please follow the build instructions mentioned in the above link.
After installing P6-GtkPlus, clone Z repo:
git clone https://github.com/hythm7/Z.git
cd Z
# installl dependencies using zef
zef install --deps-only .
# or using pakku
pakku verbose info add deps only .
Install resources/Zodiac.ttf font if you want the symbols to show as the actual cipher symbols, rather than ascii symbols
# Installing a font on Linux box is similar to below:
mkdir -p  ~/.local/share/fonts
cp resources/Zodiac.ttf !$
fc-cache -f -v
Run Z as instructed by P6-GtkPlus:
MVM_SPESH_INLINE_DISABLE=1 $P6_GTK_HOME/p6-GtkPlus/p6gtkexec bin/z
# the SPESH env variable is a temporary workaround for a current issue
Once app is running a File Chooser window will show where you can choose the cipher file path cipher/z340 (or cipher/test if you want to experiment first)
It is not the best idea to have an App depends on a non-production ready module since it can break anytime with updates to the module, But I will try to keep it updated and workign with GtkPlus master branch HEAD.
- vActivate / Deactivate- visualmode (selection using- hjkl)
- yYank selected symbols
- pPaste yanked symbols
- dDecipher current symbol (Replace it with another letter (hopefully to compose a meaningful word)
- fFlip horizontally
- FFlip Vertically
- rRotate clockwise
- RRotate anticlockwise
- mMirror clockwise [ Experimental ]
- MMirror anticlockwise [ Experimental ]
- aAngle +90 [ Experimental ]
- AAngle -90 [ Experimental ]
- gCalculate grams and print to statusbar
- GCalculate grams of selection and print to statusbar
- 1Select unigrams
- 2Select bigrams
- 3Select trigrams
- 4Select quadgrams
- 5Select quintgrams
- 6Select 6-grams
- 7Select 7-grams
- 8Select 8-grams
- 9Select 9-grams
- cOpen color box and apply chosen color to selection
- nOpen a new cipher with same state of current cipher
- NOpen a new cipher with same state of selection in current cipher
- QClose current cipher window
- Hit Space on a selected symbolSelect all similar symbols and print count to status bar
- ReturnDeactivate- visualmode
- EscUnselect all and deactivate- visualmode
- Right click -> saveSave current cipher state to a file
- Right click -> quitClose current cipher window
Artistic-2.0.
If you solved the z340 cipher with help of Z, Please mention Z ;-)
Thanks to Xliff for being more than helpfull with addressing the issues I faced during working with Z, I literally started this project knowing nothing about GTK, I wouldn't be able to make Z up and running without his help.
Thanks to the nice people on #raku irc channel
The Zodiac.ttf font was downloaded from here
