vault-tree 0.1.0 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (97) hide show
  1. data/.gitignore +7 -3
  2. data/CHANGE_LOG.md +15 -0
  3. data/Gemfile.lock +15 -5
  4. data/README.md +12 -15
  5. data/Rakefile +19 -4
  6. data/features/.nav +11 -0
  7. data/features/contracts/asymmetric_vault.feature +23 -0
  8. data/features/contracts/block_chain_key_transfer.feature +34 -0
  9. data/features/contracts/one_two_three.feature +22 -0
  10. data/features/contracts/readme.md +111 -0
  11. data/features/contracts_and_vaults.md +134 -0
  12. data/features/contributing_to_vault_tree.md +42 -0
  13. data/features/decision_tree.md +16 -0
  14. data/features/enforcement_problem.md +20 -0
  15. data/features/exceptions.feature +56 -5
  16. data/features/install_and_usage.md +57 -0
  17. data/features/keywords/assembled_shamir_key.feature +57 -0
  18. data/features/keywords/contents.feature +24 -0
  19. data/features/keywords/decryption_key.feature +10 -0
  20. data/features/keywords/dh_key.feature +56 -0
  21. data/features/keywords/external_data.feature +11 -0
  22. data/features/keywords/generated_shamir_key.feature +55 -0
  23. data/features/keywords/key.feature +38 -0
  24. data/features/keywords/master_passphrase.feature +68 -0
  25. data/features/keywords/public_encryption_key.feature +14 -0
  26. data/features/keywords/random_number.feature +44 -0
  27. data/features/keywords/readme.md +3 -0
  28. data/features/keywords/split_key.feature +54 -0
  29. data/features/keywords/unlocked.feature +51 -0
  30. data/features/manipulating_contracts.md +84 -0
  31. data/features/readme.md +6 -0
  32. data/features/steps/asymmetric_vault.steps.rb +41 -0
  33. data/features/steps/block_chain_key_transfer.steps.rb +43 -0
  34. data/features/steps/core.steps.rb +57 -104
  35. data/features/steps/exceptions.steps.rb +45 -1
  36. data/features/steps/one_two_three.steps.rb +57 -0
  37. data/features/steps/secret_sharing.steps.rb +36 -0
  38. data/features/support/contract_fixtures/asymmetric_vault.0.1.0.json +69 -0
  39. data/{spec/support/fixtures → features/support/contract_fixtures}/blank_simple_test_contract.json +0 -0
  40. data/features/support/contract_fixtures/block_chain_key_transfer.0.1.0.json +59 -0
  41. data/{spec/support/fixtures → features/support/contract_fixtures}/broken_contract.json +0 -0
  42. data/features/support/contract_fixtures/one_two_three.0.7.0.json +108 -0
  43. data/{spec/support/fixtures → features/support/contract_fixtures}/simple_test_contract.json +0 -0
  44. data/features/support/contract_fixtures/template.json +33 -0
  45. data/features/what_is_vault_tree.md +18 -0
  46. data/lib/vault-tree.rb +23 -6
  47. data/lib/vault-tree/contract/close_validator.rb +0 -7
  48. data/lib/vault-tree/contract/contract.rb +13 -2
  49. data/lib/vault-tree/contract/doorman.rb +22 -21
  50. data/lib/vault-tree/contract/vault.rb +18 -2
  51. data/lib/vault-tree/exceptions/exception_template.erb +0 -0
  52. data/lib/vault-tree/exceptions/failed_unlock_attempt.rb +6 -0
  53. data/lib/vault-tree/exceptions/vault_tree_exception.rb +18 -0
  54. data/lib/vault-tree/keywords/assembled_shamir_key.rb +44 -0
  55. data/lib/vault-tree/keywords/{vault_contents.rb → contents.rb} +0 -0
  56. data/lib/vault-tree/keywords/decryption_key.rb +1 -6
  57. data/lib/vault-tree/keywords/{shared_key.rb → dh_key.rb} +2 -2
  58. data/lib/vault-tree/keywords/external_data.rb +19 -0
  59. data/lib/vault-tree/keywords/generated_shamir_key.rb +57 -0
  60. data/lib/vault-tree/keywords/key.rb +13 -0
  61. data/lib/vault-tree/keywords/keyword_interpreter.rb +6 -6
  62. data/lib/vault-tree/keywords/public_encryption_key.rb +1 -5
  63. data/lib/vault-tree/keywords/random_number.rb +1 -1
  64. data/lib/vault-tree/keywords/split_key.rb +19 -0
  65. data/lib/vault-tree/keywords/unlocked.rb +1 -1
  66. data/lib/vault-tree/lock_smith.rb +182 -0
  67. data/lib/vault-tree/lock_smith/assembled_shamir_key.rb +64 -0
  68. data/lib/vault-tree/lock_smith/dh_key_pair.rb +10 -0
  69. data/lib/vault-tree/lock_smith/generated_shamir_key.rb +65 -0
  70. data/lib/vault-tree/lock_smith/split_key.rb +23 -0
  71. data/lib/vault-tree/{config/path_helpers.rb → path_helpers.rb} +26 -2
  72. data/lib/vault-tree/util/json.rb +1 -0
  73. data/lib/vault-tree/{config → util}/string.rb +1 -5
  74. data/lib/vault-tree/version.rb +1 -1
  75. data/spec/assembled_shamir_key_spec.rb +79 -0
  76. data/spec/generated_shamir_key_spec.rb +52 -0
  77. data/spec/lock_smith_spec.rb +90 -0
  78. data/spec/secret_sharing_spec.rb +43 -0
  79. data/support/scripts/libsodium_ubuntu.sh +1 -1
  80. data/vault-tree.gemspec +3 -2
  81. metadata +123 -41
  82. data/features/core.feature +0 -44
  83. data/lib/vault-tree/config/dependencies.rb +0 -4
  84. data/lib/vault-tree/config/lib.rb +0 -2
  85. data/lib/vault-tree/lock_smith/asymmetric_cipher.rb +0 -31
  86. data/lib/vault-tree/lock_smith/crypto_hash.rb +0 -11
  87. data/lib/vault-tree/lock_smith/digital_signature.rb +0 -32
  88. data/lib/vault-tree/lock_smith/encryption_key_pair.rb +0 -25
  89. data/lib/vault-tree/lock_smith/random_number.rb +0 -11
  90. data/lib/vault-tree/lock_smith/shared_key_pair.rb +0 -12
  91. data/lib/vault-tree/lock_smith/signing_key_pair.rb +0 -25
  92. data/lib/vault-tree/lock_smith/symmetric_cipher.rb +0 -25
  93. data/spec/app/locksmith/asymmetric_cipher_spec.rb +0 -25
  94. data/spec/app/locksmith/signing_key_pair_spec.rb +0 -22
  95. data/spec/spec_helper.rb +0 -5
  96. data/spec/support/fixtures/one_two_three-0.5.0.EXP.json +0 -105
  97. data/spec/support/fixtures/reference_contract.1.0.0.json +0 -227
@@ -1,44 +0,0 @@
1
- Feature: Core Functionality
2
-
3
- Scenario: Close And Open With Master Password
4
- Given I have a blank reference contract
5
- When I lock a message in a vault with my Master Password
6
- Then I can recover the message with my Master Password
7
-
8
- Scenario: Close And Open With Random Key
9
- Given I have a blank reference contract
10
- When I lock away a random vault key
11
- And I use the random key to lock a message
12
- Then I can recover the message with the Random Key
13
-
14
- Scenario: Transfer Key Via Unlocked Vault
15
- Given I have a blank reference contract
16
- When I lock away a random vault key
17
- And I use the random key to lock a message
18
- And I put this random key in an unlocked vault
19
- Then another user can recover the message with the Unlocked Random Key
20
-
21
- Scenario: Asymmetric Vault
22
- Given I have a blank reference contract
23
- And I have access to the another user's unlocked public key
24
- And I lock a simple message with a shared key
25
- When I transfer the contract to the other user
26
- Then they can create a shared key and unlock the message
27
-
28
- Scenario: Example - Alice and Bob Execute a One Two Three Contract
29
- Given Alice has the blank contract
30
- When she locks all of her attributes
31
- And she sends the contract to Bob
32
- Then Bob can access her public attributes
33
- When Bob locks his attributes
34
- And He fills and locks each of the three vaults
35
- Then Alice can execute the contract to recover the final message
36
-
37
- Scenario: Example - A Simple Block Chain Key Transfer
38
- Given the SENDER has the blank BTC Key Transfer template
39
- And the SENDER chooses an origin wallet address and concealed destination address
40
- And he locks away the secret BTC signing key
41
- When the SENDER transfers the Vault-Tree contract to the RECEIVER
42
- Then the RECEIVER can access the origin wallet address
43
- When the SENDER reveals the hidden wallet address by Blockchain payment from the origin address
44
- Then the RECEIVER can unlock the vault to recover the transfered signing key
@@ -1,4 +0,0 @@
1
- # encoding: utf-8
2
- require 'json'
3
- require 'rbnacl'
4
- require 'require_all'
@@ -1,2 +0,0 @@
1
- lib = VaultTree::PathHelpers.lib_dir
2
- require_all "#{lib}/**/*.rb"
@@ -1,31 +0,0 @@
1
- module VaultTree
2
- module LockSmith
3
- class AsymmetricCipher
4
-
5
- def encrypt(opts)
6
- crypto_box(opts[:public_key],opts[:secret_key]).box(opts[:plain_text], :base64)
7
- end
8
-
9
- def decrypt(opts)
10
- crypto_box(opts[:public_key],opts[:secret_key]).open(opts[:cipher_text], :base64)
11
- end
12
-
13
- private
14
-
15
- def crypto_box(public_key,private_key)
16
- pub = public_key_object(public_key)
17
- pri = private_key_object(private_key)
18
- box = Crypto::Box.new(pub,pri, :base64)
19
- Crypto::RandomNonceBox.new(box)
20
- end
21
-
22
- def private_key_object(pri_key)
23
- Crypto::PrivateKey.new(pri_key,:base64)
24
- end
25
-
26
- def public_key_object(pub_key)
27
- Crypto::PublicKey.new(pub_key,:base64)
28
- end
29
- end
30
- end
31
- end
@@ -1,11 +0,0 @@
1
- module VaultTree
2
- module LockSmith
3
- class CryptoHash
4
-
5
- def self.compute(data)
6
- Crypto::Hash.sha256("#{data}", :base64)
7
- end
8
-
9
- end
10
- end
11
- end
@@ -1,32 +0,0 @@
1
- module VaultTree
2
- module LockSmith
3
- class DigitalSignature
4
- attr_reader :signing_key, :verify_key, :message, :signature
5
-
6
- def initialize(opts = {})
7
- @message = opts[:message]
8
- @signing_key = opts[:signing_key]
9
- @verify_key = opts[:verify_key]
10
- @signature = opts[:signature]
11
- end
12
-
13
- def generate
14
- sig_generator.sign(message, :base64)
15
- end
16
-
17
- def verify
18
- sig_verifier.verify(@message, @signature, :base64)
19
- end
20
-
21
- private
22
-
23
- def sig_generator
24
- Crypto::SigningKey.new(signing_key, :base64)
25
- end
26
-
27
- def sig_verifier
28
- Crypto::VerifyKey.new(verify_key, :base64)
29
- end
30
- end
31
- end
32
- end
@@ -1,25 +0,0 @@
1
- module VaultTree
2
- module LockSmith
3
- class EncryptionKeyPair
4
-
5
- def generate_private_key
6
- Crypto::PrivateKey.generate.to_s(:base64)
7
- end
8
-
9
- def public_key(pk)
10
- lib_public_key(pk).to_s(:base64)
11
- end
12
-
13
- private
14
-
15
- def lib_private_key(s)
16
- Crypto::PrivateKey.new(s,:base64)
17
- end
18
-
19
- def lib_public_key(pk)
20
- lib_private_key(pk).public_key
21
- end
22
-
23
- end
24
- end
25
- end
@@ -1,11 +0,0 @@
1
- module VaultTree
2
- module LockSmith
3
- class RandomNumber
4
-
5
- def self.compute
6
- CryptoHash.compute rand(1000000000000)
7
- end
8
-
9
- end
10
- end
11
- end
@@ -1,12 +0,0 @@
1
- module VaultTree
2
- module LockSmith
3
- class SharedKeyPair
4
- attr_reader :public_key, :secret_key
5
-
6
- def initialize(opts)
7
- @public_key = opts[:public_key]
8
- @secret_key = opts[:secret_key]
9
- end
10
- end
11
- end
12
- end
@@ -1,25 +0,0 @@
1
- module VaultTree
2
- module LockSmith
3
- class SigningKeyPair
4
-
5
- def signing_key
6
- lib_signing_key.to_s(:base64)
7
- end
8
-
9
- def verify_key
10
- lib_verify_key.to_s(:base64)
11
- end
12
-
13
- private
14
-
15
- def lib_signing_key
16
- @lib_signing_key ||= Crypto::SigningKey.generate
17
- end
18
-
19
- def lib_verify_key
20
- lib_signing_key.verify_key
21
- end
22
-
23
- end
24
- end
25
- end
@@ -1,25 +0,0 @@
1
- module VaultTree
2
- module LockSmith
3
- class SymmetricCipher
4
-
5
- def encrypt(opts = {})
6
- key = CryptoHash.compute(opts[:key])
7
- plain_text = opts[:plain_text]
8
- box_from_key(key).box(plain_text, :base64)
9
- end
10
-
11
- def decrypt(opts = {})
12
- key = CryptoHash.compute(opts[:key])
13
- cipher_text = opts[:cipher_text]
14
- box_from_key(key).open(cipher_text , :base64)
15
- end
16
-
17
- private
18
-
19
- def box_from_key(key)
20
- sb = Crypto::SecretBox.new(key,:base64)
21
- rnb = Crypto::RandomNonceBox.new(sb)
22
- end
23
- end
24
- end
25
- end
@@ -1,25 +0,0 @@
1
- require 'spec_helper'
2
-
3
- module VaultTree
4
- describe 'AsymmetricCipher' do
5
-
6
- before :each do
7
- alice_key_pair = LockSmith::EncryptionKeyPair.new
8
- @alice_priv_key = alice_key_pair.generate_private_key
9
- @alice_pub_key = alice_key_pair.public_key(@alice_priv_key)
10
- bob_key_pair = LockSmith::EncryptionKeyPair.new
11
- @bob_priv_key = bob_key_pair.generate_private_key
12
- @bob_pub_key = bob_key_pair.public_key(@bob_priv_key)
13
- @message = 'ENCRYPT_ME!'
14
- @asymmetric_cipher = LockSmith::AsymmetricCipher.new
15
- end
16
-
17
- describe '#encrypt | #decrypt' do
18
- it 'Bob can encrypt with alice pub key and Alice can decrypt' do
19
- cipher_text = @asymmetric_cipher.encrypt(public_key: @alice_pub_key, secret_key: @bob_priv_key, plain_text: @message)
20
- plain_text = @asymmetric_cipher.decrypt(public_key: @bob_pub_key, secret_key: @alice_priv_key, cipher_text: cipher_text)
21
- plain_text.should == @message
22
- end
23
- end
24
- end
25
- end
@@ -1,22 +0,0 @@
1
- require 'spec_helper'
2
- module VaultTree
3
- module LockSmith
4
-
5
- describe 'SigningKeyPair' do
6
- describe '#new' do
7
-
8
- before :each do
9
- @signing_key_pair = SigningKeyPair.new
10
- end
11
-
12
- it 'generates a new private key' do
13
- @signing_key_pair.signing_key.should be_an_instance_of(String)
14
- end
15
-
16
- it 'generates a new public key' do
17
- @signing_key_pair.verify_key.should be_an_instance_of(String)
18
- end
19
- end
20
- end
21
- end
22
- end
@@ -1,5 +0,0 @@
1
- require_relative '../lib/vault-tree'
2
-
3
- RSpec.configure do |config|
4
- config.color_enabled = true
5
- end
@@ -1,105 +0,0 @@
1
- {
2
- "header": {},
3
- "vaults": {
4
-
5
- "bob_contract_secret":{
6
- "owner": "bob",
7
- "fill_with": "RANDOM_NUMBER",
8
- "lock_with": "MASTER_PASSPHRASE",
9
- "unlock_with": "MASTER_PASSPHRASE",
10
- "contents": ""
11
- },
12
-
13
- "alice_contract_secret":{
14
- "owner": "alice",
15
- "fill_with": "RANDOM_NUMBER",
16
- "lock_with": "MASTER_PASSPHRASE",
17
- "unlock_with": "MASTER_PASSPHRASE",
18
- "contents": ""
19
- },
20
-
21
- "alice_public_encryption_key":{
22
- "owner": "alice",
23
- "fill_with": "PUBLIC_ENCRYPTION_KEY",
24
- "lock_with": "UNLOCKED",
25
- "unlock_with": "UNLOCKED",
26
- "contents": ""
27
- },
28
-
29
- "bob_public_encryption_key":{
30
- "owner": "bob",
31
- "fill_with": "PUBLIC_ENCRYPTION_KEY",
32
- "lock_with": "UNLOCKED",
33
- "unlock_with": "UNLOCKED",
34
- "contents": ""
35
- },
36
-
37
- "alice_decryption_key":{
38
- "owner": "alice",
39
- "fill_with": "DECRYPTION_KEY",
40
- "lock_with": "VAULT_CONTENTS['alice_contract_secret']",
41
- "unlock_with": "VAULT_CONTENTS['alice_contract_secret']",
42
- "contents": ""
43
- },
44
-
45
- "bob_decryption_key":{
46
- "owner": "bob",
47
- "fill_with": "DECRYPTION_KEY",
48
- "lock_with": "VAULT_CONTENTS['bob_contract_secret']",
49
- "unlock_with": "VAULT_CONTENTS['bob_contract_secret']",
50
- "contents": ""
51
- },
52
-
53
- "congratulations_message":{
54
- "owner": "bob",
55
- "fill_with": "EXTERNAL_DATA",
56
- "lock_with": "VAULT_CONTENTS['bob_contract_secret']",
57
- "unlock_with": "VAULT_CONTENTS['bob_contract_secret']",
58
- "contents": ""
59
- },
60
-
61
- "vault_two_key":{
62
- "owner": "bob",
63
- "fill_with": "RANDOM_NUMBER",
64
- "lock_with": "VAULT_CONTENTS['bob_contract_secret']",
65
- "unlock_with": "VAULT_CONTENTS['bob_contract_secret']",
66
- "contents": ""
67
- },
68
-
69
- "vault_three_key":{
70
- "owner": "bob",
71
- "fill_with": "RANDOM_NUMBER",
72
- "lock_with": "VAULT_CONTENTS['bob_contract_secret']",
73
- "unlock_with": "VAULT_CONTENTS['bob_contract_secret']",
74
- "contents": ""
75
- },
76
-
77
- "first":{
78
- "owner": "bob",
79
- "fill_with": "VAULT_CONTENTS['vault_two_key']",
80
- "lock_with": "VAULT_CONTENTS['alice_public_encryption_key']",
81
- "unlock_with": "VAULT_CONTENTS['alice_decryption_key']",
82
- "lock_type": "ASYMMETRIC_MUTUAL_AUTH",
83
- "asym_auth_with": "VAULT_CONTENTS['bob_decryption_key']",
84
- "asym_verify_with": "VAULT_CONTENTS['bob_public_encryption_key']",
85
- "contents": ""
86
- },
87
-
88
- "second":{
89
- "owner": "bob",
90
- "fill_with": "VAULT_CONTENTS['vault_three_key']",
91
- "lock_with": "VAULT_CONTENTS['vault_two_key']",
92
- "unlock_with": "VAULT_CONTENTS['first']",
93
- "contents": ""
94
- },
95
-
96
- "third":{
97
- "owner": "bob",
98
- "fill_with": "VAULT_CONTENTS['congratulations_message']",
99
- "lock_with": "VAULT_CONTENTS['vault_three_key']",
100
- "unlock_with": "VAULT_CONTENTS['second']",
101
- "contents": ""
102
- }
103
-
104
- }
105
- }
@@ -1,227 +0,0 @@
1
- {
2
- "header": {
3
- "title":"Reference Contract 1.0.0",
4
- "description":"This is a test fixture. It is a contract built to use all Vault Tree functionality"
5
- },
6
- "vaults": {
7
-
8
- "bob_contract_secret":{
9
- "description":"contract specific password to lock private information",
10
- "fill_with": "RANDOM_NUMBER",
11
- "lock_with": "MASTER_PASSPHRASE",
12
- "unlock_with": "MASTER_PASSPHRASE",
13
- "contents": ""
14
- },
15
-
16
- "alice_contract_secret":{
17
- "description":"contract specific password to lock private information",
18
- "fill_with": "RANDOM_NUMBER",
19
- "lock_with": "MASTER_PASSPHRASE",
20
- "unlock_with": "MASTER_PASSPHRASE",
21
- "contents": ""
22
- },
23
-
24
- "alice_public_encryption_key":{
25
- "description":"public key for asymmetric encryption",
26
- "fill_with": "PUBLIC_ENCRYPTION_KEY['alice_decryption_key']",
27
- "lock_with": "UNLOCKED",
28
- "unlock_with": "UNLOCKED",
29
- "contents": ""
30
- },
31
-
32
- "bob_public_encryption_key":{
33
- "description":"public key for asymmetric encryption",
34
- "fill_with": "PUBLIC_ENCRYPTION_KEY['bob_decryption_key']",
35
- "lock_with": "UNLOCKED",
36
- "unlock_with": "UNLOCKED",
37
- "contents": ""
38
- },
39
-
40
- "alice_decryption_key":{
41
- "description":"private key for asymmetric decryption",
42
- "fill_with": "DECRYPTION_KEY",
43
- "lock_with": "CONTENTS['alice_contract_secret']",
44
- "unlock_with": "CONTENTS['alice_contract_secret']",
45
- "contents": ""
46
- },
47
-
48
- "bob_decryption_key":{
49
- "description":"private key for asymmetric decryption",
50
- "fill_with": "DECRYPTION_KEY",
51
- "lock_with": "CONTENTS['bob_contract_secret']",
52
- "unlock_with": "CONTENTS['bob_contract_secret']",
53
- "contents": ""
54
- },
55
-
56
- "congratulations_message":{
57
- "description":"A simple message for Bob to put in the final vault",
58
- "fill_with": "EXTERNAL_DATA",
59
- "lock_with": "CONTENTS['bob_contract_secret']",
60
- "unlock_with": "CONTENTS['bob_contract_secret']",
61
- "contents": ""
62
- },
63
-
64
- "vault_two_key":{
65
- "description":"Key to lock vault two. Once Bob locks the second vault he will put this key inside vault one.",
66
- "fill_with": "RANDOM_NUMBER",
67
- "lock_with": "CONTENTS['bob_contract_secret']",
68
- "unlock_with": "CONTENTS['bob_contract_secret']",
69
- "contents": ""
70
- },
71
-
72
- "vault_three_key":{
73
- "description":"Key to lock vault three. Once Bob locks the third vault he will put this key inside vault two.",
74
- "fill_with": "RANDOM_NUMBER",
75
- "lock_with": "CONTENTS['bob_contract_secret']",
76
- "unlock_with": "CONTENTS['bob_contract_secret']",
77
- "contents": ""
78
- },
79
-
80
- "first":{
81
- "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.",
82
- "fill_with": "CONTENTS['vault_two_key']",
83
- "lock_with": "SHARED_KEY['alice_public_encryption_key','bob_decryption_key']",
84
- "unlock_with": "SHARED_KEY['bob_public_encryption_key','alice_decryption_key']",
85
- "contents": ""
86
- },
87
-
88
- "second":{
89
- "description":"Alice unlocks this vault with the key held in the first vault.",
90
- "fill_with": "CONTENTS['vault_three_key']",
91
- "lock_with": "CONTENTS['vault_two_key']",
92
- "unlock_with": "CONTENTS['first']",
93
- "contents": ""
94
- },
95
-
96
- "third":{
97
- "description":"Contains a simple message. Unlock the key found in the second vault.",
98
- "fill_with": "CONTENTS['congratulations_message']",
99
- "lock_with": "CONTENTS['vault_three_key']",
100
- "unlock_with": "CONTENTS['second']",
101
- "contents": ""
102
- },
103
-
104
- "sender_btc_signing_key":{
105
- "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.",
106
- "fill_with": "EXTERNAL_DATA",
107
- "lock_with": "CONTENTS['sender_concealed_destination_wallet_address']",
108
- "unlock_with": "CONTENTS['receiver_revealed_destination_wallet_address']",
109
- "contents": ""
110
- },
111
-
112
- "sender_origin_wallet_address":{
113
- "description":"SENDER origin wallet address. Chosen by SENDER and known in advance to RECEIVER.",
114
- "fill_with": "EXTERNAL_DATA",
115
- "lock_with": "UNLOCKED",
116
- "unlock_with": "UNLOCKED",
117
- "contents": ""
118
- },
119
-
120
- "sender_concealed_destination_wallet_address":{
121
- "description":"SENDER concealed copy of the destination wallet address. This wallet address is kept secret until SENDER chosed to transfer BTC to it",
122
- "fill_with": "EXTERNAL_DATA",
123
- "lock_with": "CONTENTS['sender_secret']",
124
- "unlock_with": "CONTENTS['sender_secret']",
125
- "contents": ""
126
- },
127
-
128
- "receiver_revealed_destination_wallet_address":{
129
- "description":"RECEIVER monitors the Block Chain and fills this vault with the newly revealied destination address.",
130
- "fill_with": "EXTERNAL_DATA",
131
- "lock_with": "CONTENTS['receiver_secret']",
132
- "unlock_with": "CONTENTS['receiver_secret']",
133
- "contents": ""
134
- },
135
-
136
- "receiver_secret":{
137
- "fill_with": "RANDOM_NUMBER",
138
- "lock_with": "MASTER_PASSPHRASE",
139
- "unlock_with": "MASTER_PASSPHRASE",
140
- "contents": ""
141
- },
142
-
143
- "sender_secret":{
144
- "description":"Contract specific password for SENDER. Used to Lock the SENDER private information.",
145
- "fill_with": "RANDOM_NUMBER",
146
- "lock_with": "MASTER_PASSPHRASE",
147
- "unlock_with": "MASTER_PASSPHRASE",
148
- "contents": ""
149
- },
150
-
151
-
152
- "message":{
153
- "description":"Vault with a simple message.",
154
- "fill_with": "EXTERNAL_DATA",
155
- "lock_with": "MASTER_PASSPHRASE",
156
- "unlock_with": "MASTER_PASSPHRASE",
157
- "contents": ""
158
- },
159
-
160
- "random_vault_key":{
161
- "description":"Random Number",
162
- "fill_with": "RANDOM_NUMBER",
163
- "lock_with": "MASTER_PASSPHRASE",
164
- "unlock_with": "MASTER_PASSPHRASE",
165
- "contents": ""
166
- },
167
-
168
- "message_locked_with_random":{
169
- "description":"A simple message locked with a random number",
170
- "fill_with": "EXTERNAL_DATA",
171
- "lock_with": "CONTENTS['random_vault_key']",
172
- "unlock_with": "CONTENTS['random_vault_key']",
173
- "contents": ""
174
- },
175
-
176
- "message_locked_with_unlocked_random_number":{
177
- "fill_with": "CONTENTS['message_locked_with_random']",
178
- "lock_with": "CONTENTS['unlocked_random_key']",
179
- "unlock_with": "CONTENTS['unlocked_random_key']",
180
- "contents": ""
181
- },
182
-
183
- "unlocked_random_key":{
184
- "description":"An unlocked random key",
185
- "fill_with": "CONTENTS['random_vault_key']",
186
- "lock_with": "UNLOCKED",
187
- "unlock_with": "UNLOCKED",
188
- "contents": ""
189
- },
190
-
191
- "another_decryption_key":{
192
- "fill_with": "DECRYPTION_KEY",
193
- "lock_with": "MASTER_PASSPHRASE",
194
- "unlock_with": "MASTER_PASSPHRASE",
195
- "contents": ""
196
- },
197
-
198
- "another_public_key":{
199
- "fill_with": "PUBLIC_ENCRYPTION_KEY['another_decryption_key']",
200
- "lock_with": "UNLOCKED",
201
- "unlock_with": "UNLOCKED",
202
- "contents": ""
203
- },
204
-
205
- "my_decryption_key":{
206
- "fill_with": "DECRYPTION_KEY",
207
- "lock_with": "MASTER_PASSPHRASE",
208
- "unlock_with": "MASTER_PASSPHRASE",
209
- "contents": ""
210
- },
211
-
212
- "my_public_key":{
213
- "fill_with": "PUBLIC_ENCRYPTION_KEY['my_decryption_key']",
214
- "lock_with": "UNLOCKED",
215
- "unlock_with": "UNLOCKED",
216
- "contents": ""
217
- },
218
-
219
- "asymmetric_message":{
220
- "fill_with": "EXTERNAL_DATA",
221
- "lock_with": "SHARED_KEY['another_public_key','my_decryption_key']",
222
- "unlock_with": "SHARED_KEY['my_public_key','another_decryption_key']",
223
- "contents": ""
224
- }
225
-
226
- }
227
- }