trustworthy 0.4.1 → 0.5.0
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 +4 -4
- data/README.md +1 -1
- data/lib/trustworthy.rb +6 -0
- data/lib/trustworthy/cli.rb +3 -1
- data/lib/trustworthy/cli/passwd.rb +20 -0
- data/lib/trustworthy/prompt.rb +19 -0
- data/lib/trustworthy/random.rb +1 -1
- data/lib/trustworthy/settings.rb +2 -2
- data/lib/trustworthy/version.rb +1 -1
- data/spec/spec_helper.rb +10 -14
- data/spec/trustworthy/cli/add_key_spec.rb +1 -1
- data/spec/trustworthy/cli/decrypt_spec.rb +1 -1
- data/spec/trustworthy/cli/encrypt_spec.rb +2 -2
- data/spec/trustworthy/cli/init_spec.rb +1 -1
- data/spec/trustworthy/key_spec.rb +1 -1
- data/spec/trustworthy/master_key_spec.rb +5 -3
- data/spec/trustworthy/prompt_spec.rb +53 -3
- data/spec/trustworthy/settings_spec.rb +14 -11
- metadata +48 -33
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 3d5a9bbf0d74ba49411469bfe883a73ffb5062f7
         | 
| 4 | 
            +
              data.tar.gz: 1310654f1209695a8d5a55fa6fb93a8ac154085a
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 53d3ef8231eeba640b3a6de17fc7483cab5bbe787cba4a4b6560d2eede988c0918cd8966d0d319192660e4d25ed0dca9af63f0a630e6b0d54572db21fa82caa2
         | 
| 7 | 
            +
              data.tar.gz: 11b1cba0bae7bd711ddf38a8427cf87d7fd2104d99540070b348c7504a3defa7307f7ff0d2db02cae2f57142ac505568efd4fb5b3ea1b4f9cd17d2b6a5edfd79
         | 
    
        data/README.md
    CHANGED
    
    | @@ -1,4 +1,4 @@ | |
| 1 | 
            -
            # Trustworthy [](http://travis-ci.org/jtdowney/trustworthy)
         | 
| 2 2 |  | 
| 3 3 | 
             
            Implements a special case (k = 2) of [Adi Shamir's](http://en.wikipedia.org/wiki/Adi_Shamir) [secret sharing algorithm](http://en.wikipedia.org/wiki/Shamir%27s_Secret_Sharing). This allows secret files to be encrypted on disk and require two secret holders to decrypt it.
         | 
| 4 4 |  | 
    
        data/lib/trustworthy.rb
    CHANGED
    
    | @@ -1,6 +1,7 @@ | |
| 1 1 | 
             
            require 'aead'
         | 
| 2 2 | 
             
            require 'base64'
         | 
| 3 3 | 
             
            require 'bigdecimal'
         | 
| 4 | 
            +
            require 'date'
         | 
| 4 5 | 
             
            require 'highline'
         | 
| 5 6 | 
             
            require 'hkdf'
         | 
| 6 7 | 
             
            require 'scrypt'
         | 
| @@ -17,4 +18,9 @@ require 'trustworthy/version' | |
| 17 18 | 
             
            module Trustworthy
         | 
| 18 19 | 
             
              CipherAlgorithm = 'AES-256-CBC-HMAC-SHA-256'
         | 
| 19 20 | 
             
              Cipher = AEAD::Cipher.new(CipherAlgorithm)
         | 
| 21 | 
            +
              SCryptParams = {
         | 
| 22 | 
            +
                :max_time => 5,
         | 
| 23 | 
            +
                :max_memfrac => 0.75,
         | 
| 24 | 
            +
                :max_mem => 16 * 1024 * 1024,
         | 
| 25 | 
            +
              }
         | 
| 20 26 | 
             
            end
         | 
    
        data/lib/trustworthy/cli.rb
    CHANGED
    
    | @@ -7,6 +7,7 @@ require 'trustworthy/cli/add_key' | |
| 7 7 | 
             
            require 'trustworthy/cli/init'
         | 
| 8 8 | 
             
            require 'trustworthy/cli/decrypt'
         | 
| 9 9 | 
             
            require 'trustworthy/cli/encrypt'
         | 
| 10 | 
            +
            require 'trustworthy/cli/passwd'
         | 
| 10 11 | 
             
            require 'trustworthy/prompt'
         | 
| 11 12 |  | 
| 12 13 | 
             
            module Trustworthy
         | 
| @@ -17,7 +18,8 @@ module Trustworthy | |
| 17 18 | 
             
                  'add-key' => Trustworthy::CLI::AddKey,
         | 
| 18 19 | 
             
                  'init'    => Trustworthy::CLI::Init,
         | 
| 19 20 | 
             
                  'decrypt' => Trustworthy::CLI::Decrypt,
         | 
| 20 | 
            -
                  'encrypt' => Trustworthy::CLI::Encrypt
         | 
| 21 | 
            +
                  'encrypt' => Trustworthy::CLI::Encrypt,
         | 
| 22 | 
            +
                  'passwd'  => Trustworthy::CLI::Passwd,
         | 
| 21 23 | 
             
                }
         | 
| 22 24 |  | 
| 23 25 | 
             
                def self.banner
         | 
| @@ -0,0 +1,20 @@ | |
| 1 | 
            +
            module Trustworthy
         | 
| 2 | 
            +
              class CLI
         | 
| 3 | 
            +
                class Passwd
         | 
| 4 | 
            +
                  include Trustworthy::CLI::Command
         | 
| 5 | 
            +
             | 
| 6 | 
            +
                  def self.description
         | 
| 7 | 
            +
                    'Change a keys password'
         | 
| 8 | 
            +
                  end
         | 
| 9 | 
            +
             | 
| 10 | 
            +
                  def run(args)
         | 
| 11 | 
            +
                    options = parse_options('passwd', args)
         | 
| 12 | 
            +
             | 
| 13 | 
            +
                    prompt = Trustworthy::Prompt.new(options[:config_file], $terminal)
         | 
| 14 | 
            +
                    username = prompt.change_user_password
         | 
| 15 | 
            +
             | 
| 16 | 
            +
                    say("Changed password for #{username}")
         | 
| 17 | 
            +
                  end
         | 
| 18 | 
            +
                end
         | 
| 19 | 
            +
              end
         | 
| 20 | 
            +
            end
         | 
    
        data/lib/trustworthy/prompt.rb
    CHANGED
    
    | @@ -34,6 +34,25 @@ module Trustworthy | |
| 34 34 | 
             
                  end
         | 
| 35 35 | 
             
                end
         | 
| 36 36 |  | 
| 37 | 
            +
                def change_user_password
         | 
| 38 | 
            +
                  Trustworthy::Settings.open(@config_file) do |settings|
         | 
| 39 | 
            +
                    username, key = _unlock_key(settings, [])
         | 
| 40 | 
            +
             | 
| 41 | 
            +
                    loop do
         | 
| 42 | 
            +
                      password = _ask_password('Password: ')
         | 
| 43 | 
            +
                      password_confirm = _ask_password('Password (again): ')
         | 
| 44 | 
            +
                      if password == password_confirm
         | 
| 45 | 
            +
                        settings.add_key(key, username, password)
         | 
| 46 | 
            +
                        break
         | 
| 47 | 
            +
                      else
         | 
| 48 | 
            +
                        _error('Passwords do not match.')
         | 
| 49 | 
            +
                      end
         | 
| 50 | 
            +
                    end
         | 
| 51 | 
            +
             | 
| 52 | 
            +
                    username
         | 
| 53 | 
            +
                  end
         | 
| 54 | 
            +
                end
         | 
| 55 | 
            +
             | 
| 37 56 | 
             
                def unlock_master_key
         | 
| 38 57 | 
             
                  usernames_in_use = []
         | 
| 39 58 | 
             
                  Trustworthy::Settings.open(@config_file) do |settings|
         | 
    
        data/lib/trustworthy/random.rb
    CHANGED
    
    
    
        data/lib/trustworthy/settings.rb
    CHANGED
    
    | @@ -14,9 +14,9 @@ module Trustworthy | |
| 14 14 | 
             
                end
         | 
| 15 15 |  | 
| 16 16 | 
             
                def add_key(key, username, password)
         | 
| 17 | 
            -
                  salt = SCrypt::Engine.generate_salt
         | 
| 17 | 
            +
                  salt = SCrypt::Engine.generate_salt(Trustworthy::SCryptParams)
         | 
| 18 18 | 
             
                  encrypted_point = _encrypt(key.to_s, salt, password)
         | 
| 19 | 
            -
                  @store[username] = {'salt' => salt, 'encrypted_point' => encrypted_point}
         | 
| 19 | 
            +
                  @store[username] = {'salt' => salt, 'encrypted_point' => encrypted_point, 'timestamp' => DateTime.now.iso8601}
         | 
| 20 20 | 
             
                end
         | 
| 21 21 |  | 
| 22 22 | 
             
                def empty?
         | 
    
        data/lib/trustworthy/version.rb
    CHANGED
    
    
    
        data/spec/spec_helper.rb
    CHANGED
    
    | @@ -1,21 +1,9 @@ | |
| 1 1 | 
             
            require 'trustworthy'
         | 
| 2 2 | 
             
            require 'trustworthy/cli'
         | 
| 3 | 
            -
            require ' | 
| 3 | 
            +
            require 'test_construct'
         | 
| 4 | 
            +
            require 'timecop'
         | 
| 4 5 | 
             
            require 'highline/simulate'
         | 
| 5 6 |  | 
| 6 | 
            -
            module Trustworthy
         | 
| 7 | 
            -
              module Random
         | 
| 8 | 
            -
                def self._source
         | 
| 9 | 
            -
                  '/dev/urandom'
         | 
| 10 | 
            -
                end
         | 
| 11 | 
            -
              end
         | 
| 12 | 
            -
            end
         | 
| 13 | 
            -
             | 
| 14 | 
            -
            RSpec.configure do |config|
         | 
| 15 | 
            -
              config.order = 'random'
         | 
| 16 | 
            -
              config.include Construct::Helpers
         | 
| 17 | 
            -
            end
         | 
| 18 | 
            -
             | 
| 19 7 | 
             
            module TestValues
         | 
| 20 8 | 
             
              SettingsFile = 'trustworthy.yml'
         | 
| 21 9 | 
             
              InitializationVector = ['39164ec082fb8b7336d3c5500af99dcb'].pack('H*')
         | 
| @@ -34,6 +22,14 @@ ORZOwIL7i3M208VQCvmdyw==--o39ZYHOC+HotoUiBqeHqvSOWXUbXwaZRsMkwzQ | |
| 34 22 | 
             
            EOF
         | 
| 35 23 | 
             
            end
         | 
| 36 24 |  | 
| 25 | 
            +
            RSpec.configure do |config|
         | 
| 26 | 
            +
              config.order = 'random'
         | 
| 27 | 
            +
              config.include TestConstruct::Helpers
         | 
| 28 | 
            +
              config.before(:each) do
         | 
| 29 | 
            +
                allow(SCrypt::Engine).to receive(:generate_salt).and_return(TestValues::Salt)
         | 
| 30 | 
            +
              end
         | 
| 31 | 
            +
            end
         | 
| 32 | 
            +
             | 
| 37 33 | 
             
            def create_config(filename)
         | 
| 38 34 | 
             
              Trustworthy::Settings.open(filename) do |settings|
         | 
| 39 35 | 
             
                settings.add_key(TestValues::MasterKey.create_key, 'user1', 'password1')
         | 
| @@ -2,8 +2,8 @@ require 'spec_helper' | |
| 2 2 |  | 
| 3 3 | 
             
            describe Trustworthy::CLI::Encrypt do
         | 
| 4 4 | 
             
              before(:each) do
         | 
| 5 | 
            -
                $terminal. | 
| 6 | 
            -
                AEAD::Cipher::AES_256_CBC_HMAC_SHA_256. | 
| 5 | 
            +
                allow($terminal).to receive(:say)
         | 
| 6 | 
            +
                allow(AEAD::Cipher::AES_256_CBC_HMAC_SHA_256).to receive(:generate_nonce).and_return(TestValues::InitializationVector)
         | 
| 7 7 | 
             
              end
         | 
| 8 8 |  | 
| 9 9 | 
             
              around(:each) do |example|
         | 
| @@ -3,7 +3,7 @@ require 'spec_helper' | |
| 3 3 | 
             
            describe Trustworthy::Key do
         | 
| 4 4 | 
             
              describe 'self.create' do
         | 
| 5 5 | 
             
                it 'should create a key along the slope and intercept' do
         | 
| 6 | 
            -
                  Trustworthy::Random. | 
| 6 | 
            +
                  allow(Trustworthy::Random).to receive(:number).and_return(BigDecimal.new('10'))
         | 
| 7 7 | 
             
                  key = Trustworthy::Key.create(6, 24)
         | 
| 8 8 | 
             
                  expect(key.y).to eq(84)
         | 
| 9 9 | 
             
                end
         | 
| @@ -30,7 +30,8 @@ describe Trustworthy::MasterKey do | |
| 30 30 |  | 
| 31 31 | 
             
              describe 'self.create' do
         | 
| 32 32 | 
             
                it 'should generate a random slope and intercept' do
         | 
| 33 | 
            -
                  Trustworthy::Random. | 
| 33 | 
            +
                  allow(Trustworthy::Random).to receive(:number).and_return(BigDecimal.new('10'))
         | 
| 34 | 
            +
             | 
| 34 35 | 
             
                  master_key = Trustworthy::MasterKey.create
         | 
| 35 36 | 
             
                  key = master_key.create_key
         | 
| 36 37 | 
             
                  expect(key.x).to eq(10)
         | 
| @@ -40,7 +41,7 @@ describe Trustworthy::MasterKey do | |
| 40 41 |  | 
| 41 42 | 
             
              describe 'self.create_from_keys' do
         | 
| 42 43 | 
             
                it 'should calculate the slope and intercept given two keys' do
         | 
| 43 | 
            -
                  Trustworthy::Random. | 
| 44 | 
            +
                  allow(Trustworthy::Random).to receive(:number).and_return(BigDecimal.new('10'))
         | 
| 44 45 |  | 
| 45 46 | 
             
                  key1 = Trustworthy::Key.new(BigDecimal.new('2'), BigDecimal.new('30'))
         | 
| 46 47 | 
             
                  key2 = Trustworthy::Key.new(BigDecimal.new('5'), BigDecimal.new('60'))
         | 
| @@ -63,7 +64,8 @@ describe Trustworthy::MasterKey do | |
| 63 64 |  | 
| 64 65 | 
             
              describe 'encrypt' do
         | 
| 65 66 | 
             
                it 'should encrypt and sign the data using the intercept' do
         | 
| 66 | 
            -
                  AEAD::Cipher::AES_256_CBC_HMAC_SHA_256. | 
| 67 | 
            +
                  allow(AEAD::Cipher::AES_256_CBC_HMAC_SHA_256).to receive(:generate_nonce).and_return(TestValues::InitializationVector)
         | 
| 68 | 
            +
             | 
| 67 69 | 
             
                  master_key = Trustworthy::MasterKey.new(BigDecimal.new('6'), BigDecimal.new('24'))
         | 
| 68 70 | 
             
                  ciphertext = master_key.encrypt(TestValues::Plaintext)
         | 
| 69 71 | 
             
                  expect(ciphertext).to eq(TestValues::Ciphertext)
         | 
| @@ -4,7 +4,7 @@ describe Trustworthy::Prompt do | |
| 4 4 | 
             
              let(:test_key) { Trustworthy::Key.new(BigDecimal.new('1'), BigDecimal.new('2')) }
         | 
| 5 5 |  | 
| 6 6 | 
             
              before(:each) do
         | 
| 7 | 
            -
                $terminal. | 
| 7 | 
            +
                allow($terminal).to receive(:say)
         | 
| 8 8 | 
             
              end
         | 
| 9 9 |  | 
| 10 10 | 
             
              around(:each) do |example|
         | 
| @@ -99,7 +99,7 @@ describe Trustworthy::Prompt do | |
| 99 99 | 
             
                  end
         | 
| 100 100 | 
             
                end
         | 
| 101 101 |  | 
| 102 | 
            -
                it 'should  | 
| 102 | 
            +
                it 'should require an existing user for the first key' do
         | 
| 103 103 | 
             
                  HighLine::Simulate.with(
         | 
| 104 104 | 
             
                    'missing',
         | 
| 105 105 | 
             
                    'user1',
         | 
| @@ -113,7 +113,7 @@ describe Trustworthy::Prompt do | |
| 113 113 | 
             
                  end
         | 
| 114 114 | 
             
                end
         | 
| 115 115 |  | 
| 116 | 
            -
                it 'should  | 
| 116 | 
            +
                it 'should require an existing user for the second key' do
         | 
| 117 117 | 
             
                  HighLine::Simulate.with(
         | 
| 118 118 | 
             
                    'user1',
         | 
| 119 119 | 
             
                    'password1',
         | 
| @@ -155,4 +155,54 @@ describe Trustworthy::Prompt do | |
| 155 155 | 
             
                  end
         | 
| 156 156 | 
             
                end
         | 
| 157 157 | 
             
              end
         | 
| 158 | 
            +
             | 
| 159 | 
            +
              describe 'change_user_password' do
         | 
| 160 | 
            +
                it 'should prompt for the existing password and then a new password' do
         | 
| 161 | 
            +
                  old_settings = YAML.load_file(TestValues::SettingsFile)
         | 
| 162 | 
            +
                  HighLine::Simulate.with(
         | 
| 163 | 
            +
                    'user1',
         | 
| 164 | 
            +
                    'password1',
         | 
| 165 | 
            +
                    'password2',
         | 
| 166 | 
            +
                    'password2',
         | 
| 167 | 
            +
                  ) do
         | 
| 168 | 
            +
                    prompt = Trustworthy::Prompt.new(TestValues::SettingsFile, $terminal)
         | 
| 169 | 
            +
                    prompt.change_user_password
         | 
| 170 | 
            +
                  end
         | 
| 171 | 
            +
             | 
| 172 | 
            +
                  new_settings = YAML.load_file(TestValues::SettingsFile)
         | 
| 173 | 
            +
                  expect(old_settings['user1']['encrypted_point']).to_not eq(new_settings['user1']['encrypted_point'])
         | 
| 174 | 
            +
                end
         | 
| 175 | 
            +
             | 
| 176 | 
            +
                it 'should prompt for the correct password' do
         | 
| 177 | 
            +
                  HighLine::Simulate.with(
         | 
| 178 | 
            +
                    'user1',
         | 
| 179 | 
            +
                    'bad_password',
         | 
| 180 | 
            +
                    'password1',
         | 
| 181 | 
            +
                    'password2',
         | 
| 182 | 
            +
                    'password2',
         | 
| 183 | 
            +
                  ) do
         | 
| 184 | 
            +
                    prompt = Trustworthy::Prompt.new(TestValues::SettingsFile, $terminal)
         | 
| 185 | 
            +
                    expect(prompt).to receive(:_error).with('Password incorrect for user1')
         | 
| 186 | 
            +
                    prompt.change_user_password
         | 
| 187 | 
            +
                  end
         | 
| 188 | 
            +
                end
         | 
| 189 | 
            +
             | 
| 190 | 
            +
                it 'should prompt for the existing password and then a new password' do
         | 
| 191 | 
            +
                  old_settings = YAML.load_file(TestValues::SettingsFile)
         | 
| 192 | 
            +
                  HighLine::Simulate.with(
         | 
| 193 | 
            +
                    'user1',
         | 
| 194 | 
            +
                    'password1',
         | 
| 195 | 
            +
                    'password2',
         | 
| 196 | 
            +
                    'password3',
         | 
| 197 | 
            +
                    'password2',
         | 
| 198 | 
            +
                    'password2',
         | 
| 199 | 
            +
                  ) do
         | 
| 200 | 
            +
                    prompt = Trustworthy::Prompt.new(TestValues::SettingsFile, $terminal)
         | 
| 201 | 
            +
                    prompt.change_user_password
         | 
| 202 | 
            +
                  end
         | 
| 203 | 
            +
             | 
| 204 | 
            +
                  new_settings = YAML.load_file(TestValues::SettingsFile)
         | 
| 205 | 
            +
                  expect(old_settings['user1']['encrypted_point']).to_not eq(new_settings['user1']['encrypted_point'])
         | 
| 206 | 
            +
                end
         | 
| 207 | 
            +
              end
         | 
| 158 208 | 
             
            end
         | 
| @@ -2,8 +2,7 @@ require 'spec_helper' | |
| 2 2 |  | 
| 3 3 | 
             
            describe Trustworthy::Settings do
         | 
| 4 4 | 
             
              before(:each) do
         | 
| 5 | 
            -
                 | 
| 6 | 
            -
                AEAD::Cipher::AES_256_CBC_HMAC_SHA_256.stub(:generate_nonce).and_return(TestValues::InitializationVector)
         | 
| 5 | 
            +
                allow(AEAD::Cipher::AES_256_CBC_HMAC_SHA_256).to receive(:generate_nonce).and_return(TestValues::InitializationVector)
         | 
| 7 6 | 
             
              end
         | 
| 8 7 |  | 
| 9 8 | 
             
              around(:each) do |example|
         | 
| @@ -15,15 +14,19 @@ describe Trustworthy::Settings do | |
| 15 14 |  | 
| 16 15 | 
             
              describe 'self.open' do
         | 
| 17 16 | 
             
                it 'should read and write the key information to a file' do
         | 
| 18 | 
            -
                   | 
| 19 | 
            -
                     | 
| 20 | 
            -
             | 
| 21 | 
            -
             | 
| 17 | 
            +
                  Timecop.freeze(DateTime.new(2017, 10, 19, 9, 0, 0, 0)) do
         | 
| 18 | 
            +
                    Trustworthy::Settings.open(TestValues::SettingsFile) do |settings|
         | 
| 19 | 
            +
                      key = Trustworthy::Key.new(BigDecimal.new('2'), BigDecimal.new('3'))
         | 
| 20 | 
            +
                      settings.add_key(key, 'user', 'password1')
         | 
| 21 | 
            +
                    end
         | 
| 22 22 |  | 
| 23 | 
            -
             | 
| 24 | 
            -
             | 
| 25 | 
            -
             | 
| 26 | 
            -
             | 
| 23 | 
            +
                    Trustworthy::Settings.open(TestValues::SettingsFile) do |settings|
         | 
| 24 | 
            +
                      found_key = settings.find_key('user')
         | 
| 25 | 
            +
                      timestamp = DateTime.parse(found_key['timestamp'])
         | 
| 26 | 
            +
                      expect(found_key['salt']).to eq(TestValues::Salt)
         | 
| 27 | 
            +
                      expect(found_key['encrypted_point']).to eq(TestValues::EncryptedPoint)
         | 
| 28 | 
            +
                      expect(timestamp).to eq(DateTime.new(2017, 10, 19, 9, 0, 0, 0))
         | 
| 29 | 
            +
                    end
         | 
| 27 30 | 
             
                  end
         | 
| 28 31 | 
             
                end
         | 
| 29 32 |  | 
| @@ -40,7 +43,7 @@ describe Trustworthy::Settings do | |
| 40 43 | 
             
                      settings.add_key(key, 'missing', 'password')
         | 
| 41 44 | 
             
                      raise 'boom'
         | 
| 42 45 | 
             
                    end
         | 
| 43 | 
            -
                  end.to raise_error
         | 
| 46 | 
            +
                  end.to raise_error(RuntimeError)
         | 
| 44 47 |  | 
| 45 48 | 
             
                  Trustworthy::Settings.open(TestValues::SettingsFile) do |settings|
         | 
| 46 49 | 
             
                    missing_key = settings.find_key('missing')
         | 
    
        metadata
    CHANGED
    
    | @@ -1,113 +1,127 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: trustworthy
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0. | 
| 4 | 
            +
              version: 0.5.0
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - John Downey
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date:  | 
| 11 | 
            +
            date: 2017-10-19 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: aead
         | 
| 15 15 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 16 16 | 
             
                requirements:
         | 
| 17 | 
            -
                - - ~>
         | 
| 17 | 
            +
                - - "~>"
         | 
| 18 18 | 
             
                  - !ruby/object:Gem::Version
         | 
| 19 | 
            -
                    version: '1. | 
| 19 | 
            +
                    version: '1.8'
         | 
| 20 20 | 
             
              type: :runtime
         | 
| 21 21 | 
             
              prerelease: false
         | 
| 22 22 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 23 23 | 
             
                requirements:
         | 
| 24 | 
            -
                - - ~>
         | 
| 24 | 
            +
                - - "~>"
         | 
| 25 25 | 
             
                  - !ruby/object:Gem::Version
         | 
| 26 | 
            -
                    version: '1. | 
| 26 | 
            +
                    version: '1.8'
         | 
| 27 27 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 28 28 | 
             
              name: highline
         | 
| 29 29 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 30 30 | 
             
                requirements:
         | 
| 31 | 
            -
                - - ~>
         | 
| 31 | 
            +
                - - "~>"
         | 
| 32 32 | 
             
                  - !ruby/object:Gem::Version
         | 
| 33 | 
            -
                    version: '1. | 
| 33 | 
            +
                    version: '1.7'
         | 
| 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: '1. | 
| 40 | 
            +
                    version: '1.7'
         | 
| 41 41 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 42 42 | 
             
              name: hkdf
         | 
| 43 43 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 44 44 | 
             
                requirements:
         | 
| 45 | 
            -
                - - ~>
         | 
| 45 | 
            +
                - - "~>"
         | 
| 46 46 | 
             
                  - !ruby/object:Gem::Version
         | 
| 47 | 
            -
                    version: 0. | 
| 47 | 
            +
                    version: 0.3.0
         | 
| 48 48 | 
             
              type: :runtime
         | 
| 49 49 | 
             
              prerelease: false
         | 
| 50 50 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 51 51 | 
             
                requirements:
         | 
| 52 | 
            -
                - - ~>
         | 
| 52 | 
            +
                - - "~>"
         | 
| 53 53 | 
             
                  - !ruby/object:Gem::Version
         | 
| 54 | 
            -
                    version: 0. | 
| 54 | 
            +
                    version: 0.3.0
         | 
| 55 55 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 56 56 | 
             
              name: scrypt
         | 
| 57 57 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 58 58 | 
             
                requirements:
         | 
| 59 | 
            -
                - - ~>
         | 
| 59 | 
            +
                - - "~>"
         | 
| 60 60 | 
             
                  - !ruby/object:Gem::Version
         | 
| 61 | 
            -
                    version:  | 
| 61 | 
            +
                    version: '3.0'
         | 
| 62 62 | 
             
              type: :runtime
         | 
| 63 63 | 
             
              prerelease: false
         | 
| 64 64 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 65 65 | 
             
                requirements:
         | 
| 66 | 
            -
                - - ~>
         | 
| 66 | 
            +
                - - "~>"
         | 
| 67 67 | 
             
                  - !ruby/object:Gem::Version
         | 
| 68 | 
            -
                    version:  | 
| 68 | 
            +
                    version: '3.0'
         | 
| 69 69 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 70 | 
            -
              name:  | 
| 70 | 
            +
              name: test_construct
         | 
| 71 71 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 72 72 | 
             
                requirements:
         | 
| 73 73 | 
             
                - - '='
         | 
| 74 74 | 
             
                  - !ruby/object:Gem::Version
         | 
| 75 | 
            -
                    version:  | 
| 75 | 
            +
                    version: 2.0.1
         | 
| 76 76 | 
             
              type: :development
         | 
| 77 77 | 
             
              prerelease: false
         | 
| 78 78 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 79 79 | 
             
                requirements:
         | 
| 80 80 | 
             
                - - '='
         | 
| 81 81 | 
             
                  - !ruby/object:Gem::Version
         | 
| 82 | 
            -
                    version:  | 
| 82 | 
            +
                    version: 2.0.1
         | 
| 83 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 84 | 
            +
              name: timecop
         | 
| 85 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 86 | 
            +
                requirements:
         | 
| 87 | 
            +
                - - '='
         | 
| 88 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 89 | 
            +
                    version: 0.9.1
         | 
| 90 | 
            +
              type: :development
         | 
| 91 | 
            +
              prerelease: false
         | 
| 92 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 93 | 
            +
                requirements:
         | 
| 94 | 
            +
                - - '='
         | 
| 95 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 96 | 
            +
                    version: 0.9.1
         | 
| 83 97 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 84 98 | 
             
              name: rspec
         | 
| 85 99 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 86 100 | 
             
                requirements:
         | 
| 87 101 | 
             
                - - '='
         | 
| 88 102 | 
             
                  - !ruby/object:Gem::Version
         | 
| 89 | 
            -
                    version:  | 
| 103 | 
            +
                    version: 3.7.0
         | 
| 90 104 | 
             
              type: :development
         | 
| 91 105 | 
             
              prerelease: false
         | 
| 92 106 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 93 107 | 
             
                requirements:
         | 
| 94 108 | 
             
                - - '='
         | 
| 95 109 | 
             
                  - !ruby/object:Gem::Version
         | 
| 96 | 
            -
                    version:  | 
| 110 | 
            +
                    version: 3.7.0
         | 
| 97 111 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 98 112 | 
             
              name: rake
         | 
| 99 113 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 100 114 | 
             
                requirements:
         | 
| 101 115 | 
             
                - - '='
         | 
| 102 116 | 
             
                  - !ruby/object:Gem::Version
         | 
| 103 | 
            -
                    version:  | 
| 117 | 
            +
                    version: 12.1.0
         | 
| 104 118 | 
             
              type: :development
         | 
| 105 119 | 
             
              prerelease: false
         | 
| 106 120 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 107 121 | 
             
                requirements:
         | 
| 108 122 | 
             
                - - '='
         | 
| 109 123 | 
             
                  - !ruby/object:Gem::Version
         | 
| 110 | 
            -
                    version:  | 
| 124 | 
            +
                    version: 12.1.0
         | 
| 111 125 | 
             
            description: Implements a special case (k = 2) of Adi Shamir's secret sharing algorithm.
         | 
| 112 126 | 
             
              This allows secret files to be encrypted on disk and require two secret holders
         | 
| 113 127 | 
             
              to decrypt it.
         | 
| @@ -118,20 +132,24 @@ executables: | |
| 118 132 | 
             
            extensions: []
         | 
| 119 133 | 
             
            extra_rdoc_files: []
         | 
| 120 134 | 
             
            files:
         | 
| 135 | 
            +
            - LICENSE
         | 
| 136 | 
            +
            - README.md
         | 
| 137 | 
            +
            - bin/trustworthy
         | 
| 138 | 
            +
            - lib/trustworthy.rb
         | 
| 139 | 
            +
            - lib/trustworthy/cli.rb
         | 
| 121 140 | 
             
            - lib/trustworthy/cli/add_key.rb
         | 
| 122 141 | 
             
            - lib/trustworthy/cli/command.rb
         | 
| 123 142 | 
             
            - lib/trustworthy/cli/crypt.rb
         | 
| 124 143 | 
             
            - lib/trustworthy/cli/decrypt.rb
         | 
| 125 144 | 
             
            - lib/trustworthy/cli/encrypt.rb
         | 
| 126 145 | 
             
            - lib/trustworthy/cli/init.rb
         | 
| 127 | 
            -
            - lib/trustworthy/cli.rb
         | 
| 146 | 
            +
            - lib/trustworthy/cli/passwd.rb
         | 
| 128 147 | 
             
            - lib/trustworthy/key.rb
         | 
| 129 148 | 
             
            - lib/trustworthy/master_key.rb
         | 
| 130 149 | 
             
            - lib/trustworthy/prompt.rb
         | 
| 131 150 | 
             
            - lib/trustworthy/random.rb
         | 
| 132 151 | 
             
            - lib/trustworthy/settings.rb
         | 
| 133 152 | 
             
            - lib/trustworthy/version.rb
         | 
| 134 | 
            -
            - lib/trustworthy.rb
         | 
| 135 153 | 
             
            - spec/spec_helper.rb
         | 
| 136 154 | 
             
            - spec/trustworthy/cli/add_key_spec.rb
         | 
| 137 155 | 
             
            - spec/trustworthy/cli/decrypt_spec.rb
         | 
| @@ -142,9 +160,6 @@ files: | |
| 142 160 | 
             
            - spec/trustworthy/prompt_spec.rb
         | 
| 143 161 | 
             
            - spec/trustworthy/random_spec.rb
         | 
| 144 162 | 
             
            - spec/trustworthy/settings_spec.rb
         | 
| 145 | 
            -
            - bin/trustworthy
         | 
| 146 | 
            -
            - README.md
         | 
| 147 | 
            -
            - LICENSE
         | 
| 148 163 | 
             
            homepage: http://github.com/jtdowney/trustworthy
         | 
| 149 164 | 
             
            licenses:
         | 
| 150 165 | 
             
            - MIT
         | 
| @@ -155,17 +170,17 @@ require_paths: | |
| 155 170 | 
             
            - lib
         | 
| 156 171 | 
             
            required_ruby_version: !ruby/object:Gem::Requirement
         | 
| 157 172 | 
             
              requirements:
         | 
| 158 | 
            -
              - -  | 
| 173 | 
            +
              - - ">="
         | 
| 159 174 | 
             
                - !ruby/object:Gem::Version
         | 
| 160 175 | 
             
                  version: '0'
         | 
| 161 176 | 
             
            required_rubygems_version: !ruby/object:Gem::Requirement
         | 
| 162 177 | 
             
              requirements:
         | 
| 163 | 
            -
              - -  | 
| 178 | 
            +
              - - ">="
         | 
| 164 179 | 
             
                - !ruby/object:Gem::Version
         | 
| 165 180 | 
             
                  version: '0'
         | 
| 166 181 | 
             
            requirements: []
         | 
| 167 182 | 
             
            rubyforge_project: 
         | 
| 168 | 
            -
            rubygems_version: 2. | 
| 183 | 
            +
            rubygems_version: 2.6.13
         | 
| 169 184 | 
             
            signing_key: 
         | 
| 170 185 | 
             
            specification_version: 4
         | 
| 171 186 | 
             
            summary: Encrypt and decrypt files with multiple key holders
         |