From d0a51a7e434019ff20ba3dfb47fb9f9bafbb3540 Mon Sep 17 00:00:00 2001 From: Janne Johansson Date: Thu, 13 Sep 2018 12:17:26 +0300 Subject: [PATCH] MatrixSSL 4.0.0 --- Makefile | 20 +- README.html | 8 +- README.md | 8 +- apps/common/Makefile | 6 +- apps/common/client_common.c | 8 +- apps/common/client_common.h | 25 +- apps/common/clientconfig.c | 25 +- apps/common/load_keys.c | 28 +- apps/dtls/dtlsClient.c | 85 +- apps/dtls/dtlsCommon.h | 16 +- apps/dtls/dtlsServer.c | 107 +- apps/ssl/XGetopt.c | 4 +- apps/ssl/XGetopt.h | 4 +- apps/ssl/app.h | 13 +- apps/ssl/client.c | 945 +- apps/ssl/http.c | 25 +- apps/ssl/net.c | 193 +- apps/ssl/server.c | 803 +- common.mk | 388 +- configs/default/coreConfig.h | 81 +- configs/default/cryptoConfig.h | 38 +- configs/default/matrixsslConfig.h | 30 +- configs/noecc/coreConfig.h | 81 +- configs/noecc/cryptoConfig.h | 38 +- configs/noecc/matrixsslConfig.h | 30 +- configs/nonfips/coreConfig.h | 83 - configs/nonfips/cryptoConfig.h | 217 - configs/nonfips/matrixsslConfig.h | 336 - configs/psk/coreConfig.h | 81 +- configs/psk/cryptoConfig.h | 36 + configs/psk/matrixsslConfig.h | 30 +- configs/rsaonly/coreConfig.h | 81 +- configs/rsaonly/cryptoConfig.h | 38 +- configs/rsaonly/matrixsslConfig.h | 30 +- configs/tls/coreConfig.h | 81 +- configs/tls/cryptoConfig.h | 38 +- configs/tls/matrixsslConfig.h | 30 +- configs/tls13/coreConfig.h | 145 + configs/tls13/cryptoConfig.h | 301 + configs/tls13/matrixsslConfig.h | 432 + core/GNUmakefile | 95 + core/Makefile | 52 - core/Makefile.inc | 21 + core/apps/GNUmakefile | 27 + core/apps/log.c | 181 + core/apps/logcc.cc | 2 + core/config/cf_impldefs.h | 104 + core/config/cfg_pkcslib.h | 76 + core/config/cfg_spal.h | 75 + core/config/coreConfig.h | 145 + core/config/sl_chacha20poly1305ietf_config.h | 124 + core/corelib.c | 1090 -- core/include/c_lib.h | 135 + core/include/cl_basic.h | 124 + core/include/cl_header_begin.h | 24 + core/include/cl_header_end.h | 23 + core/include/cl_types_base.h | 290 + core/include/core/README.txt | 1 + core/include/core/coreApi.h | 1 + core/include/core/osdep.h | 1 + core/include/core/psUtil.h | 1 + core/{ => include}/coreApi.h | 109 +- core/include/export.h | 44 + core/include/implementation_defs.h | 569 + core/include/implementation_defs_log.h | 177 + core/include/list.h | 41 + core/include/private/common.h | 230 + core/include/private/coreApiExt.h | 130 + core/{ => include}/psLog.h | 83 +- core/{ => include}/psPrnf.h | 38 +- core/include/psStat.h | 89 + core/{ => include}/psUtil.h | 75 +- core/{ => include}/psbuf.h | 307 +- core/include/pscompilerdep.h | 114 + core/include/pscompilerwarning.h | 86 + core/{list.h => include/pslist.h} | 16 +- core/{ => include}/psmalloc.h | 14 +- core/{ => include}/psnet.h | 41 +- core/include/psunreachable_begin.h | 42 + core/include/psunreachable_end.h | 40 + core/include/public_defs.h | 125 + core/include/runtime.h | 46 + core/include/sfzcl/sfzclbase64.h | 77 + core/include/sfzcl/sfzclbuffer.h | 140 + core/include/sfzcl/sfzcldsprintf.h | 45 + core/include/sfzcl/sfzclenum.h | 48 + core/include/sfzcl/sfzclfastalloc.h | 78 + core/include/sfzcl/sfzclfileio.h | 155 + core/include/sfzcl/sfzclgetput.h | 213 + core/include/sfzcl/sfzclglobals.h | 69 + core/include/sfzcl/sfzclincludes.h | 127 + core/include/sfzcl/sfzclmalloc.h | 54 + core/include/sfzcl/sfzclmemparser.h | 111 + core/include/sfzcl/sfzclobstack.h | 113 + core/include/sfzcl/sfzclsnprintf.h | 93 + core/include/sfzcl/sfzclstr.h | 230 + core/include/sfzcl/sfzcltime.h | 104 + core/include/sfzcl/sfzcltimemeasure.h | 205 + core/include/testsupp/info.h | 55 + core/include/testsupp/sfzutf-perf.h | 150 + core/include/testsupp/sfzutf-utils.h | 152 + core/include/testsupp/sfzutf.h | 228 + core/include/testsupp/testsupp.h | 270 + core/include/testsupp/testsupp.hpp | 114 + core/include/testsupp/thirdparty/catch.hpp | 11339 ++++++++++++++++ core/include/utils.h | 131 + core/makefiles/detect-and-rules.mk | 443 + core/makefiles/get_CCARCH.mk | 87 + core/makefiles/platform_specific.mk | 27 + core/makefiles/rules.mk | 218 + core/makefiles/use_ar.mk | 33 + core/osdep/ANSI/osdep_break.c | 54 + core/osdep/ANSI/readme.txt | 6 + core/osdep/ANSI/spal_memory_ansi.c | 242 + core/{ => osdep}/POSIX/osdep.c | 146 +- core/{ => osdep}/POSIX/psLog.c | 80 +- core/{ => osdep}/POSIX/psPrnf.c | 69 +- core/osdep/POSIX/spal_posix_mutex.c | 186 + core/osdep/POSIX/spal_posix_semaphore.c | 215 + core/osdep/POSIX/spal_posix_sleep.c | 87 + core/osdep/POSIX/spal_posix_thread.c | 204 + core/{ => osdep}/WIN32/osdep.c | 9 +- core/osdep/include/Makefile | 71 + core/{ => osdep/include}/osdep-types.h | 117 +- core/{ => osdep/include}/osdep.h | 9 +- core/osdep/include/osdep_arm_acle.h | 52 + core/osdep/include/osdep_arm_neon.h | 52 + core/osdep/include/osdep_assert.h | 56 + core/osdep/include/osdep_cpu-features.h | 52 + core/osdep/include/osdep_ctype.h | 86 + core/osdep/include/osdep_dlfcn.h | 66 + core/osdep/include/osdep_emmintrin.h | 52 + core/osdep/include/osdep_errno.h | 52 + core/osdep/include/osdep_fcntl.h | 52 + core/osdep/include/osdep_immintrin.h | 52 + core/osdep/include/osdep_intrin.h | 52 + core/osdep/include/osdep_inttypes.h | 58 + core/osdep/include/osdep_libc-version.h | 52 + core/osdep/include/osdep_limits.h | 52 + core/osdep/include/osdep_malloc.h | 71 + core/osdep/include/osdep_math.h | 44 + core/osdep/include/osdep_netdb.h | 60 + core/osdep/include/osdep_netinet_in.h | 52 + core/osdep/include/osdep_netinet_tcp.h | 52 + core/osdep/include/osdep_nmmintrin.h | 52 + core/osdep/include/osdep_pthread.h | 83 + core/osdep/include/osdep_sched.h | 52 + core/osdep/include/osdep_semaphore.h | 52 + core/osdep/include/osdep_setjmp.h | 61 + core/osdep/include/osdep_signal.h | 61 + core/osdep/include/osdep_smmintrin.h | 52 + core/osdep/include/osdep_stdarg.h | 52 + core/osdep/include/osdep_stdbool.h | 52 + core/osdep/include/osdep_stddef.h | 58 + core/osdep/include/osdep_stdint.h | 52 + core/osdep/include/osdep_stdio.h | 111 + core/osdep/include/osdep_stdlib.h | 88 + core/osdep/include/osdep_strict.h | 94 + core/osdep/include/osdep_string.h | 126 + core/osdep/include/osdep_strings.h | 59 + core/osdep/include/osdep_sys_auxv.h | 52 + core/osdep/include/osdep_sys_ioctl.h | 52 + core/osdep/include/osdep_sys_mman.h | 52 + core/osdep/include/osdep_sys_socket.h | 66 + core/osdep/include/osdep_sys_time.h | 52 + core/osdep/include/osdep_sys_types.h | 52 + core/osdep/include/osdep_termios.h | 52 + core/osdep/include/osdep_time.h | 64 + core/osdep/include/osdep_time_gmtime_r.h | 62 + core/osdep/include/osdep_tmmintrin.h | 52 + core/osdep/include/osdep_unistd.h | 66 + core/osdep/include/osdep_wchar.h | 52 + core/osdep/include/osdep_wincrypt.h | 52 + core/osdep/include/osdep_windows.h | 56 + core/osdep/include/osdep_wmmintrin.h | 52 + core/osdep/include/osdep_x86intrin.h | 52 + core/osdep/include/osdep_zmmintrin.h | 52 + core/osdep/include/spal_memory.h | 59 + core/osdep/include/spal_mutex.h | 78 + core/osdep/include/spal_result.h | 54 + core/osdep/include/spal_semaphore.h | 86 + core/osdep/include/spal_thread.h | 76 + core/osdep/include/template.h | 64 + core/osdep/src/cl_memset.c | 100 + core/osdep/src/runtime.c | 267 + core/src/Cryptopp-License.txt | 58 + core/src/bmp.c | 37 + core/src/c_lib.c | 169 + core/src/cl_basic.c | 150 + core/src/corelib_date.c | 523 + core/src/corelib_list.c | 129 + core/src/corelib_main.c | 161 + core/src/corelib_main.h | 56 + core/src/corelib_strings.c | 466 + core/src/corelib_trace.c | 136 + core/src/debug_abort.c | 64 + core/src/debug_printf.c | 92 + core/{ => src}/memset_s.c | 48 +- core/src/psStat.c | 318 + core/{ => src}/psUtil.c | 0 core/{ => src}/psbuf.c | 282 +- core/src/psmalloc.c | 37 + core/src/psmalloc_ext.c | 54 + core/src/psprintf.c | 686 + core/src/psprintf.h | 58 + core/src/sfzclbase64.c | 237 + core/src/sfzclbuffer.c | 411 + core/src/sfzclcalendar.c | 584 + core/src/sfzclfastalloc.c | 172 + core/src/sfzclfileio.c | 356 + core/src/sfzclmalloc.c | 97 + core/src/sfzclmemparser.c | 255 + core/src/sfzclobstack.c | 313 + core/src/sfzclsnprintf.c | 1030 ++ core/src/sfzclstr.c | 2503 ++++ core/src/sfzcltime.c | 73 + core/src/sfzcltimemeasure.c | 393 + core/src/sl_cpu.c | 334 + core/src/sl_neon.c | 346 + core/src/utils.c | 713 + core/testsupp/src/sfzutf/sfzutf-heap.c | 38 + core/testsupp/src/sfzutf/sfzutf-perf.c | 227 + core/testsupp/src/sfzutf/sfzutf-stack.c | 83 + core/testsupp/src/sfzutf/sfzutf-utils.c | 421 + core/testsupp/src/sfzutf/sfzutf.c | 520 + core/testsupp/src/sfzutf/sfzutf_interactive.c | 476 + core/testsupp/src/sfzutf/sfzutf_internal.h | 178 + core/testsupp/src/sfzutf/sfzutf_main_stdio.c | 558 + core/testsupp/src/testsupp.c | 316 + core/unit_tests/GNUmakefile | 64 + core/unit_tests/test_psGetFileBuf.cc | 196 + core/wrapper/Makefile | 12 + core/wrapper/README.md | 12 + core/wrapper/wrap-malloc.c | 27 + core/wrapper/wrap-malloc.h | 21 + crypto/Makefile | 95 +- .../aead_chacha20poly1305.c | 16 +- .../crypto_aead_chacha20poly1305.h | 2 +- .../crypto_onetimeauth_poly1305.h | 8 +- .../crypto_stream_chacha20.h | 4 +- .../chacha20poly1305ietf/crypto_verify_16.h | 2 +- .../chacha20poly1305ietf/crypto_verify_32.h | 2 +- .../chacha20poly1305ietf/crypto_verify_64.h | 2 +- .../dolbeau/chacha20_dolbeau-avx2.c | 12 +- .../dolbeau/chacha20_dolbeau-avx2.h | 2 +- .../dolbeau/chacha20_dolbeau-ssse3.c | 12 +- .../dolbeau/chacha20_dolbeau-ssse3.h | 2 +- .../donna/poly1305_donna.h | 2 +- .../chacha20poly1305ietf/private/common.h | 26 +- .../chacha20poly1305ietf/private/sse2_64_32.h | 4 +- .../ps_chacha20poly1305ietf.c | 6 +- .../ps_chacha20poly1305ietf_config.h | 4 +- .../aead/chacha20poly1305ietf/randombytes.h | 14 +- .../chacha20poly1305ietf/ref/chacha20_ref.c | 14 +- .../chacha20poly1305ietf/ref/chacha20_ref.h | 2 +- crypto/aead/chacha20poly1305ietf/runtime.c | 6 +- .../chacha20poly1305ietf/sse2/poly1305_sse2.c | 26 +- .../chacha20poly1305ietf/sse2/poly1305_sse2.h | 2 +- .../chacha20poly1305ietf/stream_chacha20.h | 2 +- crypto/aead/chacha20poly1305ietf/utils.c | 60 +- crypto/aead/chacha20poly1305ietf/utils.h | 2 +- crypto/aead/chacha20poly1305ietf/verify.c | 4 +- crypto/common/alg_info.c | 509 + crypto/cryptoApi.h | 363 +- crypto/cryptoCheck.h | 17 +- crypto/cryptoImpl.h | 12 +- crypto/crypto_sign/crypto_sign.c | 82 + crypto/crypto_sign/ed25519/ref10/keypair.c | 91 + crypto/crypto_sign/ed25519/ref10/open.c | 110 + crypto/crypto_sign/ed25519/ref10/sign.c | 118 + .../ed25519/ref10/sign_ed25519_ref10.h | 15 + crypto/crypto_sign/ed25519/sign_ed25519.c | 51 + .../crypto_sign/include/sodium/crypto_sign.h | 85 + .../include/sodium/crypto_sign_ed25519.h | 86 + crypto/crypto_sign/include/sodium/export.h | 55 + crypto/crypto_sign/ps_ed25519.c | 130 + crypto/crypto_sign/ps_ed25519.h | 58 + crypto/cryptolib.h | 97 +- crypto/digest/digest.h | 1 + crypto/digest/digest_libsodium.c | 28 +- crypto/digest/digest_openssl.c | 46 +- crypto/digest/hkdf.c | 271 + crypto/digest/hmac.c | 73 +- crypto/digest/md2.c | 14 +- crypto/digest/md4.c | 4 +- crypto/digest/md5.c | 4 +- crypto/digest/sha1.c | 4 +- crypto/digest/sha256.c | 6 +- crypto/digest/sha256_standalone.c | 395 + crypto/digest/sha256_standalone.h | 67 + crypto/digest/sha512.c | 20 +- crypto/keyformat/asn1.c | 57 +- crypto/keyformat/asn1.h | 29 +- crypto/keyformat/asn1fmt.c | 36 +- crypto/keyformat/base64.c | 2 +- crypto/keyformat/crl.c | 973 +- crypto/keyformat/pem_decode_file.c | 85 + crypto/keyformat/pem_decode_mem.c | 394 + crypto/keyformat/pkcs.c | 924 +- crypto/keyformat/x509.c | 657 +- crypto/keyformat/x509.h | 10 +- crypto/layer/layer.h | 8 + crypto/layer/matrix.c | 6 +- crypto/math/pstm.c | 61 +- crypto/math/pstm.h | 13 +- crypto/math/pstm_montgomery_reduce.c | 50 +- crypto/math/pstm_mul_comba.c | 57 +- crypto/math/pstm_sqr_comba.c | 109 +- crypto/math/pstmnt.c | 71 +- crypto/math/pstmnt.h | 8 +- crypto/prng/yarrow.c | 4 +- crypto/pubkey/dh.c | 486 +- crypto/pubkey/dh_export.c | 84 + crypto/pubkey/dh_gen_key.c | 253 + crypto/pubkey/dh_gen_secret.c | 155 + crypto/pubkey/dh_import.c | 74 + crypto/pubkey/dh_import_priv.c | 76 + crypto/pubkey/dh_params.c | 205 + crypto/pubkey/ecc.c | 3134 +---- crypto/pubkey/ecc_curve.c | 112 + crypto/pubkey/ecc_curve_config.c | 214 + crypto/pubkey/ecc_curve_data.c | 205 + crypto/pubkey/ecc_export.c | 92 + crypto/pubkey/ecc_gen_shared.c | 174 + crypto/pubkey/ecc_import.c | 181 + crypto/pubkey/ecc_keygen.c | 317 + crypto/pubkey/ecc_math.c | 1455 ++ crypto/pubkey/ecc_parse_file.c | 129 + crypto/pubkey/ecc_parse_mem.c | 571 + crypto/pubkey/ecc_priv.c | 396 + crypto/pubkey/ecc_priv_el_gamal.c | 57 + crypto/pubkey/ecc_pub.c | 327 + crypto/pubkey/ecc_write_file.c | 41 + crypto/pubkey/ecc_write_mem.c | 39 + crypto/pubkey/pubkey.c | 602 +- crypto/pubkey/pubkey.h | 167 +- crypto/pubkey/pubkey_matrix.h | 1 + crypto/pubkey/pubkey_parse_file.c | 651 + crypto/pubkey/pubkey_parse_mem.c | 314 + crypto/pubkey/pubkey_sign.c | 348 + crypto/pubkey/pubkey_verify.c | 278 + crypto/pubkey/rsa.c | 650 +- crypto/pubkey/rsa_keygen.c | 41 + crypto/pubkey/rsa_parse_file.c | 158 + crypto/pubkey/rsa_parse_mem.c | 298 + crypto/pubkey/rsa_priv.c | 352 + crypto/pubkey/rsa_pub.c | 360 + crypto/pubkey/rsa_write_file.c | 43 + crypto/pubkey/rsa_write_mem.c | 42 + crypto/scalarmult/LICENSE | 18 + crypto/scalarmult/README | 6 + .../crypto_core/ed25519/core_ed25519.c | 79 + .../crypto_core/ed25519/ref10/ed25519_ref10.c | 2031 +++ .../crypto_core/ed25519/ref10/fe_25_5/base.h | 1344 ++ .../crypto_core/ed25519/ref10/fe_25_5/base2.h | 40 + .../ed25519/ref10/fe_25_5/constants.h | 20 + .../crypto_core/ed25519/ref10/fe_25_5/fe.h | 220 + .../crypto_core/ed25519/ref10/fe_51/base.h | 1344 ++ .../crypto_core/ed25519/ref10/fe_51/base2.h | 40 + .../ed25519/ref10/fe_51/constants.h | 21 + .../crypto_core/ed25519/ref10/fe_51/fe.h | 116 + crypto/scalarmult/crypto_scalarmult.c | 33 + .../curve25519/ref10/x25519_ref10.c | 159 + .../curve25519/ref10/x25519_ref10.h | 10 + crypto/scalarmult/curve25519/sandy2x/consts.S | 25 + .../curve25519/sandy2x/consts_namespace.h | 20 + .../curve25519/sandy2x/curve25519_sandy2x.c | 114 + .../curve25519/sandy2x/curve25519_sandy2x.h | 9 + crypto/scalarmult/curve25519/sandy2x/fe.h | 26 + crypto/scalarmult/curve25519/sandy2x/fe51.h | 35 + .../curve25519/sandy2x/fe51_invert.c | 58 + .../scalarmult/curve25519/sandy2x/fe51_mul.S | 197 + .../curve25519/sandy2x/fe51_namespace.h | 16 + .../curve25519/sandy2x/fe51_nsquare.S | 172 + .../scalarmult/curve25519/sandy2x/fe51_pack.S | 226 + .../curve25519/sandy2x/fe_frombytes_sandy2x.c | 78 + crypto/scalarmult/curve25519/sandy2x/ladder.S | 1440 ++ crypto/scalarmult/curve25519/sandy2x/ladder.h | 18 + .../curve25519/sandy2x/ladder_base.S | 1295 ++ .../curve25519/sandy2x/ladder_base.h | 18 + .../sandy2x/ladder_base_namespace.h | 8 + .../curve25519/sandy2x/ladder_namespace.h | 8 + .../scalarmult/curve25519/sandy2x/sandy2x.S | 17 + .../curve25519/scalarmult_curve25519.c | 59 + .../curve25519/scalarmult_curve25519.h | 11 + .../ed25519/ref10/scalarmult_ed25519_ref10.c | 86 + .../include/sodium/crypto_core_ed25519.h | 37 + .../include/sodium/crypto_scalarmult.h | 45 + .../sodium/crypto_scalarmult_curve25519.h | 40 + .../sodium/crypto_scalarmult_ed25519.h | 41 + .../include/sodium/crypto_verify_32.h | 23 + .../include/sodium/private/ed25519_ref10.h | 125 + .../sodium/private/ed25519_ref10_fe_25_5.h | 1050 ++ .../include/sodium/private/implementations.h | 11 + crypto/scalarmult/ps_x25519.c | 98 + crypto/scalarmult/ps_x25519.h | 70 + crypto/symmetric/aes.c | 6 +- crypto/symmetric/aesGCM.c | 16 +- crypto/symmetric/aes_aesni.c | 28 +- crypto/symmetric/aes_aesni.h | 2 +- crypto/symmetric/des3.c | 2 +- crypto/symmetric/idea.c | 10 +- crypto/symmetric/rc2.c | 6 +- crypto/symmetric/symmetric.h | 5 +- crypto/symmetric/symmetric_libsodium.c | 18 +- crypto/symmetric/symmetric_openssl.c | 2 +- crypto/test/Makefile | 25 +- crypto/test/algorithmTest.c | 2284 +++- crypto/test/cryptoOpen.c | 12 +- crypto/test/dhperf/dhperf.c | 24 +- crypto/test/eccTest.c | 132 + crypto/test/eccperf/eccperf.c | 47 +- crypto/test/hmacTest.c | 333 + crypto/test/ocspTest.c | 565 - crypto/test/ocspTestData.h | 950 -- crypto/test/rsaTest.c | 218 + crypto/test/rsaperf/rsaperf.c | 51 +- crypto/test/test_x509enc_data/ca_cert.pem | 10 + crypto/test/test_x509enc_data/ca_key.pem | 8 + crypto/test/test_x509enc_data/csr.pem | 7 + crypto/test/throughputTest.c | 155 +- doc/CHANGES_v4.0.html | 125 + doc/CHANGES_v4.0.md | 138 + doc/CHANGES_v4.0.txt | 139 + doc/MatrixCMS_API.pdf | Bin 0 -> 561130 bytes doc/MatrixDTLS_DeveloperGuide.pdf | Bin 216186 -> 195459 bytes doc/MatrixKeyAndCertGeneration.pdf | Bin 0 -> 349765 bytes doc/MatrixSSL_API.pdf | Bin 2559006 -> 1577428 bytes doc/MatrixSSL_CertificatesAndCRLs.pdf | Bin 0 -> 673070 bytes doc/MatrixSSL_DiffieHellman.pdf | Bin 218980 -> 208040 bytes doc/MatrixSSL_EllipticCurveCiphers.pdf | Bin 580515 -> 263730 bytes doc/MatrixSSL_ExternalModuleIntegration.pdf | Bin 541252 -> 233251 bytes doc/MatrixSSL_GettingStarted.pdf | Bin 484372 -> 216060 bytes doc/MatrixSSL_PortingGuide.pdf | Bin 375126 -> 477233 bytes doc/Matrix_DeterministicMemory.pdf | Bin 0 -> 273715 bytes doc/matrixssl_dev_guide.html | 2046 +-- doc/matrixssl_dev_guide.md | 1170 +- makefiles/testsupp.mk | 2 +- matrixssl/Makefile | 25 +- matrixssl/cipherSuite.c | 1119 +- matrixssl/dtls.c | 30 +- matrixssl/extDecode.c | 567 +- matrixssl/hsDecode.c | 1209 +- matrixssl/hsHash.c | 100 +- matrixssl/hsNegotiateVersion.c | 540 + matrixssl/matrixssl.c | 2507 ++-- matrixssl/matrixsslApi.c | 382 +- matrixssl/matrixsslApi.h | 661 +- matrixssl/matrixsslCheck.h | 136 +- matrixssl/matrixsslImpl.h | 5 +- matrixssl/matrixsslKeys.c | 1503 ++ matrixssl/matrixsslNet.c | 78 +- matrixssl/matrixsslNet.h | 30 +- matrixssl/matrixsslSocket.c | 159 +- matrixssl/matrixsslSocket.h | 29 +- matrixssl/matrixssllib.h | 1584 ++- matrixssl/prf.c | 20 +- matrixssl/psExt.h | 27 +- matrixssl/psk.c | 41 +- matrixssl/sslDecode.c | 562 +- matrixssl/sslEncode.c | 2171 +-- matrixssl/test/Makefile | 16 +- matrixssl/test/certValidate.c | 214 +- matrixssl/test/provider.c | 37 + matrixssl/test/sslTest.c | 1899 ++- matrixssl/tls.c | 595 +- matrixssl/tls13Authenticate.c | 282 + matrixssl/tls13CipherSuite.c | 421 + matrixssl/tls13Decode.c | 2045 +++ matrixssl/tls13DecodeExt.c | 1720 +++ matrixssl/tls13DhGroups.h | 153 + matrixssl/tls13Encode.c | 2511 ++++ matrixssl/tls13EncodeExt.c | 1447 ++ matrixssl/tls13KeyAgree.c | 989 ++ matrixssl/tls13KeySchedule.c | 1160 ++ matrixssl/tls13Negotiate.c | 165 + matrixssl/tls13Psk.c | 386 + matrixssl/tls13Resume.c | 800 ++ matrixssl/tls13SigVer.c | 558 + matrixssl/tls13TrHash.c | 296 + matrixssl/tlsDefaults.c | 398 + matrixssl/tlsSelectKeys.c | 251 + matrixssl/tlsTrace.c | 1938 +++ matrixssl/version.h | 10 +- release_notes-3-9-5-open.html | 106 - release_notes-4-0-0-open.html | 125 + testkeys/DH/1536_DH_PARAMS.h | 55 + testkeys/DH/1536_DH_PARAMS.pem | 7 + testkeys/DH/ffdhe2048_DH_PARAMS.h | 94 + testkeys/DH/ffdhe2048_DH_PARAMS.pem | 8 + testkeys/DH/ffdhe2048_DH_PARAMS.sequence | 12 + testkeys/DH/ffdhe2048_params.pem | 8 + testkeys/DH/ffdhe3072_DH_PARAMS.h | 116 + testkeys/DH/ffdhe3072_DH_PARAMS.pem | 11 + testkeys/DH/ffdhe3072_DH_PARAMS.sequence | 12 + testkeys/DH/ffdhe3072_params.pem | 11 + testkeys/DH/ffdhe4096_DH_PARAMS.h | 137 + testkeys/DH/ffdhe4096_DH_PARAMS.pem | 13 + testkeys/DH/ffdhe4096_DH_PARAMS.sequence | 12 + testkeys/DH/ffdhe4096_params.pem | 13 + testkeys/DH/ffdhe6144_DH_PARAMS.h | 182 + testkeys/DH/ffdhe6144_DH_PARAMS.pem | 19 + testkeys/DH/ffdhe6144_DH_PARAMS.sequence | 43 + testkeys/DH/ffdhe8192_DH_PARAMS.h | 225 + testkeys/DH/ffdhe8192_DH_PARAMS.pem | 24 + testkeys/DH/ffdhe8192_DH_PARAMS.sequence | 54 + testkeys/DH/ffdhe8192_params.pem | 35 + testkeys/EC/192_EC.h | 2 +- testkeys/EC/192_EC_CA.h | 2 +- testkeys/EC/224_EC.h | 2 +- testkeys/EC/224_EC_CA.h | 2 +- testkeys/EC/256_EC.h | 2 +- testkeys/EC/256_EC_CA.h | 2 +- testkeys/EC/384_EC.h | 2 +- testkeys/EC/384_EC_CA.h | 2 +- testkeys/EC/521_EC.h | 2 +- testkeys/EC/521_EC_CA.h | 2 +- testkeys/ECDH_RSA/1024_ECDH-RSA_CA.h | 2 +- testkeys/ECDH_RSA/2048_ECDH-RSA_CA.h | 2 +- testkeys/ECDH_RSA/256_ECDH-RSA.h | 2 +- testkeys/ECDH_RSA/521_ECDH-RSA.h | 2 +- testkeys/OCSP/responses/OCSP_256_EC_GOOD.der | Bin 0 -> 1330 bytes testkeys/OCSP/responses/OCSP_256_EC_GOOD.h | 117 + .../OCSP/responses/OCSP_256_EC_REVOKED.der | Bin 0 -> 1348 bytes testkeys/OCSP/responses/OCSP_256_EC_REVOKED.h | 119 + testkeys/PSK/tls13_psk.h | 30 + testkeys/RSA/1024_RSA.h | 2 +- testkeys/RSA/1024_RSA_CA.h | 2 +- testkeys/RSA/1024_RSA_KEY.h | 80 +- testkeys/RSA/1024_RSA_MD4.pem | 18 + testkeys/RSA/2048_RSA.h | 2 +- testkeys/RSA/2048_RSA_CA.h | 2 +- testkeys/RSA/2048_RSA_KEY.h | 152 +- testkeys/RSA/2048_RSA_PUB_pem.h | 47 + testkeys/RSA/3072_RSA.h | 2 +- testkeys/RSA/3072_RSA_CA.h | 2 +- testkeys/RSA/4096_RSA.h | 2 +- testkeys/RSA/4096_RSA_CA.h | 2 +- testkeys/RSA/4096_RSA_KEY.h | 296 +- testkeys/additional/DH/15360_DH_PARAMS.pem | 43 + testkeys/additional/DH/16384_DH_PARAMS.pem | 45 + testkeys/additional/DH/README.txt | 1 + testkeys/trusted-roots/DSTRootCAX3.pem | 20 + .../trusted-roots/DigiCertGlobalRootCA.pem | 22 + xcode/algorithmTest.xcodeproj/project.pbxproj | 253 - 545 files changed, 99407 insertions(+), 19214 deletions(-) delete mode 100644 configs/nonfips/coreConfig.h delete mode 100644 configs/nonfips/cryptoConfig.h delete mode 100644 configs/nonfips/matrixsslConfig.h create mode 100644 configs/tls13/coreConfig.h create mode 100644 configs/tls13/cryptoConfig.h create mode 100644 configs/tls13/matrixsslConfig.h create mode 100644 core/GNUmakefile delete mode 100644 core/Makefile create mode 100644 core/Makefile.inc create mode 100644 core/apps/GNUmakefile create mode 100644 core/apps/log.c create mode 100644 core/apps/logcc.cc create mode 100644 core/config/cf_impldefs.h create mode 100644 core/config/cfg_pkcslib.h create mode 100644 core/config/cfg_spal.h create mode 100644 core/config/coreConfig.h create mode 100644 core/config/sl_chacha20poly1305ietf_config.h delete mode 100644 core/corelib.c create mode 100644 core/include/c_lib.h create mode 100644 core/include/cl_basic.h create mode 100644 core/include/cl_header_begin.h create mode 100644 core/include/cl_header_end.h create mode 100644 core/include/cl_types_base.h create mode 100644 core/include/core/README.txt create mode 100644 core/include/core/coreApi.h create mode 100644 core/include/core/osdep.h create mode 100644 core/include/core/psUtil.h rename core/{ => include}/coreApi.h (87%) create mode 100644 core/include/export.h create mode 100644 core/include/implementation_defs.h create mode 100644 core/include/implementation_defs_log.h create mode 100644 core/include/list.h create mode 100644 core/include/private/common.h create mode 100644 core/include/private/coreApiExt.h rename core/{ => include}/psLog.h (89%) rename core/{ => include}/psPrnf.h (89%) create mode 100644 core/include/psStat.h rename core/{ => include}/psUtil.h (86%) rename core/{ => include}/psbuf.h (62%) create mode 100644 core/include/pscompilerdep.h create mode 100644 core/include/pscompilerwarning.h rename core/{list.h => include/pslist.h} (95%) rename core/{ => include}/psmalloc.h (90%) rename core/{ => include}/psnet.h (90%) create mode 100644 core/include/psunreachable_begin.h create mode 100644 core/include/psunreachable_end.h create mode 100644 core/include/public_defs.h create mode 100644 core/include/runtime.h create mode 100644 core/include/sfzcl/sfzclbase64.h create mode 100644 core/include/sfzcl/sfzclbuffer.h create mode 100644 core/include/sfzcl/sfzcldsprintf.h create mode 100644 core/include/sfzcl/sfzclenum.h create mode 100644 core/include/sfzcl/sfzclfastalloc.h create mode 100644 core/include/sfzcl/sfzclfileio.h create mode 100644 core/include/sfzcl/sfzclgetput.h create mode 100644 core/include/sfzcl/sfzclglobals.h create mode 100644 core/include/sfzcl/sfzclincludes.h create mode 100644 core/include/sfzcl/sfzclmalloc.h create mode 100644 core/include/sfzcl/sfzclmemparser.h create mode 100644 core/include/sfzcl/sfzclobstack.h create mode 100644 core/include/sfzcl/sfzclsnprintf.h create mode 100644 core/include/sfzcl/sfzclstr.h create mode 100644 core/include/sfzcl/sfzcltime.h create mode 100644 core/include/sfzcl/sfzcltimemeasure.h create mode 100644 core/include/testsupp/info.h create mode 100644 core/include/testsupp/sfzutf-perf.h create mode 100644 core/include/testsupp/sfzutf-utils.h create mode 100644 core/include/testsupp/sfzutf.h create mode 100644 core/include/testsupp/testsupp.h create mode 100644 core/include/testsupp/testsupp.hpp create mode 100644 core/include/testsupp/thirdparty/catch.hpp create mode 100644 core/include/utils.h create mode 100644 core/makefiles/detect-and-rules.mk create mode 100644 core/makefiles/get_CCARCH.mk create mode 100644 core/makefiles/platform_specific.mk create mode 100644 core/makefiles/rules.mk create mode 100644 core/makefiles/use_ar.mk create mode 100644 core/osdep/ANSI/osdep_break.c create mode 100644 core/osdep/ANSI/readme.txt create mode 100644 core/osdep/ANSI/spal_memory_ansi.c rename core/{ => osdep}/POSIX/osdep.c (80%) rename core/{ => osdep}/POSIX/psLog.c (91%) rename core/{ => osdep}/POSIX/psPrnf.c (83%) create mode 100644 core/osdep/POSIX/spal_posix_mutex.c create mode 100644 core/osdep/POSIX/spal_posix_semaphore.c create mode 100644 core/osdep/POSIX/spal_posix_sleep.c create mode 100644 core/osdep/POSIX/spal_posix_thread.c rename core/{ => osdep}/WIN32/osdep.c (97%) create mode 100644 core/osdep/include/Makefile rename core/{ => osdep/include}/osdep-types.h (81%) rename core/{ => osdep/include}/osdep.h (99%) create mode 100644 core/osdep/include/osdep_arm_acle.h create mode 100644 core/osdep/include/osdep_arm_neon.h create mode 100644 core/osdep/include/osdep_assert.h create mode 100644 core/osdep/include/osdep_cpu-features.h create mode 100644 core/osdep/include/osdep_ctype.h create mode 100644 core/osdep/include/osdep_dlfcn.h create mode 100644 core/osdep/include/osdep_emmintrin.h create mode 100644 core/osdep/include/osdep_errno.h create mode 100644 core/osdep/include/osdep_fcntl.h create mode 100644 core/osdep/include/osdep_immintrin.h create mode 100644 core/osdep/include/osdep_intrin.h create mode 100644 core/osdep/include/osdep_inttypes.h create mode 100644 core/osdep/include/osdep_libc-version.h create mode 100644 core/osdep/include/osdep_limits.h create mode 100644 core/osdep/include/osdep_malloc.h create mode 100644 core/osdep/include/osdep_math.h create mode 100644 core/osdep/include/osdep_netdb.h create mode 100644 core/osdep/include/osdep_netinet_in.h create mode 100644 core/osdep/include/osdep_netinet_tcp.h create mode 100644 core/osdep/include/osdep_nmmintrin.h create mode 100644 core/osdep/include/osdep_pthread.h create mode 100644 core/osdep/include/osdep_sched.h create mode 100644 core/osdep/include/osdep_semaphore.h create mode 100644 core/osdep/include/osdep_setjmp.h create mode 100644 core/osdep/include/osdep_signal.h create mode 100644 core/osdep/include/osdep_smmintrin.h create mode 100644 core/osdep/include/osdep_stdarg.h create mode 100644 core/osdep/include/osdep_stdbool.h create mode 100644 core/osdep/include/osdep_stddef.h create mode 100644 core/osdep/include/osdep_stdint.h create mode 100644 core/osdep/include/osdep_stdio.h create mode 100644 core/osdep/include/osdep_stdlib.h create mode 100644 core/osdep/include/osdep_strict.h create mode 100644 core/osdep/include/osdep_string.h create mode 100644 core/osdep/include/osdep_strings.h create mode 100644 core/osdep/include/osdep_sys_auxv.h create mode 100644 core/osdep/include/osdep_sys_ioctl.h create mode 100644 core/osdep/include/osdep_sys_mman.h create mode 100644 core/osdep/include/osdep_sys_socket.h create mode 100644 core/osdep/include/osdep_sys_time.h create mode 100644 core/osdep/include/osdep_sys_types.h create mode 100644 core/osdep/include/osdep_termios.h create mode 100644 core/osdep/include/osdep_time.h create mode 100644 core/osdep/include/osdep_time_gmtime_r.h create mode 100644 core/osdep/include/osdep_tmmintrin.h create mode 100644 core/osdep/include/osdep_unistd.h create mode 100644 core/osdep/include/osdep_wchar.h create mode 100644 core/osdep/include/osdep_wincrypt.h create mode 100644 core/osdep/include/osdep_windows.h create mode 100644 core/osdep/include/osdep_wmmintrin.h create mode 100644 core/osdep/include/osdep_x86intrin.h create mode 100644 core/osdep/include/osdep_zmmintrin.h create mode 100644 core/osdep/include/spal_memory.h create mode 100644 core/osdep/include/spal_mutex.h create mode 100644 core/osdep/include/spal_result.h create mode 100644 core/osdep/include/spal_semaphore.h create mode 100644 core/osdep/include/spal_thread.h create mode 100644 core/osdep/include/template.h create mode 100644 core/osdep/src/cl_memset.c create mode 100644 core/osdep/src/runtime.c create mode 100644 core/src/Cryptopp-License.txt create mode 100644 core/src/bmp.c create mode 100644 core/src/c_lib.c create mode 100644 core/src/cl_basic.c create mode 100644 core/src/corelib_date.c create mode 100644 core/src/corelib_list.c create mode 100644 core/src/corelib_main.c create mode 100644 core/src/corelib_main.h create mode 100644 core/src/corelib_strings.c create mode 100644 core/src/corelib_trace.c create mode 100644 core/src/debug_abort.c create mode 100644 core/src/debug_printf.c rename core/{ => src}/memset_s.c (72%) create mode 100644 core/src/psStat.c rename core/{ => src}/psUtil.c (100%) rename core/{ => src}/psbuf.c (80%) create mode 100644 core/src/psmalloc.c create mode 100644 core/src/psmalloc_ext.c create mode 100644 core/src/psprintf.c create mode 100644 core/src/psprintf.h create mode 100644 core/src/sfzclbase64.c create mode 100644 core/src/sfzclbuffer.c create mode 100644 core/src/sfzclcalendar.c create mode 100644 core/src/sfzclfastalloc.c create mode 100644 core/src/sfzclfileio.c create mode 100644 core/src/sfzclmalloc.c create mode 100644 core/src/sfzclmemparser.c create mode 100644 core/src/sfzclobstack.c create mode 100644 core/src/sfzclsnprintf.c create mode 100644 core/src/sfzclstr.c create mode 100644 core/src/sfzcltime.c create mode 100644 core/src/sfzcltimemeasure.c create mode 100644 core/src/sl_cpu.c create mode 100644 core/src/sl_neon.c create mode 100644 core/src/utils.c create mode 100644 core/testsupp/src/sfzutf/sfzutf-heap.c create mode 100644 core/testsupp/src/sfzutf/sfzutf-perf.c create mode 100644 core/testsupp/src/sfzutf/sfzutf-stack.c create mode 100644 core/testsupp/src/sfzutf/sfzutf-utils.c create mode 100644 core/testsupp/src/sfzutf/sfzutf.c create mode 100644 core/testsupp/src/sfzutf/sfzutf_interactive.c create mode 100644 core/testsupp/src/sfzutf/sfzutf_internal.h create mode 100644 core/testsupp/src/sfzutf/sfzutf_main_stdio.c create mode 100644 core/testsupp/src/testsupp.c create mode 100644 core/unit_tests/GNUmakefile create mode 100644 core/unit_tests/test_psGetFileBuf.cc create mode 100644 core/wrapper/Makefile create mode 100644 core/wrapper/README.md create mode 100644 core/wrapper/wrap-malloc.c create mode 100644 core/wrapper/wrap-malloc.h create mode 100644 crypto/common/alg_info.c create mode 100644 crypto/crypto_sign/crypto_sign.c create mode 100644 crypto/crypto_sign/ed25519/ref10/keypair.c create mode 100644 crypto/crypto_sign/ed25519/ref10/open.c create mode 100644 crypto/crypto_sign/ed25519/ref10/sign.c create mode 100644 crypto/crypto_sign/ed25519/ref10/sign_ed25519_ref10.h create mode 100644 crypto/crypto_sign/ed25519/sign_ed25519.c create mode 100644 crypto/crypto_sign/include/sodium/crypto_sign.h create mode 100644 crypto/crypto_sign/include/sodium/crypto_sign_ed25519.h create mode 100644 crypto/crypto_sign/include/sodium/export.h create mode 100644 crypto/crypto_sign/ps_ed25519.c create mode 100644 crypto/crypto_sign/ps_ed25519.h create mode 100644 crypto/digest/hkdf.c create mode 100644 crypto/digest/sha256_standalone.c create mode 100644 crypto/digest/sha256_standalone.h create mode 100644 crypto/keyformat/pem_decode_file.c create mode 100644 crypto/keyformat/pem_decode_mem.c create mode 100644 crypto/pubkey/dh_export.c create mode 100644 crypto/pubkey/dh_gen_key.c create mode 100644 crypto/pubkey/dh_gen_secret.c create mode 100644 crypto/pubkey/dh_import.c create mode 100644 crypto/pubkey/dh_import_priv.c create mode 100644 crypto/pubkey/dh_params.c create mode 100644 crypto/pubkey/ecc_curve.c create mode 100644 crypto/pubkey/ecc_curve_config.c create mode 100644 crypto/pubkey/ecc_curve_data.c create mode 100644 crypto/pubkey/ecc_export.c create mode 100644 crypto/pubkey/ecc_gen_shared.c create mode 100644 crypto/pubkey/ecc_import.c create mode 100644 crypto/pubkey/ecc_keygen.c create mode 100644 crypto/pubkey/ecc_math.c create mode 100644 crypto/pubkey/ecc_parse_file.c create mode 100644 crypto/pubkey/ecc_parse_mem.c create mode 100644 crypto/pubkey/ecc_priv.c create mode 100644 crypto/pubkey/ecc_priv_el_gamal.c create mode 100644 crypto/pubkey/ecc_pub.c create mode 100644 crypto/pubkey/ecc_write_file.c create mode 100644 crypto/pubkey/ecc_write_mem.c create mode 100644 crypto/pubkey/pubkey_parse_file.c create mode 100644 crypto/pubkey/pubkey_parse_mem.c create mode 100644 crypto/pubkey/pubkey_sign.c create mode 100644 crypto/pubkey/pubkey_verify.c create mode 100644 crypto/pubkey/rsa_keygen.c create mode 100644 crypto/pubkey/rsa_parse_file.c create mode 100644 crypto/pubkey/rsa_parse_mem.c create mode 100644 crypto/pubkey/rsa_priv.c create mode 100644 crypto/pubkey/rsa_pub.c create mode 100644 crypto/pubkey/rsa_write_file.c create mode 100644 crypto/pubkey/rsa_write_mem.c create mode 100644 crypto/scalarmult/LICENSE create mode 100644 crypto/scalarmult/README create mode 100644 crypto/scalarmult/crypto_core/ed25519/core_ed25519.c create mode 100644 crypto/scalarmult/crypto_core/ed25519/ref10/ed25519_ref10.c create mode 100644 crypto/scalarmult/crypto_core/ed25519/ref10/fe_25_5/base.h create mode 100644 crypto/scalarmult/crypto_core/ed25519/ref10/fe_25_5/base2.h create mode 100644 crypto/scalarmult/crypto_core/ed25519/ref10/fe_25_5/constants.h create mode 100644 crypto/scalarmult/crypto_core/ed25519/ref10/fe_25_5/fe.h create mode 100644 crypto/scalarmult/crypto_core/ed25519/ref10/fe_51/base.h create mode 100644 crypto/scalarmult/crypto_core/ed25519/ref10/fe_51/base2.h create mode 100644 crypto/scalarmult/crypto_core/ed25519/ref10/fe_51/constants.h create mode 100644 crypto/scalarmult/crypto_core/ed25519/ref10/fe_51/fe.h create mode 100644 crypto/scalarmult/crypto_scalarmult.c create mode 100644 crypto/scalarmult/curve25519/ref10/x25519_ref10.c create mode 100644 crypto/scalarmult/curve25519/ref10/x25519_ref10.h create mode 100644 crypto/scalarmult/curve25519/sandy2x/consts.S create mode 100644 crypto/scalarmult/curve25519/sandy2x/consts_namespace.h create mode 100644 crypto/scalarmult/curve25519/sandy2x/curve25519_sandy2x.c create mode 100644 crypto/scalarmult/curve25519/sandy2x/curve25519_sandy2x.h create mode 100644 crypto/scalarmult/curve25519/sandy2x/fe.h create mode 100644 crypto/scalarmult/curve25519/sandy2x/fe51.h create mode 100644 crypto/scalarmult/curve25519/sandy2x/fe51_invert.c create mode 100644 crypto/scalarmult/curve25519/sandy2x/fe51_mul.S create mode 100644 crypto/scalarmult/curve25519/sandy2x/fe51_namespace.h create mode 100644 crypto/scalarmult/curve25519/sandy2x/fe51_nsquare.S create mode 100644 crypto/scalarmult/curve25519/sandy2x/fe51_pack.S create mode 100644 crypto/scalarmult/curve25519/sandy2x/fe_frombytes_sandy2x.c create mode 100644 crypto/scalarmult/curve25519/sandy2x/ladder.S create mode 100644 crypto/scalarmult/curve25519/sandy2x/ladder.h create mode 100644 crypto/scalarmult/curve25519/sandy2x/ladder_base.S create mode 100644 crypto/scalarmult/curve25519/sandy2x/ladder_base.h create mode 100644 crypto/scalarmult/curve25519/sandy2x/ladder_base_namespace.h create mode 100644 crypto/scalarmult/curve25519/sandy2x/ladder_namespace.h create mode 100644 crypto/scalarmult/curve25519/sandy2x/sandy2x.S create mode 100644 crypto/scalarmult/curve25519/scalarmult_curve25519.c create mode 100644 crypto/scalarmult/curve25519/scalarmult_curve25519.h create mode 100644 crypto/scalarmult/ed25519/ref10/scalarmult_ed25519_ref10.c create mode 100644 crypto/scalarmult/include/sodium/crypto_core_ed25519.h create mode 100644 crypto/scalarmult/include/sodium/crypto_scalarmult.h create mode 100644 crypto/scalarmult/include/sodium/crypto_scalarmult_curve25519.h create mode 100644 crypto/scalarmult/include/sodium/crypto_scalarmult_ed25519.h create mode 100644 crypto/scalarmult/include/sodium/crypto_verify_32.h create mode 100644 crypto/scalarmult/include/sodium/private/ed25519_ref10.h create mode 100644 crypto/scalarmult/include/sodium/private/ed25519_ref10_fe_25_5.h create mode 100644 crypto/scalarmult/include/sodium/private/implementations.h create mode 100644 crypto/scalarmult/ps_x25519.c create mode 100644 crypto/scalarmult/ps_x25519.h create mode 100644 crypto/test/eccTest.c create mode 100644 crypto/test/hmacTest.c delete mode 100644 crypto/test/ocspTest.c delete mode 100644 crypto/test/ocspTestData.h create mode 100644 crypto/test/rsaTest.c create mode 100644 crypto/test/test_x509enc_data/ca_cert.pem create mode 100644 crypto/test/test_x509enc_data/ca_key.pem create mode 100644 crypto/test/test_x509enc_data/csr.pem create mode 100644 doc/CHANGES_v4.0.html create mode 100644 doc/CHANGES_v4.0.md create mode 100644 doc/CHANGES_v4.0.txt create mode 100644 doc/MatrixCMS_API.pdf create mode 100644 doc/MatrixKeyAndCertGeneration.pdf create mode 100644 doc/MatrixSSL_CertificatesAndCRLs.pdf create mode 100644 doc/Matrix_DeterministicMemory.pdf create mode 100644 matrixssl/hsNegotiateVersion.c create mode 100644 matrixssl/matrixsslKeys.c create mode 100644 matrixssl/test/provider.c create mode 100644 matrixssl/tls13Authenticate.c create mode 100644 matrixssl/tls13CipherSuite.c create mode 100644 matrixssl/tls13Decode.c create mode 100644 matrixssl/tls13DecodeExt.c create mode 100644 matrixssl/tls13DhGroups.h create mode 100644 matrixssl/tls13Encode.c create mode 100644 matrixssl/tls13EncodeExt.c create mode 100644 matrixssl/tls13KeyAgree.c create mode 100644 matrixssl/tls13KeySchedule.c create mode 100644 matrixssl/tls13Negotiate.c create mode 100644 matrixssl/tls13Psk.c create mode 100644 matrixssl/tls13Resume.c create mode 100644 matrixssl/tls13SigVer.c create mode 100644 matrixssl/tls13TrHash.c create mode 100644 matrixssl/tlsDefaults.c create mode 100644 matrixssl/tlsSelectKeys.c create mode 100644 matrixssl/tlsTrace.c delete mode 100644 release_notes-3-9-5-open.html create mode 100644 release_notes-4-0-0-open.html create mode 100644 testkeys/DH/1536_DH_PARAMS.h create mode 100644 testkeys/DH/1536_DH_PARAMS.pem create mode 100644 testkeys/DH/ffdhe2048_DH_PARAMS.h create mode 100644 testkeys/DH/ffdhe2048_DH_PARAMS.pem create mode 100644 testkeys/DH/ffdhe2048_DH_PARAMS.sequence create mode 100644 testkeys/DH/ffdhe2048_params.pem create mode 100644 testkeys/DH/ffdhe3072_DH_PARAMS.h create mode 100644 testkeys/DH/ffdhe3072_DH_PARAMS.pem create mode 100644 testkeys/DH/ffdhe3072_DH_PARAMS.sequence create mode 100644 testkeys/DH/ffdhe3072_params.pem create mode 100644 testkeys/DH/ffdhe4096_DH_PARAMS.h create mode 100644 testkeys/DH/ffdhe4096_DH_PARAMS.pem create mode 100644 testkeys/DH/ffdhe4096_DH_PARAMS.sequence create mode 100644 testkeys/DH/ffdhe4096_params.pem create mode 100644 testkeys/DH/ffdhe6144_DH_PARAMS.h create mode 100644 testkeys/DH/ffdhe6144_DH_PARAMS.pem create mode 100644 testkeys/DH/ffdhe6144_DH_PARAMS.sequence create mode 100644 testkeys/DH/ffdhe8192_DH_PARAMS.h create mode 100644 testkeys/DH/ffdhe8192_DH_PARAMS.pem create mode 100644 testkeys/DH/ffdhe8192_DH_PARAMS.sequence create mode 100644 testkeys/DH/ffdhe8192_params.pem create mode 100644 testkeys/OCSP/responses/OCSP_256_EC_GOOD.der create mode 100644 testkeys/OCSP/responses/OCSP_256_EC_GOOD.h create mode 100644 testkeys/OCSP/responses/OCSP_256_EC_REVOKED.der create mode 100644 testkeys/OCSP/responses/OCSP_256_EC_REVOKED.h create mode 100644 testkeys/PSK/tls13_psk.h create mode 100644 testkeys/RSA/1024_RSA_MD4.pem create mode 100644 testkeys/RSA/2048_RSA_PUB_pem.h create mode 100644 testkeys/additional/DH/15360_DH_PARAMS.pem create mode 100644 testkeys/additional/DH/16384_DH_PARAMS.pem create mode 100644 testkeys/additional/DH/README.txt create mode 100644 testkeys/trusted-roots/DSTRootCAX3.pem create mode 100644 testkeys/trusted-roots/DigiCertGlobalRootCA.pem delete mode 100644 xcode/algorithmTest.xcodeproj/project.pbxproj diff --git a/Makefile b/Makefile index a400823..c0f20f1 100644 --- a/Makefile +++ b/Makefile @@ -53,12 +53,21 @@ util: all-utils CONFIG_EXTRA_DEPENDENCIES= +CORE_CONFIG_DIR=core/config +CORE_CONFIG_FILE=$(CORE_CONFIG_DIR)/coreConfig.h + +# ! -e $(CORE_CONFIG_FILE) ] || ! cmp -s $(1)/coreConfig.h $(CORE_CONFIG_FILE) +define apply_core_config +@if [ ! -e $(CORE_CONFIG_FILE) ] || ! cmp -s $(1)/coreConfig.h $(CORE_CONFIG_FILE); then cp $(1)/coreConfig.h $(CORE_CONFIG_FILE); echo cp $(1)/coreConfig.h $(CORE_CONFIG_FILE); echo WARNING: Applied new configuration also to core. You may need to recompile the core.;fi +endef + +# ! -e $(CORE_CONFIG_FILE) ] || ! cmp -s $(1)/coreConfig.h $(CORE_CONFIG_FILE) +define apply_core_config_non_exist +@if [ ! -e $(CORE_CONFIG_FILE) ]; then cp $(1)/coreConfig.h $(CORE_CONFIG_FILE); echo cp $(1)/coreConfig.h $(CORE_CONFIG_FILE); echo WARNING: Applied new configuration also to core. You may need to recompile the core.;fi +endef + # Use default config if no config is being used. check-config: $(CONFIG_EXTRA_DEPENDENCIES) - @if [ ! -e core/coreConfig.h ];then \ - cp configs/default/coreConfig.h core/coreConfig.h;\ - echo NOTE: Using default configuration from configs/default/coreConfig.h.;\ - fi @if [ ! -e crypto/cryptoConfig.h ];then \ cp configs/default/cryptoConfig.h crypto/cryptoConfig.h;\ echo NOTE: Using default configuration from configs/default/cryptoConfig.h.;\ @@ -67,6 +76,7 @@ check-config: $(CONFIG_EXTRA_DEPENDENCIES) cp configs/default/matrixsslConfig.h matrixssl/matrixsslConfig.h;\ echo NOTE: Using default configuration from configs/default/matrixsslConfig.h.;\ fi + $(call apply_core_config_non_exist,configs/default) clean-config: rm -f core/coreConfig.h crypto/cryptoConfig.h matrixssl/matrixsslConfig.h @@ -74,9 +84,9 @@ clean-config: # Apply any of pre-existing configurations from configs directory %-config: configs/% $(CONFIG_EXTRA_DEPENDENCIES) @echo Using $MatrixSSL has been continuously maintained since 2002. It is the first open source small footprint SSL stack. Until recently, releases were tracked on http://freecode.com/projects/matrixssl

-

MatrixSSL is an embedded SSL and TLS implementation designed for small footprint IoT devices requiring low overhead per connection. The library is less than 50Kb on disk with cipher suites. It includes client and server support through TLS 1.2, mutual authentication, session resumption, and implementations of RSA, ECC, AES, SHA1, SHA-256 and more. The source is well documented and contains portability layers for additional operating systems, cipher suites, and cryptography providers.

+

MatrixSSL is an embedded SSL and TLS implementation designed for small footprint IoT devices requiring low overhead per connection. It includes client and server support through TLS 1.3, mutual authentication, session resumption, and implementations of RSA, ECC, AES, SHA1, SHA-256, ChaCha20-Poly1305 and more. The source is well documented and contains portability layers for additional operating systems, cipher suites, and cryptography providers.

Reporting Issues

@@ -23,9 +23,9 @@ Sensitive emails can be encrypted using the public key in this directory Features