rbnacl 3.1.2 → 3.2.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.
- checksums.yaml +4 -4
- data/.rubocop.yml +27 -0
- data/.travis.yml +4 -3
- data/CHANGES.md +5 -0
- data/Gemfile +8 -3
- data/Guardfile +1 -1
- data/README.md +5 -6
- data/Rakefile +3 -2
- data/lib/rbnacl.rb +1 -1
- data/lib/rbnacl/auth.rb +21 -8
- data/lib/rbnacl/boxes/curve25519xsalsa20poly1305.rb +17 -13
- data/lib/rbnacl/boxes/curve25519xsalsa20poly1305/private_key.rb +68 -65
- data/lib/rbnacl/boxes/curve25519xsalsa20poly1305/public_key.rb +49 -47
- data/lib/rbnacl/group_elements/curve25519.rb +14 -8
- data/lib/rbnacl/hash.rb +2 -2
- data/lib/rbnacl/hash/blake2b.rb +13 -13
- data/lib/rbnacl/hash/sha256.rb +5 -5
- data/lib/rbnacl/hash/sha512.rb +5 -5
- data/lib/rbnacl/hmac/sha256.rb +12 -11
- data/lib/rbnacl/hmac/sha512256.rb +11 -10
- data/lib/rbnacl/init.rb +1 -1
- data/lib/rbnacl/key_comparator.rb +3 -3
- data/lib/rbnacl/one_time_auths/poly1305.rb +4 -4
- data/lib/rbnacl/password_hash/scrypt.rb +10 -11
- data/lib/rbnacl/random.rb +2 -2
- data/lib/rbnacl/secret_boxes/xsalsa20poly1305.rb +28 -14
- data/lib/rbnacl/self_test.rb +17 -37
- data/lib/rbnacl/serializable.rb +9 -4
- data/lib/rbnacl/signatures/ed25519.rb +1 -0
- data/lib/rbnacl/signatures/ed25519/signing_key.rb +17 -9
- data/lib/rbnacl/signatures/ed25519/verify_key.rb +17 -6
- data/lib/rbnacl/simple_box.rb +6 -3
- data/lib/rbnacl/sodium.rb +6 -7
- data/lib/rbnacl/sodium/version.rb +3 -2
- data/lib/rbnacl/test_vectors.rb +57 -55
- data/lib/rbnacl/util.rb +12 -11
- data/lib/rbnacl/version.rb +3 -1
- data/rbnacl.gemspec +6 -8
- data/spec/rbnacl/authenticators/poly1305_spec.rb +1 -1
- data/spec/rbnacl/boxes/curve25519xsalsa20poly1305/private_key_spec.rb +1 -1
- data/spec/rbnacl/boxes/curve25519xsalsa20poly1305/public_key_spec.rb +1 -1
- data/spec/rbnacl/boxes/curve25519xsalsa20poly1305_spec.rb +2 -2
- data/spec/rbnacl/group_element_spec.rb +1 -1
- data/spec/rbnacl/hash/blake2b_spec.rb +1 -1
- data/spec/rbnacl/hash_spec.rb +1 -1
- data/spec/rbnacl/hmac/sha256_spec.rb +1 -1
- data/spec/rbnacl/hmac/sha512256_spec.rb +1 -1
- data/spec/rbnacl/password_hash/scrypt_spec.rb +3 -3
- data/spec/rbnacl/secret_box_spec.rb +3 -3
- data/spec/rbnacl/signatures/ed25519/signing_key_spec.rb +2 -2
- data/spec/rbnacl/signatures/ed25519/verify_key_spec.rb +12 -7
- data/spec/rbnacl/simple_box_spec.rb +2 -2
- data/spec/rbnacl/util_spec.rb +28 -29
- data/spec/shared/authenticator.rb +12 -12
- data/spec/shared/box.rb +2 -4
- data/spec/spec_helper.rb +11 -18
- data/tasks/rspec.rake +2 -2
- data/tasks/rubocop.rake +1 -1
- metadata +4 -5
- data/lib/rbnacl/rake_tasks.rb +0 -57
- data/tasks/ci.rake +0 -11
data/tasks/rspec.rake
CHANGED
data/tasks/rubocop.rake
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbnacl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tony Arcieri
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain:
|
12
12
|
- bascule.cert
|
13
|
-
date:
|
13
|
+
date: 2015-06-01 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: ffi
|
@@ -79,6 +79,7 @@ files:
|
|
79
79
|
- ".coveralls.yml"
|
80
80
|
- ".gitignore"
|
81
81
|
- ".rspec"
|
82
|
+
- ".rubocop.yml"
|
82
83
|
- ".travis.yml"
|
83
84
|
- ".yardopts"
|
84
85
|
- CHANGES.md
|
@@ -110,7 +111,6 @@ files:
|
|
110
111
|
- lib/rbnacl/one_time_auths/poly1305.rb
|
111
112
|
- lib/rbnacl/password_hash.rb
|
112
113
|
- lib/rbnacl/password_hash/scrypt.rb
|
113
|
-
- lib/rbnacl/rake_tasks.rb
|
114
114
|
- lib/rbnacl/random.rb
|
115
115
|
- lib/rbnacl/secret_boxes/xsalsa20poly1305.rb
|
116
116
|
- lib/rbnacl/self_test.rb
|
@@ -146,7 +146,6 @@ files:
|
|
146
146
|
- spec/shared/key_equality.rb
|
147
147
|
- spec/shared/serializable.rb
|
148
148
|
- spec/spec_helper.rb
|
149
|
-
- tasks/ci.rake
|
150
149
|
- tasks/rspec.rake
|
151
150
|
- tasks/rubocop.rake
|
152
151
|
homepage: https://github.com/cryptosphere/rbnacl
|
@@ -169,7 +168,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
169
168
|
version: '0'
|
170
169
|
requirements: []
|
171
170
|
rubyforge_project:
|
172
|
-
rubygems_version: 2.
|
171
|
+
rubygems_version: 2.4.6
|
173
172
|
signing_key:
|
174
173
|
specification_version: 4
|
175
174
|
summary: The Networking and Cryptography (NaCl) library provides a high-level toolkit
|
data/lib/rbnacl/rake_tasks.rb
DELETED
@@ -1,57 +0,0 @@
|
|
1
|
-
# encoding: binary
|
2
|
-
require 'rake'
|
3
|
-
require 'rake/clean'
|
4
|
-
require 'digest/sha2'
|
5
|
-
|
6
|
-
LIBSODIUM_VERSION = "0.7.0"
|
7
|
-
LIBSODIUM_DIGEST = "4ccaffd1a15be67786e28a61b602492a97eb5bcb83455ed53c02fa038b8e9168"
|
8
|
-
|
9
|
-
def sh_hidden(command)
|
10
|
-
STDERR.puts("*** Executing: #{command}")
|
11
|
-
output = `#{command}`
|
12
|
-
|
13
|
-
if !$?.success?
|
14
|
-
STDERR.puts "!!! Error executing: #{command}"
|
15
|
-
STDERR.puts output
|
16
|
-
exit 1
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
libsodium_tarball = "libsodium-#{LIBSODIUM_VERSION}.tar.gz"
|
21
|
-
|
22
|
-
file libsodium_tarball do
|
23
|
-
sh "curl -L -O https://github.com/jedisct1/libsodium/releases/download/#{LIBSODIUM_VERSION}/#{libsodium_tarball}"
|
24
|
-
|
25
|
-
digest = Digest::SHA256.hexdigest(File.read(libsodium_tarball))
|
26
|
-
if digest != LIBSODIUM_DIGEST
|
27
|
-
rm libsodium_tarball
|
28
|
-
raise "#{libsodium_tarball} failed checksum! Got #{digest}"
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
|
-
file "libsodium" => libsodium_tarball do
|
33
|
-
sh "tar -zxf #{libsodium_tarball}"
|
34
|
-
mv "libsodium-#{LIBSODIUM_VERSION}", "libsodium"
|
35
|
-
end
|
36
|
-
|
37
|
-
file "libsodium/Makefile" => "libsodium" do
|
38
|
-
sh_hidden "cd libsodium && ./configure"
|
39
|
-
end
|
40
|
-
|
41
|
-
file "libsodium/src/libsodium/.libs/libsodium.a" => "libsodium/Makefile" do
|
42
|
-
sh_hidden "cd libsodium && make"
|
43
|
-
end
|
44
|
-
|
45
|
-
if `uname` == 'Darwin'
|
46
|
-
libsodium_lib = "libsodium.bundle"
|
47
|
-
else
|
48
|
-
libsodium_lib = "libsodium.so"
|
49
|
-
end
|
50
|
-
|
51
|
-
file "libsodium/src/libsodium/.libs/#{libsodium_lib}" => "libsodium/src/libsodium/.libs/libsodium.a"
|
52
|
-
|
53
|
-
task :build_libsodium => "libsodium/src/libsodium/.libs/#{libsodium_lib}" do
|
54
|
-
$LIBSODIUM_PATH = "libsodium/src/libsodium/.libs/#{libsodium_lib}"
|
55
|
-
end
|
56
|
-
|
57
|
-
CLEAN.add "libsodium", "libsodium-*.tar.gz"
|