mystiko 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +10 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +60 -0
- data/crypto_101/part_01/README.md +40 -0
- data/lib/mystiko.rb +8 -0
- data/lib/mystiko/version.rb +6 -0
- data/mystiko.gemspec +33 -0
- data/rakefile.rb +41 -0
- data/reek.txt +1 -0
- metadata +111 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 5796e4e1fa52ab52ff132e77d247b9adffd3ebb6
|
4
|
+
data.tar.gz: 3e3c02ae21aa3d35e35b1651fd9eeff95e055031
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: a565faf5873e606e5e2bdca07f6efc9f9263e3c37405a588fd8ba7b110eef6ad705ee5985e2e25ea29d2097f4bf385f66175e63c288cb6bbbe407fbae88d1b3d
|
7
|
+
data.tar.gz: 417b4ea310cca0b2959089fdb014cc9b978e8d2ec884e98303dad60883b64308b367c70ae5a76af00c4770e250bb28a11bb4841f8c14415d8efbb9fea6507a85
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2016 Peter Camilleri
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,60 @@
|
|
1
|
+
# Mystikó
|
2
|
+
|
3
|
+
The word mystikó is from the Greek language and means secret. Keeping
|
4
|
+
secrets safe from unauthorized eyes is the very core purpose of encryption.
|
5
|
+
|
6
|
+
Over the next few months, this code repo will grow to contain an introduction
|
7
|
+
to encryption aimed at those who are curious about how it works.
|
8
|
+
|
9
|
+
This will be done in a number of parts:
|
10
|
+
|
11
|
+
- A look at the basic machinery common to all encryption systems.
|
12
|
+
- A look at some famous (and infamous) encryption systems used through history.
|
13
|
+
In addition to seeing how they work, we'll also take a look at how they
|
14
|
+
failed and/or went obsolete.
|
15
|
+
- The mystiko gem, written in ruby, that serves as a simple demonstration of
|
16
|
+
the principles of data encryption.
|
17
|
+
- A challenge. For as long as secret codes have existed, secret code breakers
|
18
|
+
have tried to defeat them. Coming soon, see if you can decode a secret
|
19
|
+
message created by the above ruby code. Prizes, if any, to be determined!
|
20
|
+
|
21
|
+
## Installation
|
22
|
+
|
23
|
+
Add this line to your application's Gemfile:
|
24
|
+
|
25
|
+
```ruby
|
26
|
+
gem 'mystiko'
|
27
|
+
```
|
28
|
+
|
29
|
+
And then execute:
|
30
|
+
|
31
|
+
$ bundle
|
32
|
+
|
33
|
+
Or install it yourself as:
|
34
|
+
|
35
|
+
$ gem install mystiko
|
36
|
+
|
37
|
+
The mystiko gem itself will soon be found at: ( https://rubygems.org/gems/mystiko )
|
38
|
+
|
39
|
+
## Usage
|
40
|
+
|
41
|
+
TODO: Write usage instructions here
|
42
|
+
|
43
|
+
## Contributing
|
44
|
+
|
45
|
+
Creating a good introduction to encryption is quite an undertaking. For
|
46
|
+
this reason, any input is most welcomed. There are two basic plans by which
|
47
|
+
this can be accomplished.
|
48
|
+
|
49
|
+
#### Plan A
|
50
|
+
|
51
|
+
1. Fork it ( https://github.com/PeterCamilleri/mystiko/fork )
|
52
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
53
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
54
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
55
|
+
5. Create new Pull Request
|
56
|
+
|
57
|
+
#### Plan B
|
58
|
+
|
59
|
+
Go to the GitHub repository and raise an issue calling attention to some
|
60
|
+
aspect that could use some TLC or a suggestion or an idea.
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# Welcome to Cyrpto 101
|
2
|
+
|
3
|
+
This series of lessons is a basic level primer on encryption. The target
|
4
|
+
audience is programmers curious about how encryption works but not in love
|
5
|
+
with pages of confusing mathematical scribblings. It is not really solid
|
6
|
+
enough to use as a basis for those wishing to delve deeply into the field
|
7
|
+
but may still serve as a starting point for such a path.
|
8
|
+
|
9
|
+
The examination of encryption will look at a number of sources.
|
10
|
+
|
11
|
+
- The theory behind how encryption works.
|
12
|
+
- An examination of actual encryption systems that are deployed in the field.
|
13
|
+
- A look at some examples of epic failures through the years.
|
14
|
+
- We will build up a simple example encryption system in the ruby language.
|
15
|
+
|
16
|
+
Keep in my that this primer will keep things on a basic level. As a result
|
17
|
+
we will avoid digging into the leading edge of security apparatus. The NSA
|
18
|
+
most certainly has nothing to fear here.
|
19
|
+
|
20
|
+
Finally, it is a goal to keep the tone light and informal. Furthermore, since
|
21
|
+
I am not particularly learned, this will _not_ be a learned dissertation.
|
22
|
+
|
23
|
+
## Encryption Basics
|
24
|
+
|
25
|
+
There are many occasions that require moving and/or storing information in a
|
26
|
+
secure manner. Some of these include:
|
27
|
+
|
28
|
+
- Protecting personal information for customers or citizens.
|
29
|
+
- Protecting financial information during business transactions.
|
30
|
+
- Protecting the secrecy during military operations.
|
31
|
+
- Protecting intellectual property from industrial espionage.
|
32
|
+
- Protecting the operation of banking systems or power grids.
|
33
|
+
- Protecting... well you get it. There's a lot that needs protecting.
|
34
|
+
|
35
|
+
So, just what does protecting mean in this context? In each case above, there
|
36
|
+
is information. That information is plainly visible to the originator of the
|
37
|
+
information. It needs to be made plainly visible to the intended recipient of
|
38
|
+
that information. It needs to be kept out of the hands who are not authorized
|
39
|
+
to possess or use that information.
|
40
|
+
|
data/lib/mystiko.rb
ADDED
data/mystiko.gemspec
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'mystiko/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "mystiko"
|
8
|
+
spec.version = Mystiko::VERSION
|
9
|
+
spec.authors = ["Peter Camilleri"]
|
10
|
+
spec.email = ["peter.c.camilleri@gmail.com"]
|
11
|
+
|
12
|
+
# spec.summary = "A introduction to the world of encryption."
|
13
|
+
# spec.description = "A brief primer on the fundamentals of encryption."
|
14
|
+
|
15
|
+
spec.summary = "A temp place holder."
|
16
|
+
spec.description = "A temp place holder. Work in progress."
|
17
|
+
|
18
|
+
spec.homepage = "http://teuthida-technologies.com/"
|
19
|
+
spec.license = "MIT"
|
20
|
+
|
21
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(tests)/}) }
|
22
|
+
spec.bindir = "exe"
|
23
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
24
|
+
spec.require_paths = ["lib"]
|
25
|
+
|
26
|
+
spec.platform = Gem::Platform::RUBY
|
27
|
+
spec.required_ruby_version = '>=1.9.3'
|
28
|
+
|
29
|
+
spec.add_development_dependency "bundler", "~> 1.11"
|
30
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
31
|
+
spec.add_development_dependency 'minitest_visible', ">= 0.1.0"
|
32
|
+
spec.add_development_dependency 'mini_readline', ">= 0.4.8"
|
33
|
+
end
|
data/rakefile.rb
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
# coding: utf-8
|
3
|
+
|
4
|
+
require 'rake/testtask'
|
5
|
+
require 'rdoc/task'
|
6
|
+
require "bundler/gem_tasks"
|
7
|
+
|
8
|
+
#Generate internal documentation with rdoc.
|
9
|
+
RDoc::Task.new do |rdoc|
|
10
|
+
rdoc.rdoc_dir = "rdoc"
|
11
|
+
|
12
|
+
#List out all the files to be documented.
|
13
|
+
rdoc.rdoc_files.include("lib/**/*.rb", "license.txt", "README.md")
|
14
|
+
|
15
|
+
#Make all access levels visible.
|
16
|
+
rdoc.options << '--visibility' << 'private'
|
17
|
+
#rdoc.options << '--verbose'
|
18
|
+
#rdoc.options << '--coverage-report'
|
19
|
+
|
20
|
+
#Set a title.
|
21
|
+
rdoc.options << '--title' << 'Mystiko Internals'
|
22
|
+
end
|
23
|
+
|
24
|
+
#Run the mystiko unit test suite.
|
25
|
+
Rake::TestTask.new do |t|
|
26
|
+
#List out all the unit test files.
|
27
|
+
t.test_files = FileList['tests/**/*.rb']
|
28
|
+
t.verbose = false
|
29
|
+
t.warning = true
|
30
|
+
end
|
31
|
+
|
32
|
+
desc "Run a scan for smelly code!"
|
33
|
+
task :reek do |t|
|
34
|
+
`reek --no-color lib > reek.txt`
|
35
|
+
end
|
36
|
+
|
37
|
+
desc "What version of mystiko is this?"
|
38
|
+
task :vers do |t|
|
39
|
+
puts
|
40
|
+
puts "Mystiko version = #{Mystiko::VERSION}"
|
41
|
+
end
|
data/reek.txt
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0 total warnings
|
metadata
ADDED
@@ -0,0 +1,111 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: mystiko
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Peter Camilleri
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-05-29 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.11'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.11'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: minitest_visible
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 0.1.0
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 0.1.0
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: mini_readline
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 0.4.8
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 0.4.8
|
69
|
+
description: A temp place holder. Work in progress.
|
70
|
+
email:
|
71
|
+
- peter.c.camilleri@gmail.com
|
72
|
+
executables: []
|
73
|
+
extensions: []
|
74
|
+
extra_rdoc_files: []
|
75
|
+
files:
|
76
|
+
- ".gitignore"
|
77
|
+
- Gemfile
|
78
|
+
- LICENSE.txt
|
79
|
+
- README.md
|
80
|
+
- crypto_101/part_01/README.md
|
81
|
+
- lib/mystiko.rb
|
82
|
+
- lib/mystiko/version.rb
|
83
|
+
- mystiko.gemspec
|
84
|
+
- rakefile.rb
|
85
|
+
- reek.txt
|
86
|
+
homepage: http://teuthida-technologies.com/
|
87
|
+
licenses:
|
88
|
+
- MIT
|
89
|
+
metadata: {}
|
90
|
+
post_install_message:
|
91
|
+
rdoc_options: []
|
92
|
+
require_paths:
|
93
|
+
- lib
|
94
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
95
|
+
requirements:
|
96
|
+
- - ">="
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: 1.9.3
|
99
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
requirements: []
|
105
|
+
rubyforge_project:
|
106
|
+
rubygems_version: 2.2.2
|
107
|
+
signing_key:
|
108
|
+
specification_version: 4
|
109
|
+
summary: A temp place holder.
|
110
|
+
test_files: []
|
111
|
+
has_rdoc:
|