tapyrus 0.3.4 → 0.3.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (115) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +1 -1
  3. data/{.prettierrc.yaml → .prettierrc.yml} +0 -1
  4. data/.ruby-version +1 -1
  5. data/Gemfile +2 -2
  6. data/README.md +1 -1
  7. data/Rakefile +2 -2
  8. data/exe/tapyrus-script-debugger +5 -5
  9. data/exe/tapyrusrb-cli +1 -1
  10. data/exe/tapyrusrbd +18 -17
  11. data/lib/openassets/payload.rb +2 -2
  12. data/lib/openassets/util.rb +2 -2
  13. data/lib/openassets.rb +4 -4
  14. data/lib/schnorr/sign_to_contract.rb +4 -4
  15. data/lib/schnorr/signature.rb +5 -5
  16. data/lib/schnorr.rb +14 -14
  17. data/lib/tapyrus/base58.rb +8 -8
  18. data/lib/tapyrus/bip175.rb +5 -5
  19. data/lib/tapyrus/block_header.rb +2 -2
  20. data/lib/tapyrus/bloom_filter.rb +1 -1
  21. data/lib/tapyrus/chain_params.rb +5 -5
  22. data/lib/tapyrus/constants.rb +1 -1
  23. data/lib/tapyrus/errors.rb +9 -9
  24. data/lib/tapyrus/ext/ecdsa.rb +4 -4
  25. data/lib/tapyrus/ext/json_parser.rb +1 -1
  26. data/lib/tapyrus/ext.rb +3 -3
  27. data/lib/tapyrus/ext_key.rb +21 -21
  28. data/lib/tapyrus/jws.rb +76 -0
  29. data/lib/tapyrus/key.rb +48 -20
  30. data/lib/tapyrus/key_path.rb +3 -3
  31. data/lib/tapyrus/logger.rb +4 -11
  32. data/lib/tapyrus/merkle_tree.rb +1 -1
  33. data/lib/tapyrus/message/addr.rb +2 -2
  34. data/lib/tapyrus/message/base.rb +2 -2
  35. data/lib/tapyrus/message/block.rb +1 -1
  36. data/lib/tapyrus/message/block_txn.rb +1 -1
  37. data/lib/tapyrus/message/cmpct_block.rb +1 -1
  38. data/lib/tapyrus/message/fee_filter.rb +3 -3
  39. data/lib/tapyrus/message/filter_add.rb +1 -1
  40. data/lib/tapyrus/message/filter_clear.rb +2 -2
  41. data/lib/tapyrus/message/filter_load.rb +7 -7
  42. data/lib/tapyrus/message/get_addr.rb +2 -2
  43. data/lib/tapyrus/message/get_block_txn.rb +1 -1
  44. data/lib/tapyrus/message/get_blocks.rb +1 -1
  45. data/lib/tapyrus/message/get_data.rb +1 -1
  46. data/lib/tapyrus/message/get_headers.rb +1 -1
  47. data/lib/tapyrus/message/header_and_short_ids.rb +6 -6
  48. data/lib/tapyrus/message/headers.rb +1 -1
  49. data/lib/tapyrus/message/headers_parser.rb +2 -2
  50. data/lib/tapyrus/message/inv.rb +1 -1
  51. data/lib/tapyrus/message/inventory.rb +3 -3
  52. data/lib/tapyrus/message/mem_pool.rb +2 -2
  53. data/lib/tapyrus/message/merkle_block.rb +3 -3
  54. data/lib/tapyrus/message/network_addr.rb +9 -9
  55. data/lib/tapyrus/message/not_found.rb +1 -1
  56. data/lib/tapyrus/message/ping.rb +3 -3
  57. data/lib/tapyrus/message/pong.rb +3 -3
  58. data/lib/tapyrus/message/reject.rb +6 -6
  59. data/lib/tapyrus/message/send_cmpct.rb +4 -4
  60. data/lib/tapyrus/message/send_headers.rb +2 -2
  61. data/lib/tapyrus/message/tx.rb +1 -1
  62. data/lib/tapyrus/message/ver_ack.rb +2 -2
  63. data/lib/tapyrus/message/version.rb +7 -7
  64. data/lib/tapyrus/message.rb +37 -37
  65. data/lib/tapyrus/mnemonic.rb +18 -16
  66. data/lib/tapyrus/network/connection.rb +2 -2
  67. data/lib/tapyrus/network/message_handler.rb +11 -11
  68. data/lib/tapyrus/network/peer.rb +1 -1
  69. data/lib/tapyrus/network/peer_discovery.rb +1 -1
  70. data/lib/tapyrus/network/pool.rb +4 -4
  71. data/lib/tapyrus/network.rb +6 -6
  72. data/lib/tapyrus/node/cli.rb +34 -34
  73. data/lib/tapyrus/node/configuration.rb +3 -3
  74. data/lib/tapyrus/node/spv.rb +2 -2
  75. data/lib/tapyrus/node.rb +3 -3
  76. data/lib/tapyrus/opcodes.rb +7 -7
  77. data/lib/tapyrus/out_point.rb +2 -2
  78. data/lib/tapyrus/rpc/http_server.rb +6 -6
  79. data/lib/tapyrus/rpc/request_handler.rb +5 -5
  80. data/lib/tapyrus/rpc/tapyrus_core_client.rb +10 -10
  81. data/lib/tapyrus/rpc.rb +4 -4
  82. data/lib/tapyrus/script/color.rb +3 -3
  83. data/lib/tapyrus/script/debugger.rb +9 -9
  84. data/lib/tapyrus/script/multisig.rb +2 -2
  85. data/lib/tapyrus/script/script.rb +28 -28
  86. data/lib/tapyrus/script/script_error.rb +42 -42
  87. data/lib/tapyrus/script/script_interpreter.rb +9 -9
  88. data/lib/tapyrus/script/tx_checker.rb +2 -2
  89. data/lib/tapyrus/secp256k1/native.rb +23 -23
  90. data/lib/tapyrus/secp256k1/rfc6979.rb +7 -7
  91. data/lib/tapyrus/secp256k1/ruby.rb +2 -2
  92. data/lib/tapyrus/secp256k1.rb +3 -3
  93. data/lib/tapyrus/slip39/share.rb +7 -7
  94. data/lib/tapyrus/slip39/sss.rb +24 -24
  95. data/lib/tapyrus/slip39.rb +514 -37
  96. data/lib/tapyrus/store/db/level_db.rb +2 -2
  97. data/lib/tapyrus/store/db.rb +1 -1
  98. data/lib/tapyrus/store/spv_chain.rb +7 -7
  99. data/lib/tapyrus/store.rb +3 -3
  100. data/lib/tapyrus/tip0137.rb +201 -0
  101. data/lib/tapyrus/tx.rb +12 -12
  102. data/lib/tapyrus/tx_builder.rb +3 -3
  103. data/lib/tapyrus/tx_in.rb +3 -3
  104. data/lib/tapyrus/tx_out.rb +3 -3
  105. data/lib/tapyrus/util.rb +21 -21
  106. data/lib/tapyrus/validation.rb +9 -9
  107. data/lib/tapyrus/version.rb +1 -1
  108. data/lib/tapyrus/wallet/account.rb +12 -12
  109. data/lib/tapyrus/wallet/base.rb +9 -8
  110. data/lib/tapyrus/wallet/db.rb +11 -11
  111. data/lib/tapyrus/wallet/master_key.rb +13 -13
  112. data/lib/tapyrus/wallet.rb +4 -4
  113. data/lib/tapyrus.rb +62 -59
  114. data/tapyrusrb.gemspec +33 -31
  115. metadata +30 -14
@@ -1,4 +1,4 @@
1
- require 'securerandom'
1
+ require "securerandom"
2
2
 
3
3
  module Tapyrus
4
4
  module SLIP39
@@ -31,33 +31,33 @@ module Tapyrus
31
31
  # @param [String] secret master secret with hex format.
32
32
  # @param [String] passphrase the passphrase used for encryption/decryption.
33
33
  # @return [Array[Array[Tapyrus::SLIP39::Share]]] array of group shares.
34
- def self.setup_shares(groups: [], group_threshold: nil, exp: 0, secret: nil, passphrase: '')
35
- raise ArgumentError, 'Groups is empty.' if groups.empty?
36
- raise ArgumentError, 'Group threshold must be greater than 0.' if group_threshold.nil? || group_threshold < 1
37
- raise ArgumentError, 'Master secret does not specified.' unless secret
34
+ def self.setup_shares(groups: [], group_threshold: nil, exp: 0, secret: nil, passphrase: "")
35
+ raise ArgumentError, "Groups is empty." if groups.empty?
36
+ raise ArgumentError, "Group threshold must be greater than 0." if group_threshold.nil? || group_threshold < 1
37
+ raise ArgumentError, "Master secret does not specified." unless secret
38
38
  if (secret.htb.bytesize * 8) < MIN_STRENGTH_BITS
39
39
  raise ArgumentError,
40
40
  "The length of the master secret (#{secret.htb.bytesize} bytes) must be at least #{MIN_STRENGTH_BITS / 8} bytes."
41
41
  end
42
42
  unless secret.bytesize.even?
43
- raise ArgumentError, 'The length of the master secret in bytes must be an even number.'
43
+ raise ArgumentError, "The length of the master secret in bytes must be an even number."
44
44
  end
45
45
  unless passphrase.ascii_only?
46
- raise ArgumentError, 'The passphrase must contain only printable ASCII characters (code points 32-126).'
46
+ raise ArgumentError, "The passphrase must contain only printable ASCII characters (code points 32-126)."
47
47
  end
48
48
  if group_threshold > groups.length
49
49
  raise ArgumentError,
50
50
  "The requested group threshold (#{group_threshold}) must not exceed the number of groups (#{groups.length})."
51
51
  end
52
52
  groups.each do |threshold, count|
53
- raise ArgumentError, 'Group threshold must be greater than 0.' if threshold.nil? || threshold < 1
53
+ raise ArgumentError, "Group threshold must be greater than 0." if threshold.nil? || threshold < 1
54
54
  if threshold > count
55
55
  raise ArgumentError,
56
56
  "The requested member threshold (#{threshold}) must not exceed the number of share (#{count})."
57
57
  end
58
58
  if threshold == 1 && count > 1
59
59
  raise ArgumentError,
60
- 'Creating multiple member shares with member threshold 1 is not allowed. Use 1-of-1 member sharing instead.'
60
+ "Creating multiple member shares with member threshold 1 is not allowed. Use 1-of-1 member sharing instead."
61
61
  end
62
62
  end
63
63
 
@@ -97,8 +97,8 @@ module Tapyrus
97
97
  # @param [Array[Tapyrus::SLIP30::Share]] shares an array of shares.
98
98
  # @param [String] passphrase the passphrase using decrypt master secret.
99
99
  # @return [String] a master secret.
100
- def self.recover_secret(shares, passphrase: '')
101
- raise ArgumentError, 'share is empty.' if shares.nil? || shares.empty?
100
+ def self.recover_secret(shares, passphrase: "")
101
+ raise ArgumentError, "share is empty." if shares.nil? || shares.empty?
102
102
  groups = {}
103
103
  id = shares[0].id
104
104
  exp = shares[0].iteration_exp
@@ -106,15 +106,15 @@ module Tapyrus
106
106
  group_count = shares.first.group_count
107
107
 
108
108
  shares.each do |share|
109
- raise ArgumentError, 'Invalid set of shares. All shares must have the same id.' unless id == share.id
109
+ raise ArgumentError, "Invalid set of shares. All shares must have the same id." unless id == share.id
110
110
  unless group_threshold == share.group_threshold
111
- raise ArgumentError, 'Invalid set of shares. All shares must have the same group threshold.'
111
+ raise ArgumentError, "Invalid set of shares. All shares must have the same group threshold."
112
112
  end
113
113
  unless group_count == share.group_count
114
- raise ArgumentError, 'Invalid set of shares. All shares must have the same group count.'
114
+ raise ArgumentError, "Invalid set of shares. All shares must have the same group count."
115
115
  end
116
116
  unless exp == share.iteration_exp
117
- raise ArgumentError, 'Invalid set of shares. All Shares must have the same iteration exponent.'
117
+ raise ArgumentError, "Invalid set of shares. All Shares must have the same iteration exponent."
118
118
  end
119
119
  groups[share.group_index] ||= []
120
120
  groups[share.group_index] << share
@@ -134,16 +134,16 @@ module Tapyrus
134
134
  x_coordinates = []
135
135
  shares.each do |share|
136
136
  unless member_threshold == share.member_threshold
137
- raise ArgumentError, 'Invalid set of shares. All shares in a group must have the same member threshold.'
137
+ raise ArgumentError, "Invalid set of shares. All shares in a group must have the same member threshold."
138
138
  end
139
139
  unless value_length == share.value.length
140
- raise ArgumentError, 'Invalid set of shares. All share values must have the same length.'
140
+ raise ArgumentError, "Invalid set of shares. All share values must have the same length."
141
141
  end
142
142
  x_coordinates << share.member_index
143
143
  end
144
144
  x_coordinates.uniq!
145
145
  unless x_coordinates.size == shares.size
146
- raise ArgumentError, 'Invalid set of shares. Share indices must be unique.'
146
+ raise ArgumentError, "Invalid set of shares. Share indices must be unique."
147
147
  end
148
148
  interpolate_shares = shares.map { |s| [s.member_index, s.value] }
149
149
 
@@ -151,7 +151,7 @@ module Tapyrus
151
151
  digest_value = interpolate(interpolate_shares, DIGEST_INDEX).htb
152
152
  digest, random_value = digest_value[0...DIGEST_LENGTH_BYTES].bth, digest_value[DIGEST_LENGTH_BYTES..-1].bth
153
153
  recover_digest = create_digest(secret, random_value)
154
- raise ArgumentError, 'Invalid digest of the shared secret.' unless digest == recover_digest
154
+ raise ArgumentError, "Invalid digest of the shared secret." unless digest == recover_digest
155
155
 
156
156
  group_shares[group_index] = secret
157
157
  end
@@ -169,7 +169,7 @@ module Tapyrus
169
169
  digest_value = interpolate(interpolate_shares, DIGEST_INDEX).htb
170
170
  digest, random_value = digest_value[0...DIGEST_LENGTH_BYTES].bth, digest_value[DIGEST_LENGTH_BYTES..-1].bth
171
171
  recover_digest = create_digest(secret, random_value)
172
- raise ArgumentError, 'Invalid digest of the shared secret.' unless digest == recover_digest
172
+ raise ArgumentError, "Invalid digest of the shared secret." unless digest == recover_digest
173
173
 
174
174
  decrypt(secret, passphrase, exp, id)
175
175
  end
@@ -186,7 +186,7 @@ module Tapyrus
186
186
 
187
187
  log_prod = shares.sum { |s| LOG_TABLE[s[0] ^ x] }
188
188
 
189
- result = ('00' * shares.first[1].length).htb
189
+ result = ("00" * shares.first[1].length).htb
190
190
  shares.each do |share|
191
191
  log_basis_eval = (log_prod - LOG_TABLE[share[0] ^ x] - shares.sum { |s| LOG_TABLE[share[0] ^ s[0]] }) % 255
192
192
  result =
@@ -213,7 +213,7 @@ module Tapyrus
213
213
  salt = get_salt(id)
214
214
  e = (Tapyrus::SLIP39::BASE_ITERATION_COUNT << exp) / Tapyrus::SLIP39::ROUND_COUNT
215
215
  Tapyrus::SLIP39::ROUND_COUNT.times.to_a.reverse.each do |i|
216
- f = OpenSSL::PKCS5.pbkdf2_hmac((i.itb + passphrase), salt + r, e, r.bytesize, 'sha256')
216
+ f = OpenSSL::PKCS5.pbkdf2_hmac((i.itb + passphrase), salt + r, e, r.bytesize, "sha256")
217
217
  l, r = padding_zero(r, r.bytesize), padding_zero((l.bti ^ f.bti).itb, r.bytesize)
218
218
  end
219
219
  (r + l).bth
@@ -231,7 +231,7 @@ module Tapyrus
231
231
  salt = get_salt(id)
232
232
  e = (Tapyrus::SLIP39::BASE_ITERATION_COUNT << exp) / Tapyrus::SLIP39::ROUND_COUNT
233
233
  Tapyrus::SLIP39::ROUND_COUNT.times.to_a.each do |i|
234
- f = OpenSSL::PKCS5.pbkdf2_hmac((i.itb + passphrase), salt + r, e, r.bytesize, 'sha256')
234
+ f = OpenSSL::PKCS5.pbkdf2_hmac((i.itb + passphrase), salt + r, e, r.bytesize, "sha256")
235
235
  l, r = padding_zero(r, r.bytesize), padding_zero((l.bti ^ f.bti).itb, r.bytesize)
236
236
  end
237
237
  (r + l).bth
@@ -250,7 +250,7 @@ module Tapyrus
250
250
  # @param [Integer] id id
251
251
  # @return [String] salt with binary format.
252
252
  def self.get_salt(id)
253
- (Tapyrus::SLIP39::CUSTOMIZATION_STRING.pack('c*') + id.itb)
253
+ (Tapyrus::SLIP39::CUSTOMIZATION_STRING.pack("c*") + id.itb)
254
254
  end
255
255
 
256
256
  # Split the share into +count+ with threshold +threshold+.
@@ -37,7 +37,7 @@ module Tapyrus
37
37
  DIGEST_LENGTH_BYTES = 4
38
38
 
39
39
  # The customization string used in the RS1024 checksum and in the PBKDF2 salt.
40
- CUSTOMIZATION_STRING = 'shamir'.bytes
40
+ CUSTOMIZATION_STRING = "shamir".bytes
41
41
 
42
42
  # The length of the mnemonic in words without the share value.
43
43
  METADATA_LENGTH_WORDS = ID_EXP_LENGTH_WORDS + 2 + CHECKSUM_LENGTH_WORDS
@@ -62,47 +62,524 @@ module Tapyrus
62
62
 
63
63
  # prettier-ignore
64
64
  EXP_TABLE = [
65
- 1, 3, 5, 15, 17, 51, 85, 255, 26, 46, 114, 150, 161, 248, 19,
66
- 53, 95, 225, 56, 72, 216, 115, 149, 164, 247, 2, 6, 10, 30, 34,
67
- 102, 170, 229, 52, 92, 228, 55, 89, 235, 38, 106, 190, 217, 112, 144,
68
- 171, 230, 49, 83, 245, 4, 12, 20, 60, 68, 204, 79, 209, 104, 184,
69
- 211, 110, 178, 205, 76, 212, 103, 169, 224, 59, 77, 215, 98, 166, 241,
70
- 8, 24, 40, 120, 136, 131, 158, 185, 208, 107, 189, 220, 127, 129, 152,
71
- 179, 206, 73, 219, 118, 154, 181, 196, 87, 249, 16, 48, 80, 240, 11,
72
- 29, 39, 105, 187, 214, 97, 163, 254, 25, 43, 125, 135, 146, 173, 236,
73
- 47, 113, 147, 174, 233, 32, 96, 160, 251, 22, 58, 78, 210, 109, 183,
74
- 194, 93, 231, 50, 86, 250, 21, 63, 65, 195, 94, 226, 61, 71, 201,
75
- 64, 192, 91, 237, 44, 116, 156, 191, 218, 117, 159, 186, 213, 100, 172,
76
- 239, 42, 126, 130, 157, 188, 223, 122, 142, 137, 128, 155, 182, 193, 88,
77
- 232, 35, 101, 175, 234, 37, 111, 177, 200, 67, 197, 84, 252, 31, 33,
78
- 99, 165, 244, 7, 9, 27, 45, 119, 153, 176, 203, 70, 202, 69, 207,
79
- 74, 222, 121, 139, 134, 145, 168, 227, 62, 66, 198, 81, 243, 14, 18,
80
- 54, 90, 238, 41, 123, 141, 140, 143, 138, 133, 148, 167, 242, 13, 23,
81
- 57, 75, 221, 124, 132, 151, 162, 253, 28, 36, 108, 180, 199, 82, 246
65
+ 1,
66
+ 3,
67
+ 5,
68
+ 15,
69
+ 17,
70
+ 51,
71
+ 85,
72
+ 255,
73
+ 26,
74
+ 46,
75
+ 114,
76
+ 150,
77
+ 161,
78
+ 248,
79
+ 19,
80
+ 53,
81
+ 95,
82
+ 225,
83
+ 56,
84
+ 72,
85
+ 216,
86
+ 115,
87
+ 149,
88
+ 164,
89
+ 247,
90
+ 2,
91
+ 6,
92
+ 10,
93
+ 30,
94
+ 34,
95
+ 102,
96
+ 170,
97
+ 229,
98
+ 52,
99
+ 92,
100
+ 228,
101
+ 55,
102
+ 89,
103
+ 235,
104
+ 38,
105
+ 106,
106
+ 190,
107
+ 217,
108
+ 112,
109
+ 144,
110
+ 171,
111
+ 230,
112
+ 49,
113
+ 83,
114
+ 245,
115
+ 4,
116
+ 12,
117
+ 20,
118
+ 60,
119
+ 68,
120
+ 204,
121
+ 79,
122
+ 209,
123
+ 104,
124
+ 184,
125
+ 211,
126
+ 110,
127
+ 178,
128
+ 205,
129
+ 76,
130
+ 212,
131
+ 103,
132
+ 169,
133
+ 224,
134
+ 59,
135
+ 77,
136
+ 215,
137
+ 98,
138
+ 166,
139
+ 241,
140
+ 8,
141
+ 24,
142
+ 40,
143
+ 120,
144
+ 136,
145
+ 131,
146
+ 158,
147
+ 185,
148
+ 208,
149
+ 107,
150
+ 189,
151
+ 220,
152
+ 127,
153
+ 129,
154
+ 152,
155
+ 179,
156
+ 206,
157
+ 73,
158
+ 219,
159
+ 118,
160
+ 154,
161
+ 181,
162
+ 196,
163
+ 87,
164
+ 249,
165
+ 16,
166
+ 48,
167
+ 80,
168
+ 240,
169
+ 11,
170
+ 29,
171
+ 39,
172
+ 105,
173
+ 187,
174
+ 214,
175
+ 97,
176
+ 163,
177
+ 254,
178
+ 25,
179
+ 43,
180
+ 125,
181
+ 135,
182
+ 146,
183
+ 173,
184
+ 236,
185
+ 47,
186
+ 113,
187
+ 147,
188
+ 174,
189
+ 233,
190
+ 32,
191
+ 96,
192
+ 160,
193
+ 251,
194
+ 22,
195
+ 58,
196
+ 78,
197
+ 210,
198
+ 109,
199
+ 183,
200
+ 194,
201
+ 93,
202
+ 231,
203
+ 50,
204
+ 86,
205
+ 250,
206
+ 21,
207
+ 63,
208
+ 65,
209
+ 195,
210
+ 94,
211
+ 226,
212
+ 61,
213
+ 71,
214
+ 201,
215
+ 64,
216
+ 192,
217
+ 91,
218
+ 237,
219
+ 44,
220
+ 116,
221
+ 156,
222
+ 191,
223
+ 218,
224
+ 117,
225
+ 159,
226
+ 186,
227
+ 213,
228
+ 100,
229
+ 172,
230
+ 239,
231
+ 42,
232
+ 126,
233
+ 130,
234
+ 157,
235
+ 188,
236
+ 223,
237
+ 122,
238
+ 142,
239
+ 137,
240
+ 128,
241
+ 155,
242
+ 182,
243
+ 193,
244
+ 88,
245
+ 232,
246
+ 35,
247
+ 101,
248
+ 175,
249
+ 234,
250
+ 37,
251
+ 111,
252
+ 177,
253
+ 200,
254
+ 67,
255
+ 197,
256
+ 84,
257
+ 252,
258
+ 31,
259
+ 33,
260
+ 99,
261
+ 165,
262
+ 244,
263
+ 7,
264
+ 9,
265
+ 27,
266
+ 45,
267
+ 119,
268
+ 153,
269
+ 176,
270
+ 203,
271
+ 70,
272
+ 202,
273
+ 69,
274
+ 207,
275
+ 74,
276
+ 222,
277
+ 121,
278
+ 139,
279
+ 134,
280
+ 145,
281
+ 168,
282
+ 227,
283
+ 62,
284
+ 66,
285
+ 198,
286
+ 81,
287
+ 243,
288
+ 14,
289
+ 18,
290
+ 54,
291
+ 90,
292
+ 238,
293
+ 41,
294
+ 123,
295
+ 141,
296
+ 140,
297
+ 143,
298
+ 138,
299
+ 133,
300
+ 148,
301
+ 167,
302
+ 242,
303
+ 13,
304
+ 23,
305
+ 57,
306
+ 75,
307
+ 221,
308
+ 124,
309
+ 132,
310
+ 151,
311
+ 162,
312
+ 253,
313
+ 28,
314
+ 36,
315
+ 108,
316
+ 180,
317
+ 199,
318
+ 82,
319
+ 246
82
320
  ]
83
321
 
84
322
  # prettier-ignore
85
323
  LOG_TABLE = [
86
- 0, 0, 25, 1, 50, 2, 26, 198, 75, 199, 27, 104, 51, 238, 223, 3,
87
- 100, 4, 224, 14, 52, 141, 129, 239, 76, 113, 8, 200, 248, 105, 28,
88
- 193, 125, 194, 29, 181, 249, 185, 39, 106, 77, 228, 166, 114, 154, 201,
89
- 9, 120, 101, 47, 138, 5, 33, 15, 225, 36, 18, 240, 130, 69, 53,
90
- 147, 218, 142, 150, 143, 219, 189, 54, 208, 206, 148, 19, 92, 210, 241,
91
- 64, 70, 131, 56, 102, 221, 253, 48, 191, 6, 139, 98, 179, 37, 226,
92
- 152, 34, 136, 145, 16, 126, 110, 72, 195, 163, 182, 30, 66, 58, 107,
93
- 40, 84, 250, 133, 61, 186, 43, 121, 10, 21, 155, 159, 94, 202, 78,
94
- 212, 172, 229, 243, 115, 167, 87, 175, 88, 168, 80, 244, 234, 214, 116,
95
- 79, 174, 233, 213, 231, 230, 173, 232, 44, 215, 117, 122, 235, 22, 11,
96
- 245, 89, 203, 95, 176, 156, 169, 81, 160, 127, 12, 246, 111, 23, 196,
97
- 73, 236, 216, 67, 31, 45, 164, 118, 123, 183, 204, 187, 62, 90, 251,
98
- 96, 177, 134, 59, 82, 161, 108, 170, 85, 41, 157, 151, 178, 135, 144,
99
- 97, 190, 220, 252, 188, 149, 207, 205, 55, 63, 91, 209, 83, 57, 132,
100
- 60, 65, 162, 109, 71, 20, 42, 158, 93, 86, 242, 211, 171, 68, 17, 146,
101
- 217, 35, 32, 46, 137, 180, 124, 184, 38, 119, 153, 227, 165, 103, 74, 237,
102
- 222, 197, 49, 254, 24, 13, 99, 140, 128, 192, 247, 112, 7
324
+ 0,
325
+ 0,
326
+ 25,
327
+ 1,
328
+ 50,
329
+ 2,
330
+ 26,
331
+ 198,
332
+ 75,
333
+ 199,
334
+ 27,
335
+ 104,
336
+ 51,
337
+ 238,
338
+ 223,
339
+ 3,
340
+ 100,
341
+ 4,
342
+ 224,
343
+ 14,
344
+ 52,
345
+ 141,
346
+ 129,
347
+ 239,
348
+ 76,
349
+ 113,
350
+ 8,
351
+ 200,
352
+ 248,
353
+ 105,
354
+ 28,
355
+ 193,
356
+ 125,
357
+ 194,
358
+ 29,
359
+ 181,
360
+ 249,
361
+ 185,
362
+ 39,
363
+ 106,
364
+ 77,
365
+ 228,
366
+ 166,
367
+ 114,
368
+ 154,
369
+ 201,
370
+ 9,
371
+ 120,
372
+ 101,
373
+ 47,
374
+ 138,
375
+ 5,
376
+ 33,
377
+ 15,
378
+ 225,
379
+ 36,
380
+ 18,
381
+ 240,
382
+ 130,
383
+ 69,
384
+ 53,
385
+ 147,
386
+ 218,
387
+ 142,
388
+ 150,
389
+ 143,
390
+ 219,
391
+ 189,
392
+ 54,
393
+ 208,
394
+ 206,
395
+ 148,
396
+ 19,
397
+ 92,
398
+ 210,
399
+ 241,
400
+ 64,
401
+ 70,
402
+ 131,
403
+ 56,
404
+ 102,
405
+ 221,
406
+ 253,
407
+ 48,
408
+ 191,
409
+ 6,
410
+ 139,
411
+ 98,
412
+ 179,
413
+ 37,
414
+ 226,
415
+ 152,
416
+ 34,
417
+ 136,
418
+ 145,
419
+ 16,
420
+ 126,
421
+ 110,
422
+ 72,
423
+ 195,
424
+ 163,
425
+ 182,
426
+ 30,
427
+ 66,
428
+ 58,
429
+ 107,
430
+ 40,
431
+ 84,
432
+ 250,
433
+ 133,
434
+ 61,
435
+ 186,
436
+ 43,
437
+ 121,
438
+ 10,
439
+ 21,
440
+ 155,
441
+ 159,
442
+ 94,
443
+ 202,
444
+ 78,
445
+ 212,
446
+ 172,
447
+ 229,
448
+ 243,
449
+ 115,
450
+ 167,
451
+ 87,
452
+ 175,
453
+ 88,
454
+ 168,
455
+ 80,
456
+ 244,
457
+ 234,
458
+ 214,
459
+ 116,
460
+ 79,
461
+ 174,
462
+ 233,
463
+ 213,
464
+ 231,
465
+ 230,
466
+ 173,
467
+ 232,
468
+ 44,
469
+ 215,
470
+ 117,
471
+ 122,
472
+ 235,
473
+ 22,
474
+ 11,
475
+ 245,
476
+ 89,
477
+ 203,
478
+ 95,
479
+ 176,
480
+ 156,
481
+ 169,
482
+ 81,
483
+ 160,
484
+ 127,
485
+ 12,
486
+ 246,
487
+ 111,
488
+ 23,
489
+ 196,
490
+ 73,
491
+ 236,
492
+ 216,
493
+ 67,
494
+ 31,
495
+ 45,
496
+ 164,
497
+ 118,
498
+ 123,
499
+ 183,
500
+ 204,
501
+ 187,
502
+ 62,
503
+ 90,
504
+ 251,
505
+ 96,
506
+ 177,
507
+ 134,
508
+ 59,
509
+ 82,
510
+ 161,
511
+ 108,
512
+ 170,
513
+ 85,
514
+ 41,
515
+ 157,
516
+ 151,
517
+ 178,
518
+ 135,
519
+ 144,
520
+ 97,
521
+ 190,
522
+ 220,
523
+ 252,
524
+ 188,
525
+ 149,
526
+ 207,
527
+ 205,
528
+ 55,
529
+ 63,
530
+ 91,
531
+ 209,
532
+ 83,
533
+ 57,
534
+ 132,
535
+ 60,
536
+ 65,
537
+ 162,
538
+ 109,
539
+ 71,
540
+ 20,
541
+ 42,
542
+ 158,
543
+ 93,
544
+ 86,
545
+ 242,
546
+ 211,
547
+ 171,
548
+ 68,
549
+ 17,
550
+ 146,
551
+ 217,
552
+ 35,
553
+ 32,
554
+ 46,
555
+ 137,
556
+ 180,
557
+ 124,
558
+ 184,
559
+ 38,
560
+ 119,
561
+ 153,
562
+ 227,
563
+ 165,
564
+ 103,
565
+ 74,
566
+ 237,
567
+ 222,
568
+ 197,
569
+ 49,
570
+ 254,
571
+ 24,
572
+ 13,
573
+ 99,
574
+ 140,
575
+ 128,
576
+ 192,
577
+ 247,
578
+ 112,
579
+ 7
103
580
  ]
104
581
 
105
- autoload :SSS, 'tapyrus/slip39/sss'
106
- autoload :Share, 'tapyrus/slip39/share'
582
+ autoload :SSS, "tapyrus/slip39/sss"
583
+ autoload :Share, "tapyrus/slip39/share"
107
584
  end
108
585
  end