forgiva 1.0.pre.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,234 @@
1
+ require 'constants'
2
+
3
+
4
+ module TestVectors
5
+ FG_TESTS = [
6
+ {:host => "facebook.com",
7
+ :account => "bill.gates@microsoft.com",
8
+ :renewal_date => "1970-01-01",
9
+ :master_key => "forgiva_rockz_all_the_fuck1ng_t1m3",
10
+ :complexity => Constants::FORGIVA_PG_SIMPLE,
11
+ :animal_name => "Ape",
12
+ :expected_password_hash => "797036592a475f78444c6153504d3757"},
13
+
14
+ ## facebook.com - root
15
+ {:host => "facebook.com",
16
+ :account => "root",
17
+ :renewal_date => "1970-01-01",
18
+ :master_key => "forgiva_rockz_all_the_fuck1ng_t1m3",
19
+ :complexity => Constants::FORGIVA_PG_INTERMEDIATE,
20
+ :animal_name => "Bat",
21
+ :expected_password_hash => "5544245f2b72682e4635765040416a49"
22
+
23
+ },
24
+
25
+ ## facebook.com - k3ym4k3r
26
+ {:host => "facebook.com",
27
+ :account => "k3ym4k3r",
28
+ :renewal_date => "1970-01-01",
29
+ :master_key => "forgiva_rockz_all_the_fuck1ng_t1m3",
30
+ :complexity => Constants::FORGIVA_PG_ADVANCED,
31
+ :animal_name => "Bear",
32
+ :expected_password_hash => "4f5c7653513251417a675949284c5539"
33
+
34
+ },
35
+
36
+ ## facebook.com - scr1ptk1dd1e
37
+ {:host => "facebook.com",
38
+ :account => "scr1ptk1dd1e",
39
+ :renewal_date => "1970-01-01",
40
+ :master_key => "forgiva_rockz_all_the_fuck1ng_t1m3",
41
+ :complexity => Constants::FORGIVA_PG_SIMPLE,
42
+ :animal_name => "Whale",
43
+ :expected_password_hash => "6465635a675374322f47695051464157"
44
+ },
45
+
46
+ ## microsoft.com - toor
47
+ {:host => "microsoft.com",
48
+ :account => "toor",
49
+ :renewal_date => "1970-01-01",
50
+ :master_key => "forgiva_rockz_all_the_fuck1ng_t1m3",
51
+ :complexity => Constants::FORGIVA_PG_INTERMEDIATE,
52
+ :animal_name => "Crow",
53
+ :expected_password_hash => "4d314573586d403649672970786d7133"
54
+ },
55
+
56
+ ## 192.168.0.1 - root
57
+ {:host => "192.168.0.1",
58
+ :account => "root",
59
+ :renewal_date => "1970-01-01",
60
+ :master_key => "forgiva_rockz_all_the_fuck1ng_t1m3",
61
+ :complexity => Constants::FORGIVA_PG_ADVANCED,
62
+ :animal_name => "Dog",
63
+ :expected_password_hash => "2c376d234a7a6c4d6f785c34494a672a"
64
+ },
65
+
66
+ ## 10.0.0.2:22 - root
67
+ {:host => "10.0.0.2:22",
68
+ :account => "root",
69
+ :renewal_date => "1970-01-01",
70
+ :master_key => "forgiva_rockz_all_the_fuck1ng_t1m3",
71
+ :complexity => Constants::FORGIVA_PG_SIMPLE,
72
+ :animal_name => "Duck",
73
+ :expected_password_hash => "6440562a36375065693646396e312c4b"
74
+
75
+ },
76
+
77
+ ## 10.0.0.2:22 - k3ym4k3r
78
+ {:host => "10.0.0.2:22",
79
+ :account => "k3ym4k3r",
80
+ :renewal_date => "1970-01-01",
81
+ :master_key => "forgiva_rockz_all_the_fuck1ng_t1m3",
82
+ :complexity => Constants::FORGIVA_PG_INTERMEDIATE,
83
+ :animal_name => "Cat",
84
+ :expected_password_hash => "78435f57566e2f53535f2e617738293b"
85
+
86
+ },
87
+
88
+ ## 10.0.0.2:22 - toor
89
+ {:host => "10.0.0.2:22",
90
+ :account => "toor",
91
+ :renewal_date => "1970-01-01",
92
+ :master_key => "forgiva_rockz_all_the_fuck1ng_t1m3",
93
+ :complexity => Constants::FORGIVA_PG_ADVANCED,
94
+ :animal_name => "Wasp",
95
+ :expected_password_hash => "54534a582b265f337e2e43403b536861"
96
+ }].freeze
97
+
98
+ FA_TESTS = [{:is_encryption_algorithm => true,
99
+ :algorithm_name => "camellia-128-cbc",
100
+ :data_hex =>
101
+ "b9717e084ce3a6bb30af116bc811df7cbfdd618c005c92c90076162daba5a849",
102
+ :key_hex => "d40d6d81d931ecc30a534c3f9d5dfe01",
103
+ :iv_hex => "cd5464cf4236b8a53ad5b42cbc27f0a8",
104
+ :target_hex => "5a2e35425a955265856300246eca4e65a4a428935c80e59dffed50852b8430d0"},
105
+
106
+ {:is_encryption_algorithm => true,
107
+ :algorithm_name => "camellia-192-cbc",
108
+ :data_hex =>
109
+ "404e8c8b37e91d052ffd70573ed257a9677811cfa73458ba0607dc9e8def97b4",
110
+ :key_hex => "edb8557b39e7e656148f850530950d8c",
111
+ :iv_hex => "a8708092b77bd94c6b1f0b8cf6b0afd8",
112
+ :target_hex => "9b297587c3291ddc538ca02cdcd46476f60d45dcf655ebb4d1f7f072d1c514f7"},
113
+
114
+ {:is_encryption_algorithm => true,
115
+ :algorithm_name => "camellia-256-cbc",
116
+ :data_hex =>
117
+ "f266dad6764640de2e13902fb7c04fcd7f1c2e950ceb1b6559d1e620ea2cf39b",
118
+ :key_hex => "4200c4cad8b47814a5ed84ab0141aaeb",
119
+ :iv_hex => "e0a054f34133aa2602db257fee1e7db1",
120
+ :target_hex => "be84b266be13e13fc78a27c4ec86c4d7b70ecb26d8d1f6bbe247744f029eed19"},
121
+
122
+ {:is_encryption_algorithm => true,
123
+ :algorithm_name => "cast5-cbc",
124
+ :data_hex =>
125
+ "777de3b277bda18f668e3d152e820c1780355e3acd3c840b21f012dd5746c033",
126
+ :key_hex => "896f94494198b4867715bfe43a85678a",
127
+ :iv_hex => "164cc12f57553024cf070a9bfe6e9d2e",
128
+ :target_hex => "a302710f9e7baf1ce2b77a341db04ce1defb1ef60b3e0cf77b265f877f4acbe8"},
129
+
130
+ {:is_encryption_algorithm => true,
131
+ :algorithm_name => "bf-cbc",
132
+ :data_hex =>
133
+ "d487857248f982686da2f4f2089ed190e682e0e9121f60ed5e8e5be9ac5ef899",
134
+ :key_hex => "bfb9ed5fb23e17e59d930d25eb530a2c",
135
+ :iv_hex => "5a112824d6ae4d9fef511706ec5c68eb",
136
+ :target_hex => "8544fe775bd28d691ae13c4083ab43b0c0b84062cade9b166b516dbd65685263"},
137
+
138
+ {:is_encryption_algorithm => true,
139
+ :algorithm_name => "aes-128-cbc",
140
+ :data_hex =>
141
+ "63e319d3fb7f655479be7b4a1ef03853c590bda498514ce2a4810fe77bb85aa8aa",
142
+ :key_hex => "117063a80532b561a8e9a5fc8d850365",
143
+ :iv_hex => "13b6cd9b3c664b0d573fbced0c331040",
144
+ :target_hex => "f8102b04449eb1ce0048c67496cce3e3a8f1cdb8238d661caddd7ad7d0af2aa920b7d5f224ae50a492e2534a729ca1eb"},
145
+
146
+ {:is_encryption_algorithm => true,
147
+ :algorithm_name => "aes-192-cbc",
148
+ :data_hex =>
149
+ "ad67bfaeadab3c6500cbb59a3995a489b131c371bd20c4a55bfe3d7408d6d84b",
150
+ :key_hex => "dbab5fe55cd0f37e33e4b875d861ceb3",
151
+ :iv_hex => "98044a639fcec92837b300394a709f2c",
152
+ :target_hex => "5e439780e5f56b92911e6e60e7ce74b6c5a71cb197d77d99c0e931600c918c03"},
153
+
154
+ {:is_encryption_algorithm => true,
155
+ :algorithm_name => "aes-256-cbc",
156
+ :data_hex =>
157
+ "344e7b462a97d48431d68d315dea1a8b8fcfbe3d73a819471309597127aef5da",
158
+ :key_hex => "24545749f13f8fb477c7d5046f490dcc",
159
+ :iv_hex => "a5276092d0645616bf8999d744580515",
160
+ :target_hex => "c60682324e2b83886e17432c212d6690d44afb465a201055af151b44a3448068"},
161
+
162
+ {:is_encryption_algorithm => false,
163
+ :algorithm_name => "sha512",
164
+ :data_hex =>
165
+ "695904cb6bf6b74ab18852f70750139d78dbf7d46dda70ce67afac1de89fd2dd",
166
+ :key_hex => "",
167
+ :iv_hex => "",
168
+ :target_hex => "390e9d9c2a5483695a3707b509cd5a5948dea7221e5c3293b0a4eb4dc3c068811b27eef66adf569e268b2779cb77e35ee030918b7f3364e1882b2d524a96846c"},
169
+
170
+ {:is_encryption_algorithm => false,
171
+ :algorithm_name => "sha384",
172
+ :data_hex =>
173
+ "de9beb10c8d4208fc23eaeeda614fa6ecf8811e36d61fca957546c7649e561c1",
174
+ :key_hex => "",
175
+ :iv_hex => "",
176
+ :target_hex => "dbab1b89b069043585eeb67fdae2683ec1f5a2d4e721400a3b2335228f49444fb4a0e0509a55d28ffdc608db0bf8866e"},
177
+
178
+ {:is_encryption_algorithm => false,
179
+ :algorithm_name => "sha256",
180
+ :data_hex =>
181
+ "46142ed7236f2420f4bdac45192ba954da0ea56235c03886e4a2b528d60044da",
182
+ :key_hex => "",
183
+ :iv_hex => "",
184
+ :target_hex => "dccec513ea5995846df778bed02468e80ffcac06bd07d20eedbed3d367634492"},
185
+
186
+ {:is_encryption_algorithm => false,
187
+ :algorithm_name => "sha224",
188
+ :data_hex =>
189
+ "72f159ef70dee2db9e4ce0df16e19231bbacf4127ec97f430b546f838d82d173",
190
+ :key_hex => "",
191
+ :iv_hex => "",
192
+ :target_hex => "0673d0dd51f915d37baf9767dc24325ab9c2317a73a9ef022aa7911c561efd65"},
193
+
194
+ {:is_encryption_algorithm => false,
195
+ :algorithm_name => "sha1",
196
+ :data_hex =>
197
+ "5bb6f36326d34827a14df430bf809a14da00c27583bd33aee91edfe58b24708a",
198
+ :key_hex => "",
199
+ :iv_hex => "",
200
+ :target_hex => "f0ceb2b738be458cc0519e7a8b02c6c5cdc1c773687e1f6fb36642e2b87bfeca"},
201
+
202
+ {:is_encryption_algorithm => false,
203
+ :algorithm_name => "sha",
204
+ :data_hex =>
205
+ "a8f11175865f3f4dc543f558c282ec9b7b439bf818a77000adc9dee2199d43f5",
206
+ :key_hex => "",
207
+ :iv_hex => "",
208
+ :target_hex => "47e73858d52f91a9f5a3c798d8903a759834fb955544d01deaf55e1fc380e861"},
209
+
210
+ {:is_encryption_algorithm => false,
211
+ :algorithm_name => "md5",
212
+ :data_hex =>
213
+ "1b6bc2af8a57ccf15339f023863d35e5f35d13127622e2d03e008eb78188f772",
214
+ :key_hex => "",
215
+ :iv_hex => "",
216
+ :target_hex => "38806990d2b77c96d5776e3ec43cf2082d05d1de3285443444a67f984d3c2288"},
217
+
218
+ {:is_encryption_algorithm => false,
219
+ :algorithm_name => "md4",
220
+ :data_hex =>
221
+ "a64d8b2bbee2a8c820c16a14cfaea65d417decc309b3621e1bd5dc4769bb7c61",
222
+ :key_hex => "",
223
+ :iv_hex => "",
224
+ :target_hex => "354fde36aeadd1816b506956985eb7b05a5f9490ae96d88c7a1b3100a8a8d2bc"},
225
+
226
+ {:is_encryption_algorithm => false,
227
+ :algorithm_name => "ripemd160",
228
+ :data_hex =>
229
+ "7c2d9f56b35109f7cfdf554f70fdbf2bbff97a2244c0677820be6b38983c90ea",
230
+ :key_hex => "",
231
+ :iv_hex => "",
232
+ :target_hex => "aec3c24f17677cbeffdf1081af591aaa20e51d04e69da384bb65f1eefebbb1f5"}].freeze
233
+
234
+ end
metadata ADDED
@@ -0,0 +1,89 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: forgiva
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.pre.0
5
+ platform: ruby
6
+ authors:
7
+ - Harun Esur
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-07-12 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: highline
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.6'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 1.6.20
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: '1.6'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 1.6.20
33
+ - !ruby/object:Gem::Dependency
34
+ name: rubocop
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '0.26'
40
+ type: :development
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "~>"
45
+ - !ruby/object:Gem::Version
46
+ version: '0.26'
47
+ description: The new-age password manager.
48
+ email: root@sceptive.com
49
+ executables:
50
+ - forgiva
51
+ extensions: []
52
+ extra_rdoc_files: []
53
+ files:
54
+ - Gemfile
55
+ - LICENSE.md
56
+ - README.md
57
+ - bin/forgiva
58
+ - forgiva.gemspec
59
+ - lib/constants.rb
60
+ - lib/forgiva.rb
61
+ - lib/forgiva_commands.rb
62
+ - lib/forgiva_test.rb
63
+ - lib/testvectors.rb
64
+ homepage: http://sceptive.com
65
+ licenses:
66
+ - MIT
67
+ metadata: {}
68
+ post_install_message:
69
+ rdoc_options: []
70
+ require_paths:
71
+ - lib
72
+ required_ruby_version: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ required_rubygems_version: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - ">"
80
+ - !ruby/object:Gem::Version
81
+ version: 1.3.1
82
+ requirements:
83
+ - Ruby should be compiled with openssl support.
84
+ rubyforge_project:
85
+ rubygems_version: 2.4.6
86
+ signing_key:
87
+ specification_version: 4
88
+ summary: Forgiva
89
+ test_files: []