rbnacl-libsodium 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (83) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +4 -0
  3. data/lib/rbnacl/libsodium/version.rb +1 -1
  4. data/vendor/libsodium/ChangeLog +10 -0
  5. data/vendor/libsodium/LICENSE +1 -1
  6. data/vendor/libsodium/Makefile.in +10 -2
  7. data/vendor/libsodium/THANKS +1 -0
  8. data/vendor/libsodium/autom4te.cache/output.1 +52 -17
  9. data/vendor/libsodium/autom4te.cache/output.3 +52 -17
  10. data/vendor/libsodium/autom4te.cache/requests +558 -558
  11. data/vendor/libsodium/autom4te.cache/traces.1 +543 -542
  12. data/vendor/libsodium/autom4te.cache/traces.3 +320 -319
  13. data/vendor/libsodium/build-aux/compile +347 -0
  14. data/vendor/libsodium/build-aux/config.guess +1568 -0
  15. data/vendor/libsodium/build-aux/config.sub +1793 -0
  16. data/vendor/libsodium/build-aux/depcomp +791 -0
  17. data/vendor/libsodium/build-aux/install-sh +527 -0
  18. data/vendor/libsodium/build-aux/ltmain.sh +9655 -0
  19. data/vendor/libsodium/build-aux/missing +215 -0
  20. data/vendor/libsodium/build-aux/test-driver +139 -0
  21. data/vendor/libsodium/builds/msvc/properties/Common.props +1 -3
  22. data/vendor/libsodium/builds/msvc/properties/Release.props +3 -1
  23. data/vendor/libsodium/builds/msvc/resource.rc +0 -0
  24. data/vendor/libsodium/builds/msvc/version.h +2 -2
  25. data/vendor/libsodium/builds/msvc/vs2010/libsodium/libsodium.props +1 -1
  26. data/vendor/libsodium/builds/msvc/vs2010/test/test.vcxproj +12 -6
  27. data/vendor/libsodium/builds/msvc/vs2010/test/test.vcxproj.filters +11 -5
  28. data/vendor/libsodium/builds/msvc/vs2012/libsodium/libsodium.props +1 -1
  29. data/vendor/libsodium/builds/msvc/vs2012/test/test.vcxproj +12 -6
  30. data/vendor/libsodium/builds/msvc/vs2012/test/test.vcxproj.filters +11 -5
  31. data/vendor/libsodium/builds/msvc/vs2013/libsodium/libsodium.props +1 -1
  32. data/vendor/libsodium/builds/msvc/vs2013/test/test.vcxproj +12 -6
  33. data/vendor/libsodium/builds/msvc/vs2013/test/test.vcxproj.filters +11 -5
  34. data/vendor/libsodium/configure +52 -17
  35. data/vendor/libsodium/configure.ac +7 -4
  36. data/vendor/libsodium/dist-build/ios.sh +4 -3
  37. data/vendor/libsodium/libsodium.vcxproj +4 -4
  38. data/vendor/libsodium/msvc-scripts/process.bat +2 -2
  39. data/vendor/libsodium/packaging/nuget/package.config +1 -1
  40. data/vendor/libsodium/packaging/nuget/package.nuspec +25 -25
  41. data/vendor/libsodium/packaging/nuget/package.targets +20 -20
  42. data/vendor/libsodium/src/libsodium/Makefile.in +2 -2
  43. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2-impl.h +2 -2
  44. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2.h +8 -8
  45. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/auth_poly1305_donna.c +6 -6
  46. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna.h +2 -2
  47. data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/crypto_scrypt-common.c +1 -1
  48. data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/crypto_scrypt.h +2 -2
  49. data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/pbkdf2-sha256.h +2 -2
  50. data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/pwhash_scryptsalsa208sha256.c +1 -1
  51. data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/sse/pwhash_scryptsalsa208sha256_sse.c +1 -1
  52. data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/sysendian.h +2 -2
  53. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/donna_c64/smult_curve25519_donna_c64.c +38 -38
  54. data/vendor/libsodium/src/libsodium/crypto_secretbox/crypto_secretbox_easy.c +8 -0
  55. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_frombytes.c +10 -10
  56. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_mul.c +10 -10
  57. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_sq.c +10 -10
  58. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_sq2.c +10 -10
  59. data/vendor/libsodium/src/libsodium/include/sodium.h +2 -2
  60. data/vendor/libsodium/src/libsodium/include/sodium/core.h +2 -2
  61. data/vendor/libsodium/src/libsodium/include/sodium/export.h +3 -3
  62. data/vendor/libsodium/src/libsodium/include/sodium/runtime.h +2 -2
  63. data/vendor/libsodium/src/libsodium/include/sodium/utils.h +4 -4
  64. data/vendor/libsodium/src/libsodium/include/sodium/version.h.in +2 -2
  65. data/vendor/libsodium/src/libsodium/randombytes/salsa20/randombytes_salsa20_random.c +9 -9
  66. data/vendor/libsodium/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c +9 -9
  67. data/vendor/libsodium/src/libsodium/sodium/utils.c +17 -15
  68. data/vendor/libsodium/test/default/Makefile.in +5 -4
  69. data/vendor/libsodium/test/default/aead_chacha20poly1305.c +25 -0
  70. data/vendor/libsodium/test/default/aead_chacha20poly1305.exp +4 -0
  71. data/vendor/libsodium/test/default/box_easy2.c +23 -8
  72. data/vendor/libsodium/test/default/box_easy2.exp +2 -0
  73. data/vendor/libsodium/test/default/generichash.c +23 -15
  74. data/vendor/libsodium/test/default/generichash3.c +24 -20
  75. data/vendor/libsodium/test/default/pwhash.c +27 -28
  76. data/vendor/libsodium/test/default/scalarmult6.c +19 -3
  77. data/vendor/libsodium/test/default/secretbox_easy2.c +27 -11
  78. data/vendor/libsodium/test/default/secretbox_easy2.exp +3 -0
  79. data/vendor/libsodium/test/default/shorthash.c +15 -10
  80. data/vendor/libsodium/test/default/sign.c +23 -0
  81. data/vendor/libsodium/test/default/sodium_utils2.c +4 -0
  82. data/vendor/libsodium/test/default/sodium_utils3.c +4 -0
  83. metadata +10 -2
@@ -1041,6 +1041,24 @@ static TestData test_data[] = {
1041
1041
  {{0xf5,0xe5,0x76,0x7c,0xf1,0x53,0x31,0x95,0x17,0x63,0x0f,0x22,0x68,0x76,0xb8,0x6c,0x81,0x60,0xcc,0x58,0x3b,0xc0,0x13,0x74,0x4c,0x6b,0xf2,0x55,0xf5,0xcc,0x0e,0xe5,},{0x27,0x81,0x17,0xfc,0x14,0x4c,0x72,0x34,0x0f,0x67,0xd0,0xf2,0x31,0x6e,0x83,0x86,0xce,0xff,0xbf,0x2b,0x24,0x28,0xc9,0xc5,0x1f,0xef,0x7c,0x59,0x7f,0x1d,0x42,0x6e,},{0x0a,0xab,0x4c,0x90,0x05,0x01,0xb3,0xe2,0x4d,0x7c,0xdf,0x46,0x63,0x32,0x6a,0x3a,0x87,0xdf,0x5e,0x48,0x43,0xb2,0xcb,0xdb,0x67,0xcb,0xf6,0xe4,0x60,0xfe,0xc3,0x50,0xaa,0x53,0x71,0xb1,0x50,0x8f,0x9f,0x45,0x28,0xec,0xea,0x23,0xc4,0x36,0xd9,0x4b,0x5e,0x8f,0xcd,0x4f,0x68,0x1e,0x30,0xa6,0xac,0x00,0xa9,0x70,0x4a,0x18,0x8a,0x03,},"\x08\xb8\xb2\xb7\x33\x42\x42\x43\x76\x0f\xe4\x26\xa4\xb5\x49\x08\x63\x21\x10\xa6\x6c\x2f\x65\x91\xea\xbd\x33\x45\xe3\xe4\xeb\x98\xfa\x6e\x26\x4b\xf0\x9e\xfe\x12\xee\x50\xf8\xf5\x4e\x9f\x77\xb1\xe3\x55\xf6\xc5\x05\x44\xe2\x3f\xb1\x43\x3d\xdf\x73\xbe\x84\xd8\x79\xde\x7c\x00\x46\xdc\x49\x96\xd9\xe7\x73\xf4\xbc\x9e\xfe\x57\x38\x82\x9a\xdb\x26\xc8\x1b\x37\xc9\x3a\x1b\x27\x0b\x20\x32\x9d\x65\x86\x75\xfc\x6e\xa5\x34\xe0\x81\x0a\x44\x32\x82\x6b\xf5\x8c\x94\x1e\xfb\x65\xd5\x7a\x33\x8b\xbd\x2e\x26\x64\x0f\x89\xff\xbc\x1a\x85\x8e\xfc\xb8\x55\x0e\xe3\xa5\xe1\x99\x8b\xd1\x77\xe9\x3a\x73\x63\xc3\x44\xfe\x6b\x19\x9e\xe5\xd0\x2e\x82\xd5\x22\xc4\xfe\xba\x15\x45\x2f\x80\x28\x8a\x82\x1a\x57\x91\x16\xec\x6d\xad\x2b\x3b\x31\x0d\xa9\x03\x40\x1a\xa6\x21\x00\xab\x5d\x1a\x36\x55\x3e\x06\x20\x3b\x33\x89\x0c\xc9\xb8\x32\xf7\x9e\xf8\x05\x60\xcc\xb9\xa3\x9c\xe7\x67\x96\x7e\xd6\x28\xc6\xad\x57\x3c\xb1\x16\xdb\xef\xef\xd7\x54\x99\xda\x96\xbd\x68\xa8\xa9\x7b\x92\x8a\x8b\xbc\x10\x3b\x66\x21\xfc\xde\x2b\xec\xa1\x23\x1d\x20\x6b\xe6\xcd\x9e\xc7\xaf\xf6\xf6\xc9\x4f\xcd\x72\x04\xed\x34\x55\xc6\x8c\x83\xf4\xa4\x1d\xa4\xaf\x2b\x74\xef\x5c\x53\xf1\xd8\xac\x70\xbd\xcb\x7e\xd1\x85\xce\x81\xbd\x84\x35\x9d\x44\x25\x4d\x95\x62\x9e\x98\x55\xa9\x4a\x7c\x19\x58\xd1\xf8\xad\xa5\xd0\x53\x2e\xd8\xa5\xaa\x3f\xb2\xd1\x7b\xa7\x0e\xb6\x24\x8e\x59\x4e\x1a\x22\x97\xac\xbb\xb3\x9d\x50\x2f\x1a\x8c\x6e\xb6\xf1\xce\x22\xb3\xde\x1a\x1f\x40\xcc\x24\x55\x41\x19\xa8\x31\xa9\xaa\xd6\x07\x9c\xad\x88\x42\x5d\xe6\xbd\xe1\xa9\x18\x7e\xbb\x60\x92\xcf\x67\xbf\x2b\x13\xfd\x65\xf2\x70\x88\xd7\x8b\x7e\x88\x3c\x87\x59\xd2\xc4\xf5\xc6\x5a\xdb\x75\x53\x87\x8a\xd5\x75\xf9\xfa\xd8\x78\xe8\x0a\x0c\x9b\xa6\x3b\xcb\xcc\x27\x32\xe6\x94\x85\xbb\xc9\xc9\x0b\xfb\xd6\x24\x81\xd9\x08\x9b\xec\xcf\x80\xcf\xe2\xdf\x16\xa2\xcf\x65\xbd\x92\xdd\x59\x7b\x07\x07\xe0\x91\x7a\xf4\x8b\xbb\x75\xfe\xd4\x13\xd2\x38\xf5\x55\x5a\x7a\x56\x9d\x80\xc3\x41\x4a\x8d\x08\x59\xdc\x65\xa4\x61\x28\xba\xb2\x7a\xf8\x7a\x71\x31\x4f\x31\x8c\x78\x2b\x23\xeb\xfe\x80\x8b\x82\xb0\xce\x26\x40\x1d\x2e\x22\xf0\x4d\x83\xd1\x25\x5d\xc5\x1a\xdd\xd3\xb7\x5a\x2b\x1a\xe0\x78\x45\x04\xdf\x54\x3a\xf8\x96\x9b\xe3\xea\x70\x82\xff\x7f\xc9\x88\x8c\x14\x4d\xa2\xaf\x58\x42\x9e\xc9\x60\x31\xdb\xca\xd3\xda\xd9\xaf\x0d\xcb\xaa\xaf\x26\x8c\xb8\xfc\xff\xea\xd9\x4f\x3c\x7c\xa4\x95\xe0\x56\xa9\xb4\x7a\xcd\xb7\x51\xfb\x73\xe6\x66\xc6\xc6\x55\xad\xe8\x29\x72\x97\xd0\x7a\xd1\xba\x5e\x43\xf1\xbc\xa3\x23\x01\x65\x13\x39\xe2\x29\x04\xcc\x8c\x42\xf5\x8c\x30\xc0\x4a\xaf\xdb\x03\x8d\xda\x08\x47\xdd\x98\x8d\xcd\xa6\xf3\xbf\xd1\x5c\x4b\x4c\x45\x25\x00\x4a\xa0\x6e\xef\xf8\xca\x61\x78\x3a\xac\xec\x57\xfb\x3d\x1f\x92\xb0\xfe\x2f\xd1\xa8\x5f\x67\x24\x51\x7b\x65\xe6\x14\xad\x68\x08\xd6\xf6\xee\x34\xdf\xf7\x31\x0f\xdc\x82\xae\xbf\xd9\x04\xb0\x1e\x1d\xc5\x4b\x29\x27\x09\x4b\x2d\xb6\x8d\x6f\x90\x3b\x68\x40\x1a\xde\xbf\x5a\x7e\x08\xd7\x8f\xf4\xef\x5d\x63\x65\x3a\x65\x04\x0c\xf9\xbf\xd4\xac\xa7\x98\x4a\x74\xd3\x71\x45\x98\x67\x80\xfc\x0b\x16\xac\x45\x16\x49\xde\x61\x88\xa7\xdb\xdf\x19\x1f\x64\xb5\xfc\x5e\x2a\xb4\x7b\x57\xf7\xf7\x27\x6c\xd4\x19\xc1\x7a\x3c\xa8\xe1\xb9\x39\xae\x49\xe4\x88\xac\xba\x6b\x96\x56\x10\xb5\x48\x01\x09\xc8\xb1\x7b\x80\xe1\xb7\xb7\x50\xdf\xc7\x59\x8d\x5d\x50\x11\xfd\x2d\xcc\x56\x00\xa3\x2e\xf5\xb5\x2a\x1e\xcc\x82\x0e\x30\x8a\xa3\x42\x72\x1a\xac\x09\x43\xbf\x66\x86\xb6\x4b\x25\x79\x37\x65\x04\xcc\xc4\x93\xd9\x7e\x6a\xed\x3f\xb0\xf9\xcd\x71\xa4\x3d\xd4\x97\xf0\x1f\x17\xc0\xe2\xcb\x37\x97\xaa\x2a\x2f\x25\x66\x56\x16\x8e\x6c\x49\x6a\xfc\x5f\xb9\x32\x46\xf6\xb1\x11\x63\x98\xa3\x46\xf1\xa6\x41\xf3\xb0\x41\xe9\x89\xf7\x91\x4f\x90\xcc\x2c\x7f\xff\x35\x78\x76\xe5\x06\xb5\x0d\x33\x4b\xa7\x7c\x22\x5b\xc3\x07\xba\x53\x71\x52\xf3\xf1\x61\x0e\x4e\xaf\xe5\x95\xf6\xd9\xd9\x0d\x11\xfa\xa9\x33\xa1\x5e\xf1\x36\x95\x46\x86\x8a\x7f\x3a\x45\xa9\x67\x68\xd4\x0f\xd9\xd0\x34\x12\xc0\x91\xc6\x31\x5c\xf4\xfd\xe7\xcb\x68\x60\x69\x37\x38\x0d\xb2\xea\xaa\x70\x7b\x4c\x41\x85\xc3\x2e\xdd\xcd\xd3\x06\x70\x5e\x4d\xc1\xff\xc8\x72\xee\xee\x47\x5a\x64\xdf\xac\x86\xab\xa4\x1c\x06\x18\x98\x3f\x87\x41\xc5\xef\x68\xd3\xa1\x01\xe8\xa3\xb8\xca\xc6\x0c\x90\x5c\x15\xfc\x91\x08\x40\xb9\x4c\x00\xa0\xb9\xd0"},
1042
1042
  };
1043
1043
 
1044
+ static void add_l(unsigned char * const S)
1045
+ {
1046
+ static const unsigned char l[32] =
1047
+ { 0xed, 0xd3, 0xf5, 0x5c, 0x1a, 0x63, 0x12, 0x58,
1048
+ 0xd6, 0x9c, 0xf7, 0xa2, 0xde, 0xf9, 0xde, 0x14,
1049
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1050
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10 };
1051
+ unsigned char c = 0U;
1052
+ unsigned int i;
1053
+ unsigned int s;
1054
+
1055
+ for (i = 0U; i < 32U; i++) {
1056
+ s = S[i] + l[i] + c;
1057
+ S[i] = (unsigned char) s;
1058
+ c = (s >> 8) & 1;
1059
+ }
1060
+ }
1061
+
1044
1062
  int main(void)
1045
1063
  {
1046
1064
  unsigned char extracted_seed[crypto_sign_ed25519_SEEDBYTES];
@@ -1077,6 +1095,11 @@ int main(void)
1077
1095
  printf("crypto_sign_open() failure: [%u]\n", i);
1078
1096
  continue;
1079
1097
  }
1098
+ add_l(sm + 32);
1099
+ if (crypto_sign_open(m, &mlen, sm, smlen, test_data[i].pk) != 0) {
1100
+ printf("crypto_sign_open(): signature [%u] is not malleable\n", i);
1101
+ continue;
1102
+ }
1080
1103
  if (memcmp(test_data[i].m, m, (size_t)mlen) != 0) {
1081
1104
  printf("message verification failure: [%u]\n", i);
1082
1105
  continue;
@@ -7,6 +7,10 @@
7
7
  #define TEST_NAME "sodium_utils2"
8
8
  #include "cmptest.h"
9
9
 
10
+ #ifdef __SANITIZE_ADDRESS__
11
+ # error This test requires address sanitizer to be off
12
+ #endif
13
+
10
14
  static void segv_handler(int sig)
11
15
  {
12
16
  printf("Intentional segfault / bus error caught\n");
@@ -7,6 +7,10 @@
7
7
  #define TEST_NAME "sodium_utils3"
8
8
  #include "cmptest.h"
9
9
 
10
+ #ifdef __SANITIZE_ADDRESS__
11
+ # error This test requires address sanitizer to be off
12
+ #endif
13
+
10
14
  static void segv_handler(int sig)
11
15
  {
12
16
  printf("Intentional segfault / bus error caught\n");
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbnacl-libsodium
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Artiom Di
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-27 00:00:00.000000000 Z
11
+ date: 2014-11-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rbnacl
@@ -96,6 +96,14 @@ files:
96
96
  - vendor/libsodium/autom4te.cache/traces.1
97
97
  - vendor/libsodium/autom4te.cache/traces.2
98
98
  - vendor/libsodium/autom4te.cache/traces.3
99
+ - vendor/libsodium/build-aux/compile
100
+ - vendor/libsodium/build-aux/config.guess
101
+ - vendor/libsodium/build-aux/config.sub
102
+ - vendor/libsodium/build-aux/depcomp
103
+ - vendor/libsodium/build-aux/install-sh
104
+ - vendor/libsodium/build-aux/ltmain.sh
105
+ - vendor/libsodium/build-aux/missing
106
+ - vendor/libsodium/build-aux/test-driver
99
107
  - vendor/libsodium/builds/msvc/build/buildall.bat
100
108
  - vendor/libsodium/builds/msvc/build/buildbase.bat
101
109
  - vendor/libsodium/builds/msvc/properties/Common.props