Skip to content

Commit 65d2d7f

Browse files
authored
Update shuffled_shift_cipher.py
1 parent d6cd9e6 commit 65d2d7f

1 file changed

Lines changed: 22 additions & 1 deletion

File tree

ciphers/shuffled_shift_cipher.py

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,28 @@
55

66

77
class ShuffledShiftCipher:
8-
"""
8+
"""
9+
This algorithm uses the Caesar Cipher algorithm but removes the option to
10+
use brute force to decrypt the message.
11+
12+
The passcode is a random password from the selection buffer of
13+
1. uppercase letters of the English alphabet
14+
2. lowercase letters of the English alphabet
15+
3. digits from 0 to 9
16+
17+
Using unique characters from the passcode, the normal list of characters,
18+
that can be allowed in the plaintext, is pivoted and shuffled. Refer to docstring
19+
of __make_key_list() to learn more about the shuffling.
20+
21+
Then, using the passcode, a number is calculated which is used to encrypt the
22+
plaintext message with the normal shift cipher method, only in this case, the
23+
reference, to look back at while decrypting, is shuffled.
24+
25+
Each cipher object can possess an optional argument as passcode, without which a
26+
new passcode is generated for that object automatically.
27+
cip1 = ShuffledShiftCipher('d4usr9TWxw9wMD')
28+
cip2 = ShuffledShiftCipher()
29+
930
Enhanced Caesar Cipher with shuffled character set for stronger encryption.
1031
Uses a passcode to generate a unique shuffled key list and shift key.
1132
"""

0 commit comments

Comments
 (0)