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.
Files changed (190) hide show
  1. data/.gitignore +3 -0
  2. data/.rspec +1 -0
  3. data/CHANGE_LOG.md +27 -0
  4. data/README.md +15 -73
  5. data/features/contracts/asymmetric_vault.feature +69 -2
  6. data/features/contracts/block_chain_key_transfer.feature +59 -0
  7. data/features/contracts/one_two_three.feature +109 -1
  8. data/features/contracts/readme.md +5 -6
  9. data/features/contracts_and_vaults.md +19 -24
  10. data/features/decision_tree.md +1 -1
  11. data/features/exceptions.feature +54 -43
  12. data/features/install_and_usage.md +38 -33
  13. data/features/keywords/assembled_shamir_key.feature +17 -17
  14. data/features/keywords/dh_key.feature +5 -5
  15. data/features/keywords/external_input.feature +35 -0
  16. data/features/keywords/external_key.feature +24 -0
  17. data/features/keywords/key.feature +3 -3
  18. data/features/keywords/random_number.feature +3 -3
  19. data/features/keywords/shamir_key_shares.feature +29 -0
  20. data/features/keywords/shamir_share.feature +40 -0
  21. data/features/keywords/split_key.feature +10 -9
  22. data/features/keywords/unlocked.feature +3 -3
  23. data/features/readme.md +1 -1
  24. data/features/steps/asymmetric_vault.steps.rb +14 -21
  25. data/features/steps/block_chain_key_transfer.steps.rb +17 -22
  26. data/features/steps/core.steps.rb +60 -71
  27. data/features/steps/exceptions.steps.rb +27 -64
  28. data/features/steps/external_input.steps.rb +17 -0
  29. data/features/steps/one_two_three.steps.rb +21 -27
  30. data/features/steps/secret_sharing.steps.rb +36 -19
  31. data/lib/vault-tree.rb +1 -1
  32. data/lib/vault-tree/contract/content_ciphertext.rb +33 -0
  33. data/lib/vault-tree/contract/content_plaintext.rb +33 -0
  34. data/lib/vault-tree/contract/contract.rb +15 -72
  35. data/lib/vault-tree/contract/contract_header.rb +11 -0
  36. data/lib/vault-tree/contract/vault.rb +24 -74
  37. data/lib/vault-tree/contract/vault_key.rb +21 -0
  38. data/lib/vault-tree/contract/vault_list.rb +56 -0
  39. data/lib/vault-tree/exceptions/empty_vault.rb +18 -3
  40. data/lib/vault-tree/exceptions/failed_lock_attempt.rb +18 -0
  41. data/lib/vault-tree/exceptions/failed_unlock_attempt.rb +23 -1
  42. data/lib/vault-tree/exceptions/invalid_external_input.rb +16 -0
  43. data/lib/vault-tree/exceptions/{missing_passphrase.rb → invalid_shamir_split.rb} +2 -1
  44. data/lib/vault-tree/exceptions/library_exception.rb +64 -0
  45. data/lib/vault-tree/exceptions/missing_partner_decryption_key.rb +11 -1
  46. data/lib/vault-tree/exceptions/unsupported_keyword.rb +17 -1
  47. data/lib/vault-tree/exceptions/vault_does_not_exist.rb +8 -1
  48. data/lib/vault-tree/keywords/assembled_shamir_key.rb +1 -1
  49. data/lib/vault-tree/keywords/contents.rb +1 -1
  50. data/lib/vault-tree/keywords/dh_key.rb +2 -2
  51. data/lib/vault-tree/keywords/external_input.rb +58 -0
  52. data/lib/vault-tree/keywords/external_key.rb +20 -0
  53. data/lib/vault-tree/keywords/key.rb +7 -1
  54. data/lib/vault-tree/keywords/keyword_interpreter.rb +5 -3
  55. data/lib/vault-tree/keywords/public_encryption_key.rb +1 -5
  56. data/lib/vault-tree/keywords/shamir_key_shares.rb +18 -0
  57. data/lib/vault-tree/keywords/shamir_share.rb +18 -0
  58. data/lib/vault-tree/keywords/split_key.rb +1 -1
  59. data/lib/vault-tree/lock_smith.rb +7 -8
  60. data/lib/vault-tree/lock_smith/{generated_shamir_key.rb → shamir_key_shares.rb} +22 -21
  61. data/lib/vault-tree/lock_smith/{split_key.rb → split_key_crypto.rb} +0 -0
  62. data/lib/vault-tree/version.rb +1 -1
  63. data/spec/assembled_shamir_key_spec.rb +0 -1
  64. data/spec/custom_exception_spec.rb +81 -0
  65. data/spec/lock_smith_spec.rb +0 -48
  66. data/spec/secret_sharing_spec.rb +0 -1
  67. data/spec/shamir_key_shares_spec.rb +27 -0
  68. data/vault-tree.gemspec +1 -1
  69. metadata +33 -139
  70. data/Gemfile.lock +0 -53
  71. data/VagrantFile +0 -30
  72. data/features/keywords/external_data.feature +0 -11
  73. data/features/keywords/generated_shamir_key.feature +0 -55
  74. data/features/keywords/master_passphrase.feature +0 -68
  75. data/features/manipulating_contracts.md +0 -84
  76. data/features/support/contract_fixtures/asymmetric_vault.0.1.0.json +0 -69
  77. data/features/support/contract_fixtures/blank_simple_test_contract.json +0 -14
  78. data/features/support/contract_fixtures/block_chain_key_transfer.0.1.0.json +0 -59
  79. data/features/support/contract_fixtures/broken_contract.json +0 -55
  80. data/features/support/contract_fixtures/one_two_three.0.7.0.json +0 -108
  81. data/features/support/contract_fixtures/simple_test_contract.json +0 -14
  82. data/features/support/contract_fixtures/template.json +0 -33
  83. data/lib/vault-tree/contract/close_validator.rb +0 -28
  84. data/lib/vault-tree/contract/doorman.rb +0 -113
  85. data/lib/vault-tree/contract/open_validator.rb +0 -20
  86. data/lib/vault-tree/exceptions/exception_template.erb +0 -0
  87. data/lib/vault-tree/exceptions/fill_attempt_master_password.rb +0 -6
  88. data/lib/vault-tree/exceptions/missing_external_data.rb +0 -6
  89. data/lib/vault-tree/exceptions/vault_tree_exception.rb +0 -25
  90. data/lib/vault-tree/keywords/external_data.rb +0 -32
  91. data/lib/vault-tree/keywords/generated_shamir_key.rb +0 -57
  92. data/lib/vault-tree/keywords/master_passphrase.rb +0 -9
  93. data/spec/generated_shamir_key_spec.rb +0 -52
  94. data/support/cookbooks/ark/.gitignore +0 -12
  95. data/support/cookbooks/ark/.kitchen.yml +0 -34
  96. data/support/cookbooks/ark/.travis.yml +0 -6
  97. data/support/cookbooks/ark/Berksfile +0 -9
  98. data/support/cookbooks/ark/CHANGELOG.md +0 -87
  99. data/support/cookbooks/ark/CONTRIBUTING.md +0 -257
  100. data/support/cookbooks/ark/README.md +0 -301
  101. data/support/cookbooks/ark/Rakefile +0 -36
  102. data/support/cookbooks/ark/TESTING.md +0 -25
  103. data/support/cookbooks/ark/Toftfile +0 -15
  104. data/support/cookbooks/ark/attributes/default.rb +0 -6
  105. data/support/cookbooks/ark/chefignore +0 -96
  106. data/support/cookbooks/ark/files/default/foo.tar.gz +0 -0
  107. data/support/cookbooks/ark/files/default/foo.tbz +0 -0
  108. data/support/cookbooks/ark/files/default/foo.tgz +0 -0
  109. data/support/cookbooks/ark/files/default/foo.zip +0 -0
  110. data/support/cookbooks/ark/files/default/tests/minitest/default_test.rb +0 -0
  111. data/support/cookbooks/ark/files/default/tests/minitest/support/helpers.rb +0 -0
  112. data/support/cookbooks/ark/files/default/tests/minitest/test_test.rb +0 -94
  113. data/support/cookbooks/ark/libraries/default.rb +0 -167
  114. data/support/cookbooks/ark/metadata.rb +0 -13
  115. data/support/cookbooks/ark/providers/default.rb +0 -370
  116. data/support/cookbooks/ark/recipes/default.rb +0 -31
  117. data/support/cookbooks/ark/recipes/test.rb +0 -138
  118. data/support/cookbooks/ark/resources/default.rb +0 -54
  119. data/support/cookbooks/ark/templates/default/add_to_path.sh.erb +0 -1
  120. data/support/cookbooks/ark/test/support/Gemfile +0 -4
  121. data/support/cookbooks/build-essential/README.md +0 -24
  122. data/support/cookbooks/build-essential/metadata.rb +0 -10
  123. data/support/cookbooks/build-essential/recipes/default.rb +0 -45
  124. data/support/cookbooks/chruby/.gitignore +0 -15
  125. data/support/cookbooks/chruby/.kitchen.yml +0 -26
  126. data/support/cookbooks/chruby/.ruby_version +0 -1
  127. data/support/cookbooks/chruby/Berksfile +0 -3
  128. data/support/cookbooks/chruby/Gemfile +0 -7
  129. data/support/cookbooks/chruby/LICENSE +0 -14
  130. data/support/cookbooks/chruby/README.md +0 -92
  131. data/support/cookbooks/chruby/Rakefile +0 -7
  132. data/support/cookbooks/chruby/Thorfile +0 -6
  133. data/support/cookbooks/chruby/Vagrantfile +0 -86
  134. data/support/cookbooks/chruby/attributes/default.rb +0 -10
  135. data/support/cookbooks/chruby/chefignore +0 -96
  136. data/support/cookbooks/chruby/metadata.rb +0 -11
  137. data/support/cookbooks/chruby/recipes/default.rb +0 -43
  138. data/support/cookbooks/chruby/recipes/system.rb +0 -25
  139. data/support/cookbooks/chruby/templates/default/chruby.sh.erb +0 -22
  140. data/support/cookbooks/chruby/test/integration/default/bash/embedded_test.sh +0 -1
  141. data/support/cookbooks/git/.gitignore +0 -14
  142. data/support/cookbooks/git/.kitchen.yml +0 -46
  143. data/support/cookbooks/git/Berksfile +0 -8
  144. data/support/cookbooks/git/CHANGELOG.md +0 -87
  145. data/support/cookbooks/git/CONTRIBUTING +0 -29
  146. data/support/cookbooks/git/Gemfile +0 -3
  147. data/support/cookbooks/git/LICENSE +0 -201
  148. data/support/cookbooks/git/README.md +0 -115
  149. data/support/cookbooks/git/TESTING.md +0 -25
  150. data/support/cookbooks/git/attributes/default.rb +0 -40
  151. data/support/cookbooks/git/metadata.rb +0 -35
  152. data/support/cookbooks/git/recipes/default.rb +0 -53
  153. data/support/cookbooks/git/recipes/server.rb +0 -58
  154. data/support/cookbooks/git/recipes/source.rb +0 -49
  155. data/support/cookbooks/git/recipes/windows.rb +0 -37
  156. data/support/cookbooks/git/templates/default/git-xinetd.d.erb +0 -10
  157. data/support/cookbooks/git/templates/default/sv-git-daemon-log-run.erb +0 -2
  158. data/support/cookbooks/git/templates/default/sv-git-daemon-run.erb +0 -3
  159. data/support/cookbooks/install_ruby/README.md +0 -3
  160. data/support/cookbooks/install_ruby/metadata.rb +0 -10
  161. data/support/cookbooks/install_ruby/recipes/default.rb +0 -14
  162. data/support/cookbooks/ruby_build/.gitignore +0 -6
  163. data/support/cookbooks/ruby_build/.kitchen.yml +0 -31
  164. data/support/cookbooks/ruby_build/.travis.yml +0 -4
  165. data/support/cookbooks/ruby_build/Berksfile +0 -10
  166. data/support/cookbooks/ruby_build/CHANGELOG.md +0 -72
  167. data/support/cookbooks/ruby_build/Gemfile +0 -14
  168. data/support/cookbooks/ruby_build/README.md +0 -338
  169. data/support/cookbooks/ruby_build/Rakefile +0 -21
  170. data/support/cookbooks/ruby_build/attributes/default.rb +0 -67
  171. data/support/cookbooks/ruby_build/chefignore +0 -53
  172. data/support/cookbooks/ruby_build/libraries/ruby_build_recipe_helpers.rb +0 -40
  173. data/support/cookbooks/ruby_build/metadata.rb +0 -18
  174. data/support/cookbooks/ruby_build/providers/ruby.rb +0 -88
  175. data/support/cookbooks/ruby_build/recipes/default.rb +0 -69
  176. data/support/cookbooks/ruby_build/resources/ruby.rb +0 -33
  177. data/support/cookbooks/ruby_build/test/cookbooks/alltherubies/metadata.rb +0 -10
  178. data/support/cookbooks/ruby_build/test/cookbooks/alltherubies/recipes/default.rb +0 -59
  179. data/support/cookbooks/ruby_build/test/integration/alltherubies/bats/_verify_tests.bash +0 -33
  180. data/support/cookbooks/ruby_build/test/integration/alltherubies/bats/verify_1.8.7.bats +0 -29
  181. data/support/cookbooks/ruby_build/test/integration/alltherubies/bats/verify_1.9.2.bats +0 -18
  182. data/support/cookbooks/ruby_build/test/integration/alltherubies/bats/verify_1.9.3.bats +0 -18
  183. data/support/cookbooks/ruby_build/test/integration/alltherubies/bats/verify_2.0.0.bats +0 -18
  184. data/support/cookbooks/ruby_build/test/integration/alltherubies/bats/verify_jruby.bats +0 -20
  185. data/support/cookbooks/ruby_build/test/integration/alltherubies/bats/verify_rbx.bats +0 -18
  186. data/support/cookbooks/ruby_build/test/integration/alltherubies/bats/verify_ree.bats +0 -19
  187. data/support/cookbooks/ruby_build/test/integration/installation/bats/installation.bats +0 -6
  188. data/support/scripts/libsodium_ubuntu.sh +0 -80
  189. data/support/tasks/.gitkeep +0 -0
  190. 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,14 +0,0 @@
1
- {
2
- "header": {},
3
- "vaults": {
4
-
5
- "simple_message":{
6
- "owner": "tester",
7
- "fill_with": "EXTERNAL_DATA",
8
- "lock_with": "MASTER_PASSPHRASE",
9
- "unlock_with": "MASTER_PASSPHRASE",
10
- "contents": ""
11
- }
12
-
13
- }
14
- }
@@ -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
- }