-
-
Notifications
You must be signed in to change notification settings - Fork 11
armaOS Commands
The crypto
command is meant to be used in conjuction with the crack
command. The crypto
command allows you to encrypt and decrypt text by using various algorithms. See the list below for available algorithms. crypto
is no real world linux command. It's meant to create gameplay options.
There is a very good website explaining simple encryption methods. Future algorithms will be taken from there.
algorithm | status | key type | allowed text characters |
---|---|---|---|
caesar | implemented | even integer | latin alphabet A-Z, only upper case, no numbers or symbols, no language specific characters like ö, é or ô |
crypto -a <ALGORITHM> -m <MODE> -k <KEY> <MESSAGE>
option | mandatory | option type | available options |
---|---|---|---|
-a | yes | select from available options | caesar |
-m | yes | select from available options |
encrypt and decrypt
|
-k | yes | custom string, see algorithms for details | --- |
yes | custom string | --- |
The caesar algorithm is very old and very simple. You shift every character by the key number to the right. For example: If the key is 3
and you want to encode a B
you will get an E
because this is the character 3 digits to the right in the latin alphabet.
Because you can only use upper case latin alphabet you need to somehow adjust your messages according to that. This algorithm is meant to be easy crackable. You can do that in mind because of it's low complexity or with the crack
command.
Keep in mind, all characters of the message to be encoded will be changed to upper case latin alphabet or a blank space. Also keep in mind that there are only 26 passible keys because that's the length of the alphabet. You can use higher numbers but the result will match a lower number.
Here's an example. Message to encode: HELLO WORLD
admin@armaOS:/> crypto -a caesar -m encode -k 3 HELLO WORLD
KHOOR ZRUOG
admin@armaOS:/> crypto -a caesar -m decode -k 3 KHOOR ZRUOG
HELLO WORLD
The crack
command is meant to be used in conjuction with the crypto
command. The crack
command currently implements two methods, that allow you to crack the caesar
algorithm. With a bruteforce
attack the crack
command prints all possible key variants und you need to find the correct one by looking over it. This is quite easy because there are only 26 options. The second method is a statistics
analysis. Because some characters are more common then others. The most common character for example in german is the E
so it's very likely that the most frequent character in the encoded message corresponds to an E
. From there it's quite easy to decrypt.crack
is no real world linux command. It's meant to create gameplay options.
crack -a <ALGORITHM> -m <MODE> <MESSAGE>
option | mandatory | option type | available options |
---|---|---|---|
-a | only, if using bruteforce
|
select from available options | caesar |
-m | yes | select from available options |
bruteforce and statistics
|
yes | custom string | --- |
Here's an example with the statistics
mode. Keep in mind, this mode doesn't need a given algorithm. This mode is universal, but you need to interpret the result.
Original Message: THIS IS MY SECRET MESSAGE
Encoded Message: WKLV LV PB VHFUHW PHVVDJH
admin@armaOS:/> crack -m statistics WKLV LV PB VHFUHW PHVVDJH
Character 'B' found 1 times (Possible key, if this is an 'E': 23)
Character 'D' found 1 times (Possible key, if this is an 'E': 25)
Character 'F' found 1 times (Possible key, if this is an 'E': 1)
Character 'H' found 4 times (Possible key, if this is an 'E': 3)
Character 'J' found 1 times (Possible key, if this is an 'E': 5)
Character 'K' found 1 times (Possible key, if this is an 'E': 6)
Character 'L' found 2 times (Possible key, if this is an 'E': 7)
Character 'P' found 2 times (Possible key, if this is an 'E': 11)
Character 'U' found 1 times (Possible key, if this is an 'E': 16)
Character 'V' found 5 times (Possible key, if this is an 'E': 17)
Character 'W' found 2 times (Possible key, if this is an 'E': 18)
admin@armaOS:/> crypto -a caesar -m decode -k 17 WKLV LV PB VHFUHW PHVVDJH
FTUE UE YK EQODQF YQEEMSQ
admin@armaOS:/> crypto -a caesar -m decode -k 3 WKLV LV PB VHFUHW PHVVDJH
THIS IS MY SECRET MESSAGE
Here's an example with the bruteforce
mode. You need to add the -a <ALGORITHM>
parameter because the possible key values depend on the chosen algorithm.
Original Message: THIS IS MY SECRET MESSAGE
Encoded Message: WKLV LV PB VHFUHW PHVVDJH
admin@armaOS:/> crack -m bruteforce -a caesar WKLV LV PB VHFUHW PHVVDJH
Test 1: VJKU KU OA UGETGV OGUUCIG
Test 2: UIJT JT NZ TFDSFU NFTTBHF
Test 3: THIS IS MY SECRET MESSAGE
Test 4: SGHR HR LX RDBQDS LDRRZFD
Test 5: RFGQ GQ KW QCAPCR KCQQYEC
Test 6: QEFP FP JV PBZOBQ JBPPXDB
Test 7: PDEO EO IU OAYNAP IAOOWCA
Test 8: OCDN DN HT NZXMZO HZNNVBZ
Test 9: NBCM CM GS MYWLYN GYMMUAY
Test 10: MABL BL FR LXVKXM FXLLTZX
Test 11: LZAK AK EQ KWUJWL EWKKSYW
Test 12: KYZJ ZJ DP JVTIVK DVJJRXV
Test 13: JXYI YI CO IUSHUJ CUIIQWU
Test 14: IWXH XH BN HTRGTI BTHHPVT
Test 15: HVWG WG AM GSQFSH ASGGOUS
Test 16: GUVF VF ZL FRPERG ZRFFNTR
Test 17: FTUE UE YK EQODQF YQEEMSQ
Test 18: ESTD TD XJ DPNCPE XPDDLRP
Test 19: DRSC SC WI COMBOD WOCCKQO
Test 20: CQRB RB VH BNLANC VNBBJPN
Test 21: BPQA QA UG AMKZMB UMAAIOM
Test 22: AOPZ PZ TF ZLJYLA TLZZHNL
Test 23: ZNOY OY SE YKIXKZ SKYYGMK
Test 24: YMNX NX RD XJHWJY RJXXFLJ
Test 25: XLMW MW QC WIGVIX QIWWEKI
Test 26: WKLV LV PB VHFUHW PHVVDJH
Check the lines one by one. You will recognize immediately the correct decoded message. So we found the correct message in Test 3. That means that the correct key is 3.