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.
v
Activate / Deactivatevisual
mode (selection usinghjkl
)y
Yank selected symbolsp
Paste yanked symbolsd
Decipher current symbol (Replace it with another letter (hopefully to compose a meaningful word)f
Flip horizontallyF
Flip Verticallyr
Rotate clockwiseR
Rotate anticlockwisem
Mirror clockwise [ Experimental ]M
Mirror anticlockwise [ Experimental ]a
Angle +90 [ Experimental ]A
Angle -90 [ Experimental ]g
Calculate grams and print to statusbarG
Calculate grams of selection and print to statusbar1
Select unigrams2
Select bigrams3
Select trigrams4
Select quadgrams5
Select quintgrams6
Select 6-grams7
Select 7-grams8
Select 8-grams9
Select 9-gramsc
Open color box and apply chosen color to selectionn
Open a new cipher with same state of current cipherN
Open a new cipher with same state of selection in current cipherQ
Close current cipher windowHit Space on a selected symbol
Select all similar symbols and print count to status barReturn
Deactivatevisual
modeEsc
Unselect all and deactivatevisual
modeRight click -> save
Save current cipher state to a fileRight click -> quit
Close 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