mystiko 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/README.md +21 -12
- data/challenge/README.md +10 -0
- data/challenge/challenge.bin +0 -0
- data/irbt.rb +0 -2
- data/lib/mystiko/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c51d35ea70b716ac0e8919fb8ae9edc5cad499e
|
4
|
+
data.tar.gz: 2bffcef13afb643b6fc3de882f6fcaa1387113b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 746c0dd4aab8f1b00fefca0e244ebc0a1602d425683a8e33fb6952fe517c3867c949d7b847b09bf5041eb350860b238afe1b8c91a1b0c74b47bdf69984415e7b
|
7
|
+
data.tar.gz: 34a1d022bb95bdc0ce0a87cdc5f8a8a39a4c1b6a4800d59abdda7176774faa7a6c57c91dd1e21f0575ee9b44f6d91bd9c79686255fdaab6601a5f334f7289b0c
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -32,6 +32,9 @@ Mystikó is both a ruby gem and a command line utility. In order to work
|
|
32
32
|
with the encryption engine two things must be done:
|
33
33
|
|
34
34
|
- An instance must be created. This is easily done with the new method.
|
35
|
+
|
36
|
+
and then one of the following two options:
|
37
|
+
|
35
38
|
- Encryption is done with the encrypt method and appropriate parameters.
|
36
39
|
- Decryption is done with the decrypt method and appropriate parameters.
|
37
40
|
|
@@ -72,16 +75,17 @@ arguments or the "--help", "-h", or "-?" options.
|
|
72
75
|
- If -r is specified, -i is ignored.
|
73
76
|
- String data may be optionally enclosed in " ... "
|
74
77
|
|
75
|
-
##
|
78
|
+
## Principles of Operation
|
76
79
|
|
77
80
|
#### The Vernam Cypher
|
78
81
|
|
79
|
-
The mystikó gem is a modified Vernam cypher. The
|
80
|
-
|
81
|
-
the
|
82
|
-
|
83
|
-
|
84
|
-
|
82
|
+
The mystikó gem is a modified Vernam cypher. The Vernam cypher works
|
83
|
+
by taking a stream of input symbols and mapping them to output symbols. This
|
84
|
+
mapping obscures the original data. The classic approach to this type of cypher
|
85
|
+
is to have a random string of data of the same length as the plain text data.
|
86
|
+
The two streams of data are combined using the XOR operation. To recover the
|
87
|
+
original data, the cypher data is again combined with the random data with the
|
88
|
+
XOR operation. After one use, the random data is never reused.
|
85
89
|
|
86
90
|
This works because the XOR operator exhibits the following identity:
|
87
91
|
|
@@ -134,15 +138,20 @@ deal.
|
|
134
138
|
#### The Scrambled Vernam Cypher
|
135
139
|
|
136
140
|
To avoid the problems of the classical Vernam cypher, mystikó makes one
|
137
|
-
significant change: The
|
138
|
-
|
141
|
+
significant change: The Scrambled Vernam Cypher first performs a PRNG
|
142
|
+
controlled shuffle on the symbols followed by a mapping of input symbols to
|
143
|
+
output symbols.
|
139
144
|
|
140
|
-
To recover data,
|
141
|
-
|
145
|
+
To recover data, the Scrambled Vernam Cypher decryption routine performs an
|
146
|
+
anti-mapping of the symbols back to their original values followed by a
|
147
|
+
controlled anti-shuffle of the data back to its original order.
|
142
148
|
|
143
149
|
This data shuffling denies any would-be attacker knowledge of the order of the
|
144
150
|
input data. Thus even with standard message headers, the content of the
|
145
|
-
original message is no longer relevant.
|
151
|
+
original message is (hopefully) no longer relevant.
|
152
|
+
|
153
|
+
It remains to be seen if this is indeed the case. Comments, ideas,
|
154
|
+
observations, and thoughts are welcomed. See below for contributing.
|
146
155
|
|
147
156
|
#### References
|
148
157
|
|
data/challenge/README.md
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
# The Mystikó Challenge
|
2
|
+
|
3
|
+
In this folder you will find the challenge.bin file. This file contains the
|
4
|
+
output of the mystico program. It is a encrypted version of a bit of text.
|
5
|
+
|
6
|
+
The **Challenge?** **Crack** the **Code**; **Recover** the **Data**; If you can!
|
7
|
+
|
8
|
+
Prizes? Well at present none beyond fame and notoriety. I will try and
|
9
|
+
see if I can find a sponsor for something a little better and will update
|
10
|
+
this note as more information and goodies become available.
|
Binary file
|
data/irbt.rb
CHANGED
data/lib/mystiko/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mystiko
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Camilleri
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-08-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fibonacci_rng
|
@@ -107,6 +107,8 @@ files:
|
|
107
107
|
- LICENSE.txt
|
108
108
|
- README.md
|
109
109
|
- bin/mystiko
|
110
|
+
- challenge/README.md
|
111
|
+
- challenge/challenge.bin
|
110
112
|
- irbt.rb
|
111
113
|
- lib/mystiko.rb
|
112
114
|
- lib/mystiko/decrypt.rb
|