donjon 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 13b97b25c7492ea9cd2e839f3782fc514f69951e
4
- data.tar.gz: 9dd7c77553f48b0462ae6024752689b8f0743b20
3
+ metadata.gz: a52e48a0e488c6c6c5fd5e621ae964131f09237f
4
+ data.tar.gz: 41d5d8286f93d7816cd995f7da295d11ed88dca2
5
5
  SHA512:
6
- metadata.gz: 7ef534ceda3824fbe3538223ddf4a7d70b9a1661411659df0fb71fc534222f1b4c6508d0948b705712b8d98a3e71f61c1252d85cf96b752c40ca695c90e1533a
7
- data.tar.gz: c8da58337bb8b1ad3dccb9030253a6b742eae9ee78576dfdac49d7e74d05212ccc4a58f28ed8c65b8951b44a5eb23b25c72ea7fb0b5ac883d7269b03ce3d199c
6
+ metadata.gz: 34a36e4f2d73d4a200fab5d90927783e1bef7b0c4be1d03d1cf90716070c2301bbb6a0cb9d7fe3003ac75efe8520c37e70e96c7f0eb0b308fce78ec245e5c06d
7
+ data.tar.gz: a651bf0842529f2e3d0afd2527fe2b83918752c8db4aa54c1dfeb726fbfd576b26162b7301c3667a9ee763a15839528498334f2548e5b7ee6f8e844bf9b8a71b
@@ -1,5 +1,6 @@
1
1
  language: ruby
2
2
  rvm:
3
3
  - 2.1.2
4
+ - 2.2.2
4
5
  script:
5
6
  - bundle exec rspec
data/README.md CHANGED
@@ -58,7 +58,7 @@ This section assumes the vault is synced between users using Bittorrent Sync.
58
58
  ### Creating a new vault
59
59
 
60
60
  Install Donjon:
61
-
61
+
62
62
  $ gem install donjon
63
63
 
64
64
  Run the Donjon configuration:
@@ -70,7 +70,9 @@ encrypted and be a 2048-bit RSA key.
70
70
 
71
71
  Add, then read a first key-value pair to confirm encryption is working:
72
72
 
73
- $ dj config:set TEST=foobar
73
+ $ dj config:set TEST
74
+ Enter the value for 'TEST'
75
+ > ****
74
76
  $ dj config:get TEST
75
77
  TEST: foobar
76
78
 
@@ -104,7 +106,7 @@ Configure Donjon; when prompted for a vault path, enter the path to the relevant
104
106
  synced directory:
105
107
 
106
108
  $ dj init
107
-
109
+
108
110
  At this point your public key has been added to the vault, but you can't access
109
111
  any data as it hasn't been encrypted for you. Obtain your public key:
110
112
 
@@ -118,6 +120,21 @@ to encrypt all key-value pairs for your user.
118
120
 
119
121
  Test that you can read a particular key, and you're all set!
120
122
 
123
+ #### Troubleshooting: lost private key password
124
+
125
+ In case you lose your private key password, you won't be able to decrypt the vault.
126
+
127
+ However, you don't need to reinstall donjon from scratch, just remove your donjon preferences and the private/public keys:
128
+ ```bash
129
+ rm ~/.donjonrc
130
+ rm ~/.ssh/donjon*
131
+ ```
132
+
133
+ Then repeat the installation procedure above from the `dj init` step onwards.
134
+
135
+ **DO NOT** delete your vault, it will sync to others.
136
+ If you really need to, stop the Bittorrent syncing beforehand.
137
+
121
138
 
122
139
  ## Usage
123
140
 
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.require_paths = ["lib"]
19
19
 
20
20
  spec.add_dependency 'thor'
21
- spec.add_dependency 'gibberish'
21
+ spec.add_dependency 'gibberish', '>= 2.0.0'
22
22
 
23
23
  spec.add_development_dependency 'bundler'
24
24
  spec.add_development_dependency 'rake'
@@ -60,7 +60,7 @@ module Donjon
60
60
  decrypted_pw = user.key.private_decrypt(encrypted_key)
61
61
 
62
62
  assert(decrypted_pw.size == 32)
63
- payload = Gibberish::AES.new(decrypted_pw).decrypt(encrypted_data, binary: true)
63
+ payload = Gibberish::AES::CBC.new(decrypted_pw).decrypt(encrypted_data, binary: true)
64
64
  encoding = payload[0...32].strip
65
65
  payload[32...-PADDING].force_encoding(encoding)
66
66
  end
@@ -72,8 +72,8 @@ module Donjon
72
72
  encoding_field = ("%-32s" % encoding).force_encoding(Encoding::BINARY)
73
73
  payload = encoding_field + data + OpenSSL::Random.random_bytes(PADDING)
74
74
  password = OpenSSL::Random.random_bytes(32)
75
- encrypted_data = Gibberish::AES.new(password).encrypt(payload, binary: true)
76
-
75
+ encrypted_data = Gibberish::AES::CBC.new(password).encrypt(payload, binary: true)
76
+
77
77
  encrypted_key = user.key.public_encrypt(password)
78
78
 
79
79
  assert(encrypted_key.size == 256)
@@ -1,3 +1,3 @@
1
1
  module Donjon
2
- VERSION = "2.0.0"
2
+ VERSION = "2.0.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: donjon
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julien Letessier
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-22 00:00:00.000000000 Z
11
+ date: 2015-05-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: 2.0.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
40
+ version: 2.0.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -170,7 +170,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
170
170
  version: '0'
171
171
  requirements: []
172
172
  rubyforge_project:
173
- rubygems_version: 2.2.2
173
+ rubygems_version: 2.4.5
174
174
  signing_key:
175
175
  specification_version: 4
176
176
  summary: Secure, multi-user data store.
@@ -182,3 +182,4 @@ test_files:
182
182
  - spec/spec_helper.rb
183
183
  - spec/support/keys.rb
184
184
  - spec/support/repos.rb
185
+ has_rdoc: