You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
self.e.update(dict(zip(string.ascii_uppercase, string.ascii_uppercase[self.key:]+string.ascii_uppercase[:self.key]))) # After updating the e {'a': 'd', 'b': 'e'.......'z': 'c', 'A': 'D', 'B':'E',.....'Z':'C'}
- The Ceaser cipher Algorithm is simple to understand and implement.
8
+
This is used to Encrypt the message and Decrypt the message.
9
+
10
+
### Description
11
+
12
+
- In cryptography, a Caesar cipher also known as Caesar's cipher, the shift cipher, Caesar's code or Caesar shift, is one of the simplest and most widely known encryption techniques.
13
+
It is a type of substitution cipher in which each letter in the plaintext is replaced by a letter some fixed number of positions down the alphabet.
14
+
15
+
### Workflow
16
+
- The complete process depends on length of the alphabets used.
17
+
- The letter of an alphabet of size m are first mapped to the integers in the range 0...m-1.
18
+
- Each letter of a given text is replaced by a letter some fixed number of positions down the alphabet.
19
+
- For example with a shift of 1, A would be replaced by B, B would become C, and so on. The method is apparently named after Julius Caesar, who apparently used it to communicate with his officials.
20
+
- Thus to cipher a given text we need an integer value, known as shift which indicates the number of position each letter of the text has been moved down.
21
+
- The encryption can be represented using modular arithmetic by first transforming the letters into numbers, according to the scheme, A = 0, B = 1,…, Z = 25. Encryption of a letter by a shift n can be described mathematically as.
22
+
23
+
### Compilation Steps
24
+
25
+
- Download the file Ceaser_cipher.py
26
+
- Run the File Ceaser_cipher.py
27
+
- Input any key
28
+
- Input the Message
29
+
- And finally we will get Encrypted message and Decrypted Message
0 commit comments