tweetnacl 0.3.0 → 1.0.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 +5 -5
- checksums.yaml.gz.sig +4 -0
- data.tar.gz.sig +0 -0
- data/.circleci/config.yml +50 -0
- data/CHANGELOG.md +22 -1
- data/README.md +2 -2
- data/Rakefile +50 -0
- data/certs/franckverrot.pem +25 -0
- data/ext/tweetnacl/rbext.c +39 -19
- data/ext/tweetnacl/tweetnacl.c +3 -1
- data/lib/tweet_na_cl.rb +1 -0
- data/test/test_helper.rb +1 -0
- data/test/tweetnacl_constants_test.rb +162 -162
- data/test/tweetnacl_crypto_box_test.rb +16 -1
- data/test/tweetnacl_crypto_secretbox_test.rb +1 -1
- data/tweetnacl.gemspec +21 -1
- metadata +47 -8
- metadata.gz.sig +0 -0
- data/.travis.yml +0 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: df32ba55a66d1f9acd3f40099ffc4e866c56abdb704a7191b2b4c0ffad4089b6
|
4
|
+
data.tar.gz: 90fa17459095c80c00910b0900a02ac11fe35a142dac323ae4427f3cd0aad7e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 986de1548f6a609b464ca5905bf007af6136e0dc33463ccce70598ce92d4317ea713d248bae833936e8f661462287da0b9779583515ec3a37f5edf32da8bf8ff
|
7
|
+
data.tar.gz: 7b9fb5c8285e391a161feb8774efaf038c3c08adc45cec032b9f9d92d36d335cb6952ee6ca62f3f4bdc1ebf87f9cbe88ab9c8be1b27a6554778f9750ec736ec7
|
checksums.yaml.gz.sig
ADDED
@@ -0,0 +1,4 @@
|
|
1
|
+
�)!nR�����Ay%�r���R���K�2W��9�x`��4^#�A�+[C2T��vt?����ogZQ?�Mz���e�K����jT�ݯ��3�n�����A�{5��� n6�>B`�ց��m����%����q���'�
|
2
|
+
4anV"F17Mv�4�%W�ǭw�$�Ȅ���P[ȫN堃Tk���T�6���X�փH��5�z�Ѽ�j�P���/ړ��-��L�c�8�\��в�e�3���<h��\��
|
3
|
+
������:���H���@I[1Ś/�&��7@ywO1$��E�3�����������<Q��9&�ߞ<����>���ۅgL�؛� ��K"X/G{5]�MB��;3��5I�A8y��Ϝ�,X�
|
4
|
+
�
|
data.tar.gz.sig
ADDED
Binary file
|
@@ -0,0 +1,50 @@
|
|
1
|
+
version: 2
|
2
|
+
|
3
|
+
shared: &shared
|
4
|
+
working_directory: ~/repo
|
5
|
+
steps:
|
6
|
+
- checkout
|
7
|
+
|
8
|
+
# Download and cache dependencies
|
9
|
+
- restore_cache:
|
10
|
+
keys:
|
11
|
+
- v1-dependencies-{{ checksum "Gemfile.lock" }}
|
12
|
+
# fallback to using the latest cache if no exact match is found
|
13
|
+
- v1-dependencies-
|
14
|
+
|
15
|
+
- run:
|
16
|
+
name: install dependencies
|
17
|
+
command: |
|
18
|
+
bundle install --jobs=4 --retry=3 --path vendor/bundle
|
19
|
+
|
20
|
+
- save_cache:
|
21
|
+
paths:
|
22
|
+
- ./vendor/bundle
|
23
|
+
key: v1-dependencies-{{ checksum "Gemfile.lock" }}
|
24
|
+
|
25
|
+
# run tests!
|
26
|
+
- run:
|
27
|
+
name: run tests
|
28
|
+
command: bundle exec rake
|
29
|
+
|
30
|
+
jobs:
|
31
|
+
"ruby-2.4":
|
32
|
+
<<: *shared
|
33
|
+
docker:
|
34
|
+
- image: circleci/ruby:2.4
|
35
|
+
"ruby-2.5":
|
36
|
+
<<: *shared
|
37
|
+
docker:
|
38
|
+
- image: circleci/ruby:2.5
|
39
|
+
"ruby-2.6":
|
40
|
+
<<: *shared
|
41
|
+
docker:
|
42
|
+
- image: circleci/ruby:2.6
|
43
|
+
|
44
|
+
workflows:
|
45
|
+
version: 2
|
46
|
+
build:
|
47
|
+
jobs:
|
48
|
+
- "ruby-2.4"
|
49
|
+
- "ruby-2.5"
|
50
|
+
- "ruby-2.6"
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,27 @@
|
|
1
1
|
# Releases
|
2
2
|
|
3
|
-
## UNRELEASED
|
3
|
+
## UNRELEASED
|
4
|
+
|
5
|
+
## 1.0.0 – Apr 30th 2019
|
6
|
+
|
7
|
+
### BREAKING CHANGES
|
8
|
+
|
9
|
+
* Drop leading 0s from encrypted boxes!
|
10
|
+
|
11
|
+
A breaking change has been introduced to `crypto_box` and `crypto_secretbox`
|
12
|
+
that makes ciphers differ. The first 64 bits are always empty and have been
|
13
|
+
dropped from the cipher output.
|
14
|
+
|
15
|
+
This causes differences like:
|
16
|
+
|
17
|
+
```
|
18
|
+
- expected_cipher = "0000000000000000FBC937C3F136E09FA8A45C58C15E801394F5BB74CE8D538FE3D726"
|
19
|
+
+ expected_cipher = "FBC937C3F136E09FA8A45C58C15E801394F5BB74CE8D538FE3D726"
|
20
|
+
```
|
21
|
+
|
22
|
+
You might need to go through all persisted ciphers and change these values.
|
23
|
+
|
24
|
+
If you have more questions, please file a ticket! Thanks!
|
4
25
|
|
5
26
|
## 0.3.0 - Aug 19th 2014
|
6
27
|
|
data/README.md
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
TweetNaCl is a C-extension for Ruby built on top of the official TweetNacl
|
6
6
|
distribution. It exposes the basic functions using Ruby objects.
|
7
7
|
|
8
|
-
For a detailed explanation of TweetNaCl, [here's the research paper associated with it][paper]
|
8
|
+
For a detailed explanation of TweetNaCl, [here's the research paper associated with it][paper].
|
9
9
|
|
10
10
|
## INSTALL
|
11
11
|
|
@@ -159,4 +159,4 @@ No. Until proven otherwise.
|
|
159
159
|
Franck Verrot, Copyright 2014. See LICENSE.txt.
|
160
160
|
|
161
161
|
|
162
|
-
[paper]
|
162
|
+
[paper]: http://tweetnacl.cr.yp.to/tweetnacl-20131229.pdf
|
data/Rakefile
CHANGED
@@ -1,4 +1,10 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rubygems/specification'
|
3
|
+
|
4
|
+
require 'bundler'
|
1
5
|
require 'rake/extensiontask'
|
6
|
+
Bundler::GemHelper.install_tasks
|
7
|
+
|
2
8
|
spec = Gem::Specification.load('tweetnacl.gemspec')
|
3
9
|
Rake::ExtensionTask.new('tweetnacl', spec) do |ext|
|
4
10
|
ext.source_pattern = "*.{c,h}"
|
@@ -16,3 +22,47 @@ task :default => :full
|
|
16
22
|
|
17
23
|
desc "Run the full spec suite"
|
18
24
|
task :full => ["clean", "compile", "test"]
|
25
|
+
|
26
|
+
def gemspec
|
27
|
+
@gemspec ||= begin
|
28
|
+
file = File.expand_path('../tweetnacl.gemspec', __FILE__)
|
29
|
+
eval(File.read(file), binding, file)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
desc "Clean the current directory"
|
34
|
+
task :clean do
|
35
|
+
rm_rf 'tmp'
|
36
|
+
rm_rf 'pkg'
|
37
|
+
end
|
38
|
+
|
39
|
+
desc "Run the full spec suite"
|
40
|
+
task :full => ["clean", "test"]
|
41
|
+
|
42
|
+
desc "install the gem locally"
|
43
|
+
task :install => :package do
|
44
|
+
sh %{gem install pkg/#{gemspec.name}-#{gemspec.version}}
|
45
|
+
end
|
46
|
+
|
47
|
+
desc "validate the gemspec"
|
48
|
+
task :gemspec do
|
49
|
+
gemspec.validate
|
50
|
+
end
|
51
|
+
|
52
|
+
desc "Build the gem"
|
53
|
+
task :gem => [:gemspec, :build] do
|
54
|
+
mkdir_p "pkg"
|
55
|
+
sh "gem build tweetnacl.gemspec"
|
56
|
+
mv "#{gemspec.full_name}.gem", "pkg"
|
57
|
+
|
58
|
+
require 'digest/sha2'
|
59
|
+
built_gem_path = "pkg/#{gemspec.full_name}.gem"
|
60
|
+
checksum = Digest::SHA512.new.hexdigest(File.read(built_gem_path))
|
61
|
+
checksum_path = "checksums/#{gemspec.version}.sha512"
|
62
|
+
File.open(checksum_path, 'w' ) {|f| f.write(checksum) }
|
63
|
+
end
|
64
|
+
|
65
|
+
desc "Install TweetNaCl"
|
66
|
+
task :install => :gem do
|
67
|
+
sh "gem install pkg/#{gemspec.full_name}.gem"
|
68
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
-----BEGIN CERTIFICATE-----
|
2
|
+
MIIEMDCCApigAwIBAgIBATANBgkqhkiG9w0BAQsFADAhMR8wHQYDVQQDDBZmcmFu
|
3
|
+
Y2svREM9dmVycm90L0RDPWZyMB4XDTE4MTIyMTAxMzgwNVoXDTE5MTIyMTAxMzgw
|
4
|
+
NVowITEfMB0GA1UEAwwWZnJhbmNrL0RDPXZlcnJvdC9EQz1mcjCCAaIwDQYJKoZI
|
5
|
+
hvcNAQEBBQADggGPADCCAYoCggGBANjZ/7L2ECEQAVOYvMl0JOwyVXKRCsLnVrmP
|
6
|
+
mcwpCMFL0ennkpLJcqiDNsm0b/RkJHSLu3FMoYrIU5KoaP7iMIsLGv846aw2wSNI
|
7
|
+
G5XWGnRY9dWVu7Gz2OZbsDi18WT94Y/s2yf+orPLAiaJb451decYEpHqLTiaJhhJ
|
8
|
+
xHckJixfDVwZGJpow7rrJAJMbU9ZCJFUFAfNpgkOqhbBU4Ehi1umbC/ZBsVDiRVa
|
9
|
+
ZjfNhe7kgx6jo3EfPY4izPW2IKkpk7nJKNfZnM2r0cnpPJbhyH1m5fsikBD5tRNe
|
10
|
+
YxJpxDPf8UBTTXqoeSSQygiHWWZVbH3zj2jWzi5T0do5PbZcCeoIKR4TyOgbOgBW
|
11
|
+
Ra7bm9uVXo6MQWpp0aeC/X+F2Y/dFjXAP/TPL89ownd3XZUaNDdZfS6aKBMG3a5C
|
12
|
+
gcRLMt1hOJchslGNtvkq5W4Wq8hw+zNHzTMpRkIsYTbvlJCDxXRKR3jwPDTRvNAl
|
13
|
+
aemBW1g3yerHeDQr6GtxKEvhmHdw/wIDAQABo3MwcTAJBgNVHRMEAjAAMAsGA1Ud
|
14
|
+
DwQEAwIEsDAdBgNVHQ4EFgQUgG77cLAMzowManymHX63DbvfR5IwGwYDVR0RBBQw
|
15
|
+
EoEQZnJhbmNrQHZlcnJvdC5mcjAbBgNVHRIEFDASgRBmcmFuY2tAdmVycm90LmZy
|
16
|
+
MA0GCSqGSIb3DQEBCwUAA4IBgQAofcg/2kPT9VMBGEuO17F3yH6fiJboQeLL1nlM
|
17
|
+
ULZv5LyyqV6Yq0cQ+TZMGHd/hbvBFTN9/55WmiN66tYLaunyfr4aUflCQcM/qu2g
|
18
|
+
Ieoz8QLxfIi24DCDezpODHaud6Qt0VmMpalSOxbCuMeNnXLpnxbP/7fJBJoum5GS
|
19
|
+
CqGuH81fXy7KAAlgMBcsYb3+vZJhuAeM/zSrE5Hmf1zApTEVZc4Y0dO6eRC6WbXW
|
20
|
+
pJfyNXyITkkr7pTRYO/wj3lFoeDqfGXb48HvpJ54lqfeIvr9Hek7grcyQGfZ1rFY
|
21
|
+
Dx3RTjxParzCWk/HCFHQiZmU5lnOl7GShwAZrG6l0UHST3/YNCA52KDrmC/T0A2N
|
22
|
+
d2MQGgSZerYTx+HRKlradglBDPCs4nxQj5pnoDvGbngeZUua+ZZGFM9SXBT3zAIQ
|
23
|
+
akLQjJWKHQCzyqDChJHRGhlxyVFKP2JwqFgzE3p1l64JArsb7BEqhpoBPXMwlChE
|
24
|
+
HgzCBTsCU0syQBb1s6lBz2HrWA4=
|
25
|
+
-----END CERTIFICATE-----
|
data/ext/tweetnacl/rbext.c
CHANGED
@@ -12,6 +12,18 @@ void hexdump(char * data, int len)
|
|
12
12
|
printf("\n");
|
13
13
|
}
|
14
14
|
|
15
|
+
extern int salsa_rounds;
|
16
|
+
|
17
|
+
VALUE m_crypto_box_salsa_rounds_set(VALUE self, VALUE _n) {
|
18
|
+
if(_n == Qnil) { rb_raise(rb_eArgError, "`TweetNaCl#salsa_round=` called with nil argument"); }
|
19
|
+
salsa_rounds = NUM2INT(_n);
|
20
|
+
return _n;
|
21
|
+
}
|
22
|
+
|
23
|
+
VALUE m_crypto_box_salsa_rounds_get(VALUE self) {
|
24
|
+
return INT2NUM(salsa_rounds);
|
25
|
+
}
|
26
|
+
|
15
27
|
VALUE m_crypto_box_keypair(VALUE self) {
|
16
28
|
VALUE ary = rb_ary_new2(2);
|
17
29
|
unsigned char *pk = calloc(crypto_box_PUBLICKEYBYTES, sizeof(unsigned char));
|
@@ -39,14 +51,14 @@ VALUE m_crypto_box(VALUE self, VALUE _m, VALUE _n, VALUE _pk, VALUE _sk) {
|
|
39
51
|
char * nonce = RSTRING_PTR(_n);
|
40
52
|
char * pk = RSTRING_PTR(_pk);
|
41
53
|
char * sk = RSTRING_PTR(_sk);
|
42
|
-
int len =
|
54
|
+
int len = RSTRING_LEN(_m);
|
43
55
|
char * padded_message = (char*)calloc(sizeof(char), len + PADDING_LEN);
|
44
|
-
memcpy(padded_message + PADDING_LEN, message,
|
45
|
-
char * c = malloc(
|
56
|
+
memcpy(padded_message + PADDING_LEN, message, len);
|
57
|
+
char * c = malloc(len + PADDING_LEN);
|
46
58
|
int res = crypto_box(c, padded_message, len + PADDING_LEN, nonce, pk, sk);
|
47
59
|
// TODO: use an exception instead of exit()
|
48
60
|
if (0 != res) { fprintf(stderr, "Something went wrong\n"); exit(res); }
|
49
|
-
VALUE ret = rb_str_new(c, len +
|
61
|
+
VALUE ret = rb_str_new(c + 16, len + 16);
|
50
62
|
return ret;
|
51
63
|
}
|
52
64
|
|
@@ -63,15 +75,16 @@ VALUE m_crypto_box_open(VALUE self, VALUE _c, VALUE _n, VALUE _pk, VALUE _sk) {
|
|
63
75
|
char * nonce = RSTRING_PTR(_n);
|
64
76
|
char * pk = RSTRING_PTR(_pk);
|
65
77
|
char * sk = RSTRING_PTR(_sk);
|
66
|
-
int
|
67
|
-
unsigned char *
|
78
|
+
int len = RSTRING_LEN(_c);
|
79
|
+
unsigned char * ciphertext = (unsigned char*)calloc(sizeof(unsigned char), len + 16);
|
80
|
+
memcpy(ciphertext + 16, c, len);
|
68
81
|
|
69
|
-
|
70
|
-
if (0 != res) { rb_raise(rb_eRuntimeError, "crypto_box_open did not work. error %d", res); }
|
82
|
+
unsigned char * message = (unsigned char*)calloc(len + PADDING_LEN, sizeof(unsigned char));
|
71
83
|
|
72
|
-
message
|
84
|
+
int res = crypto_box_open(message, ciphertext, len + 16, nonce, pk, sk);
|
85
|
+
if (0 != res) { rb_raise(rb_eRuntimeError, "crypto_box_open did not work. error %d", res); }
|
73
86
|
|
74
|
-
VALUE ret =
|
87
|
+
VALUE ret = rb_str_new(message + PADDING_LEN, len - 16);
|
75
88
|
return ret;
|
76
89
|
}
|
77
90
|
|
@@ -79,19 +92,19 @@ VALUE m_crypto_secretbox(VALUE self, VALUE _m, VALUE _n, VALUE _k) {
|
|
79
92
|
if(_m == Qnil) { rb_raise(rb_eArgError, "A message should have been given"); }
|
80
93
|
if(_k == Qnil) { rb_raise(rb_eArgError, "Secret key should have been given"); }
|
81
94
|
if (RSTRING_LEN(_n) != 24) { rb_raise(rb_eArgError, "nonce should be 24-byte long"); }
|
82
|
-
if (RSTRING_LEN(_k) != 32) { rb_raise(rb_eArgError, "Secret key should be
|
95
|
+
if (RSTRING_LEN(_k) != 32) { rb_raise(rb_eArgError, "Secret key should be 32-byte long"); }
|
83
96
|
|
84
97
|
char * message = RSTRING_PTR(_m);
|
85
98
|
char * nonce = RSTRING_PTR(_n);
|
86
99
|
char * k = RSTRING_PTR(_k);
|
87
|
-
int len =
|
100
|
+
int len = RSTRING_LEN(_m);
|
88
101
|
char * padded_message = (char*)calloc(sizeof(char), len + PADDING_LEN);
|
89
|
-
memcpy(padded_message + PADDING_LEN, message,
|
90
|
-
char * c = malloc(
|
102
|
+
memcpy(padded_message + PADDING_LEN, message, len);
|
103
|
+
char * c = malloc(len + PADDING_LEN);
|
91
104
|
int res = crypto_secretbox(c, padded_message, len + PADDING_LEN, nonce, k);
|
92
105
|
// TODO: use an exception instead of exit()
|
93
106
|
if (0 != res) { fprintf(stderr, "Something went wrong\n"); exit(res); }
|
94
|
-
VALUE ret = rb_str_new(c, len +
|
107
|
+
VALUE ret = rb_str_new(c + 16, len + 16);
|
95
108
|
return ret;
|
96
109
|
}
|
97
110
|
|
@@ -104,13 +117,17 @@ VALUE m_crypto_secretbox_open(VALUE self, VALUE _c, VALUE _n, VALUE _k) {
|
|
104
117
|
unsigned char * c = RSTRING_PTR(_c);
|
105
118
|
char * nonce = RSTRING_PTR(_n);
|
106
119
|
char * k = RSTRING_PTR(_k);
|
107
|
-
int
|
108
|
-
|
120
|
+
int len = RSTRING_LEN(_c);
|
121
|
+
|
122
|
+
unsigned char * ciphertext = (unsigned char*)calloc(sizeof(unsigned char), len + 16);
|
123
|
+
memcpy(ciphertext + 16, c, len);
|
109
124
|
|
110
|
-
|
125
|
+
char * message = calloc(len + PADDING_LEN, sizeof(char));
|
126
|
+
|
127
|
+
int res = crypto_secretbox_open(message, ciphertext, len + 16, nonce, k);
|
111
128
|
if (0 != res) { rb_raise(rb_eRuntimeError, "crypto_secretbox_open did not work"); }
|
112
129
|
|
113
|
-
return
|
130
|
+
return rb_str_new(message + PADDING_LEN, len - 16);
|
114
131
|
}
|
115
132
|
|
116
133
|
VALUE m_crypto_sign_keypair(VALUE self) {
|
@@ -165,6 +182,9 @@ VALUE m_crypto_sign_open(VALUE self, VALUE _c, VALUE _k) {
|
|
165
182
|
void Init_tweetnacl() {
|
166
183
|
VALUE c = rb_define_module("TweetNaCl");
|
167
184
|
|
185
|
+
rb_define_module_function(c , "salsa_rounds=" , RUBY_METHOD_FUNC(m_crypto_box_salsa_rounds_set), 1);
|
186
|
+
rb_define_module_function(c , "salsa_rounds" , RUBY_METHOD_FUNC(m_crypto_box_salsa_rounds_get), 0);
|
187
|
+
|
168
188
|
rb_define_module_function(c , "crypto_box_keypair" , RUBY_METHOD_FUNC(m_crypto_box_keypair) , 0);
|
169
189
|
|
170
190
|
rb_define_module_function(c , "crypto_box" , RUBY_METHOD_FUNC(m_crypto_box) , 4);
|
data/ext/tweetnacl/tweetnacl.c
CHANGED
@@ -9,6 +9,8 @@ typedef long long i64;
|
|
9
9
|
typedef i64 gf[16];
|
10
10
|
extern void randombytes(u8 *,u64);
|
11
11
|
|
12
|
+
int salsa_rounds = 20;
|
13
|
+
|
12
14
|
static const u8
|
13
15
|
_0[16],
|
14
16
|
_9[32] = {9};
|
@@ -82,7 +84,7 @@ sv core(u8 *out,const u8 *in,const u8 *k,const u8 *c,int h)
|
|
82
84
|
|
83
85
|
FOR(i,16) y[i] = x[i];
|
84
86
|
|
85
|
-
FOR(i,
|
87
|
+
FOR(i,salsa_rounds) {
|
86
88
|
FOR(j,4) {
|
87
89
|
FOR(m,4) t[m] = x[(5*j+4*m)%16];
|
88
90
|
t[1] ^= L32(t[0]+t[3], 7);
|
data/lib/tweet_na_cl.rb
CHANGED
data/test/test_helper.rb
CHANGED
@@ -6,167 +6,167 @@ class TweetNaClConstantsTest < MiniTest::Test
|
|
6
6
|
end
|
7
7
|
|
8
8
|
def test_constants
|
9
|
-
assert_instance_of String,
|
10
|
-
assert_instance_of
|
11
|
-
assert_instance_of
|
12
|
-
assert_instance_of String,
|
13
|
-
assert_instance_of String,
|
14
|
-
assert_instance_of
|
15
|
-
assert_instance_of
|
16
|
-
assert_instance_of String,
|
17
|
-
assert_instance_of
|
18
|
-
assert_instance_of
|
19
|
-
assert_instance_of String,
|
20
|
-
assert_instance_of String,
|
21
|
-
assert_instance_of String,
|
22
|
-
assert_instance_of
|
23
|
-
assert_instance_of
|
24
|
-
assert_instance_of
|
25
|
-
assert_instance_of
|
26
|
-
assert_instance_of
|
27
|
-
assert_instance_of
|
28
|
-
assert_instance_of String,
|
29
|
-
assert_instance_of String,
|
30
|
-
assert_instance_of
|
31
|
-
assert_instance_of
|
32
|
-
assert_instance_of
|
33
|
-
assert_instance_of
|
34
|
-
assert_instance_of
|
35
|
-
assert_instance_of
|
36
|
-
assert_instance_of String,
|
37
|
-
assert_instance_of
|
38
|
-
assert_instance_of
|
39
|
-
assert_instance_of
|
40
|
-
assert_instance_of
|
41
|
-
assert_instance_of
|
42
|
-
assert_instance_of
|
43
|
-
assert_instance_of String,
|
44
|
-
assert_instance_of String,
|
45
|
-
assert_instance_of String,
|
46
|
-
assert_instance_of
|
47
|
-
assert_instance_of
|
48
|
-
assert_instance_of
|
49
|
-
assert_instance_of
|
50
|
-
assert_instance_of String,
|
51
|
-
assert_instance_of String,
|
52
|
-
assert_instance_of
|
53
|
-
assert_instance_of
|
54
|
-
assert_instance_of
|
55
|
-
assert_instance_of
|
56
|
-
assert_instance_of String,
|
57
|
-
assert_instance_of
|
58
|
-
assert_instance_of
|
59
|
-
assert_instance_of
|
60
|
-
assert_instance_of
|
61
|
-
assert_instance_of String,
|
62
|
-
assert_instance_of String,
|
63
|
-
assert_instance_of
|
64
|
-
assert_instance_of
|
65
|
-
assert_instance_of
|
66
|
-
assert_instance_of
|
67
|
-
assert_instance_of String,
|
68
|
-
assert_instance_of
|
69
|
-
assert_instance_of
|
70
|
-
assert_instance_of
|
71
|
-
assert_instance_of
|
72
|
-
assert_instance_of String,
|
73
|
-
assert_instance_of String,
|
74
|
-
assert_instance_of String,
|
75
|
-
assert_instance_of
|
76
|
-
assert_instance_of
|
77
|
-
assert_instance_of String,
|
78
|
-
assert_instance_of String,
|
79
|
-
assert_instance_of
|
80
|
-
assert_instance_of
|
81
|
-
assert_instance_of String,
|
82
|
-
assert_instance_of
|
83
|
-
assert_instance_of
|
84
|
-
assert_instance_of String,
|
85
|
-
assert_instance_of String,
|
86
|
-
assert_instance_of
|
87
|
-
assert_instance_of
|
88
|
-
assert_instance_of String,
|
89
|
-
assert_instance_of
|
90
|
-
assert_instance_of
|
91
|
-
assert_instance_of String,
|
92
|
-
assert_instance_of String,
|
93
|
-
assert_instance_of String,
|
94
|
-
assert_instance_of
|
95
|
-
assert_instance_of String,
|
96
|
-
assert_instance_of String,
|
97
|
-
assert_instance_of
|
98
|
-
assert_instance_of String,
|
99
|
-
assert_instance_of
|
100
|
-
assert_instance_of String,
|
101
|
-
assert_instance_of String,
|
102
|
-
assert_instance_of
|
103
|
-
assert_instance_of String,
|
104
|
-
assert_instance_of
|
105
|
-
assert_instance_of String,
|
106
|
-
assert_instance_of String,
|
107
|
-
assert_instance_of String,
|
108
|
-
assert_instance_of
|
109
|
-
assert_instance_of
|
110
|
-
assert_instance_of String,
|
111
|
-
assert_instance_of String,
|
112
|
-
assert_instance_of
|
113
|
-
assert_instance_of
|
114
|
-
assert_instance_of String,
|
115
|
-
assert_instance_of
|
116
|
-
assert_instance_of
|
117
|
-
assert_instance_of String,
|
118
|
-
assert_instance_of String,
|
119
|
-
assert_instance_of String,
|
120
|
-
assert_instance_of
|
121
|
-
assert_instance_of
|
122
|
-
assert_instance_of String,
|
123
|
-
assert_instance_of String,
|
124
|
-
assert_instance_of
|
125
|
-
assert_instance_of
|
126
|
-
assert_instance_of String,
|
127
|
-
assert_instance_of
|
128
|
-
assert_instance_of
|
129
|
-
assert_instance_of String,
|
130
|
-
assert_instance_of String,
|
131
|
-
assert_instance_of String,
|
132
|
-
assert_instance_of
|
133
|
-
assert_instance_of
|
134
|
-
assert_instance_of
|
135
|
-
assert_instance_of
|
136
|
-
assert_instance_of String,
|
137
|
-
assert_instance_of String,
|
138
|
-
assert_instance_of
|
139
|
-
assert_instance_of
|
140
|
-
assert_instance_of
|
141
|
-
assert_instance_of
|
142
|
-
assert_instance_of String,
|
143
|
-
assert_instance_of
|
144
|
-
assert_instance_of
|
145
|
-
assert_instance_of
|
146
|
-
assert_instance_of
|
147
|
-
assert_instance_of String,
|
148
|
-
assert_instance_of String,
|
149
|
-
assert_instance_of String,
|
150
|
-
assert_instance_of
|
151
|
-
assert_instance_of
|
152
|
-
assert_instance_of
|
153
|
-
assert_instance_of String,
|
154
|
-
assert_instance_of String,
|
155
|
-
assert_instance_of
|
156
|
-
assert_instance_of
|
157
|
-
assert_instance_of
|
158
|
-
assert_instance_of String,
|
159
|
-
assert_instance_of
|
160
|
-
assert_instance_of
|
161
|
-
assert_instance_of
|
162
|
-
assert_instance_of String,
|
163
|
-
assert_instance_of String,
|
164
|
-
assert_instance_of String,
|
165
|
-
assert_instance_of
|
166
|
-
assert_instance_of
|
167
|
-
assert_instance_of String,
|
168
|
-
assert_instance_of String,
|
169
|
-
assert_instance_of
|
170
|
-
assert_instance_of
|
9
|
+
assert_instance_of String, _const("CRYPTO_AUTH_PRIMITIVE")
|
10
|
+
assert_instance_of Integer, _const("CRYPTO_AUTH_BYTES")
|
11
|
+
assert_instance_of Integer, _const("CRYPTO_AUTH_KEYBYTES")
|
12
|
+
assert_instance_of String, _const("CRYPTO_AUTH_IMPLEMENTATION")
|
13
|
+
assert_instance_of String, _const("CRYPTO_AUTH_VERSION")
|
14
|
+
assert_instance_of Integer, _const("CRYPTO_AUTH_HMACSHA512256_TWEET_BYTES")
|
15
|
+
assert_instance_of Integer, _const("CRYPTO_AUTH_HMACSHA512256_TWEET_KEYBYTES")
|
16
|
+
assert_instance_of String, _const("CRYPTO_AUTH_HMACSHA512256_TWEET_VERSION")
|
17
|
+
assert_instance_of Integer, _const("CRYPTO_AUTH_HMACSHA512256_BYTES")
|
18
|
+
assert_instance_of Integer, _const("CRYPTO_AUTH_HMACSHA512256_KEYBYTES")
|
19
|
+
assert_instance_of String, _const("CRYPTO_AUTH_HMACSHA512256_VERSION")
|
20
|
+
assert_instance_of String, _const("CRYPTO_AUTH_HMACSHA512256_IMPLEMENTATION")
|
21
|
+
assert_instance_of String, _const("CRYPTO_BOX_PRIMITIVE")
|
22
|
+
assert_instance_of Integer, _const("CRYPTO_BOX_PUBLICKEYBYTES")
|
23
|
+
assert_instance_of Integer, _const("CRYPTO_BOX_SECRETKEYBYTES")
|
24
|
+
assert_instance_of Integer, _const("CRYPTO_BOX_BEFORENMBYTES")
|
25
|
+
assert_instance_of Integer, _const("CRYPTO_BOX_NONCEBYTES")
|
26
|
+
assert_instance_of Integer, _const("CRYPTO_BOX_ZEROBYTES")
|
27
|
+
assert_instance_of Integer, _const("CRYPTO_BOX_BOXZEROBYTES")
|
28
|
+
assert_instance_of String, _const("CRYPTO_BOX_IMPLEMENTATION")
|
29
|
+
assert_instance_of String, _const("CRYPTO_BOX_VERSION")
|
30
|
+
assert_instance_of Integer, _const("CRYPTO_BOX_CURVE25519XSALSA20POLY1305_TWEET_PUBLICKEYBYTES")
|
31
|
+
assert_instance_of Integer, _const("CRYPTO_BOX_CURVE25519XSALSA20POLY1305_TWEET_SECRETKEYBYTES")
|
32
|
+
assert_instance_of Integer, _const("CRYPTO_BOX_CURVE25519XSALSA20POLY1305_TWEET_BEFORENMBYTES")
|
33
|
+
assert_instance_of Integer, _const("CRYPTO_BOX_CURVE25519XSALSA20POLY1305_TWEET_NONCEBYTES")
|
34
|
+
assert_instance_of Integer, _const("CRYPTO_BOX_CURVE25519XSALSA20POLY1305_TWEET_ZEROBYTES")
|
35
|
+
assert_instance_of Integer, _const("CRYPTO_BOX_CURVE25519XSALSA20POLY1305_TWEET_BOXZEROBYTES")
|
36
|
+
assert_instance_of String, _const("CRYPTO_BOX_CURVE25519XSALSA20POLY1305_TWEET_VERSION")
|
37
|
+
assert_instance_of Integer, _const("CRYPTO_BOX_CURVE25519XSALSA20POLY1305_PUBLICKEYBYTES")
|
38
|
+
assert_instance_of Integer, _const("CRYPTO_BOX_CURVE25519XSALSA20POLY1305_SECRETKEYBYTES")
|
39
|
+
assert_instance_of Integer, _const("CRYPTO_BOX_CURVE25519XSALSA20POLY1305_BEFORENMBYTES")
|
40
|
+
assert_instance_of Integer, _const("CRYPTO_BOX_CURVE25519XSALSA20POLY1305_NONCEBYTES")
|
41
|
+
assert_instance_of Integer, _const("CRYPTO_BOX_CURVE25519XSALSA20POLY1305_ZEROBYTES")
|
42
|
+
assert_instance_of Integer, _const("CRYPTO_BOX_CURVE25519XSALSA20POLY1305_BOXZEROBYTES")
|
43
|
+
assert_instance_of String, _const("CRYPTO_BOX_CURVE25519XSALSA20POLY1305_VERSION")
|
44
|
+
assert_instance_of String, _const("CRYPTO_BOX_CURVE25519XSALSA20POLY1305_IMPLEMENTATION")
|
45
|
+
assert_instance_of String, _const("CRYPTO_CORE_PRIMITIVE")
|
46
|
+
assert_instance_of Integer, _const("CRYPTO_CORE_OUTPUTBYTES")
|
47
|
+
assert_instance_of Integer, _const("CRYPTO_CORE_INPUTBYTES")
|
48
|
+
assert_instance_of Integer, _const("CRYPTO_CORE_KEYBYTES")
|
49
|
+
assert_instance_of Integer, _const("CRYPTO_CORE_CONSTBYTES")
|
50
|
+
assert_instance_of String, _const("CRYPTO_CORE_IMPLEMENTATION")
|
51
|
+
assert_instance_of String, _const("CRYPTO_CORE_VERSION")
|
52
|
+
assert_instance_of Integer, _const("CRYPTO_CORE_SALSA20_TWEET_OUTPUTBYTES")
|
53
|
+
assert_instance_of Integer, _const("CRYPTO_CORE_SALSA20_TWEET_INPUTBYTES")
|
54
|
+
assert_instance_of Integer, _const("CRYPTO_CORE_SALSA20_TWEET_KEYBYTES")
|
55
|
+
assert_instance_of Integer, _const("CRYPTO_CORE_SALSA20_TWEET_CONSTBYTES")
|
56
|
+
assert_instance_of String, _const("CRYPTO_CORE_SALSA20_TWEET_VERSION")
|
57
|
+
assert_instance_of Integer, _const("CRYPTO_CORE_SALSA20_OUTPUTBYTES")
|
58
|
+
assert_instance_of Integer, _const("CRYPTO_CORE_SALSA20_INPUTBYTES")
|
59
|
+
assert_instance_of Integer, _const("CRYPTO_CORE_SALSA20_KEYBYTES")
|
60
|
+
assert_instance_of Integer, _const("CRYPTO_CORE_SALSA20_CONSTBYTES")
|
61
|
+
assert_instance_of String, _const("CRYPTO_CORE_SALSA20_VERSION")
|
62
|
+
assert_instance_of String, _const("CRYPTO_CORE_SALSA20_IMPLEMENTATION")
|
63
|
+
assert_instance_of Integer, _const("CRYPTO_CORE_HSALSA20_TWEET_OUTPUTBYTES")
|
64
|
+
assert_instance_of Integer, _const("CRYPTO_CORE_HSALSA20_TWEET_INPUTBYTES")
|
65
|
+
assert_instance_of Integer, _const("CRYPTO_CORE_HSALSA20_TWEET_KEYBYTES")
|
66
|
+
assert_instance_of Integer, _const("CRYPTO_CORE_HSALSA20_TWEET_CONSTBYTES")
|
67
|
+
assert_instance_of String, _const("CRYPTO_CORE_HSALSA20_TWEET_VERSION")
|
68
|
+
assert_instance_of Integer, _const("CRYPTO_CORE_HSALSA20_OUTPUTBYTES")
|
69
|
+
assert_instance_of Integer, _const("CRYPTO_CORE_HSALSA20_INPUTBYTES")
|
70
|
+
assert_instance_of Integer, _const("CRYPTO_CORE_HSALSA20_KEYBYTES")
|
71
|
+
assert_instance_of Integer, _const("CRYPTO_CORE_HSALSA20_CONSTBYTES")
|
72
|
+
assert_instance_of String, _const("CRYPTO_CORE_HSALSA20_VERSION")
|
73
|
+
assert_instance_of String, _const("CRYPTO_CORE_HSALSA20_IMPLEMENTATION")
|
74
|
+
assert_instance_of String, _const("CRYPTO_HASHBLOCKS_PRIMITIVE")
|
75
|
+
assert_instance_of Integer, _const("CRYPTO_HASHBLOCKS_STATEBYTES")
|
76
|
+
assert_instance_of Integer, _const("CRYPTO_HASHBLOCKS_BLOCKBYTES")
|
77
|
+
assert_instance_of String, _const("CRYPTO_HASHBLOCKS_IMPLEMENTATION")
|
78
|
+
assert_instance_of String, _const("CRYPTO_HASHBLOCKS_VERSION")
|
79
|
+
assert_instance_of Integer, _const("CRYPTO_HASHBLOCKS_SHA512_TWEET_STATEBYTES")
|
80
|
+
assert_instance_of Integer, _const("CRYPTO_HASHBLOCKS_SHA512_TWEET_BLOCKBYTES")
|
81
|
+
assert_instance_of String, _const("CRYPTO_HASHBLOCKS_SHA512_TWEET_VERSION")
|
82
|
+
assert_instance_of Integer, _const("CRYPTO_HASHBLOCKS_SHA512_STATEBYTES")
|
83
|
+
assert_instance_of Integer, _const("CRYPTO_HASHBLOCKS_SHA512_BLOCKBYTES")
|
84
|
+
assert_instance_of String, _const("CRYPTO_HASHBLOCKS_SHA512_VERSION")
|
85
|
+
assert_instance_of String, _const("CRYPTO_HASHBLOCKS_SHA512_IMPLEMENTATION")
|
86
|
+
assert_instance_of Integer, _const("CRYPTO_HASHBLOCKS_SHA256_TWEET_STATEBYTES")
|
87
|
+
assert_instance_of Integer, _const("CRYPTO_HASHBLOCKS_SHA256_TWEET_BLOCKBYTES")
|
88
|
+
assert_instance_of String, _const("CRYPTO_HASHBLOCKS_SHA256_TWEET_VERSION")
|
89
|
+
assert_instance_of Integer, _const("CRYPTO_HASHBLOCKS_SHA256_STATEBYTES")
|
90
|
+
assert_instance_of Integer, _const("CRYPTO_HASHBLOCKS_SHA256_BLOCKBYTES")
|
91
|
+
assert_instance_of String, _const("CRYPTO_HASHBLOCKS_SHA256_VERSION")
|
92
|
+
assert_instance_of String, _const("CRYPTO_HASHBLOCKS_SHA256_IMPLEMENTATION")
|
93
|
+
assert_instance_of String, _const("CRYPTO_HASH_PRIMITIVE")
|
94
|
+
assert_instance_of Integer, _const("CRYPTO_HASH_BYTES")
|
95
|
+
assert_instance_of String, _const("CRYPTO_HASH_IMPLEMENTATION")
|
96
|
+
assert_instance_of String, _const("CRYPTO_HASH_VERSION")
|
97
|
+
assert_instance_of Integer, _const("CRYPTO_HASH_SHA512_TWEET_BYTES")
|
98
|
+
assert_instance_of String, _const("CRYPTO_HASH_SHA512_TWEET_VERSION")
|
99
|
+
assert_instance_of Integer, _const("CRYPTO_HASH_SHA512_BYTES")
|
100
|
+
assert_instance_of String, _const("CRYPTO_HASH_SHA512_VERSION")
|
101
|
+
assert_instance_of String, _const("CRYPTO_HASH_SHA512_IMPLEMENTATION")
|
102
|
+
assert_instance_of Integer, _const("CRYPTO_HASH_SHA256_TWEET_BYTES")
|
103
|
+
assert_instance_of String, _const("CRYPTO_HASH_SHA256_TWEET_VERSION")
|
104
|
+
assert_instance_of Integer, _const("CRYPTO_HASH_SHA256_BYTES")
|
105
|
+
assert_instance_of String, _const("CRYPTO_HASH_SHA256_VERSION")
|
106
|
+
assert_instance_of String, _const("CRYPTO_HASH_SHA256_IMPLEMENTATION")
|
107
|
+
assert_instance_of String, _const("CRYPTO_ONETIMEAUTH_PRIMITIVE")
|
108
|
+
assert_instance_of Integer, _const("CRYPTO_ONETIMEAUTH_BYTES")
|
109
|
+
assert_instance_of Integer, _const("CRYPTO_ONETIMEAUTH_KEYBYTES")
|
110
|
+
assert_instance_of String, _const("CRYPTO_ONETIMEAUTH_IMPLEMENTATION")
|
111
|
+
assert_instance_of String, _const("CRYPTO_ONETIMEAUTH_VERSION")
|
112
|
+
assert_instance_of Integer, _const("CRYPTO_ONETIMEAUTH_POLY1305_TWEET_BYTES")
|
113
|
+
assert_instance_of Integer, _const("CRYPTO_ONETIMEAUTH_POLY1305_TWEET_KEYBYTES")
|
114
|
+
assert_instance_of String, _const("CRYPTO_ONETIMEAUTH_POLY1305_TWEET_VERSION")
|
115
|
+
assert_instance_of Integer, _const("CRYPTO_ONETIMEAUTH_POLY1305_BYTES")
|
116
|
+
assert_instance_of Integer, _const("CRYPTO_ONETIMEAUTH_POLY1305_KEYBYTES")
|
117
|
+
assert_instance_of String, _const("CRYPTO_ONETIMEAUTH_POLY1305_VERSION")
|
118
|
+
assert_instance_of String, _const("CRYPTO_ONETIMEAUTH_POLY1305_IMPLEMENTATION")
|
119
|
+
assert_instance_of String, _const("CRYPTO_SCALARMULT_PRIMITIVE")
|
120
|
+
assert_instance_of Integer, _const("CRYPTO_SCALARMULT_BYTES")
|
121
|
+
assert_instance_of Integer, _const("CRYPTO_SCALARMULT_SCALARBYTES")
|
122
|
+
assert_instance_of String, _const("CRYPTO_SCALARMULT_IMPLEMENTATION")
|
123
|
+
assert_instance_of String, _const("CRYPTO_SCALARMULT_VERSION")
|
124
|
+
assert_instance_of Integer, _const("CRYPTO_SCALARMULT_CURVE25519_TWEET_BYTES")
|
125
|
+
assert_instance_of Integer, _const("CRYPTO_SCALARMULT_CURVE25519_TWEET_SCALARBYTES")
|
126
|
+
assert_instance_of String, _const("CRYPTO_SCALARMULT_CURVE25519_TWEET_VERSION")
|
127
|
+
assert_instance_of Integer, _const("CRYPTO_SCALARMULT_CURVE25519_BYTES")
|
128
|
+
assert_instance_of Integer, _const("CRYPTO_SCALARMULT_CURVE25519_SCALARBYTES")
|
129
|
+
assert_instance_of String, _const("CRYPTO_SCALARMULT_CURVE25519_VERSION")
|
130
|
+
assert_instance_of String, _const("CRYPTO_SCALARMULT_CURVE25519_IMPLEMENTATION")
|
131
|
+
assert_instance_of String, _const("CRYPTO_SECRETBOX_PRIMITIVE")
|
132
|
+
assert_instance_of Integer, _const("CRYPTO_SECRETBOX_KEYBYTES")
|
133
|
+
assert_instance_of Integer, _const("CRYPTO_SECRETBOX_NONCEBYTES")
|
134
|
+
assert_instance_of Integer, _const("CRYPTO_SECRETBOX_ZEROBYTES")
|
135
|
+
assert_instance_of Integer, _const("CRYPTO_SECRETBOX_BOXZEROBYTES")
|
136
|
+
assert_instance_of String, _const("CRYPTO_SECRETBOX_IMPLEMENTATION")
|
137
|
+
assert_instance_of String, _const("CRYPTO_SECRETBOX_VERSION")
|
138
|
+
assert_instance_of Integer, _const("CRYPTO_SECRETBOX_XSALSA20POLY1305_TWEET_KEYBYTES")
|
139
|
+
assert_instance_of Integer, _const("CRYPTO_SECRETBOX_XSALSA20POLY1305_TWEET_NONCEBYTES")
|
140
|
+
assert_instance_of Integer, _const("CRYPTO_SECRETBOX_XSALSA20POLY1305_TWEET_ZEROBYTES")
|
141
|
+
assert_instance_of Integer, _const("CRYPTO_SECRETBOX_XSALSA20POLY1305_TWEET_BOXZEROBYTES")
|
142
|
+
assert_instance_of String, _const("CRYPTO_SECRETBOX_XSALSA20POLY1305_TWEET_VERSION")
|
143
|
+
assert_instance_of Integer, _const("CRYPTO_SECRETBOX_XSALSA20POLY1305_KEYBYTES")
|
144
|
+
assert_instance_of Integer, _const("CRYPTO_SECRETBOX_XSALSA20POLY1305_NONCEBYTES")
|
145
|
+
assert_instance_of Integer, _const("CRYPTO_SECRETBOX_XSALSA20POLY1305_ZEROBYTES")
|
146
|
+
assert_instance_of Integer, _const("CRYPTO_SECRETBOX_XSALSA20POLY1305_BOXZEROBYTES")
|
147
|
+
assert_instance_of String, _const("CRYPTO_SECRETBOX_XSALSA20POLY1305_VERSION")
|
148
|
+
assert_instance_of String, _const("CRYPTO_SECRETBOX_XSALSA20POLY1305_IMPLEMENTATION")
|
149
|
+
assert_instance_of String, _const("CRYPTO_SIGN_PRIMITIVE")
|
150
|
+
assert_instance_of Integer, _const("CRYPTO_SIGN_BYTES")
|
151
|
+
assert_instance_of Integer, _const("CRYPTO_SIGN_PUBLICKEYBYTES")
|
152
|
+
assert_instance_of Integer, _const("CRYPTO_SIGN_SECRETKEYBYTES")
|
153
|
+
assert_instance_of String, _const("CRYPTO_SIGN_IMPLEMENTATION")
|
154
|
+
assert_instance_of String, _const("CRYPTO_SIGN_VERSION")
|
155
|
+
assert_instance_of Integer, _const("CRYPTO_SIGN_ED25519_TWEET_BYTES")
|
156
|
+
assert_instance_of Integer, _const("CRYPTO_SIGN_ED25519_TWEET_PUBLICKEYBYTES")
|
157
|
+
assert_instance_of Integer, _const("CRYPTO_SIGN_ED25519_TWEET_SECRETKEYBYTES")
|
158
|
+
assert_instance_of String, _const("CRYPTO_SIGN_ED25519_TWEET_VERSION")
|
159
|
+
assert_instance_of Integer, _const("CRYPTO_SIGN_ED25519_BYTES")
|
160
|
+
assert_instance_of Integer, _const("CRYPTO_SIGN_ED25519_PUBLICKEYBYTES")
|
161
|
+
assert_instance_of Integer, _const("CRYPTO_SIGN_ED25519_SECRETKEYBYTES")
|
162
|
+
assert_instance_of String, _const("CRYPTO_SIGN_ED25519_VERSION")
|
163
|
+
assert_instance_of String, _const("CRYPTO_SIGN_ED25519_IMPLEMENTATION")
|
164
|
+
assert_instance_of String, _const("CRYPTO_STREAM_PRIMITIVE")
|
165
|
+
assert_instance_of Integer, _const("CRYPTO_STREAM_KEYBYTES")
|
166
|
+
assert_instance_of Integer, _const("CRYPTO_STREAM_NONCEBYTES")
|
167
|
+
assert_instance_of String, _const("CRYPTO_STREAM_IMPLEMENTATION")
|
168
|
+
assert_instance_of String, _const("CRYPTO_STREAM_VERSION")
|
169
|
+
assert_instance_of Integer, _const("CRYPTO_STREAM_XSALSA20_TWEET_KEYBYTES")
|
170
|
+
assert_instance_of Integer, _const("CRYPTO_STREAM_XSALSA20_TWEET_NONCEBYTES")
|
171
171
|
end
|
172
172
|
end
|
@@ -4,7 +4,7 @@ class TweetNaClCryptoBoxTest < MiniTest::Test
|
|
4
4
|
def test_crypto_box
|
5
5
|
input = "hello world"
|
6
6
|
nonce = "*" * 24
|
7
|
-
expected_cipher = "
|
7
|
+
expected_cipher = "FBC937C3F136E09FA8A45C58C15E801394F5BB74CE8D538FE3D726"
|
8
8
|
pk = "\x60\xF0\x23\x07\xDF\xB6\x8B\xBB\x15\xE2\x92\x59\x05\x1B\x2D\xF8\xC8\x59\xDB\x5B\xDE\x97\xFA\xE8\x9B\x5F\xE5\x62\x63\x11\xD6\x56"
|
9
9
|
sk = "\xBE\x38\x7C\x59\xD1\x81\x0B\xCC\x8E\xD8\x90\xDB\x3D\xF9\x80\x63\x9E\xD2\x54\x44\xFB\x4D\xD1\x92\xB6\xC6\x75\x53\xF9\x76\x9F\xCF"
|
10
10
|
|
@@ -31,4 +31,19 @@ class TweetNaClCryptoBoxTest < MiniTest::Test
|
|
31
31
|
def test_crypto_box_nonce_not_correct_length
|
32
32
|
assert_raises(ArgumentError) { TweetNaCl.crypto_box("foo", "bar", "pk", "sk") }
|
33
33
|
end
|
34
|
+
|
35
|
+
def test_crypto_box_salsa_rounds_set_with_nil_argument
|
36
|
+
assert_raises(ArgumentError) { TweetNaCl.salsa_rounds = nil }
|
37
|
+
end
|
38
|
+
|
39
|
+
def test_crypto_box_salsa_rounds_get_set
|
40
|
+
assert_equal(TweetNaCl.salsa_rounds, TweetNaCl::DEFAULT_SALSA_ROUNDS)
|
41
|
+
TweetNaCl.salsa_rounds = 42
|
42
|
+
assert_equal(TweetNaCl.salsa_rounds, 42)
|
43
|
+
ensure
|
44
|
+
TweetNaCl.salsa_rounds = TweetNaCl::DEFAULT_SALSA_ROUNDS
|
45
|
+
end
|
46
|
+
|
47
|
+
def test_crypto_box_salsa_rounds_get
|
48
|
+
end
|
34
49
|
end
|
@@ -4,7 +4,7 @@ class TweetNaClCryptoSecretTest < MiniTest::Test
|
|
4
4
|
def test_crypto_secretbox
|
5
5
|
input = "hello world"
|
6
6
|
nonce = "*" * 24
|
7
|
-
expected_cipher = "
|
7
|
+
expected_cipher = "2A9612E32BCC4E836B3D46463B7C1546EA8BC752A1B6AE6DE"
|
8
8
|
k = "\x60\xF0\x23\x07\xDF\xB6\x8B\xBB\x15\xE2\x92\x59\x05\x1B\x2D\xF8\xC8\x59\xDB\x5B\xDE\x97\xFA\xE8\x9B\x5F\xE5\x62\x63\x11\xD6\x56"
|
9
9
|
|
10
10
|
cipher = TweetNaCl.crypto_secretbox(input, nonce, k)
|
data/tweetnacl.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
$:<< 'lib'
|
3
3
|
Gem::Specification.new do |spec|
|
4
4
|
spec.name = "tweetnacl"
|
5
|
-
spec.version = "0.
|
5
|
+
spec.version = "1.0.0"
|
6
6
|
spec.authors = ["Franck Verrot"]
|
7
7
|
spec.email = ["franck@verrot.fr"]
|
8
8
|
spec.homepage = "https://github.com/franckverrot/tweetnacl"
|
@@ -21,4 +21,24 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.add_development_dependency "bundler", "~> 1.5"
|
22
22
|
spec.add_development_dependency "rake"
|
23
23
|
spec.add_development_dependency "minitest"
|
24
|
+
|
25
|
+
spec.post_install_message = <<END_OF_MESSAGE
|
26
|
+
[TweetNaCl] Breaking change in v1.0.0!
|
27
|
+
|
28
|
+
A breaking change has been introduced to `crypto_box` and `crypto_secretbox`
|
29
|
+
that makes ciphers differ. The first 64 bits are always empty and have been
|
30
|
+
dropped from the cipher output.
|
31
|
+
|
32
|
+
This causes differences like:
|
33
|
+
|
34
|
+
- expected_cipher = "0000000000000000FBC937C3F136E09FA8A45C58C15E801394F5BB74CE8D538FE3D726"
|
35
|
+
+ expected_cipher = "FBC937C3F136E09FA8A45C58C15E801394F5BB74CE8D538FE3D726"
|
36
|
+
|
37
|
+
You might need to go through all persisted ciphers and change these values.
|
38
|
+
|
39
|
+
If you have more questions, please file a ticket! Thanks!
|
40
|
+
END_OF_MESSAGE
|
41
|
+
|
42
|
+
spec.cert_chain = ['certs/franckverrot.pem']
|
43
|
+
spec.signing_key = File.expand_path(ENV['RUBYGEMS_CERT_PATH']) if $0 =~ /gem\z/
|
24
44
|
end
|
metadata
CHANGED
@@ -1,14 +1,40 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tweetnacl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Franck Verrot
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
|
-
cert_chain:
|
11
|
-
|
10
|
+
cert_chain:
|
11
|
+
- |
|
12
|
+
-----BEGIN CERTIFICATE-----
|
13
|
+
MIIEMDCCApigAwIBAgIBATANBgkqhkiG9w0BAQsFADAhMR8wHQYDVQQDDBZmcmFu
|
14
|
+
Y2svREM9dmVycm90L0RDPWZyMB4XDTE4MTIyMTAxMzgwNVoXDTE5MTIyMTAxMzgw
|
15
|
+
NVowITEfMB0GA1UEAwwWZnJhbmNrL0RDPXZlcnJvdC9EQz1mcjCCAaIwDQYJKoZI
|
16
|
+
hvcNAQEBBQADggGPADCCAYoCggGBANjZ/7L2ECEQAVOYvMl0JOwyVXKRCsLnVrmP
|
17
|
+
mcwpCMFL0ennkpLJcqiDNsm0b/RkJHSLu3FMoYrIU5KoaP7iMIsLGv846aw2wSNI
|
18
|
+
G5XWGnRY9dWVu7Gz2OZbsDi18WT94Y/s2yf+orPLAiaJb451decYEpHqLTiaJhhJ
|
19
|
+
xHckJixfDVwZGJpow7rrJAJMbU9ZCJFUFAfNpgkOqhbBU4Ehi1umbC/ZBsVDiRVa
|
20
|
+
ZjfNhe7kgx6jo3EfPY4izPW2IKkpk7nJKNfZnM2r0cnpPJbhyH1m5fsikBD5tRNe
|
21
|
+
YxJpxDPf8UBTTXqoeSSQygiHWWZVbH3zj2jWzi5T0do5PbZcCeoIKR4TyOgbOgBW
|
22
|
+
Ra7bm9uVXo6MQWpp0aeC/X+F2Y/dFjXAP/TPL89ownd3XZUaNDdZfS6aKBMG3a5C
|
23
|
+
gcRLMt1hOJchslGNtvkq5W4Wq8hw+zNHzTMpRkIsYTbvlJCDxXRKR3jwPDTRvNAl
|
24
|
+
aemBW1g3yerHeDQr6GtxKEvhmHdw/wIDAQABo3MwcTAJBgNVHRMEAjAAMAsGA1Ud
|
25
|
+
DwQEAwIEsDAdBgNVHQ4EFgQUgG77cLAMzowManymHX63DbvfR5IwGwYDVR0RBBQw
|
26
|
+
EoEQZnJhbmNrQHZlcnJvdC5mcjAbBgNVHRIEFDASgRBmcmFuY2tAdmVycm90LmZy
|
27
|
+
MA0GCSqGSIb3DQEBCwUAA4IBgQAofcg/2kPT9VMBGEuO17F3yH6fiJboQeLL1nlM
|
28
|
+
ULZv5LyyqV6Yq0cQ+TZMGHd/hbvBFTN9/55WmiN66tYLaunyfr4aUflCQcM/qu2g
|
29
|
+
Ieoz8QLxfIi24DCDezpODHaud6Qt0VmMpalSOxbCuMeNnXLpnxbP/7fJBJoum5GS
|
30
|
+
CqGuH81fXy7KAAlgMBcsYb3+vZJhuAeM/zSrE5Hmf1zApTEVZc4Y0dO6eRC6WbXW
|
31
|
+
pJfyNXyITkkr7pTRYO/wj3lFoeDqfGXb48HvpJ54lqfeIvr9Hek7grcyQGfZ1rFY
|
32
|
+
Dx3RTjxParzCWk/HCFHQiZmU5lnOl7GShwAZrG6l0UHST3/YNCA52KDrmC/T0A2N
|
33
|
+
d2MQGgSZerYTx+HRKlradglBDPCs4nxQj5pnoDvGbngeZUua+ZZGFM9SXBT3zAIQ
|
34
|
+
akLQjJWKHQCzyqDChJHRGhlxyVFKP2JwqFgzE3p1l64JArsb7BEqhpoBPXMwlChE
|
35
|
+
HgzCBTsCU0syQBb1s6lBz2HrWA4=
|
36
|
+
-----END CERTIFICATE-----
|
37
|
+
date: 2019-05-01 00:00:00.000000000 Z
|
12
38
|
dependencies:
|
13
39
|
- !ruby/object:Gem::Dependency
|
14
40
|
name: rake-compiler
|
@@ -74,13 +100,14 @@ extensions:
|
|
74
100
|
- ext/tweetnacl/extconf.rb
|
75
101
|
extra_rdoc_files: []
|
76
102
|
files:
|
103
|
+
- ".circleci/config.yml"
|
77
104
|
- ".gitignore"
|
78
|
-
- ".travis.yml"
|
79
105
|
- CHANGELOG.md
|
80
106
|
- Gemfile
|
81
107
|
- LICENSE.txt
|
82
108
|
- README.md
|
83
109
|
- Rakefile
|
110
|
+
- certs/franckverrot.pem
|
84
111
|
- ext/tweetnacl/extconf.rb
|
85
112
|
- ext/tweetnacl/randombytes.c
|
86
113
|
- ext/tweetnacl/randombytes.h
|
@@ -110,7 +137,21 @@ homepage: https://github.com/franckverrot/tweetnacl
|
|
110
137
|
licenses:
|
111
138
|
- GPLv3
|
112
139
|
metadata: {}
|
113
|
-
post_install_message:
|
140
|
+
post_install_message: |
|
141
|
+
[TweetNaCl] Breaking change in v1.0.0!
|
142
|
+
|
143
|
+
A breaking change has been introduced to `crypto_box` and `crypto_secretbox`
|
144
|
+
that makes ciphers differ. The first 64 bits are always empty and have been
|
145
|
+
dropped from the cipher output.
|
146
|
+
|
147
|
+
This causes differences like:
|
148
|
+
|
149
|
+
- expected_cipher = "0000000000000000FBC937C3F136E09FA8A45C58C15E801394F5BB74CE8D538FE3D726"
|
150
|
+
+ expected_cipher = "FBC937C3F136E09FA8A45C58C15E801394F5BB74CE8D538FE3D726"
|
151
|
+
|
152
|
+
You might need to go through all persisted ciphers and change these values.
|
153
|
+
|
154
|
+
If you have more questions, please file a ticket! Thanks!
|
114
155
|
rdoc_options: []
|
115
156
|
require_paths:
|
116
157
|
- lib
|
@@ -125,8 +166,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
125
166
|
- !ruby/object:Gem::Version
|
126
167
|
version: '0'
|
127
168
|
requirements: []
|
128
|
-
|
129
|
-
rubygems_version: 2.2.0
|
169
|
+
rubygems_version: 3.0.2
|
130
170
|
signing_key:
|
131
171
|
specification_version: 4
|
132
172
|
summary: TweetNaCl for Ruby
|
@@ -145,4 +185,3 @@ test_files:
|
|
145
185
|
- test/tweetnacl_crypto_sign_key_pair_test.rb
|
146
186
|
- test/tweetnacl_crypto_sign_open_test.rb
|
147
187
|
- test/tweetnacl_crypto_sign_test.rb
|
148
|
-
has_rdoc:
|
metadata.gz.sig
ADDED
Binary file
|
data/.travis.yml
DELETED