summaryrefslogtreecommitdiffstats
path: root/README.md
blob: bc94b051bc11f5c71262a9570c2bb381d0873aaa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
Onetimebluh (Workbluhp in blogress!!)
======================================

Simple implementation of One Time Pad cipher. 
Capable of generating cryptographically strong random number keys and of usign them to encrypt/decrypt messages of same length with a bitwise XOR function.

Build
-------

To build onetimebluh just run `make` or `make all`, and You will find the executable binary in the build folder. If you want to install it, just run `make install` and `make clean` to get rid of all the compiled files.

Usage
-------

Example creates two keys of length 4096 bytes and use the first as a message and the second as the pad key (just for testing):

```
otbluh --key-gen --nbytes 4096 --output message
otbluh --key-gen --nbytes 4096 --output pad
otbluh --encrypt message --key-file pad --output encrypted-message
otbluh --decrypt encrypted-message --key-file pad --outptut decrypted-message
```

Is recommended to use the `-t` option in order to be sure not to use more than once the same pieces of the pad to encrypt your data. Here follows an other example:

```
otbluh --encrypt message --key-file pad --output encrypted-message --tear-page
```

Or using the short options:

```
otbluh -te message -k pad -o encrypted-message
```

If you want you can use the `--bluh` function to get the binary dump of yuor encrypted message:
```
otbluh --bluh message --output bluhed-message
```

You can print the help by running `onetimebluh --help` or `onetimebluh -h`.

```
ONETIMEBLUH USAGE:
otbluh [COMMAND] [OPTIONS]

COMMANDS:

-b, --bluh=FILE            bluhes your message or in other words performs a binary dump
-d, --decrypt=FILE         decrypt message (input) same ad --encrypt, just for the feeling
-e, --encrypt=FILE         encrypt message (input)
-g, --gen-key              create key file
-h, --help                 print this help
-u, --unbluh=FILE          unbluhes your message (gets the orginal message from the binary dump)

OPTIONS

-c, --char=CAHRS           reads two cahracters as argument and uses them to bluh your message
-k, --key-file=KEY_FILE    use key (input)
-n, --nbytes=NUM           number of bytes
-o, --output=FILE          output name
-t, --tear-page            deletes from the pad file the bytes used to encrypt/decrypt

Onetimebluh project repository at https://git.eigenlab.org/seppia/onetimebluh
```