vault-tree 0.3.4 → 0.6.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.
- data/.gitignore +3 -0
- data/.rspec +1 -0
- data/CHANGE_LOG.md +27 -0
- data/README.md +15 -73
- data/features/contracts/asymmetric_vault.feature +69 -2
- data/features/contracts/block_chain_key_transfer.feature +59 -0
- data/features/contracts/one_two_three.feature +109 -1
- data/features/contracts/readme.md +5 -6
- data/features/contracts_and_vaults.md +19 -24
- data/features/decision_tree.md +1 -1
- data/features/exceptions.feature +54 -43
- data/features/install_and_usage.md +38 -33
- data/features/keywords/assembled_shamir_key.feature +17 -17
- data/features/keywords/dh_key.feature +5 -5
- data/features/keywords/external_input.feature +35 -0
- data/features/keywords/external_key.feature +24 -0
- data/features/keywords/key.feature +3 -3
- data/features/keywords/random_number.feature +3 -3
- data/features/keywords/shamir_key_shares.feature +29 -0
- data/features/keywords/shamir_share.feature +40 -0
- data/features/keywords/split_key.feature +10 -9
- data/features/keywords/unlocked.feature +3 -3
- data/features/readme.md +1 -1
- data/features/steps/asymmetric_vault.steps.rb +14 -21
- data/features/steps/block_chain_key_transfer.steps.rb +17 -22
- data/features/steps/core.steps.rb +60 -71
- data/features/steps/exceptions.steps.rb +27 -64
- data/features/steps/external_input.steps.rb +17 -0
- data/features/steps/one_two_three.steps.rb +21 -27
- data/features/steps/secret_sharing.steps.rb +36 -19
- data/lib/vault-tree.rb +1 -1
- data/lib/vault-tree/contract/content_ciphertext.rb +33 -0
- data/lib/vault-tree/contract/content_plaintext.rb +33 -0
- data/lib/vault-tree/contract/contract.rb +15 -72
- data/lib/vault-tree/contract/contract_header.rb +11 -0
- data/lib/vault-tree/contract/vault.rb +24 -74
- data/lib/vault-tree/contract/vault_key.rb +21 -0
- data/lib/vault-tree/contract/vault_list.rb +56 -0
- data/lib/vault-tree/exceptions/empty_vault.rb +18 -3
- data/lib/vault-tree/exceptions/failed_lock_attempt.rb +18 -0
- data/lib/vault-tree/exceptions/failed_unlock_attempt.rb +23 -1
- data/lib/vault-tree/exceptions/invalid_external_input.rb +16 -0
- data/lib/vault-tree/exceptions/{missing_passphrase.rb → invalid_shamir_split.rb} +2 -1
- data/lib/vault-tree/exceptions/library_exception.rb +64 -0
- data/lib/vault-tree/exceptions/missing_partner_decryption_key.rb +11 -1
- data/lib/vault-tree/exceptions/unsupported_keyword.rb +17 -1
- data/lib/vault-tree/exceptions/vault_does_not_exist.rb +8 -1
- data/lib/vault-tree/keywords/assembled_shamir_key.rb +1 -1
- data/lib/vault-tree/keywords/contents.rb +1 -1
- data/lib/vault-tree/keywords/dh_key.rb +2 -2
- data/lib/vault-tree/keywords/external_input.rb +58 -0
- data/lib/vault-tree/keywords/external_key.rb +20 -0
- data/lib/vault-tree/keywords/key.rb +7 -1
- data/lib/vault-tree/keywords/keyword_interpreter.rb +5 -3
- data/lib/vault-tree/keywords/public_encryption_key.rb +1 -5
- data/lib/vault-tree/keywords/shamir_key_shares.rb +18 -0
- data/lib/vault-tree/keywords/shamir_share.rb +18 -0
- data/lib/vault-tree/keywords/split_key.rb +1 -1
- data/lib/vault-tree/lock_smith.rb +7 -8
- data/lib/vault-tree/lock_smith/{generated_shamir_key.rb → shamir_key_shares.rb} +22 -21
- data/lib/vault-tree/lock_smith/{split_key.rb → split_key_crypto.rb} +0 -0
- data/lib/vault-tree/version.rb +1 -1
- data/spec/assembled_shamir_key_spec.rb +0 -1
- data/spec/custom_exception_spec.rb +81 -0
- data/spec/lock_smith_spec.rb +0 -48
- data/spec/secret_sharing_spec.rb +0 -1
- data/spec/shamir_key_shares_spec.rb +27 -0
- data/vault-tree.gemspec +1 -1
- metadata +33 -139
- data/Gemfile.lock +0 -53
- data/VagrantFile +0 -30
- data/features/keywords/external_data.feature +0 -11
- data/features/keywords/generated_shamir_key.feature +0 -55
- data/features/keywords/master_passphrase.feature +0 -68
- data/features/manipulating_contracts.md +0 -84
- data/features/support/contract_fixtures/asymmetric_vault.0.1.0.json +0 -69
- data/features/support/contract_fixtures/blank_simple_test_contract.json +0 -14
- data/features/support/contract_fixtures/block_chain_key_transfer.0.1.0.json +0 -59
- data/features/support/contract_fixtures/broken_contract.json +0 -55
- data/features/support/contract_fixtures/one_two_three.0.7.0.json +0 -108
- data/features/support/contract_fixtures/simple_test_contract.json +0 -14
- data/features/support/contract_fixtures/template.json +0 -33
- data/lib/vault-tree/contract/close_validator.rb +0 -28
- data/lib/vault-tree/contract/doorman.rb +0 -113
- data/lib/vault-tree/contract/open_validator.rb +0 -20
- data/lib/vault-tree/exceptions/exception_template.erb +0 -0
- data/lib/vault-tree/exceptions/fill_attempt_master_password.rb +0 -6
- data/lib/vault-tree/exceptions/missing_external_data.rb +0 -6
- data/lib/vault-tree/exceptions/vault_tree_exception.rb +0 -25
- data/lib/vault-tree/keywords/external_data.rb +0 -32
- data/lib/vault-tree/keywords/generated_shamir_key.rb +0 -57
- data/lib/vault-tree/keywords/master_passphrase.rb +0 -9
- data/spec/generated_shamir_key_spec.rb +0 -52
- data/support/cookbooks/ark/.gitignore +0 -12
- data/support/cookbooks/ark/.kitchen.yml +0 -34
- data/support/cookbooks/ark/.travis.yml +0 -6
- data/support/cookbooks/ark/Berksfile +0 -9
- data/support/cookbooks/ark/CHANGELOG.md +0 -87
- data/support/cookbooks/ark/CONTRIBUTING.md +0 -257
- data/support/cookbooks/ark/README.md +0 -301
- data/support/cookbooks/ark/Rakefile +0 -36
- data/support/cookbooks/ark/TESTING.md +0 -25
- data/support/cookbooks/ark/Toftfile +0 -15
- data/support/cookbooks/ark/attributes/default.rb +0 -6
- data/support/cookbooks/ark/chefignore +0 -96
- data/support/cookbooks/ark/files/default/foo.tar.gz +0 -0
- data/support/cookbooks/ark/files/default/foo.tbz +0 -0
- data/support/cookbooks/ark/files/default/foo.tgz +0 -0
- data/support/cookbooks/ark/files/default/foo.zip +0 -0
- data/support/cookbooks/ark/files/default/tests/minitest/default_test.rb +0 -0
- data/support/cookbooks/ark/files/default/tests/minitest/support/helpers.rb +0 -0
- data/support/cookbooks/ark/files/default/tests/minitest/test_test.rb +0 -94
- data/support/cookbooks/ark/libraries/default.rb +0 -167
- data/support/cookbooks/ark/metadata.rb +0 -13
- data/support/cookbooks/ark/providers/default.rb +0 -370
- data/support/cookbooks/ark/recipes/default.rb +0 -31
- data/support/cookbooks/ark/recipes/test.rb +0 -138
- data/support/cookbooks/ark/resources/default.rb +0 -54
- data/support/cookbooks/ark/templates/default/add_to_path.sh.erb +0 -1
- data/support/cookbooks/ark/test/support/Gemfile +0 -4
- data/support/cookbooks/build-essential/README.md +0 -24
- data/support/cookbooks/build-essential/metadata.rb +0 -10
- data/support/cookbooks/build-essential/recipes/default.rb +0 -45
- data/support/cookbooks/chruby/.gitignore +0 -15
- data/support/cookbooks/chruby/.kitchen.yml +0 -26
- data/support/cookbooks/chruby/.ruby_version +0 -1
- data/support/cookbooks/chruby/Berksfile +0 -3
- data/support/cookbooks/chruby/Gemfile +0 -7
- data/support/cookbooks/chruby/LICENSE +0 -14
- data/support/cookbooks/chruby/README.md +0 -92
- data/support/cookbooks/chruby/Rakefile +0 -7
- data/support/cookbooks/chruby/Thorfile +0 -6
- data/support/cookbooks/chruby/Vagrantfile +0 -86
- data/support/cookbooks/chruby/attributes/default.rb +0 -10
- data/support/cookbooks/chruby/chefignore +0 -96
- data/support/cookbooks/chruby/metadata.rb +0 -11
- data/support/cookbooks/chruby/recipes/default.rb +0 -43
- data/support/cookbooks/chruby/recipes/system.rb +0 -25
- data/support/cookbooks/chruby/templates/default/chruby.sh.erb +0 -22
- data/support/cookbooks/chruby/test/integration/default/bash/embedded_test.sh +0 -1
- data/support/cookbooks/git/.gitignore +0 -14
- data/support/cookbooks/git/.kitchen.yml +0 -46
- data/support/cookbooks/git/Berksfile +0 -8
- data/support/cookbooks/git/CHANGELOG.md +0 -87
- data/support/cookbooks/git/CONTRIBUTING +0 -29
- data/support/cookbooks/git/Gemfile +0 -3
- data/support/cookbooks/git/LICENSE +0 -201
- data/support/cookbooks/git/README.md +0 -115
- data/support/cookbooks/git/TESTING.md +0 -25
- data/support/cookbooks/git/attributes/default.rb +0 -40
- data/support/cookbooks/git/metadata.rb +0 -35
- data/support/cookbooks/git/recipes/default.rb +0 -53
- data/support/cookbooks/git/recipes/server.rb +0 -58
- data/support/cookbooks/git/recipes/source.rb +0 -49
- data/support/cookbooks/git/recipes/windows.rb +0 -37
- data/support/cookbooks/git/templates/default/git-xinetd.d.erb +0 -10
- data/support/cookbooks/git/templates/default/sv-git-daemon-log-run.erb +0 -2
- data/support/cookbooks/git/templates/default/sv-git-daemon-run.erb +0 -3
- data/support/cookbooks/install_ruby/README.md +0 -3
- data/support/cookbooks/install_ruby/metadata.rb +0 -10
- data/support/cookbooks/install_ruby/recipes/default.rb +0 -14
- data/support/cookbooks/ruby_build/.gitignore +0 -6
- data/support/cookbooks/ruby_build/.kitchen.yml +0 -31
- data/support/cookbooks/ruby_build/.travis.yml +0 -4
- data/support/cookbooks/ruby_build/Berksfile +0 -10
- data/support/cookbooks/ruby_build/CHANGELOG.md +0 -72
- data/support/cookbooks/ruby_build/Gemfile +0 -14
- data/support/cookbooks/ruby_build/README.md +0 -338
- data/support/cookbooks/ruby_build/Rakefile +0 -21
- data/support/cookbooks/ruby_build/attributes/default.rb +0 -67
- data/support/cookbooks/ruby_build/chefignore +0 -53
- data/support/cookbooks/ruby_build/libraries/ruby_build_recipe_helpers.rb +0 -40
- data/support/cookbooks/ruby_build/metadata.rb +0 -18
- data/support/cookbooks/ruby_build/providers/ruby.rb +0 -88
- data/support/cookbooks/ruby_build/recipes/default.rb +0 -69
- data/support/cookbooks/ruby_build/resources/ruby.rb +0 -33
- data/support/cookbooks/ruby_build/test/cookbooks/alltherubies/metadata.rb +0 -10
- data/support/cookbooks/ruby_build/test/cookbooks/alltherubies/recipes/default.rb +0 -59
- data/support/cookbooks/ruby_build/test/integration/alltherubies/bats/_verify_tests.bash +0 -33
- data/support/cookbooks/ruby_build/test/integration/alltherubies/bats/verify_1.8.7.bats +0 -29
- data/support/cookbooks/ruby_build/test/integration/alltherubies/bats/verify_1.9.2.bats +0 -18
- data/support/cookbooks/ruby_build/test/integration/alltherubies/bats/verify_1.9.3.bats +0 -18
- data/support/cookbooks/ruby_build/test/integration/alltherubies/bats/verify_2.0.0.bats +0 -18
- data/support/cookbooks/ruby_build/test/integration/alltherubies/bats/verify_jruby.bats +0 -20
- data/support/cookbooks/ruby_build/test/integration/alltherubies/bats/verify_rbx.bats +0 -18
- data/support/cookbooks/ruby_build/test/integration/alltherubies/bats/verify_ree.bats +0 -19
- data/support/cookbooks/ruby_build/test/integration/installation/bats/installation.bats +0 -6
- data/support/scripts/libsodium_ubuntu.sh +0 -80
- data/support/tasks/.gitkeep +0 -0
- data/support/tasks/libsodium_install.rb +0 -57
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
Feature: Master Passphrase
|
|
2
|
-
|
|
3
|
-
```javascript
|
|
4
|
-
"lock_with": "MASTER_PASSPHRASE",
|
|
5
|
-
"unlock_with": "MASTER_PASSPHRASE"
|
|
6
|
-
```
|
|
7
|
-
|
|
8
|
-
The master password can be thought of as the secure password for the system that is executing the contract. It should never be shared or transfered between parties.
|
|
9
|
-
|
|
10
|
-
Vault Tree prevents this value from ever being stored within a vault. If you attempt to store the master password within a vault, an exception will be thrown.
|
|
11
|
-
|
|
12
|
-
As a best practice you should minimize the number of vaults that are locked or
|
|
13
|
-
unlocked with your master password. Specifically, consider randomly generating a
|
|
14
|
-
contract secret and then locking it with your master password. Then you can lock
|
|
15
|
-
other vaults with this randomly generated ephemeral secret when you want store
|
|
16
|
-
confidential contract data.
|
|
17
|
-
|
|
18
|
-
Scenario: Close And Open With Master Password
|
|
19
|
-
Given the blank contract:
|
|
20
|
-
"""javascript
|
|
21
|
-
{
|
|
22
|
-
"header": {},
|
|
23
|
-
"vaults": {
|
|
24
|
-
"random_vault_key":{
|
|
25
|
-
"description":"Random Number",
|
|
26
|
-
"fill_with": "RANDOM_NUMBER",
|
|
27
|
-
"lock_with": "MASTER_PASSPHRASE",
|
|
28
|
-
"unlock_with": "MASTER_PASSPHRASE",
|
|
29
|
-
"contents": ""
|
|
30
|
-
},
|
|
31
|
-
"message":{
|
|
32
|
-
"description": "Simple Congratulations Message",
|
|
33
|
-
"fill_with": "EXTERNAL_DATA",
|
|
34
|
-
"lock_with": "KEY['random_vault_key']",
|
|
35
|
-
"unlock_with": "KEY['random_vault_key']",
|
|
36
|
-
"contents": ""
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
"""
|
|
41
|
-
When I lock a message in a vault with my Master Password
|
|
42
|
-
Then I can recover the message with my Master Password
|
|
43
|
-
|
|
44
|
-
Scenario: Missing Passphrase
|
|
45
|
-
Given the blank contract:
|
|
46
|
-
"""javascript
|
|
47
|
-
{
|
|
48
|
-
"header": {},
|
|
49
|
-
"vaults": {
|
|
50
|
-
"random_vault_key":{
|
|
51
|
-
"description":"Random Number",
|
|
52
|
-
"fill_with": "RANDOM_NUMBER",
|
|
53
|
-
"lock_with": "MASTER_PASSPHRASE",
|
|
54
|
-
"unlock_with": "MASTER_PASSPHRASE",
|
|
55
|
-
"contents": ""
|
|
56
|
-
},
|
|
57
|
-
"message":{
|
|
58
|
-
"description": "Simple Congratulations Message",
|
|
59
|
-
"fill_with": "EXTERNAL_DATA",
|
|
60
|
-
"lock_with": "KEY['random_vault_key']",
|
|
61
|
-
"unlock_with": "KEY['random_vault_key']",
|
|
62
|
-
"contents": ""
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
"""
|
|
67
|
-
When I attempt fill a vault without providing a master passphrase
|
|
68
|
-
Then a MissingPassphrase exception is raised
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
Contracts are a central part of the [Vault Tree Project]. Here is what you
|
|
2
|
-
need to know:
|
|
3
|
-
|
|
4
|
-
* A Vault Tree Contract is simply a [JSON] text file
|
|
5
|
-
* Every contract is composed of two parts:
|
|
6
|
-
- The **Header** section, which includes helpful meta data
|
|
7
|
-
- The **Vaults** section, which can be any collection of _vaults_ that form the
|
|
8
|
-
contract.
|
|
9
|
-
* The way in which you, the contract author, organize the vaults will determine the **Self-Enforcing Terms** of your contract.
|
|
10
|
-
* Each vault will typically contain either an **external data** string that is provided by one of the contract
|
|
11
|
-
participants, or a key to anther vault.
|
|
12
|
-
|
|
13
|
-
### Writing and Simulating Contracts
|
|
14
|
-
|
|
15
|
-
If you've made it to this far, then you're ready to build some stuff. You're
|
|
16
|
-
thinking to yourself:
|
|
17
|
-
|
|
18
|
-
* For my Vault Tree Contract to be useful it probably needs to involve more than one person.
|
|
19
|
-
* I think I can write a contract, but I really need a way to test it out and think through all the different scenarios.
|
|
20
|
-
* When my final contract is complete it might involve network calls to pass it
|
|
21
|
-
between parties, queries the Bitcoin Block Chain, or some other crazy step involving the outside world.
|
|
22
|
-
|
|
23
|
-
What I really need is a way to **Simulate** how the contract will be used in real life ...
|
|
24
|
-
|
|
25
|
-
Enter [Cucumber].
|
|
26
|
-
|
|
27
|
-
[Cucumber]: https://github.com/cucumber/cucumber
|
|
28
|
-
|
|
29
|
-
Cucumber is a tool designed to test complicated full stack web applications. However, we are going to use it for a slightly different purpose.
|
|
30
|
-
|
|
31
|
-
Take a look at this simple example:
|
|
32
|
-
|
|
33
|
-
```Gherkin
|
|
34
|
-
Scenario: Alice and Bob Execute the One Two Three Contract
|
|
35
|
-
Given Alice has the blank contract
|
|
36
|
-
When she locks all of her attributes
|
|
37
|
-
And she sends the contract to Bob
|
|
38
|
-
Then Bob can access all of her public attributes
|
|
39
|
-
When Bob locks his attributes
|
|
40
|
-
And He fills and locks each of the three main vaults
|
|
41
|
-
Then Alice can execute the contract to recover the final message
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
Great. So we wrote down how the contract is used in some funny looking format ... so what.
|
|
45
|
-
|
|
46
|
-
Well, what if we associate each one of these steps in the scenario with some simple Ruby code that interacts with the Vault Tree API. Here are the first three step definitions:
|
|
47
|
-
|
|
48
|
-
```Ruby
|
|
49
|
-
# This file: "features/core/one_two_three/one_two_three.steps.rb"
|
|
50
|
-
# Associated Contract: "core/one_two_three.0.7.0.json"
|
|
51
|
-
|
|
52
|
-
Given(/^Alice has the blank contract$/) do
|
|
53
|
-
contract_path = VaultTree::ContractsRepo::PathHelpers.core_contracts('one_two_three.0.7.0.json')
|
|
54
|
-
@contract_json = File.read(contract_path)
|
|
55
|
-
end
|
|
56
|
-
|
|
57
|
-
When(/^she locks all of her attributes$/) do
|
|
58
|
-
@contract = VaultTree::Contract.new(@contract_json, master_passphrase: 'ALICE_SECURE_PASS', external_data: {})
|
|
59
|
-
@contract = @contract.close_vault('alice_decryption_key')
|
|
60
|
-
@contract = @contract.close_vault('alice_public_encryption_key')
|
|
61
|
-
end
|
|
62
|
-
|
|
63
|
-
When(/^she sends the contract to Bob$/) do
|
|
64
|
-
@contract_json = @contract.as_json
|
|
65
|
-
@bobs_external_data = {"congratulations_message" => "CONGRATS! YOU OPENED THE THIRD VAULT."}
|
|
66
|
-
@contract = VaultTree::Contract.new(@contract_json, master_passphrase: 'BOB_SECURE_PASS', external_data: @bobs_external_data)
|
|
67
|
-
end
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
Not only can we easily run the contract throught the library to test that it
|
|
71
|
-
works, we have a straight forward mechanism for simulating otherwise complicated
|
|
72
|
-
steps like sending the JSON representation of the contact _over the wire_.
|
|
73
|
-
|
|
74
|
-
Some items to keep in mind when you run Cucumber scenarios:
|
|
75
|
-
|
|
76
|
-
* Run `rake` instead of `cucumber` when in the VM `/vagrant` dir
|
|
77
|
-
* This will:
|
|
78
|
-
- Take care of the wierd cucumber configuration flags needed to handle the unconventional directory structure.
|
|
79
|
-
- Execute all cucumber scenarios associated with contracts in the `/core` directory
|
|
80
|
-
|
|
81
|
-
[JSON]: http://www.json.org
|
|
82
|
-
[Vault Tree Homepage]: http://www.vault-tree.org
|
|
83
|
-
[Vault Tree Project]: http://www.vault-tree.org
|
|
84
|
-
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"header": {
|
|
3
|
-
|
|
4
|
-
"title":"Asymmetric Vault",
|
|
5
|
-
"description":"Demonstrated use of a Vault Tree Asymmetric Vault",
|
|
6
|
-
"template_url":"https://github.com/VaultTree/contracts/blob/master/core/asymmetric_vault.0.1.0.json",
|
|
7
|
-
"contributers":"Andrew Bashelor"
|
|
8
|
-
},
|
|
9
|
-
"vaults": {
|
|
10
|
-
|
|
11
|
-
"bob_contract_secret":{
|
|
12
|
-
"description":"Contract specific password to lock private information",
|
|
13
|
-
"fill_with": "RANDOM_NUMBER",
|
|
14
|
-
"lock_with": "MASTER_PASSPHRASE",
|
|
15
|
-
"unlock_with": "MASTER_PASSPHRASE",
|
|
16
|
-
"contents": ""
|
|
17
|
-
},
|
|
18
|
-
|
|
19
|
-
"alice_contract_secret":{
|
|
20
|
-
"description":"Contract specific password to lock private information",
|
|
21
|
-
"fill_with": "RANDOM_NUMBER",
|
|
22
|
-
"lock_with": "MASTER_PASSPHRASE",
|
|
23
|
-
"unlock_with": "MASTER_PASSPHRASE",
|
|
24
|
-
"contents": ""
|
|
25
|
-
},
|
|
26
|
-
|
|
27
|
-
"alice_public_encryption_key":{
|
|
28
|
-
"description":"Public key for asymmetric encryption",
|
|
29
|
-
"fill_with": "PUBLIC_ENCRYPTION_KEY['alice_decryption_key']",
|
|
30
|
-
"lock_with": "UNLOCKED",
|
|
31
|
-
"unlock_with": "UNLOCKED",
|
|
32
|
-
"contents": ""
|
|
33
|
-
},
|
|
34
|
-
|
|
35
|
-
"bob_public_encryption_key":{
|
|
36
|
-
"description":"Public key for asymmetric encryption",
|
|
37
|
-
"fill_with": "PUBLIC_ENCRYPTION_KEY['bob_decryption_key']",
|
|
38
|
-
"lock_with": "UNLOCKED",
|
|
39
|
-
"unlock_with": "UNLOCKED",
|
|
40
|
-
"contents": ""
|
|
41
|
-
},
|
|
42
|
-
|
|
43
|
-
"alice_decryption_key":{
|
|
44
|
-
"description":"Private key for asymmetric decryption",
|
|
45
|
-
"fill_with": "DECRYPTION_KEY",
|
|
46
|
-
"lock_with": "KEY['alice_contract_secret']",
|
|
47
|
-
"unlock_with": "KEY['alice_contract_secret']",
|
|
48
|
-
"contents": ""
|
|
49
|
-
},
|
|
50
|
-
|
|
51
|
-
"bob_decryption_key":{
|
|
52
|
-
"description":"Private key for asymmetric decryption",
|
|
53
|
-
"fill_with": "DECRYPTION_KEY",
|
|
54
|
-
"lock_with": "KEY['bob_contract_secret']",
|
|
55
|
-
"unlock_with": "KEY['bob_contract_secret']",
|
|
56
|
-
"contents": ""
|
|
57
|
-
},
|
|
58
|
-
|
|
59
|
-
"message":{
|
|
60
|
-
"description":"This is an asymmetric vault. It contains a secret message.",
|
|
61
|
-
"fill_with": "EXTERNAL_DATA",
|
|
62
|
-
"lock_with": "DH_KEY['alice_public_encryption_key','bob_decryption_key']",
|
|
63
|
-
"unlock_with": "DH_KEY['bob_public_encryption_key','alice_decryption_key']",
|
|
64
|
-
"contents": ""
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"header": {
|
|
3
|
-
"title":"Block Chain Key Transfer",
|
|
4
|
-
"description":"A simple key transfer sheme utilizing a revealed BTC Wallet Address. This can be used as step within the execution of a larger contract.",
|
|
5
|
-
"template_url":"https://github.com/VaultTree/contracts/blob/master/contracts/block_chain_key_transfer.0.1.0.json",
|
|
6
|
-
"contributer":"Andrew Bashelor"
|
|
7
|
-
},
|
|
8
|
-
"vaults": {
|
|
9
|
-
|
|
10
|
-
"sender_btc_signing_key":{
|
|
11
|
-
"description":"This is the secret Bitcoin Signing Key that SENDER wishes to transfer to RECEIVER. The RECEIVER can unlock only after he has the revealed address.",
|
|
12
|
-
"fill_with": "EXTERNAL_DATA",
|
|
13
|
-
"lock_with": "KEY['sender_concealed_destination_wallet_address']",
|
|
14
|
-
"unlock_with": "KEY['receiver_revealed_destination_wallet_address']",
|
|
15
|
-
"contents": ""
|
|
16
|
-
},
|
|
17
|
-
|
|
18
|
-
"sender_origin_wallet_address":{
|
|
19
|
-
"description":"SENDER origin wallet address. Chosen by SENDER and known in advance to RECEIVER.",
|
|
20
|
-
"fill_with": "EXTERNAL_DATA",
|
|
21
|
-
"lock_with": "UNLOCKED",
|
|
22
|
-
"unlock_with": "UNLOCKED",
|
|
23
|
-
"contents": ""
|
|
24
|
-
},
|
|
25
|
-
|
|
26
|
-
"sender_concealed_destination_wallet_address":{
|
|
27
|
-
"description":"SENDER concealed copy of the destination wallet address. This wallet address is kept secret until SENDER chosed to transfer BTC to it",
|
|
28
|
-
"fill_with": "EXTERNAL_DATA",
|
|
29
|
-
"lock_with": "KEY['sender_secret']",
|
|
30
|
-
"unlock_with": "KEY['sender_secret']",
|
|
31
|
-
"contents": ""
|
|
32
|
-
},
|
|
33
|
-
|
|
34
|
-
"receiver_revealed_destination_wallet_address":{
|
|
35
|
-
"description":"RECEIVER monitors the Block Chain and fills this vault with the newly revealied destination address.",
|
|
36
|
-
"fill_with": "EXTERNAL_DATA",
|
|
37
|
-
"lock_with": "KEY['receiver_secret']",
|
|
38
|
-
"unlock_with": "KEY['receiver_secret']",
|
|
39
|
-
"contents": ""
|
|
40
|
-
},
|
|
41
|
-
|
|
42
|
-
"receiver_secret":{
|
|
43
|
-
"fill_with": "RANDOM_NUMBER",
|
|
44
|
-
"lock_with": "MASTER_PASSPHRASE",
|
|
45
|
-
"unlock_with": "MASTER_PASSPHRASE",
|
|
46
|
-
"contents": ""
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
"sender_secret":{
|
|
50
|
-
"description":"Contract specific password for SENDER. Used to Lock the SENDER private information.",
|
|
51
|
-
"fill_with": "RANDOM_NUMBER",
|
|
52
|
-
"lock_with": "MASTER_PASSPHRASE",
|
|
53
|
-
"unlock_with": "MASTER_PASSPHRASE",
|
|
54
|
-
"contents": ""
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
59
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"header": {
|
|
3
|
-
|
|
4
|
-
"title":"Broken Contract",
|
|
5
|
-
"summary":"This is a test fixture for ensuring proper exception handling. These are examples of what NOT to do.",
|
|
6
|
-
"contributers":"Andrew Bashelor"
|
|
7
|
-
},
|
|
8
|
-
"vaults": {
|
|
9
|
-
|
|
10
|
-
"empty_vault":{
|
|
11
|
-
"fill_with": "RANDOM_NUMBER",
|
|
12
|
-
"lock_with": "MASTER_PASSPHRASE",
|
|
13
|
-
"unlock_with": "MASTER_PASSPHRASE",
|
|
14
|
-
"contents": ""
|
|
15
|
-
},
|
|
16
|
-
|
|
17
|
-
"unsupported_keyword":{
|
|
18
|
-
"fill_with": "UNSUPPORTED_KEYWORD",
|
|
19
|
-
"lock_with": "UNLOCKED",
|
|
20
|
-
"unlock_with": "UNLOCKED",
|
|
21
|
-
"contents": ""
|
|
22
|
-
},
|
|
23
|
-
|
|
24
|
-
"fill_with_master_pass_vault":{
|
|
25
|
-
"fill_with": "MASTER_PASSPHRASE",
|
|
26
|
-
"lock_with": "UNLOCKED",
|
|
27
|
-
"unlock_with": "UNLOCKED",
|
|
28
|
-
"contents": ""
|
|
29
|
-
},
|
|
30
|
-
|
|
31
|
-
"missing_external_data_vault":{
|
|
32
|
-
"fill_with": "EXTERNAL_DATA",
|
|
33
|
-
"lock_with": "UNLOCKED",
|
|
34
|
-
"unlock_with": "UNLOCKED",
|
|
35
|
-
"contents": ""
|
|
36
|
-
},
|
|
37
|
-
|
|
38
|
-
"empty_decryption_key":{
|
|
39
|
-
"description": "Leave this empty.",
|
|
40
|
-
"fill_with": "DECRYPTION_KEY",
|
|
41
|
-
"lock_with": "UNLOCKED",
|
|
42
|
-
"unlock_with": "UNLOCKED",
|
|
43
|
-
"contents": ""
|
|
44
|
-
},
|
|
45
|
-
|
|
46
|
-
"orphaned_public_key":{
|
|
47
|
-
"description": "Attempt to establish a public key with first building a decryption key",
|
|
48
|
-
"fill_with": "PUBLIC_ENCRYPTION_KEY['empty_decryption_key']",
|
|
49
|
-
"lock_with": "UNLOCKED",
|
|
50
|
-
"unlock_with": "UNLOCKED",
|
|
51
|
-
"contents": ""
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
}
|
|
55
|
-
}
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"header": {
|
|
3
|
-
|
|
4
|
-
"title":"One Two Three",
|
|
5
|
-
"description":"A simple contract to test the full Vault Tree stack. Open each vault to proceed to the next one. Unlock the congratulations message",
|
|
6
|
-
"template_url":"https://github.com/VaultTree/contracts/blob/master/contracts/one_two_three.0.7.0.json",
|
|
7
|
-
"contributers":"Andrew Bashelor"
|
|
8
|
-
},
|
|
9
|
-
"vaults": {
|
|
10
|
-
|
|
11
|
-
"bob_contract_secret":{
|
|
12
|
-
"description":"contract specific password to lock private information",
|
|
13
|
-
"fill_with": "RANDOM_NUMBER",
|
|
14
|
-
"lock_with": "MASTER_PASSPHRASE",
|
|
15
|
-
"unlock_with": "MASTER_PASSPHRASE",
|
|
16
|
-
"contents": ""
|
|
17
|
-
},
|
|
18
|
-
|
|
19
|
-
"alice_contract_secret":{
|
|
20
|
-
"description":"contract specific password to lock private information",
|
|
21
|
-
"fill_with": "RANDOM_NUMBER",
|
|
22
|
-
"lock_with": "MASTER_PASSPHRASE",
|
|
23
|
-
"unlock_with": "MASTER_PASSPHRASE",
|
|
24
|
-
"contents": ""
|
|
25
|
-
},
|
|
26
|
-
|
|
27
|
-
"alice_public_encryption_key":{
|
|
28
|
-
"description":"public key for asymmetric encryption",
|
|
29
|
-
"fill_with": "PUBLIC_ENCRYPTION_KEY['alice_decryption_key']",
|
|
30
|
-
"lock_with": "UNLOCKED",
|
|
31
|
-
"unlock_with": "UNLOCKED",
|
|
32
|
-
"contents": ""
|
|
33
|
-
},
|
|
34
|
-
|
|
35
|
-
"bob_public_encryption_key":{
|
|
36
|
-
"description":"public key for asymmetric encryption",
|
|
37
|
-
"fill_with": "PUBLIC_ENCRYPTION_KEY['bob_decryption_key']",
|
|
38
|
-
"lock_with": "UNLOCKED",
|
|
39
|
-
"unlock_with": "UNLOCKED",
|
|
40
|
-
"contents": ""
|
|
41
|
-
},
|
|
42
|
-
|
|
43
|
-
"alice_decryption_key":{
|
|
44
|
-
"description":"private key for asymmetric decryption",
|
|
45
|
-
"fill_with": "DECRYPTION_KEY",
|
|
46
|
-
"lock_with": "KEY['alice_contract_secret']",
|
|
47
|
-
"unlock_with": "KEY['alice_contract_secret']",
|
|
48
|
-
"contents": ""
|
|
49
|
-
},
|
|
50
|
-
|
|
51
|
-
"bob_decryption_key":{
|
|
52
|
-
"description":"private key for asymmetric decryption",
|
|
53
|
-
"fill_with": "DECRYPTION_KEY",
|
|
54
|
-
"lock_with": "KEY['bob_contract_secret']",
|
|
55
|
-
"unlock_with": "KEY['bob_contract_secret']",
|
|
56
|
-
"contents": ""
|
|
57
|
-
},
|
|
58
|
-
|
|
59
|
-
"congratulations_message":{
|
|
60
|
-
"description":"A simple message for Bob to put in the final vault",
|
|
61
|
-
"fill_with": "EXTERNAL_DATA",
|
|
62
|
-
"lock_with": "KEY['bob_contract_secret']",
|
|
63
|
-
"unlock_with": "KEY['bob_contract_secret']",
|
|
64
|
-
"contents": ""
|
|
65
|
-
},
|
|
66
|
-
|
|
67
|
-
"vault_two_key":{
|
|
68
|
-
"description":"Key to lock vault two. Once Bob locks the second vault he will put this key inside vault one.",
|
|
69
|
-
"fill_with": "RANDOM_NUMBER",
|
|
70
|
-
"lock_with": "KEY['bob_contract_secret']",
|
|
71
|
-
"unlock_with": "KEY['bob_contract_secret']",
|
|
72
|
-
"contents": ""
|
|
73
|
-
},
|
|
74
|
-
|
|
75
|
-
"vault_three_key":{
|
|
76
|
-
"description":"Key to lock vault three. Once Bob locks the third vault he will put this key inside vault two.",
|
|
77
|
-
"fill_with": "RANDOM_NUMBER",
|
|
78
|
-
"lock_with": "KEY['bob_contract_secret']",
|
|
79
|
-
"unlock_with": "KEY['bob_contract_secret']",
|
|
80
|
-
"contents": ""
|
|
81
|
-
},
|
|
82
|
-
|
|
83
|
-
"first":{
|
|
84
|
-
"description":"This is an asymmetric vault with mutual authentication. It contains the key to vault two and is locked by Bob, with Alices public key. Only Alice can unlock it.",
|
|
85
|
-
"fill_with": "KEY['vault_two_key']",
|
|
86
|
-
"lock_with": "DH_KEY['alice_public_encryption_key','bob_decryption_key']",
|
|
87
|
-
"unlock_with": "DH_KEY['bob_public_encryption_key','alice_decryption_key']",
|
|
88
|
-
"contents": ""
|
|
89
|
-
},
|
|
90
|
-
|
|
91
|
-
"second":{
|
|
92
|
-
"description":"Alice unlocks this vault with the key held in the first vault.",
|
|
93
|
-
"fill_with": "KEY['vault_three_key']",
|
|
94
|
-
"lock_with": "KEY['vault_two_key']",
|
|
95
|
-
"unlock_with": "KEY['first']",
|
|
96
|
-
"contents": ""
|
|
97
|
-
},
|
|
98
|
-
|
|
99
|
-
"third":{
|
|
100
|
-
"description":"Contains a simple message. Unlock the key found in the second vault.",
|
|
101
|
-
"fill_with": "KEY['congratulations_message']",
|
|
102
|
-
"lock_with": "KEY['vault_three_key']",
|
|
103
|
-
"unlock_with": "KEY['second']",
|
|
104
|
-
"contents": ""
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
}
|
|
108
|
-
}
|