tss 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c3e63f35e23f40623afd002c3cba4e7a3407dd19
4
- data.tar.gz: 54fb3ead58b69e1118e13dcd72da08705bed4276
3
+ metadata.gz: 4a1355a02a05472fa3fb4550c8c761eb70121106
4
+ data.tar.gz: 8413fbf6537db6f9d7b054e5712f54df190ca8b0
5
5
  SHA512:
6
- metadata.gz: 1c1e218fbc97f5caee8f2975ac340313104807bd12a1d68b6e47a00ea3befea35c2cdc62785f428dbddd71289a55f3cbad6656438613a43029c41b52cf4b7d9b
7
- data.tar.gz: 1a32eaaf782d3fe963451e2e1e1caff4c2fefe2e412b93ec47b8745eff6004773785fa9b9566a424ab15288b63cbc00957a547f59d7a1fa66e1c2420a423c936
6
+ metadata.gz: 8dc125e3e4abc5222ed51bfcda0d91835e19685ddfe040aefbb0632f13946e88a074e67ca3ac8412d59e4c2f7fcc4d41b69db61f05dbc90dcdd975552bc52654
7
+ data.tar.gz: bc115a9767c1fc65b16f5baaaa8cd8cbd4f5928de5351d15b71baf883e03460998cad7f451b2980ba3792a447b65f6bb3b6316652d6a91a84e50ca0e824e831a
@@ -1,2 +1 @@
1
- ��W��a��ړ(IY1���7J�H&�qn��3�M���uw F|��AY!�������N{�V[A��6�
2
- _f��u.bo4�fN�+�p��h����������&��N��r�:� �W7�H!N9)��}�T�r�؁�B"��<����פ?�L�T �?��A��j�q�p��
1
+ n�Lq{$X��X�S��i ��q���*����?]��;�Ib�|iw�Yu���\�#��X�sdq�� ��H��'W@o�7o�I]OD�`��w����-�� �쐡�nM�ʻ0>�;o�,L�Y�Qx��3��yL���(�E��޾�493 P(����Jq��6խ�=[���|�{. �,R$/���h���i���ZiZ5���Z#Wz3�p��}ef��P����Ƣ�J �" ��M��
data.tar.gz.sig CHANGED
Binary file
data/.inch.yml CHANGED
@@ -4,6 +4,4 @@ files:
4
4
  # - plugins/**/*.rb
5
5
  # define files excluded from the analysis (defaults to [])
6
6
  excluded:
7
- - lib/tss/blank.rb
8
- - lib/tss/types.rb
9
7
  - lib/tss/cli.rb
@@ -1,5 +1,10 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## v0.4.1 (9/28/2016)
4
+
5
+ * Use activesupport for blank support. Remove the extraction.
6
+ * Update sysrandom and remove the workaround needed for earlier version
7
+
3
8
  ## v0.4.0 (9/24/2016)
4
9
 
5
10
  * Breaking change to force upcasing of some addition string args
@@ -8,7 +13,7 @@
8
13
  * Remove int_commas utility method
9
14
  * Hash w/ sha256 a,b strings in secure_compare
10
15
  * Deeper Contracts integration
11
-
16
+
12
17
  ## v0.3.0 (9/24/2016)
13
18
 
14
19
  * Breaking change, identifier cannot be an empty string
@@ -103,13 +103,7 @@ module TSS
103
103
  #
104
104
  secret_bytes.each do |byte|
105
105
  # Unpack random Byte String into Byte Array of 8 bit unsigned Integers
106
- # Using a conditional test for now due to bug in sysrandom
107
- # https://github.com/cryptosphere/sysrandom/issues/13
108
- r = if threshold == 1
109
- []
110
- else
111
- SecureRandom.random_bytes(threshold - 1).unpack('C*')
112
- end
106
+ r = SecureRandom.random_bytes(threshold - 1).unpack('C*')
113
107
 
114
108
  # Build each share one byte at a time for each byte of the secret.
115
109
  shares.map! { |s| s << Util.f(s[0], [byte] + r) }
@@ -1,9 +1,9 @@
1
+ require 'active_support/core_ext/object/blank'
1
2
  require 'digest'
2
3
  require 'base64'
3
4
  require 'sysrandom/securerandom'
4
5
  require 'binary_struct'
5
6
  require 'contracts'
6
- require 'tss/blank'
7
7
  require 'tss/version'
8
8
  require 'tss/custom_contracts'
9
9
  require 'tss/util'
@@ -1,3 +1,3 @@
1
1
  module TSS
2
- VERSION = '0.4.0'.freeze
2
+ VERSION = '0.4.1'.freeze
3
3
  end
@@ -48,7 +48,8 @@ Gem::Specification.new do |spec|
48
48
  spec.executables << 'tss'
49
49
  spec.require_paths = ['lib']
50
50
 
51
- spec.add_dependency 'sysrandom', '~> 1.0'
51
+ spec.add_dependency 'activesupport', '>= 4.0.0'
52
+ spec.add_dependency 'sysrandom', '>= 1.0.3', '~> 1.0.3'
52
53
  spec.add_dependency 'contracts', '~> 0.14'
53
54
  spec.add_dependency 'binary_struct', '~> 2.1'
54
55
  spec.add_dependency 'thor', '~> 0.19'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tss
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Glenn Rempe
@@ -30,22 +30,42 @@ cert_chain:
30
30
  zieXiXZSAojfFx9g91fKdIrlPbInHU/BaCxXSLBwvOM0drE+c2ue9X8gB55XAhzX
31
31
  37oBiw==
32
32
  -----END CERTIFICATE-----
33
- date: 2016-09-25 00:00:00.000000000 Z
33
+ date: 2016-09-29 00:00:00.000000000 Z
34
34
  dependencies:
35
+ - !ruby/object:Gem::Dependency
36
+ name: activesupport
37
+ requirement: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ version: 4.0.0
42
+ type: :runtime
43
+ prerelease: false
44
+ version_requirements: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ">="
47
+ - !ruby/object:Gem::Version
48
+ version: 4.0.0
35
49
  - !ruby/object:Gem::Dependency
36
50
  name: sysrandom
37
51
  requirement: !ruby/object:Gem::Requirement
38
52
  requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ version: 1.0.3
39
56
  - - "~>"
40
57
  - !ruby/object:Gem::Version
41
- version: '1.0'
58
+ version: 1.0.3
42
59
  type: :runtime
43
60
  prerelease: false
44
61
  version_requirements: !ruby/object:Gem::Requirement
45
62
  requirements:
63
+ - - ">="
64
+ - !ruby/object:Gem::Version
65
+ version: 1.0.3
46
66
  - - "~>"
47
67
  - !ruby/object:Gem::Version
48
- version: '1.0'
68
+ version: 1.0.3
49
69
  - !ruby/object:Gem::Dependency
50
70
  name: contracts
51
71
  requirement: !ruby/object:Gem::Requirement
@@ -246,7 +266,6 @@ files:
246
266
  - docs/tss-ietf-draft/draft-mcgrew-tss-03.html
247
267
  - docs/tss-ietf-draft/draft-mcgrew-tss-03.txt
248
268
  - lib/tss.rb
249
- - lib/tss/blank.rb
250
269
  - lib/tss/cli_combine.rb
251
270
  - lib/tss/cli_common.rb
252
271
  - lib/tss/cli_split.rb
metadata.gz.sig CHANGED
Binary file
@@ -1,142 +0,0 @@
1
- # Extracted from activesupport gem.
2
- # https://github.com/rails/rails/blob/52ce6ece8c8f74064bb64e0a0b1ddd83092718e1/activesupport/lib/active_support/core_ext/object/blank.rb
3
- class Object
4
- # An object is blank if it's false, empty, or a whitespace string.
5
- # For example, +false+, '', ' ', +nil+, [], and {} are all blank.
6
- #
7
- # This simplifies
8
- #
9
- # !address || address.empty?
10
- #
11
- # to
12
- #
13
- # address.blank?
14
- #
15
- # @return [true, false]
16
- def blank?
17
- respond_to?(:empty?) ? !!empty? : !self
18
- end
19
-
20
- # An object is present if it's not blank.
21
- #
22
- # @return [true, false]
23
- def present?
24
- !blank?
25
- end
26
-
27
- # Returns the receiver if it's present otherwise returns +nil+.
28
- # <tt>object.presence</tt> is equivalent to
29
- #
30
- # object.present? ? object : nil
31
- #
32
- # For example, something like
33
- #
34
- # state = params[:state] if params[:state].present?
35
- # country = params[:country] if params[:country].present?
36
- # region = state || country || 'US'
37
- #
38
- # becomes
39
- #
40
- # region = params[:state].presence || params[:country].presence || 'US'
41
- #
42
- # @return [Object]
43
- def presence
44
- self if present?
45
- end
46
- end
47
-
48
- class NilClass
49
- # +nil+ is blank:
50
- #
51
- # nil.blank? # => true
52
- #
53
- # @return [true]
54
- def blank?
55
- true
56
- end
57
- end
58
-
59
- class FalseClass
60
- # +false+ is blank:
61
- #
62
- # false.blank? # => true
63
- #
64
- # @return [true]
65
- def blank?
66
- true
67
- end
68
- end
69
-
70
- class TrueClass
71
- # +true+ is not blank:
72
- #
73
- # true.blank? # => false
74
- #
75
- # @return [false]
76
- def blank?
77
- false
78
- end
79
- end
80
-
81
- class Array
82
- # An array is blank if it's empty:
83
- #
84
- # [].blank? # => true
85
- # [1,2,3].blank? # => false
86
- #
87
- # @return [true, false]
88
- alias_method :blank?, :empty?
89
- end
90
-
91
- class Hash
92
- # A hash is blank if it's empty:
93
- #
94
- # {}.blank? # => true
95
- # { key: 'value' }.blank? # => false
96
- #
97
- # @return [true, false]
98
- alias_method :blank?, :empty?
99
- end
100
-
101
- class String
102
- BLANK_RE = /\A[[:space:]]*\z/
103
-
104
- # A string is blank if it's empty or contains whitespaces only:
105
- #
106
- # ''.blank? # => true
107
- # ' '.blank? # => true
108
- # "\t\n\r".blank? # => true
109
- # ' blah '.blank? # => false
110
- #
111
- # Unicode whitespace is supported:
112
- #
113
- # "\u00a0".blank? # => true
114
- #
115
- # @return [true, false]
116
- def blank?
117
- BLANK_RE === self
118
- end
119
- end
120
-
121
- class Numeric #:nodoc:
122
- # No number is blank:
123
- #
124
- # 1.blank? # => false
125
- # 0.blank? # => false
126
- #
127
- # @return [false]
128
- def blank?
129
- false
130
- end
131
- end
132
-
133
- class Time #:nodoc:
134
- # No Time is blank:
135
- #
136
- # Time.now.blank? # => false
137
- #
138
- # @return [false]
139
- def blank?
140
- false
141
- end
142
- end