rbnacl-libsodium 0.6.1 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (89) 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/AUTHORS +0 -3
  5. data/vendor/libsodium/ChangeLog +24 -0
  6. data/vendor/libsodium/THANKS +2 -0
  7. data/vendor/libsodium/autom4te.cache/output.1 +35 -147
  8. data/vendor/libsodium/autom4te.cache/output.3 +35 -147
  9. data/vendor/libsodium/autom4te.cache/requests +127 -127
  10. data/vendor/libsodium/autom4te.cache/traces.1 +244 -254
  11. data/vendor/libsodium/autom4te.cache/traces.3 +111 -113
  12. data/vendor/libsodium/builds/msvc/properties/Common.props +3 -1
  13. data/vendor/libsodium/builds/msvc/properties/Release.props +1 -3
  14. data/vendor/libsodium/builds/msvc/version.h +3 -3
  15. data/vendor/libsodium/builds/msvc/vs2010/libsodium/libsodium.vcxproj +1 -11
  16. data/vendor/libsodium/builds/msvc/vs2010/libsodium/libsodium.vcxproj.filters +1 -37
  17. data/vendor/libsodium/builds/msvc/vs2010/test/test.vcxproj +10 -1
  18. data/vendor/libsodium/builds/msvc/vs2010/test/test.vcxproj.filters +10 -1
  19. data/vendor/libsodium/builds/msvc/vs2012/libsodium/libsodium.vcxproj +1 -11
  20. data/vendor/libsodium/builds/msvc/vs2012/libsodium/libsodium.vcxproj.filters +1 -37
  21. data/vendor/libsodium/builds/msvc/vs2012/test/test.vcxproj +10 -1
  22. data/vendor/libsodium/builds/msvc/vs2012/test/test.vcxproj.filters +10 -1
  23. data/vendor/libsodium/builds/msvc/vs2013/libsodium/libsodium.vcxproj +1 -11
  24. data/vendor/libsodium/builds/msvc/vs2013/libsodium/libsodium.vcxproj.filters +1 -37
  25. data/vendor/libsodium/builds/msvc/vs2013/test/test.vcxproj +10 -1
  26. data/vendor/libsodium/builds/msvc/vs2013/test/test.vcxproj.filters +10 -1
  27. data/vendor/libsodium/configure +33 -145
  28. data/vendor/libsodium/configure.ac +22 -23
  29. data/vendor/libsodium/dist-build/android-build.sh +1 -0
  30. data/vendor/libsodium/dist-build/emscripten.sh +2 -2
  31. data/vendor/libsodium/dist-build/ios.sh +1 -0
  32. data/vendor/libsodium/libsodium.pc.in +1 -1
  33. data/vendor/libsodium/libsodium.vcxproj +1 -5
  34. data/vendor/libsodium/libsodium.vcxproj.filters +1 -13
  35. data/vendor/libsodium/msvc-scripts/process.bat +3 -3
  36. data/vendor/libsodium/msvc-scripts/sodium.props +4 -1
  37. data/vendor/libsodium/src/libsodium/Makefile.am +1 -10
  38. data/vendor/libsodium/src/libsodium/Makefile.in +5 -79
  39. data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha256/cp/verify_hmacsha256.c +3 -1
  40. data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha512/cp/verify_hmacsha512.c +3 -1
  41. data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha512256/cp/verify_hmacsha512256.c +3 -1
  42. data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/pwhash_scryptsalsa208sha256.c +6 -0
  43. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/pow225521.h +2 -2
  44. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/keypair.c +46 -3
  45. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/open.c +2 -10
  46. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/sign.c +7 -1
  47. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/sign_ed25519_api.c +18 -0
  48. data/vendor/libsodium/src/libsodium/include/Makefile.am +0 -1
  49. data/vendor/libsodium/src/libsodium/include/Makefile.in +0 -1
  50. data/vendor/libsodium/src/libsodium/include/sodium.h +0 -1
  51. data/vendor/libsodium/src/libsodium/include/sodium/crypto_onetimeauth_poly1305.h +1 -2
  52. data/vendor/libsodium/src/libsodium/include/sodium/crypto_pwhash_scryptsalsa208sha256.h +5 -0
  53. data/vendor/libsodium/src/libsodium/include/sodium/crypto_sign_ed25519.h +15 -0
  54. data/vendor/libsodium/src/libsodium/include/sodium/utils.h +54 -3
  55. data/vendor/libsodium/src/libsodium/randombytes/salsa20/randombytes_salsa20_random.c +22 -7
  56. data/vendor/libsodium/src/libsodium/sodium/core.c +2 -0
  57. data/vendor/libsodium/src/libsodium/sodium/utils.c +305 -31
  58. data/vendor/libsodium/test/default/Makefile.am +18 -16
  59. data/vendor/libsodium/test/default/Makefile.in +141 -76
  60. data/vendor/libsodium/test/default/ed25519_convert.c +48 -0
  61. data/vendor/libsodium/test/default/ed25519_convert.exp +3 -0
  62. data/vendor/libsodium/test/default/sign.c +15 -4
  63. data/vendor/libsodium/test/default/sodium_utils2.c +70 -0
  64. data/vendor/libsodium/test/default/sodium_utils2.exp +3 -0
  65. data/vendor/libsodium/test/default/sodium_utils3.c +55 -0
  66. data/vendor/libsodium/test/default/sodium_utils3.exp +2 -0
  67. metadata +8 -24
  68. data/vendor/libsodium/src/libsodium/crypto_auth/try.c +0 -119
  69. data/vendor/libsodium/src/libsodium/crypto_box/try.c +0 -195
  70. data/vendor/libsodium/src/libsodium/crypto_hash/try.c +0 -76
  71. data/vendor/libsodium/src/libsodium/crypto_scalarmult/try.c +0 -125
  72. data/vendor/libsodium/src/libsodium/crypto_secretbox/try.c +0 -129
  73. data/vendor/libsodium/src/libsodium/crypto_sign/try.c +0 -87
  74. data/vendor/libsodium/src/libsodium/crypto_stream/aes256estream/hongjun/aes-table-be.h +0 -273
  75. data/vendor/libsodium/src/libsodium/crypto_stream/aes256estream/hongjun/aes-table-le.h +0 -274
  76. data/vendor/libsodium/src/libsodium/crypto_stream/aes256estream/hongjun/aes-table.h +0 -62
  77. data/vendor/libsodium/src/libsodium/crypto_stream/aes256estream/hongjun/aes256-ctr.c +0 -239
  78. data/vendor/libsodium/src/libsodium/crypto_stream/aes256estream/hongjun/aes256.h +0 -171
  79. data/vendor/libsodium/src/libsodium/crypto_stream/aes256estream/hongjun/api.h +0 -13
  80. data/vendor/libsodium/src/libsodium/crypto_stream/aes256estream/hongjun/ecrypt-sync.h +0 -27
  81. data/vendor/libsodium/src/libsodium/crypto_stream/aes256estream/stream_aes256estream_api.c +0 -16
  82. data/vendor/libsodium/src/libsodium/crypto_stream/try.c +0 -122
  83. data/vendor/libsodium/src/libsodium/crypto_verify/try.c +0 -76
  84. data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream_aes256estream.h +0 -67
  85. data/vendor/libsodium/src/libsodium/sodium/compat.c +0 -361
  86. data/vendor/libsodium/test/default/stream5.c +0 -29
  87. data/vendor/libsodium/test/default/stream5.exp +0 -1
  88. data/vendor/libsodium/test/default/stream6.c +0 -54
  89. data/vendor/libsodium/test/default/stream6.exp +0 -17
@@ -77,12 +77,8 @@ PRE_UNINSTALL = :
77
77
  POST_UNINSTALL = :
78
78
  build_triplet = @build@
79
79
  host_triplet = @host@
80
- @MINIMAL_FALSE@am__append_1 = \
81
- @MINIMAL_FALSE@ stream5 \
82
- @MINIMAL_FALSE@ stream6
83
-
84
- check_PROGRAMS = $(am__EXEEXT_2)
85
- TESTS = $(am__EXEEXT_2)
80
+ check_PROGRAMS = $(am__EXEEXT_1)
81
+ TESTS = $(am__EXEEXT_1)
86
82
  subdir = test/default
87
83
  DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
88
84
  $(top_srcdir)/depcomp $(top_srcdir)/test-driver
@@ -98,16 +94,15 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
98
94
  mkinstalldirs = $(install_sh) -d
99
95
  CONFIG_CLEAN_FILES =
100
96
  CONFIG_CLEAN_VPATH_FILES =
101
- @MINIMAL_FALSE@am__EXEEXT_1 = stream5$(EXEEXT) stream6$(EXEEXT)
102
- am__EXEEXT_2 = aead_chacha20poly1305$(EXEEXT) auth$(EXEEXT) \
97
+ am__EXEEXT_1 = aead_chacha20poly1305$(EXEEXT) auth$(EXEEXT) \
103
98
  auth2$(EXEEXT) auth3$(EXEEXT) auth5$(EXEEXT) auth6$(EXEEXT) \
104
99
  auth7$(EXEEXT) box$(EXEEXT) box2$(EXEEXT) box7$(EXEEXT) \
105
100
  box8$(EXEEXT) box_easy$(EXEEXT) box_easy2$(EXEEXT) \
106
101
  box_seed$(EXEEXT) chacha20$(EXEEXT) core1$(EXEEXT) \
107
102
  core2$(EXEEXT) core3$(EXEEXT) core4$(EXEEXT) core5$(EXEEXT) \
108
- core6$(EXEEXT) generichash$(EXEEXT) generichash2$(EXEEXT) \
109
- generichash3$(EXEEXT) hash$(EXEEXT) hash3$(EXEEXT) \
110
- onetimeauth$(EXEEXT) onetimeauth2$(EXEEXT) \
103
+ core6$(EXEEXT) ed25519_convert$(EXEEXT) generichash$(EXEEXT) \
104
+ generichash2$(EXEEXT) generichash3$(EXEEXT) hash$(EXEEXT) \
105
+ hash3$(EXEEXT) onetimeauth$(EXEEXT) onetimeauth2$(EXEEXT) \
111
106
  onetimeauth7$(EXEEXT) pwhash$(EXEEXT) \
112
107
  pwhash_scrypt_ll$(EXEEXT) randombytes$(EXEEXT) \
113
108
  scalarmult$(EXEEXT) scalarmult2$(EXEEXT) scalarmult5$(EXEEXT) \
@@ -115,9 +110,10 @@ am__EXEEXT_2 = aead_chacha20poly1305$(EXEEXT) auth$(EXEEXT) \
115
110
  secretbox7$(EXEEXT) secretbox8$(EXEEXT) \
116
111
  secretbox_easy$(EXEEXT) secretbox_easy2$(EXEEXT) \
117
112
  shorthash$(EXEEXT) sign$(EXEEXT) sodium_core$(EXEEXT) \
118
- sodium_utils$(EXEEXT) sodium_version$(EXEEXT) stream$(EXEEXT) \
113
+ sodium_utils$(EXEEXT) sodium_utils2$(EXEEXT) \
114
+ sodium_utils3$(EXEEXT) sodium_version$(EXEEXT) stream$(EXEEXT) \
119
115
  stream2$(EXEEXT) stream3$(EXEEXT) stream4$(EXEEXT) \
120
- verify1$(EXEEXT) $(am__EXEEXT_1)
116
+ verify1$(EXEEXT)
121
117
  aead_chacha20poly1305_SOURCES = aead_chacha20poly1305.c
122
118
  aead_chacha20poly1305_OBJECTS = aead_chacha20poly1305.$(OBJEXT)
123
119
  aead_chacha20poly1305_DEPENDENCIES = $(TESTS_LDADD)
@@ -185,6 +181,9 @@ core5_DEPENDENCIES = $(TESTS_LDADD)
185
181
  core6_SOURCES = core6.c
186
182
  core6_OBJECTS = core6.$(OBJEXT)
187
183
  core6_DEPENDENCIES = $(TESTS_LDADD)
184
+ ed25519_convert_SOURCES = ed25519_convert.c
185
+ ed25519_convert_OBJECTS = ed25519_convert.$(OBJEXT)
186
+ ed25519_convert_DEPENDENCIES = $(TESTS_LDADD)
188
187
  generichash_SOURCES = generichash.c
189
188
  generichash_OBJECTS = generichash.$(OBJEXT)
190
189
  generichash_DEPENDENCIES = $(TESTS_LDADD)
@@ -260,6 +259,12 @@ sodium_core_DEPENDENCIES = $(TESTS_LDADD)
260
259
  sodium_utils_SOURCES = sodium_utils.c
261
260
  sodium_utils_OBJECTS = sodium_utils.$(OBJEXT)
262
261
  sodium_utils_DEPENDENCIES = $(TESTS_LDADD)
262
+ sodium_utils2_SOURCES = sodium_utils2.c
263
+ sodium_utils2_OBJECTS = sodium_utils2.$(OBJEXT)
264
+ sodium_utils2_DEPENDENCIES = $(TESTS_LDADD)
265
+ sodium_utils3_SOURCES = sodium_utils3.c
266
+ sodium_utils3_OBJECTS = sodium_utils3.$(OBJEXT)
267
+ sodium_utils3_DEPENDENCIES = $(TESTS_LDADD)
263
268
  sodium_version_SOURCES = sodium_version.c
264
269
  sodium_version_OBJECTS = sodium_version.$(OBJEXT)
265
270
  sodium_version_DEPENDENCIES = $(TESTS_LDADD)
@@ -275,12 +280,6 @@ stream3_DEPENDENCIES = $(TESTS_LDADD)
275
280
  stream4_SOURCES = stream4.c
276
281
  stream4_OBJECTS = stream4.$(OBJEXT)
277
282
  stream4_DEPENDENCIES = $(TESTS_LDADD)
278
- stream5_SOURCES = stream5.c
279
- stream5_OBJECTS = stream5.$(OBJEXT)
280
- stream5_DEPENDENCIES = $(TESTS_LDADD)
281
- stream6_SOURCES = stream6.c
282
- stream6_OBJECTS = stream6.$(OBJEXT)
283
- stream6_DEPENDENCIES = $(TESTS_LDADD)
284
283
  verify1_SOURCES = verify1.c
285
284
  verify1_OBJECTS = verify1.$(OBJEXT)
286
285
  verify1_DEPENDENCIES = $(TESTS_LDADD)
@@ -321,25 +320,27 @@ am__v_CCLD_1 =
321
320
  SOURCES = aead_chacha20poly1305.c auth.c auth2.c auth3.c auth5.c \
322
321
  auth6.c auth7.c box.c box2.c box7.c box8.c box_easy.c \
323
322
  box_easy2.c box_seed.c chacha20.c core1.c core2.c core3.c \
324
- core4.c core5.c core6.c generichash.c generichash2.c \
325
- generichash3.c hash.c hash3.c onetimeauth.c onetimeauth2.c \
326
- onetimeauth7.c pwhash.c pwhash_scrypt_ll.c randombytes.c \
327
- scalarmult.c scalarmult2.c scalarmult5.c scalarmult6.c \
328
- secretbox.c secretbox2.c secretbox7.c secretbox8.c \
329
- secretbox_easy.c secretbox_easy2.c shorthash.c sign.c \
330
- sodium_core.c sodium_utils.c sodium_version.c stream.c \
331
- stream2.c stream3.c stream4.c stream5.c stream6.c verify1.c
323
+ core4.c core5.c core6.c ed25519_convert.c generichash.c \
324
+ generichash2.c generichash3.c hash.c hash3.c onetimeauth.c \
325
+ onetimeauth2.c onetimeauth7.c pwhash.c pwhash_scrypt_ll.c \
326
+ randombytes.c scalarmult.c scalarmult2.c scalarmult5.c \
327
+ scalarmult6.c secretbox.c secretbox2.c secretbox7.c \
328
+ secretbox8.c secretbox_easy.c secretbox_easy2.c shorthash.c \
329
+ sign.c sodium_core.c sodium_utils.c sodium_utils2.c \
330
+ sodium_utils3.c sodium_version.c stream.c stream2.c stream3.c \
331
+ stream4.c verify1.c
332
332
  DIST_SOURCES = aead_chacha20poly1305.c auth.c auth2.c auth3.c auth5.c \
333
333
  auth6.c auth7.c box.c box2.c box7.c box8.c box_easy.c \
334
334
  box_easy2.c box_seed.c chacha20.c core1.c core2.c core3.c \
335
- core4.c core5.c core6.c generichash.c generichash2.c \
336
- generichash3.c hash.c hash3.c onetimeauth.c onetimeauth2.c \
337
- onetimeauth7.c pwhash.c pwhash_scrypt_ll.c randombytes.c \
338
- scalarmult.c scalarmult2.c scalarmult5.c scalarmult6.c \
339
- secretbox.c secretbox2.c secretbox7.c secretbox8.c \
340
- secretbox_easy.c secretbox_easy2.c shorthash.c sign.c \
341
- sodium_core.c sodium_utils.c sodium_version.c stream.c \
342
- stream2.c stream3.c stream4.c stream5.c stream6.c verify1.c
335
+ core4.c core5.c core6.c ed25519_convert.c generichash.c \
336
+ generichash2.c generichash3.c hash.c hash3.c onetimeauth.c \
337
+ onetimeauth2.c onetimeauth7.c pwhash.c pwhash_scrypt_ll.c \
338
+ randombytes.c scalarmult.c scalarmult2.c scalarmult5.c \
339
+ scalarmult6.c secretbox.c secretbox2.c secretbox7.c \
340
+ secretbox8.c secretbox_easy.c secretbox_easy2.c shorthash.c \
341
+ sign.c sodium_core.c sodium_utils.c sodium_utils2.c \
342
+ sodium_utils3.c sodium_version.c stream.c stream2.c stream3.c \
343
+ stream4.c verify1.c
343
344
  am__can_run_installinfo = \
344
345
  case $$AM_UPDATE_INFO_DIR in \
345
346
  n|no|NO) false;; \
@@ -724,6 +725,7 @@ EXTRA_DIST = \
724
725
  core4.exp \
725
726
  core5.exp \
726
727
  core6.exp \
728
+ ed25519_convert.exp \
727
729
  generichash.exp \
728
730
  generichash2.exp \
729
731
  generichash3.exp \
@@ -749,13 +751,13 @@ EXTRA_DIST = \
749
751
  sign.exp \
750
752
  sodium_core.exp \
751
753
  sodium_utils.exp \
754
+ sodium_utils2.exp \
755
+ sodium_utils3.exp \
752
756
  sodium_version.exp \
753
757
  stream.exp \
754
758
  stream2.exp \
755
759
  stream3.exp \
756
760
  stream4.exp \
757
- stream5.exp \
758
- stream6.exp \
759
761
  verify1.exp
760
762
 
761
763
  DISTCLEANFILES = \
@@ -780,6 +782,7 @@ DISTCLEANFILES = \
780
782
  core4.res \
781
783
  core5.res \
782
784
  core6.res \
785
+ ed25519_convert.res \
783
786
  generichash.res \
784
787
  generichash2.res \
785
788
  generichash3.res \
@@ -805,13 +808,13 @@ DISTCLEANFILES = \
805
808
  sign.res \
806
809
  sodium_core.res \
807
810
  sodium_utils.res \
811
+ sodium_utils2.res \
812
+ sodium_utils3.res \
808
813
  sodium_version.res \
809
814
  stream.res \
810
815
  stream2.res \
811
816
  stream3.res \
812
817
  stream4.res \
813
- stream5.res \
814
- stream6.res \
815
818
  verify1.res
816
819
 
817
820
  AM_CPPFLAGS = \
@@ -822,15 +825,63 @@ AM_CPPFLAGS = \
822
825
  -I$(top_builddir)/src/libsodium/include/sodium \
823
826
  -I$(top_srcdir)/test/quirks
824
827
 
825
- TESTS_TARGETS = aead_chacha20poly1305 auth auth2 auth3 auth5 auth6 \
826
- auth7 box box2 box7 box8 box_easy box_easy2 box_seed chacha20 \
827
- core1 core2 core3 core4 core5 core6 generichash generichash2 \
828
- generichash3 hash hash3 onetimeauth onetimeauth2 onetimeauth7 \
829
- pwhash pwhash_scrypt_ll randombytes scalarmult scalarmult2 \
830
- scalarmult5 scalarmult6 secretbox secretbox2 secretbox7 \
831
- secretbox8 secretbox_easy secretbox_easy2 shorthash sign \
832
- sodium_core sodium_utils sodium_version stream stream2 stream3 \
833
- stream4 verify1 $(am__append_1)
828
+ TESTS_TARGETS = \
829
+ aead_chacha20poly1305 \
830
+ auth \
831
+ auth2 \
832
+ auth3 \
833
+ auth5 \
834
+ auth6 \
835
+ auth7 \
836
+ box \
837
+ box2 \
838
+ box7 \
839
+ box8 \
840
+ box_easy \
841
+ box_easy2 \
842
+ box_seed \
843
+ chacha20 \
844
+ core1 \
845
+ core2 \
846
+ core3 \
847
+ core4 \
848
+ core5 \
849
+ core6 \
850
+ ed25519_convert \
851
+ generichash \
852
+ generichash2 \
853
+ generichash3 \
854
+ hash \
855
+ hash3 \
856
+ onetimeauth \
857
+ onetimeauth2 \
858
+ onetimeauth7 \
859
+ pwhash \
860
+ pwhash_scrypt_ll \
861
+ randombytes \
862
+ scalarmult \
863
+ scalarmult2 \
864
+ scalarmult5 \
865
+ scalarmult6 \
866
+ secretbox \
867
+ secretbox2 \
868
+ secretbox7 \
869
+ secretbox8 \
870
+ secretbox_easy \
871
+ secretbox_easy2 \
872
+ shorthash \
873
+ sign \
874
+ sodium_core \
875
+ sodium_utils \
876
+ sodium_utils2 \
877
+ sodium_utils3 \
878
+ sodium_version \
879
+ stream \
880
+ stream2 \
881
+ stream3 \
882
+ stream4 \
883
+ verify1
884
+
834
885
  TESTS_LDADD = \
835
886
  ${top_builddir}/src/libsodium/libsodium.la
836
887
 
@@ -876,6 +927,8 @@ core5_SOURCE = cmptest.h core5.c
876
927
  core5_LDADD = $(TESTS_LDADD)
877
928
  core6_SOURCE = cmptest.h core6.c
878
929
  core6_LDADD = $(TESTS_LDADD)
930
+ ed25519_convert_SOURCE = cmptest.h ed25519_convert.c
931
+ ed25519_convert_LDADD = $(TESTS_LDADD)
879
932
  generichash_SOURCE = cmptest.h generichash.c
880
933
  generichash_LDADD = $(TESTS_LDADD)
881
934
  generichash2_SOURCE = cmptest.h generichash2.c
@@ -926,6 +979,10 @@ sodium_core_SOURCE = cmptest.h sodium_core.c
926
979
  sodium_core_LDADD = $(TESTS_LDADD)
927
980
  sodium_utils_SOURCE = cmptest.h sodium_utils.c
928
981
  sodium_utils_LDADD = $(TESTS_LDADD)
982
+ sodium_utils2_SOURCE = cmptest.h sodium_utils2.c
983
+ sodium_utils2_LDADD = $(TESTS_LDADD)
984
+ sodium_utils3_SOURCE = cmptest.h sodium_utils3.c
985
+ sodium_utils3_LDADD = $(TESTS_LDADD)
929
986
  sodium_version_SOURCE = cmptest.h sodium_version.c
930
987
  sodium_version_LDADD = $(TESTS_LDADD)
931
988
  stream_SOURCE = cmptest.h stream.c
@@ -936,10 +993,6 @@ stream3_SOURCE = cmptest.h stream3.c
936
993
  stream3_LDADD = $(TESTS_LDADD)
937
994
  stream4_SOURCE = cmptest.h stream4.c
938
995
  stream4_LDADD = $(TESTS_LDADD)
939
- stream5_SOURCE = cmptest.h stream5.c
940
- stream5_LDADD = $(TESTS_LDADD)
941
- stream6_SOURCE = cmptest.h stream6.c
942
- stream6_LDADD = $(TESTS_LDADD)
943
996
  verify1_SOURCE = cmptest.h verify1.c
944
997
  verify1_LDADD = $(TESTS_LDADD)
945
998
  all: all-am
@@ -1070,6 +1123,10 @@ core6$(EXEEXT): $(core6_OBJECTS) $(core6_DEPENDENCIES) $(EXTRA_core6_DEPENDENCIE
1070
1123
  @rm -f core6$(EXEEXT)
1071
1124
  $(AM_V_CCLD)$(LINK) $(core6_OBJECTS) $(core6_LDADD) $(LIBS)
1072
1125
 
1126
+ ed25519_convert$(EXEEXT): $(ed25519_convert_OBJECTS) $(ed25519_convert_DEPENDENCIES) $(EXTRA_ed25519_convert_DEPENDENCIES)
1127
+ @rm -f ed25519_convert$(EXEEXT)
1128
+ $(AM_V_CCLD)$(LINK) $(ed25519_convert_OBJECTS) $(ed25519_convert_LDADD) $(LIBS)
1129
+
1073
1130
  generichash$(EXEEXT): $(generichash_OBJECTS) $(generichash_DEPENDENCIES) $(EXTRA_generichash_DEPENDENCIES)
1074
1131
  @rm -f generichash$(EXEEXT)
1075
1132
  $(AM_V_CCLD)$(LINK) $(generichash_OBJECTS) $(generichash_LDADD) $(LIBS)
@@ -1170,6 +1227,14 @@ sodium_utils$(EXEEXT): $(sodium_utils_OBJECTS) $(sodium_utils_DEPENDENCIES) $(EX
1170
1227
  @rm -f sodium_utils$(EXEEXT)
1171
1228
  $(AM_V_CCLD)$(LINK) $(sodium_utils_OBJECTS) $(sodium_utils_LDADD) $(LIBS)
1172
1229
 
1230
+ sodium_utils2$(EXEEXT): $(sodium_utils2_OBJECTS) $(sodium_utils2_DEPENDENCIES) $(EXTRA_sodium_utils2_DEPENDENCIES)
1231
+ @rm -f sodium_utils2$(EXEEXT)
1232
+ $(AM_V_CCLD)$(LINK) $(sodium_utils2_OBJECTS) $(sodium_utils2_LDADD) $(LIBS)
1233
+
1234
+ sodium_utils3$(EXEEXT): $(sodium_utils3_OBJECTS) $(sodium_utils3_DEPENDENCIES) $(EXTRA_sodium_utils3_DEPENDENCIES)
1235
+ @rm -f sodium_utils3$(EXEEXT)
1236
+ $(AM_V_CCLD)$(LINK) $(sodium_utils3_OBJECTS) $(sodium_utils3_LDADD) $(LIBS)
1237
+
1173
1238
  sodium_version$(EXEEXT): $(sodium_version_OBJECTS) $(sodium_version_DEPENDENCIES) $(EXTRA_sodium_version_DEPENDENCIES)
1174
1239
  @rm -f sodium_version$(EXEEXT)
1175
1240
  $(AM_V_CCLD)$(LINK) $(sodium_version_OBJECTS) $(sodium_version_LDADD) $(LIBS)
@@ -1190,14 +1255,6 @@ stream4$(EXEEXT): $(stream4_OBJECTS) $(stream4_DEPENDENCIES) $(EXTRA_stream4_DEP
1190
1255
  @rm -f stream4$(EXEEXT)
1191
1256
  $(AM_V_CCLD)$(LINK) $(stream4_OBJECTS) $(stream4_LDADD) $(LIBS)
1192
1257
 
1193
- stream5$(EXEEXT): $(stream5_OBJECTS) $(stream5_DEPENDENCIES) $(EXTRA_stream5_DEPENDENCIES)
1194
- @rm -f stream5$(EXEEXT)
1195
- $(AM_V_CCLD)$(LINK) $(stream5_OBJECTS) $(stream5_LDADD) $(LIBS)
1196
-
1197
- stream6$(EXEEXT): $(stream6_OBJECTS) $(stream6_DEPENDENCIES) $(EXTRA_stream6_DEPENDENCIES)
1198
- @rm -f stream6$(EXEEXT)
1199
- $(AM_V_CCLD)$(LINK) $(stream6_OBJECTS) $(stream6_LDADD) $(LIBS)
1200
-
1201
1258
  verify1$(EXEEXT): $(verify1_OBJECTS) $(verify1_DEPENDENCIES) $(EXTRA_verify1_DEPENDENCIES)
1202
1259
  @rm -f verify1$(EXEEXT)
1203
1260
  $(AM_V_CCLD)$(LINK) $(verify1_OBJECTS) $(verify1_LDADD) $(LIBS)
@@ -1229,6 +1286,7 @@ distclean-compile:
1229
1286
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/core4.Po@am__quote@
1230
1287
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/core5.Po@am__quote@
1231
1288
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/core6.Po@am__quote@
1289
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ed25519_convert.Po@am__quote@
1232
1290
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/generichash.Po@am__quote@
1233
1291
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/generichash2.Po@am__quote@
1234
1292
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/generichash3.Po@am__quote@
@@ -1254,13 +1312,13 @@ distclean-compile:
1254
1312
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sign.Po@am__quote@
1255
1313
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sodium_core.Po@am__quote@
1256
1314
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sodium_utils.Po@am__quote@
1315
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sodium_utils2.Po@am__quote@
1316
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sodium_utils3.Po@am__quote@
1257
1317
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sodium_version.Po@am__quote@
1258
1318
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stream.Po@am__quote@
1259
1319
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stream2.Po@am__quote@
1260
1320
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stream3.Po@am__quote@
1261
1321
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stream4.Po@am__quote@
1262
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stream5.Po@am__quote@
1263
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stream6.Po@am__quote@
1264
1322
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/verify1.Po@am__quote@
1265
1323
 
1266
1324
  .c.o:
@@ -1633,6 +1691,13 @@ core6.log: core6$(EXEEXT)
1633
1691
  --log-file $$b.log --trs-file $$b.trs \
1634
1692
  $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
1635
1693
  "$$tst" $(AM_TESTS_FD_REDIRECT)
1694
+ ed25519_convert.log: ed25519_convert$(EXEEXT)
1695
+ @p='ed25519_convert$(EXEEXT)'; \
1696
+ b='ed25519_convert'; \
1697
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
1698
+ --log-file $$b.log --trs-file $$b.trs \
1699
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
1700
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
1636
1701
  generichash.log: generichash$(EXEEXT)
1637
1702
  @p='generichash$(EXEEXT)'; \
1638
1703
  b='generichash'; \
@@ -1808,6 +1873,20 @@ sodium_utils.log: sodium_utils$(EXEEXT)
1808
1873
  --log-file $$b.log --trs-file $$b.trs \
1809
1874
  $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
1810
1875
  "$$tst" $(AM_TESTS_FD_REDIRECT)
1876
+ sodium_utils2.log: sodium_utils2$(EXEEXT)
1877
+ @p='sodium_utils2$(EXEEXT)'; \
1878
+ b='sodium_utils2'; \
1879
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
1880
+ --log-file $$b.log --trs-file $$b.trs \
1881
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
1882
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
1883
+ sodium_utils3.log: sodium_utils3$(EXEEXT)
1884
+ @p='sodium_utils3$(EXEEXT)'; \
1885
+ b='sodium_utils3'; \
1886
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
1887
+ --log-file $$b.log --trs-file $$b.trs \
1888
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
1889
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
1811
1890
  sodium_version.log: sodium_version$(EXEEXT)
1812
1891
  @p='sodium_version$(EXEEXT)'; \
1813
1892
  b='sodium_version'; \
@@ -1850,20 +1929,6 @@ verify1.log: verify1$(EXEEXT)
1850
1929
  --log-file $$b.log --trs-file $$b.trs \
1851
1930
  $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
1852
1931
  "$$tst" $(AM_TESTS_FD_REDIRECT)
1853
- stream5.log: stream5$(EXEEXT)
1854
- @p='stream5$(EXEEXT)'; \
1855
- b='stream5'; \
1856
- $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
1857
- --log-file $$b.log --trs-file $$b.trs \
1858
- $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
1859
- "$$tst" $(AM_TESTS_FD_REDIRECT)
1860
- stream6.log: stream6$(EXEEXT)
1861
- @p='stream6$(EXEEXT)'; \
1862
- b='stream6'; \
1863
- $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
1864
- --log-file $$b.log --trs-file $$b.trs \
1865
- $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
1866
- "$$tst" $(AM_TESTS_FD_REDIRECT)
1867
1932
  .test.log:
1868
1933
  @p='$<'; \
1869
1934
  $(am__set_b); \
@@ -0,0 +1,48 @@
1
+ #include <stdio.h>
2
+ #include <string.h>
3
+
4
+ #define TEST_NAME "ed25519_convert"
5
+ #include "cmptest.h"
6
+
7
+ static const unsigned char keypair_seed[crypto_sign_ed25519_SEEDBYTES] = {
8
+ 0x42, 0x11, 0x51, 0xa4, 0x59, 0xfa, 0xea, 0xde,
9
+ 0x3d, 0x24, 0x71, 0x15, 0xf9, 0x4a, 0xed, 0xae,
10
+ 0x42, 0x31, 0x81, 0x24, 0x09, 0x5a, 0xfa, 0xbe,
11
+ 0x4d, 0x14, 0x51, 0xa5, 0x59, 0xfa, 0xed, 0xee
12
+ };
13
+
14
+ int main(void)
15
+ {
16
+ unsigned char ed25519_pk[crypto_sign_ed25519_PUBLICKEYBYTES];
17
+ unsigned char ed25519_skpk[crypto_sign_ed25519_SECRETKEYBYTES];
18
+ unsigned char curve25519_pk[crypto_scalarmult_curve25519_BYTES];
19
+ unsigned char curve25519_pk2[crypto_scalarmult_curve25519_BYTES];
20
+ unsigned char curve25519_sk[crypto_scalarmult_curve25519_BYTES];
21
+ char curve25519_pk_hex[crypto_scalarmult_curve25519_BYTES * 2 + 1];
22
+ char curve25519_sk_hex[crypto_scalarmult_curve25519_BYTES * 2 + 1];
23
+ unsigned int i;
24
+
25
+ crypto_sign_ed25519_seed_keypair(ed25519_pk, ed25519_skpk, keypair_seed);
26
+ crypto_sign_ed25519_pk_to_curve25519(curve25519_pk, ed25519_pk);
27
+ crypto_sign_ed25519_sk_to_curve25519(curve25519_sk, ed25519_skpk);
28
+ sodium_bin2hex(curve25519_pk_hex, sizeof curve25519_pk_hex,
29
+ curve25519_pk, sizeof curve25519_pk);
30
+ sodium_bin2hex(curve25519_sk_hex, sizeof curve25519_sk_hex,
31
+ curve25519_sk, sizeof curve25519_sk);
32
+
33
+ printf("curve25519 pk: [%s]\n", curve25519_pk_hex);
34
+ printf("curve25519 sk: [%s]\n", curve25519_sk_hex);
35
+
36
+ for (i = 0U; i < 500U; i++) {
37
+ crypto_sign_ed25519_keypair(ed25519_pk, ed25519_skpk);
38
+ crypto_sign_ed25519_pk_to_curve25519(curve25519_pk, ed25519_pk);
39
+ crypto_sign_ed25519_sk_to_curve25519(curve25519_sk, ed25519_skpk);
40
+ crypto_scalarmult_curve25519_base(curve25519_pk2, curve25519_sk);
41
+ if (memcmp(curve25519_pk, curve25519_pk2, sizeof curve25519_pk) != 0) {
42
+ printf("conversion failed\n");
43
+ }
44
+ }
45
+ printf("ok\n");
46
+
47
+ return 0;
48
+ }
@@ -0,0 +1,3 @@
1
+ curve25519 pk: [f1814f0e8ff1043d8a44d25babff3cedcae6c22c3edaa48f857ae70de2baae50]
2
+ curve25519 sk: [8052030376d47112be7f73ed7a019293dd12ad910b654455798b4667d73de166]
3
+ ok
@@ -1052,11 +1052,12 @@ static TestData test_data[] = {
1052
1052
 
1053
1053
  int main(void)
1054
1054
  {
1055
+ unsigned char extracted_seed[crypto_sign_ed25519_SEEDBYTES];
1056
+ unsigned char extracted_pk[crypto_sign_ed25519_PUBLICKEYBYTES];
1055
1057
  unsigned char sig[crypto_sign_BYTES];
1056
1058
  unsigned char sm[1024 + crypto_sign_BYTES];
1057
1059
  unsigned char m[1024];
1058
- unsigned char skpk[crypto_sign_SECRETKEYBYTES +
1059
- crypto_sign_PUBLICKEYBYTES];
1060
+ unsigned char skpk[crypto_sign_SECRETKEYBYTES];
1060
1061
  unsigned char pk[crypto_sign_PUBLICKEYBYTES];
1061
1062
  unsigned char sk[crypto_sign_SECRETKEYBYTES];
1062
1063
  char pk_hex[crypto_sign_PUBLICKEYBYTES * 2 + 1];
@@ -1099,8 +1100,8 @@ int main(void)
1099
1100
  continue;
1100
1101
  }
1101
1102
  if (crypto_sign_detached(sig, &siglen,
1102
- (const unsigned char *) test_data[i].m, i,
1103
- test_data[i].sk) != 0) {
1103
+ (const unsigned char *) test_data[i].m,
1104
+ i, skpk) != 0) {
1104
1105
  printf("detached signature failed: [%u]\n", i);
1105
1106
  continue;
1106
1107
  }
@@ -1128,6 +1129,16 @@ int main(void)
1128
1129
  printf("crypto_sign_seed_keypair() failure\n");
1129
1130
  return -1;
1130
1131
  }
1132
+ crypto_sign_ed25519_sk_to_seed(extracted_seed, sk);
1133
+ if (memcmp(extracted_seed, keypair_seed,
1134
+ crypto_sign_ed25519_SEEDBYTES) != 0) {
1135
+ printf("crypto_sign_ed25519_sk_to_seed() failure\n");
1136
+ }
1137
+ crypto_sign_ed25519_sk_to_pk(extracted_pk, sk);
1138
+ if (memcmp(extracted_pk, pk,
1139
+ crypto_sign_ed25519_PUBLICKEYBYTES) != 0) {
1140
+ printf("crypto_sign_ed25519_sk_to_pk() failure\n");
1141
+ }
1131
1142
  sodium_bin2hex(pk_hex, sizeof pk_hex, pk, sizeof pk);
1132
1143
  sodium_bin2hex(sk_hex, sizeof sk_hex, sk, sizeof sk);
1133
1144