Skip to content
This repository has been archived by the owner on Feb 6, 2021. It is now read-only.

Commit

Permalink
v3.1 ReadMe
Browse files Browse the repository at this point in the history
Removed mention of file/message limits, as there no longer exist.
  • Loading branch information
a-p-jo committed Feb 4, 2021
1 parent b154932 commit c081267
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ C5 is short for Counter Conventional Caesar Cipher Contraption

**Full Disclosure :**

C5 is **not** intended for any critical security purposes. It is loosely based on the Vigenère and Caesar ciphers, and remains a shift cipher. It's intended for puzzle-ciphers and throwing off casual snooping.It is not immune to being treated as multiple Caesar ciphers, where it may be broken by frequency analysis, as long as the message is long enough or if the password is easily guessed.
C5 is **not** intended for any critical security purposes. It is based on the classical Vigenère and Caesar ciphers, and remains a shift cipher. It's intended for puzzle-ciphers and throwing off casual snooping.It is not immune to being treated as multiple Caesar ciphers, where it may be broken by frequency analysis, as long as the message is long enough or if the password is easily guessed.

It is in fact cracked : https://puzzling.stackexchange.com/a/101467/70806
It is, in fact, cracked : https://puzzling.stackexchange.com/a/101467/70806

**Algorithm/Steps:**

Expand All @@ -15,19 +15,26 @@ It is not necessary that all 8 shifts are used, nor that 8 shifts have unique va

Hence, a number can be ecnrypted as itself, and the ciphertext can prima facie be random looking.

C5 can, as of v3.0, encode/decode text files upto 100,000 chars as well as smaller messages upto 3000 chars entered through the console.
C5 can, as of v3.1, encode/decode text files as well as small messages entered through the Terminal.

- Encoding :

1. Password is taken. Password has 8 characters. These are stored as their ASCII values(except 0, which is stored with the value 0) individually.These values are used as the 8 possible shifts.
1. Password has 8 characters. These are stored as their ASCII values (except 0, which is stored with the value 0) individually.These values are used as the 8 possible shifts.

2. Plaintext is taken in through cosole or as a (text) file.
4. Each character in plaintext is changed depending on its position. The position number is matched with 6 mathematical number series. Depending on which it matches with, a value from the password is used as a shift on the char in that position. If it is a part of none of these series, the position value is checked for being odd or even. The shifted value is stored as an int. ASCII value of char is used for the shift operations.
5. Each resultant int is printed or saved to a file, and the last number is always -999 (used to terminate input in decryption).

3. Each character in plaintext is shifted depending on its position and the characters of the password. The position is matched with 6 mathematical number series. Correspondingly, a character from the password is used as a shift on the character of the plaintext. If it is a part of none of these series, the position value is checked for being odd or even. The shifted value is stored as an int. ASCII value of plaintext character is operated on by the shift operations.

4. Each resultant int is printed, and the terminal number of ciphertext is always -999 (used to terminate input in decryption).

- Decoding :

1. Password is taken and each char's value is stored just as with the encoding process.

2. Ciphertext is taken from user through console or as a file.

3. Same rules as in encrypt are applied and reversed according to the entered password .

4. Decoded text is printed or saved to a file, and if password was correct, the decoded text makes sense and is the same as the original message.

- **Example :**
Expand All @@ -36,12 +43,4 @@ Message = "hello"

Password = "12345678"

Ciphertext = 51 152 159 55 160 -999

**Misc.**

- Windows C5 **=>** Compiled with VS2019 | x86_64 & x86 only | requires ' _ ' prefix before getw & putw |

- MacOS C5 **=>** Compiled with Apple Clang 11 | x86_64 only | Compiled with : " make C5 " |

- Linux C5 **=>** Compiled with Ubuntu GCC 9.3.0 | x86_64 only | Compiled with : " make C5 " & " gcc -static -o C5_static C5.c " |
Ciphertext = 51 152 159 55 160 -999

0 comments on commit c081267

Please sign in to comment.