Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #1

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 50 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,58 @@ encrypts better than you"? I've got you covered! With this port of the amazing
1940's technology you'll be just as good at encrypting things as anyone's
grandmother.

The CLI was modified by becgabri, I have added here the proper usage of the cli as well as the build procedure.

### Usage

This repository contains both the CLI tool and its underlying library written in Go.
The library is documented on [GoDoc](https://godoc.org/github.com/emedvedev/enigma).

As for the CLI tool, a simple `go get` should do it:
As for the CLI tool, a simple `go get` could do it:

```
go get github.com/emedvedev/enigma/cmd/enigma
```
An alternative (I recommand) is to clone the github repository and compile the code on your machine:
in the directory ./enigma/cmd/enigma, you build the GO code by running:

```
go build .

While the full CLI syntax is a bit verbose, it's actually possible to use the tool
without any source code modifications, config files, or Enigma knowledge:
```

The new CLI format developped by becgabri requires to put the arguments between " " as the are manages as strings.
In the repository of the executable file you can run
```
./enigma -h
```
An example of the enigma configuration and out put is

```
enigma Never gonna give you up, never gonna let you down!
./enigma --rotors "Beta VI I III" --position "A A A A" --reflector "C" --plugboard "AD SF ET RY HK JL QZ WX UM OP" --rings "10 5 16 10" "hello world!"

```

Using an Enigma machine with default settings is somewhat similar to
setting your password to `0000`. Let's up our security game:
which gives the following result:

```
enigma youtu.be/dQw4w9WgXcQ --rotors Beta VI I III --reflector C-Thin --plugboard AD SF ET RY HK JL QZ WX UM OP --rings 10 5 16 10

Original text:
hello world!

Processed original text:
HELLOWORLDX

Enigma configuration:
Rotors: Beta VI I III
Rotor positions: A A A A
Rings: 10 5 16 10
Plugboard: AD SF ET RY HK JL QZ WX UM OP
Reflector: C

Result:
KZTDAUQBGVK

```

Much better! And of course, `enigma -h` will give you the complete description of
Expand All @@ -55,7 +84,21 @@ emulator:

* Plugboard: any number of letter pairs is accepted. Plugboard configuration
is optional.
Original text:
hello world!

Processed original text:
HELLOWORLDX

Enigma configuration:
Rotors: Beta VI I III
Rotor positions: A A A A
Rings: 10 5 16 10
Plugboard: AD SF ET RY HK JL QZ WX UM OP
Reflector: C

Result:
KZTDAUQBGVK
* Ring offsets and starting position of the rotors.

M3 and M4 can be fully emulated with the right parameters, and if it's
Expand Down