xor-encoded vigenere cypher decoder for ru-ru alphabet
Find a file
2022-10-16 20:05:18 +03:00
example Initial commit 2022-10-16 20:05:18 +03:00
.gitignore Initial commit 2022-10-16 20:05:18 +03:00
coder.go Initial commit 2022-10-16 20:05:18 +03:00
go.mod Initial commit 2022-10-16 20:05:18 +03:00
go.sum Initial commit 2022-10-16 20:05:18 +03:00
LICENSE Initial commit 2022-10-16 19:43:18 +03:00
main.go Initial commit 2022-10-16 20:05:18 +03:00
README.md Initial commit 2022-10-16 20:05:18 +03:00
text.go Initial commit 2022-10-16 20:05:18 +03:00
top.go Initial commit 2022-10-16 20:05:18 +03:00
util.go Initial commit 2022-10-16 20:05:18 +03:00

xor-vigenere

xor-encoded vigenere cypher decoder for ru-ru alphabet. Decodes uppercase text without white spaces and Ë letter.

Build

Requires go1.19

$ go build .

Usage

Specify input file and wait for result.

$ ./xor-vigenere -i example/cipher.txt -r 2
Cypher text file: example/cipher.txt
Parallel workers: 12 (override with -w flag)
Trying to predict secret key length ... 8 (override with -l flag)
Cypher text sample size to analyze: 2000 (override with -s flag)
Number of letters in permutations: 4 [ОЕАИ] (override with -p flag)
Number of results to show: 2 (override with -r flag)
Analyzing 100% [##################################################] (65536/65536, 36315 keys/s)        

Key=АБЫРВАЛГ Sample:ГДЕЖЕВЕСЬМИРВДЕНЬМОЕГОРОЖДЕНИЯГДЕЭЛЕКТРИЧЕСКИЕФО Div:0.145333
Key=АЙЫРВАЛГ Sample:ГМЕЖЕВЕСЬДИРВДЕНЬДОЕГОРОЖМЕНИЯГДЕХЛЕКТРИЧНСКИЕФО Div:0.166576
Execution duration: 1.805705397s

АБЫРВАЛГ is a valid secret key on top.

To receive better (but slower) results use:

  • bigger sample size for analyzing cypher text (-s 0 for analyzing whole text)
  • look through more possible keys (-r flag)
  • use more frequently used letters to create more permutations (slows really hard, -p flag)