Skip to content

Commit

Permalink
Finished README
Browse files Browse the repository at this point in the history
  • Loading branch information
arguiot authored Mar 5, 2018
1 parent f0fbb97 commit d306ec4
Showing 1 changed file with 34 additions and 3 deletions.
37 changes: 34 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,41 @@ The ***Vigenere cipher*** was named after **Blaise de Vigenère**. This **substi

## Detailed Explanations : How it works?

1. Firstly,
#### 1. Firstly, we'll "draw" the Vigenere Table:
<img align="center" width="500" src="https://upload.wikimedia.org/wikipedia/commons/9/9a/Vigenère_square_shading.svg"/>

#### 2. After, we'll repeat the key:
If our message has a length of 12 for example, and our key is `CRYPTOOLS`, then we just repeat it until the new key length is superior to the message length:

```
CRYPTOOLSCRYPTOOLS
```
And we take the first `x` characters of this string, where `x` is our message length:
```
CRYPTOOLSCRY
```

#### 3. We encrypt the message using the Vigenere Table:
```
CRYPTOGRAPHY
|
v
CRYPTOOLSCRY
------------
EIWEMCUCSRYW
```
#### 4. We output the word
```
return "EIWEMCUCSRYW"
```
## Weaknesses
- Repeating key
- Cryptanalysis can determine the key length

## Example
## Implementations

### Encrypting
| **Language** | Encrypt | Decrypt |
| ------------ | ------------------------------ | ------------------------------ |
| C | [c/vigenere.c](c/vigenere.c) | [c/vigenere.c](c/vigenere.c) |
| Python | [py/encrypt.py](py/encrypt.py) | [py/decrypt.py](py/decrypt.py) |
| JavaScript | [js/encrypt.js](js/encrypt.js) | [js/decrypt.js](js/decrypt.js) |

0 comments on commit d306ec4

Please sign in to comment.