aws-crt 0.1.9 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/VERSION +1 -1
- data/aws-crt-ffi/crt/aws-c-auth/include/aws/auth/auth.h +1 -0
- data/aws-crt-ffi/crt/aws-c-auth/include/aws/auth/aws_imds_client.h +5 -0
- data/aws-crt-ffi/crt/aws-c-auth/include/aws/auth/credentials.h +5 -0
- data/aws-crt-ffi/crt/aws-c-auth/include/aws/auth/private/aws_signing.h +1 -0
- data/aws-crt-ffi/crt/aws-c-auth/include/aws/auth/private/credentials_utils.h +2 -0
- data/aws-crt-ffi/crt/aws-c-auth/include/aws/auth/signing_config.h +1 -0
- data/aws-crt-ffi/crt/aws-c-auth/source/auth.c +3 -1
- data/aws-crt-ffi/crt/aws-c-auth/source/aws_imds_client.c +146 -63
- data/aws-crt-ffi/crt/aws-c-auth/source/aws_signing.c +41 -19
- data/aws-crt-ffi/crt/aws-c-auth/source/credentials_provider_imds.c +1 -0
- data/aws-crt-ffi/crt/aws-c-auth/source/credentials_utils.c +1 -0
- data/aws-crt-ffi/crt/aws-c-auth/source/signable_http_request.c +2 -1
- data/aws-crt-ffi/crt/aws-c-auth/source/signing_config.c +25 -0
- data/aws-crt-ffi/crt/aws-c-auth/tests/CMakeLists.txt +3 -0
- data/aws-crt-ffi/crt/aws-c-auth/tests/aws_imds_client_test.c +197 -31
- data/aws-crt-ffi/crt/aws-c-auth/tests/credentials_provider_imds_tests.c +16 -18
- data/aws-crt-ffi/crt/aws-c-auth/tests/sigv4_signing_tests.c +3 -1
- data/aws-crt-ffi/crt/aws-c-cal/include/aws/cal/private/opensslcrypto_common.h +22 -0
- data/aws-crt-ffi/crt/aws-c-cal/source/darwin/commoncrypto_aes.c +46 -17
- data/aws-crt-ffi/crt/aws-c-cal/source/unix/openssl_aes.c +1 -0
- data/aws-crt-ffi/crt/aws-c-cal/source/unix/openssl_platform_init.c +7 -0
- data/aws-crt-ffi/crt/aws-c-cal/source/unix/openssl_rsa.c +59 -2
- data/aws-crt-ffi/crt/aws-c-cal/source/unix/opensslcrypto_ecc.c +1 -0
- data/aws-crt-ffi/crt/aws-c-common/CMakeLists.txt +13 -1
- data/aws-crt-ffi/crt/aws-c-common/THIRD-PARTY-LICENSES.txt +28 -7
- data/aws-crt-ffi/crt/aws-c-common/bin/system_info/CMakeLists.txt +18 -0
- data/aws-crt-ffi/crt/aws-c-common/bin/system_info/print_system_info.c +48 -0
- data/aws-crt-ffi/crt/aws-c-common/include/aws/common/allocator.h +23 -0
- data/aws-crt-ffi/crt/aws-c-common/include/aws/common/byte_buf.h +12 -0
- data/aws-crt-ffi/crt/aws-c-common/include/aws/common/cross_process_lock.h +35 -0
- data/aws-crt-ffi/crt/aws-c-common/include/aws/common/hash_table.h +1 -0
- data/aws-crt-ffi/crt/aws-c-common/include/aws/common/priority_queue.h +24 -0
- data/aws-crt-ffi/crt/aws-c-common/include/aws/common/private/system_info_priv.h +37 -0
- data/aws-crt-ffi/crt/aws-c-common/include/aws/common/system_info.h +47 -0
- data/aws-crt-ffi/crt/aws-c-common/include/aws/common/system_resource_util.h +30 -0
- data/aws-crt-ffi/crt/aws-c-common/include/aws/testing/aws_test_harness.h +3 -2
- data/aws-crt-ffi/crt/aws-c-common/source/allocator.c +64 -13
- data/aws-crt-ffi/crt/aws-c-common/source/android/logging.c +14 -0
- data/aws-crt-ffi/crt/aws-c-common/source/common.c +3 -3
- data/aws-crt-ffi/crt/aws-c-common/source/file.c +96 -35
- data/aws-crt-ffi/crt/aws-c-common/source/linux/system_info.c +24 -0
- data/aws-crt-ffi/crt/aws-c-common/source/memtrace.c +10 -3
- data/aws-crt-ffi/crt/aws-c-common/source/platform_fallback_stubs/system_info.c +21 -0
- data/aws-crt-ffi/crt/aws-c-common/source/posix/cross_process_lock.c +141 -0
- data/aws-crt-ffi/crt/aws-c-common/source/posix/system_info.c +1 -1
- data/aws-crt-ffi/crt/aws-c-common/source/posix/system_resource_utils.c +32 -0
- data/aws-crt-ffi/crt/aws-c-common/source/priority_queue.c +24 -0
- data/aws-crt-ffi/crt/aws-c-common/source/system_info.c +80 -0
- data/aws-crt-ffi/crt/aws-c-common/source/task_scheduler.c +2 -2
- data/aws-crt-ffi/crt/aws-c-common/source/windows/cross_process_lock.c +93 -0
- data/aws-crt-ffi/crt/aws-c-common/source/windows/system_resource_utils.c +31 -0
- data/aws-crt-ffi/crt/aws-c-common/tests/CMakeLists.txt +16 -0
- data/aws-crt-ffi/crt/aws-c-common/tests/alloc_test.c +83 -22
- data/aws-crt-ffi/crt/aws-c-common/tests/cross_process_lock_tests.c +116 -0
- data/aws-crt-ffi/crt/aws-c-common/tests/file_test.c +103 -0
- data/aws-crt-ffi/crt/aws-c-common/tests/priority_queue_test.c +36 -0
- data/aws-crt-ffi/crt/aws-c-common/tests/system_info_tests.c +19 -0
- data/aws-crt-ffi/crt/aws-c-common/tests/system_resource_util_test.c +37 -0
- data/aws-crt-ffi/crt/aws-c-http/include/aws/http/connection.h +9 -0
- data/aws-crt-ffi/crt/aws-c-http/include/aws/http/http.h +1 -0
- data/aws-crt-ffi/crt/aws-c-http/include/aws/http/private/connection_impl.h +5 -4
- data/aws-crt-ffi/crt/aws-c-http/include/aws/http/private/connection_manager_system_vtable.h +10 -18
- data/aws-crt-ffi/crt/aws-c-http/include/aws/http/private/proxy_impl.h +5 -1
- data/aws-crt-ffi/crt/aws-c-http/include/aws/http/private/request_response_impl.h +5 -0
- data/aws-crt-ffi/crt/aws-c-http/include/aws/http/request_response.h +10 -0
- data/aws-crt-ffi/crt/aws-c-http/source/connection.c +5 -2
- data/aws-crt-ffi/crt/aws-c-http/source/connection_manager.c +22 -21
- data/aws-crt-ffi/crt/aws-c-http/source/h1_connection.c +102 -17
- data/aws-crt-ffi/crt/aws-c-http/source/h1_stream.c +1 -0
- data/aws-crt-ffi/crt/aws-c-http/source/http.c +3 -0
- data/aws-crt-ffi/crt/aws-c-http/source/proxy_connection.c +2 -2
- data/aws-crt-ffi/crt/aws-c-http/tests/CMakeLists.txt +2 -0
- data/aws-crt-ffi/crt/aws-c-http/tests/test_connection_manager.c +18 -18
- data/aws-crt-ffi/crt/aws-c-http/tests/test_h1_client.c +111 -1
- data/aws-crt-ffi/crt/aws-c-http/tests/test_proxy.c +2 -2
- data/aws-crt-ffi/crt/aws-c-http/tests/test_stream_manager.c +2 -2
- data/aws-crt-ffi/crt/aws-c-io/include/aws/io/retry_strategy.h +1 -1
- data/aws-crt-ffi/crt/aws-c-io/source/exponential_backoff_retry_strategy.c +1 -1
- data/aws-crt-ffi/crt/aws-c-io/source/pkcs11_tls_op_handler.c +2 -4
- data/aws-crt-ffi/crt/aws-lc/CMakeLists.txt +16 -8
- data/aws-crt-ffi/crt/aws-lc/cmake/go.cmake +6 -0
- data/aws-crt-ffi/crt/aws-lc/crypto/CMakeLists.txt +6 -9
- data/aws-crt-ffi/crt/aws-lc/crypto/asn1/a_time.c +34 -1
- data/aws-crt-ffi/crt/aws-lc/crypto/asn1/a_utctm.c +4 -1
- data/aws-crt-ffi/crt/aws-lc/crypto/asn1/asn1_test.cc +41 -0
- data/aws-crt-ffi/crt/aws-lc/crypto/bio/bio_mem.c +6 -7
- data/aws-crt-ffi/crt/aws-lc/crypto/bio/bio_test.cc +152 -16
- data/aws-crt-ffi/crt/aws-lc/crypto/bio/connect.c +6 -12
- data/aws-crt-ffi/crt/aws-lc/crypto/bio/fd.c +2 -2
- data/aws-crt-ffi/crt/aws-lc/crypto/bio/file.c +20 -8
- data/aws-crt-ffi/crt/aws-lc/crypto/bio/socket.c +2 -2
- data/aws-crt-ffi/crt/aws-lc/crypto/bio/socket_helper.c +2 -2
- data/aws-crt-ffi/crt/aws-lc/crypto/blake2/blake2.c +11 -1
- data/aws-crt-ffi/crt/aws-lc/crypto/bytestring/cbb.c +13 -3
- data/aws-crt-ffi/crt/aws-lc/crypto/bytestring/cbs.c +9 -0
- data/aws-crt-ffi/crt/aws-lc/crypto/chacha/asm/chacha-armv8.pl +1 -1
- data/aws-crt-ffi/crt/aws-lc/crypto/chacha/chacha.c +49 -8
- data/aws-crt-ffi/crt/aws-lc/crypto/chacha/chacha_test.cc +110 -0
- data/aws-crt-ffi/crt/aws-lc/crypto/chacha/internal.h +8 -1
- data/aws-crt-ffi/crt/aws-lc/crypto/compiler_test.cc +4 -1
- data/aws-crt-ffi/crt/aws-lc/crypto/conf/conf_test.cc +1 -0
- data/aws-crt-ffi/crt/aws-lc/crypto/crypto_test.cc +9 -0
- data/aws-crt-ffi/crt/aws-lc/crypto/curve25519/curve25519.c +189 -108
- data/aws-crt-ffi/crt/aws-lc/crypto/curve25519/curve25519_nohw.c +78 -6
- data/aws-crt-ffi/crt/aws-lc/crypto/curve25519/ed25519_test.cc +9 -0
- data/aws-crt-ffi/crt/aws-lc/crypto/curve25519/internal.h +24 -10
- data/aws-crt-ffi/crt/aws-lc/crypto/curve25519/spake25519.c +4 -4
- data/aws-crt-ffi/crt/aws-lc/crypto/curve25519/x25519_test.cc +80 -11
- data/aws-crt-ffi/crt/aws-lc/crypto/decrepit/evp/evp_do_all.c +2 -0
- data/aws-crt-ffi/crt/aws-lc/crypto/digest_extra/digest_extra.c +8 -0
- data/aws-crt-ffi/crt/aws-lc/crypto/digest_extra/digest_test.cc +110 -45
- data/aws-crt-ffi/crt/aws-lc/crypto/dsa/dsa_test.cc +8 -2
- data/aws-crt-ffi/crt/aws-lc/crypto/dsa/internal.h +18 -0
- data/aws-crt-ffi/crt/aws-lc/crypto/dynamic_loading_test.c +8 -5
- data/aws-crt-ffi/crt/aws-lc/crypto/ec_extra/ec_derive.c +4 -3
- data/aws-crt-ffi/crt/aws-lc/crypto/ec_extra/hash_to_curve.c +6 -18
- data/aws-crt-ffi/crt/aws-lc/crypto/endian_test.cc +308 -0
- data/aws-crt-ffi/crt/aws-lc/crypto/err/ssl.errordata +2 -0
- data/aws-crt-ffi/crt/aws-lc/crypto/evp_extra/evp_extra_test.cc +2 -0
- data/aws-crt-ffi/crt/aws-lc/crypto/evp_extra/evp_test.cc +11 -1
- data/aws-crt-ffi/crt/aws-lc/crypto/evp_extra/evp_tests.txt +25 -0
- data/aws-crt-ffi/crt/aws-lc/crypto/evp_extra/p_ec_asn1.c +1 -1
- data/aws-crt-ffi/crt/aws-lc/crypto/evp_extra/p_kem.c +2 -2
- data/aws-crt-ffi/crt/aws-lc/crypto/evp_extra/p_rsa_asn1.c +1 -0
- data/aws-crt-ffi/crt/aws-lc/crypto/evp_extra/print.c +7 -6
- data/aws-crt-ffi/crt/aws-lc/crypto/evp_extra/scrypt.c +13 -1
- data/aws-crt-ffi/crt/aws-lc/crypto/fipsmodule/CMakeLists.txt +13 -4
- data/aws-crt-ffi/crt/aws-lc/crypto/fipsmodule/aes/aes_nohw.c +18 -6
- data/aws-crt-ffi/crt/aws-lc/crypto/fipsmodule/bcm.c +12 -4
- data/aws-crt-ffi/crt/aws-lc/crypto/fipsmodule/bn/bn_assert_test.cc +77 -0
- data/aws-crt-ffi/crt/aws-lc/crypto/fipsmodule/bn/bn_test.cc +30 -0
- data/aws-crt-ffi/crt/aws-lc/crypto/fipsmodule/bn/bytes.c +112 -22
- data/aws-crt-ffi/crt/aws-lc/crypto/fipsmodule/bn/div.c +12 -5
- data/aws-crt-ffi/crt/aws-lc/crypto/fipsmodule/bn/exponentiation.c +54 -1
- data/aws-crt-ffi/crt/aws-lc/crypto/fipsmodule/bn/gcd.c +5 -6
- data/aws-crt-ffi/crt/aws-lc/crypto/fipsmodule/bn/internal.h +37 -15
- data/aws-crt-ffi/crt/aws-lc/crypto/fipsmodule/bn/montgomery.c +4 -11
- data/aws-crt-ffi/crt/aws-lc/crypto/fipsmodule/bn/montgomery_inv.c +51 -15
- data/aws-crt-ffi/crt/aws-lc/crypto/fipsmodule/cipher/aead.c +2 -2
- data/aws-crt-ffi/crt/aws-lc/crypto/fipsmodule/digest/digest.c +29 -6
- data/aws-crt-ffi/crt/aws-lc/crypto/fipsmodule/digest/digests.c +89 -0
- data/aws-crt-ffi/crt/aws-lc/crypto/fipsmodule/digest/internal.h +4 -0
- data/aws-crt-ffi/crt/aws-lc/crypto/fipsmodule/ec/ec.c +19 -36
- data/aws-crt-ffi/crt/aws-lc/crypto/fipsmodule/ec/ec_key.c +3 -3
- data/aws-crt-ffi/crt/aws-lc/crypto/fipsmodule/ec/ec_montgomery.c +9 -7
- data/aws-crt-ffi/crt/aws-lc/crypto/fipsmodule/ec/ec_test.cc +33 -9
- data/aws-crt-ffi/crt/aws-lc/crypto/fipsmodule/ec/internal.h +17 -12
- data/aws-crt-ffi/crt/aws-lc/crypto/fipsmodule/ec/p224-64.c +5 -8
- data/aws-crt-ffi/crt/aws-lc/crypto/fipsmodule/ec/p256-nistz.c +8 -8
- data/aws-crt-ffi/crt/aws-lc/crypto/fipsmodule/ec/p256.c +9 -8
- data/aws-crt-ffi/crt/aws-lc/crypto/fipsmodule/ec/p384.c +33 -16
- data/aws-crt-ffi/crt/aws-lc/crypto/fipsmodule/ec/p521.c +14 -6
- data/aws-crt-ffi/crt/aws-lc/crypto/fipsmodule/ec/scalar.c +26 -24
- data/aws-crt-ffi/crt/aws-lc/crypto/fipsmodule/ec/simple_mul.c +8 -5
- data/aws-crt-ffi/crt/aws-lc/crypto/fipsmodule/ec/wnaf.c +3 -3
- data/aws-crt-ffi/crt/aws-lc/crypto/fipsmodule/ecdsa/ecdsa.c +9 -3
- data/aws-crt-ffi/crt/aws-lc/crypto/fipsmodule/evp/evp.c +43 -12
- data/aws-crt-ffi/crt/aws-lc/crypto/fipsmodule/evp/p_ec.c +4 -3
- data/aws-crt-ffi/crt/aws-lc/crypto/fipsmodule/hmac/hmac.c +3 -1
- data/aws-crt-ffi/crt/aws-lc/crypto/fipsmodule/modes/xts.c +26 -3
- data/aws-crt-ffi/crt/aws-lc/crypto/fipsmodule/rand/cpu_jitter_test.cc +1 -1
- data/aws-crt-ffi/crt/aws-lc/crypto/fipsmodule/rand/internal.h +20 -11
- data/aws-crt-ffi/crt/aws-lc/crypto/fipsmodule/rand/rand.c +10 -10
- data/aws-crt-ffi/crt/aws-lc/crypto/fipsmodule/rand/urandom.c +2 -2
- data/aws-crt-ffi/crt/aws-lc/crypto/fipsmodule/rsa/internal.h +59 -0
- data/aws-crt-ffi/crt/aws-lc/crypto/fipsmodule/rsa/padding.c +9 -3
- data/aws-crt-ffi/crt/aws-lc/crypto/fipsmodule/rsa/rsa.c +7 -0
- data/aws-crt-ffi/crt/aws-lc/crypto/fipsmodule/rsa/rsa_impl.c +51 -60
- data/aws-crt-ffi/crt/aws-lc/crypto/fipsmodule/service_indicator/service_indicator.c +5 -2
- data/aws-crt-ffi/crt/aws-lc/crypto/fipsmodule/service_indicator/service_indicator_test.cc +205 -5
- data/aws-crt-ffi/crt/aws-lc/crypto/fipsmodule/sha/asm/sha1-armv8.pl +1 -1
- data/aws-crt-ffi/crt/aws-lc/crypto/fipsmodule/sha/asm/sha512-armv8.pl +1 -1
- data/aws-crt-ffi/crt/aws-lc/crypto/fipsmodule/sha/internal.h +8 -0
- data/aws-crt-ffi/crt/aws-lc/crypto/fipsmodule/sha/sha3.c +37 -15
- data/aws-crt-ffi/crt/aws-lc/crypto/fipsmodule/sha/sha3_test.cc +115 -110
- data/aws-crt-ffi/crt/aws-lc/crypto/fipsmodule/sha/sha512.c +55 -1
- data/aws-crt-ffi/crt/aws-lc/crypto/fipsmodule/sshkdf/sshkdf.c +2 -2
- data/aws-crt-ffi/crt/aws-lc/crypto/hmac_extra/hmac_test.cc +12 -0
- data/aws-crt-ffi/crt/aws-lc/crypto/hmac_extra/hmac_tests.txt +10 -0
- data/aws-crt-ffi/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S +2 -6
- data/aws-crt-ffi/crt/aws-lc/crypto/impl_dispatch_test.cc +9 -1
- data/aws-crt-ffi/crt/aws-lc/crypto/internal.h +90 -8
- data/aws-crt-ffi/crt/aws-lc/crypto/kem/kem.c +28 -27
- data/aws-crt-ffi/crt/aws-lc/crypto/kyber/kem_kyber.h +14 -0
- data/aws-crt-ffi/crt/aws-lc/crypto/obj/obj_dat.h +52 -2
- data/aws-crt-ffi/crt/aws-lc/crypto/obj/obj_mac.num +5 -0
- data/aws-crt-ffi/crt/aws-lc/crypto/obj/objects.txt +7 -0
- data/aws-crt-ffi/crt/aws-lc/crypto/perlasm/arm-xlate.pl +3 -14
- data/aws-crt-ffi/crt/aws-lc/crypto/perlasm/ppc-xlate.pl +1 -5
- data/aws-crt-ffi/crt/aws-lc/crypto/perlasm/x86_64-xlate.pl +4 -15
- data/aws-crt-ffi/crt/aws-lc/crypto/perlasm/x86asm.pl +4 -13
- data/aws-crt-ffi/crt/aws-lc/crypto/poly1305/poly1305_arm_asm.S +3 -13
- data/aws-crt-ffi/crt/aws-lc/crypto/rand_extra/deterministic.c +4 -3
- data/aws-crt-ffi/crt/aws-lc/crypto/rand_extra/fuchsia.c +4 -4
- data/aws-crt-ffi/crt/aws-lc/crypto/rand_extra/rand_test.cc +0 -63
- data/aws-crt-ffi/crt/aws-lc/crypto/rand_extra/windows.c +41 -19
- data/aws-crt-ffi/crt/aws-lc/crypto/rsa_extra/rsa_test.cc +3 -3
- data/aws-crt-ffi/crt/aws-lc/crypto/siphash/siphash.c +12 -5
- data/aws-crt-ffi/crt/aws-lc/crypto/siphash/siphash_test.cc +5 -5
- data/aws-crt-ffi/crt/aws-lc/crypto/stack/stack.c +68 -46
- data/aws-crt-ffi/crt/aws-lc/crypto/trust_token/pmbtoken.c +4 -4
- data/aws-crt-ffi/crt/aws-lc/crypto/trust_token/voprf.c +2 -2
- data/aws-crt-ffi/crt/aws-lc/crypto/x509/by_dir.c +0 -6
- data/aws-crt-ffi/crt/aws-lc/crypto/x509/internal.h +4 -1
- data/aws-crt-ffi/crt/aws-lc/crypto/x509/x509_lu.c +33 -9
- data/aws-crt-ffi/crt/aws-lc/crypto/x509/x509_test.cc +87 -0
- data/aws-crt-ffi/crt/aws-lc/crypto/x509/x509_trs.c +1 -1
- data/aws-crt-ffi/crt/aws-lc/crypto/x509/x509_vfy.c +35 -13
- data/aws-crt-ffi/crt/aws-lc/crypto/x509v3/v3_lib.c +2 -0
- data/aws-crt-ffi/crt/aws-lc/crypto/x509v3/v3_purp.c +4 -6
- data/aws-crt-ffi/crt/aws-lc/generated-src/crypto_test_data.cc +179 -151
- data/aws-crt-ffi/crt/aws-lc/generated-src/err_data.c +353 -349
- data/aws-crt-ffi/crt/aws-lc/generated-src/ios-aarch64/crypto/chacha/chacha-armv8.S +4 -14
- data/aws-crt-ffi/crt/aws-lc/generated-src/ios-aarch64/crypto/cipher_extra/chacha20_poly1305_armv8.S +4 -14
- data/aws-crt-ffi/crt/aws-lc/generated-src/ios-aarch64/crypto/fipsmodule/aesv8-armx.S +3 -13
- data/aws-crt-ffi/crt/aws-lc/generated-src/ios-aarch64/crypto/fipsmodule/aesv8-gcm-armv8-unroll8.S +3 -13
- data/aws-crt-ffi/crt/aws-lc/generated-src/ios-aarch64/crypto/fipsmodule/aesv8-gcm-armv8.S +3 -13
- data/aws-crt-ffi/crt/aws-lc/generated-src/ios-aarch64/crypto/fipsmodule/armv8-mont.S +4 -14
- data/aws-crt-ffi/crt/aws-lc/generated-src/ios-aarch64/crypto/fipsmodule/bn-armv8.S +4 -14
- data/aws-crt-ffi/crt/aws-lc/generated-src/ios-aarch64/crypto/fipsmodule/ghash-neon-armv8.S +4 -14
- data/aws-crt-ffi/crt/aws-lc/generated-src/ios-aarch64/crypto/fipsmodule/ghashv8-armx.S +3 -13
- data/aws-crt-ffi/crt/aws-lc/generated-src/ios-aarch64/crypto/fipsmodule/keccak1600-armv8.S +3 -13
- data/aws-crt-ffi/crt/aws-lc/generated-src/ios-aarch64/crypto/fipsmodule/md5-armv8.S +3 -13
- data/aws-crt-ffi/crt/aws-lc/generated-src/ios-aarch64/crypto/fipsmodule/p256-armv8-asm.S +4 -14
- data/aws-crt-ffi/crt/aws-lc/generated-src/ios-aarch64/crypto/fipsmodule/p256_beeu-armv8-asm.S +4 -14
- data/aws-crt-ffi/crt/aws-lc/generated-src/ios-aarch64/crypto/fipsmodule/sha1-armv8.S +4 -14
- data/aws-crt-ffi/crt/aws-lc/generated-src/ios-aarch64/crypto/fipsmodule/sha256-armv8.S +4 -14
- data/aws-crt-ffi/crt/aws-lc/generated-src/ios-aarch64/crypto/fipsmodule/sha512-armv8.S +4 -14
- data/aws-crt-ffi/crt/aws-lc/generated-src/ios-aarch64/crypto/fipsmodule/vpaes-armv8.S +3 -13
- data/aws-crt-ffi/crt/aws-lc/generated-src/ios-aarch64/crypto/test/trampoline-armv8.S +4 -14
- data/aws-crt-ffi/crt/aws-lc/generated-src/ios-arm/crypto/chacha/chacha-armv4.S +3 -13
- data/aws-crt-ffi/crt/aws-lc/generated-src/ios-arm/crypto/fipsmodule/aesv8-armx.S +3 -13
- data/aws-crt-ffi/crt/aws-lc/generated-src/ios-arm/crypto/fipsmodule/armv4-mont.S +3 -13
- data/aws-crt-ffi/crt/aws-lc/generated-src/ios-arm/crypto/fipsmodule/bsaes-armv7.S +3 -13
- data/aws-crt-ffi/crt/aws-lc/generated-src/ios-arm/crypto/fipsmodule/ghash-armv4.S +3 -13
- data/aws-crt-ffi/crt/aws-lc/generated-src/ios-arm/crypto/fipsmodule/ghashv8-armx.S +3 -13
- data/aws-crt-ffi/crt/aws-lc/generated-src/ios-arm/crypto/fipsmodule/sha1-armv4-large.S +3 -13
- data/aws-crt-ffi/crt/aws-lc/generated-src/ios-arm/crypto/fipsmodule/sha256-armv4.S +3 -13
- data/aws-crt-ffi/crt/aws-lc/generated-src/ios-arm/crypto/fipsmodule/sha512-armv4.S +3 -13
- data/aws-crt-ffi/crt/aws-lc/generated-src/ios-arm/crypto/fipsmodule/vpaes-armv7.S +3 -13
- data/aws-crt-ffi/crt/aws-lc/generated-src/ios-arm/crypto/test/trampoline-armv4.S +3 -13
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-aarch64/crypto/chacha/chacha-armv8.S +4 -14
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-aarch64/crypto/cipher_extra/chacha20_poly1305_armv8.S +4 -14
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-aarch64/crypto/fipsmodule/aesv8-armx.S +3 -13
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-aarch64/crypto/fipsmodule/aesv8-gcm-armv8-unroll8.S +3 -13
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-aarch64/crypto/fipsmodule/aesv8-gcm-armv8.S +3 -13
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-aarch64/crypto/fipsmodule/armv8-mont.S +4 -14
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-aarch64/crypto/fipsmodule/bn-armv8.S +3 -13
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-aarch64/crypto/fipsmodule/ghash-neon-armv8.S +3 -13
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-aarch64/crypto/fipsmodule/ghashv8-armx.S +3 -13
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-aarch64/crypto/fipsmodule/keccak1600-armv8.S +3 -13
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-aarch64/crypto/fipsmodule/md5-armv8.S +3 -13
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-aarch64/crypto/fipsmodule/p256-armv8-asm.S +4 -14
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-aarch64/crypto/fipsmodule/p256_beeu-armv8-asm.S +4 -14
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-aarch64/crypto/fipsmodule/sha1-armv8.S +4 -14
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-aarch64/crypto/fipsmodule/sha256-armv8.S +4 -14
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-aarch64/crypto/fipsmodule/sha512-armv8.S +4 -14
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-aarch64/crypto/fipsmodule/vpaes-armv8.S +3 -13
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-aarch64/crypto/test/trampoline-armv8.S +3 -13
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-arm/crypto/chacha/chacha-armv4.S +3 -13
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-arm/crypto/fipsmodule/aesv8-armx.S +3 -13
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-arm/crypto/fipsmodule/armv4-mont.S +3 -13
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-arm/crypto/fipsmodule/bsaes-armv7.S +3 -13
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-arm/crypto/fipsmodule/ghash-armv4.S +3 -13
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-arm/crypto/fipsmodule/ghashv8-armx.S +3 -13
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-arm/crypto/fipsmodule/sha1-armv4-large.S +3 -13
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-arm/crypto/fipsmodule/sha256-armv4.S +3 -13
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-arm/crypto/fipsmodule/sha512-armv4.S +3 -13
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-arm/crypto/fipsmodule/vpaes-armv7.S +3 -13
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-arm/crypto/test/trampoline-armv4.S +3 -13
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-ppc64le/crypto/fipsmodule/aesp8-ppc.S +1 -5
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-ppc64le/crypto/fipsmodule/ghashp8-ppc.S +1 -5
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-ppc64le/crypto/test/trampoline-ppc.S +1 -5
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-x86/crypto/chacha/chacha-x86.S +3 -12
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-x86/crypto/fipsmodule/aesni-x86.S +3 -12
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-x86/crypto/fipsmodule/bn-586.S +4 -13
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-x86/crypto/fipsmodule/co-586.S +4 -13
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-x86/crypto/fipsmodule/ghash-ssse3-x86.S +3 -12
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-x86/crypto/fipsmodule/ghash-x86.S +3 -12
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-x86/crypto/fipsmodule/md5-586.S +4 -13
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-x86/crypto/fipsmodule/sha1-586.S +4 -13
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-x86/crypto/fipsmodule/sha256-586.S +3 -12
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-x86/crypto/fipsmodule/sha512-586.S +3 -12
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-x86/crypto/fipsmodule/vpaes-x86.S +3 -12
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-x86/crypto/fipsmodule/x86-mont.S +3 -12
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-x86/crypto/test/trampoline-x86.S +3 -12
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-x86_64/crypto/chacha/chacha-x86_64.S +2 -11
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-x86_64/crypto/cipher_extra/aes128gcmsiv-x86_64.S +2 -11
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-x86_64/crypto/cipher_extra/aesni-sha1-x86_64.S +2 -11
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-x86_64/crypto/cipher_extra/aesni-sha256-x86_64.S +2 -11
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-x86_64/crypto/cipher_extra/chacha20_poly1305_x86_64.S +2 -11
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-x86_64/crypto/fipsmodule/aesni-gcm-avx512.S +2 -11
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-x86_64/crypto/fipsmodule/aesni-gcm-x86_64.S +2 -11
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-x86_64/crypto/fipsmodule/aesni-x86_64.S +2 -11
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-x86_64/crypto/fipsmodule/aesni-xts-avx512.S +2 -11
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-x86_64/crypto/fipsmodule/ghash-ssse3-x86_64.S +2 -11
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-x86_64/crypto/fipsmodule/ghash-x86_64.S +2 -11
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-x86_64/crypto/fipsmodule/md5-x86_64.S +2 -11
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-x86_64/crypto/fipsmodule/p256-x86_64-asm.S +2 -11
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-x86_64/crypto/fipsmodule/p256_beeu-x86_64-asm.S +2 -11
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-x86_64/crypto/fipsmodule/rdrand-x86_64.S +2 -11
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-x86_64/crypto/fipsmodule/rsaz-avx2.S +2 -11
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-x86_64/crypto/fipsmodule/sha1-x86_64.S +2 -11
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-x86_64/crypto/fipsmodule/sha256-x86_64.S +2 -11
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-x86_64/crypto/fipsmodule/sha512-x86_64.S +2 -11
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-x86_64/crypto/fipsmodule/vpaes-x86_64.S +2 -11
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-x86_64/crypto/fipsmodule/x86_64-mont.S +2 -11
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-x86_64/crypto/fipsmodule/x86_64-mont5.S +2 -11
- data/aws-crt-ffi/crt/aws-lc/generated-src/linux-x86_64/crypto/test/trampoline-x86_64.S +2 -11
- data/aws-crt-ffi/crt/aws-lc/generated-src/mac-x86/crypto/chacha/chacha-x86.S +3 -12
- data/aws-crt-ffi/crt/aws-lc/generated-src/mac-x86/crypto/fipsmodule/aesni-x86.S +3 -12
- data/aws-crt-ffi/crt/aws-lc/generated-src/mac-x86/crypto/fipsmodule/bn-586.S +3 -12
- data/aws-crt-ffi/crt/aws-lc/generated-src/mac-x86/crypto/fipsmodule/co-586.S +3 -12
- data/aws-crt-ffi/crt/aws-lc/generated-src/mac-x86/crypto/fipsmodule/ghash-ssse3-x86.S +3 -12
- data/aws-crt-ffi/crt/aws-lc/generated-src/mac-x86/crypto/fipsmodule/ghash-x86.S +3 -12
- data/aws-crt-ffi/crt/aws-lc/generated-src/mac-x86/crypto/fipsmodule/md5-586.S +3 -12
- data/aws-crt-ffi/crt/aws-lc/generated-src/mac-x86/crypto/fipsmodule/sha1-586.S +3 -12
- data/aws-crt-ffi/crt/aws-lc/generated-src/mac-x86/crypto/fipsmodule/sha256-586.S +3 -12
- data/aws-crt-ffi/crt/aws-lc/generated-src/mac-x86/crypto/fipsmodule/sha512-586.S +3 -12
- data/aws-crt-ffi/crt/aws-lc/generated-src/mac-x86/crypto/fipsmodule/vpaes-x86.S +3 -12
- data/aws-crt-ffi/crt/aws-lc/generated-src/mac-x86/crypto/fipsmodule/x86-mont.S +3 -12
- data/aws-crt-ffi/crt/aws-lc/generated-src/mac-x86/crypto/test/trampoline-x86.S +3 -12
- data/aws-crt-ffi/crt/aws-lc/generated-src/mac-x86_64/crypto/chacha/chacha-x86_64.S +2 -11
- data/aws-crt-ffi/crt/aws-lc/generated-src/mac-x86_64/crypto/cipher_extra/aes128gcmsiv-x86_64.S +2 -11
- data/aws-crt-ffi/crt/aws-lc/generated-src/mac-x86_64/crypto/cipher_extra/aesni-sha1-x86_64.S +2 -11
- data/aws-crt-ffi/crt/aws-lc/generated-src/mac-x86_64/crypto/cipher_extra/aesni-sha256-x86_64.S +2 -11
- data/aws-crt-ffi/crt/aws-lc/generated-src/mac-x86_64/crypto/cipher_extra/chacha20_poly1305_x86_64.S +2 -11
- data/aws-crt-ffi/crt/aws-lc/generated-src/mac-x86_64/crypto/fipsmodule/aesni-gcm-avx512.S +2 -11
- data/aws-crt-ffi/crt/aws-lc/generated-src/mac-x86_64/crypto/fipsmodule/aesni-gcm-x86_64.S +2 -11
- data/aws-crt-ffi/crt/aws-lc/generated-src/mac-x86_64/crypto/fipsmodule/aesni-x86_64.S +2 -11
- data/aws-crt-ffi/crt/aws-lc/generated-src/mac-x86_64/crypto/fipsmodule/aesni-xts-avx512.S +2 -11
- data/aws-crt-ffi/crt/aws-lc/generated-src/mac-x86_64/crypto/fipsmodule/ghash-ssse3-x86_64.S +2 -11
- data/aws-crt-ffi/crt/aws-lc/generated-src/mac-x86_64/crypto/fipsmodule/ghash-x86_64.S +2 -11
- data/aws-crt-ffi/crt/aws-lc/generated-src/mac-x86_64/crypto/fipsmodule/md5-x86_64.S +2 -11
- data/aws-crt-ffi/crt/aws-lc/generated-src/mac-x86_64/crypto/fipsmodule/p256-x86_64-asm.S +2 -11
- data/aws-crt-ffi/crt/aws-lc/generated-src/mac-x86_64/crypto/fipsmodule/p256_beeu-x86_64-asm.S +2 -11
- data/aws-crt-ffi/crt/aws-lc/generated-src/mac-x86_64/crypto/fipsmodule/rdrand-x86_64.S +2 -11
- data/aws-crt-ffi/crt/aws-lc/generated-src/mac-x86_64/crypto/fipsmodule/rsaz-avx2.S +2 -11
- data/aws-crt-ffi/crt/aws-lc/generated-src/mac-x86_64/crypto/fipsmodule/sha1-x86_64.S +2 -11
- data/aws-crt-ffi/crt/aws-lc/generated-src/mac-x86_64/crypto/fipsmodule/sha256-x86_64.S +2 -11
- data/aws-crt-ffi/crt/aws-lc/generated-src/mac-x86_64/crypto/fipsmodule/sha512-x86_64.S +2 -11
- data/aws-crt-ffi/crt/aws-lc/generated-src/mac-x86_64/crypto/fipsmodule/vpaes-x86_64.S +2 -11
- data/aws-crt-ffi/crt/aws-lc/generated-src/mac-x86_64/crypto/fipsmodule/x86_64-mont.S +2 -11
- data/aws-crt-ffi/crt/aws-lc/generated-src/mac-x86_64/crypto/fipsmodule/x86_64-mont5.S +2 -11
- data/aws-crt-ffi/crt/aws-lc/generated-src/mac-x86_64/crypto/test/trampoline-x86_64.S +2 -11
- data/aws-crt-ffi/crt/aws-lc/generated-src/win-aarch64/crypto/chacha/chacha-armv8.S +4 -14
- data/aws-crt-ffi/crt/aws-lc/generated-src/win-aarch64/crypto/cipher_extra/chacha20_poly1305_armv8.S +4 -14
- data/aws-crt-ffi/crt/aws-lc/generated-src/win-aarch64/crypto/fipsmodule/aesv8-armx.S +3 -13
- data/aws-crt-ffi/crt/aws-lc/generated-src/win-aarch64/crypto/fipsmodule/aesv8-gcm-armv8-unroll8.S +3 -13
- data/aws-crt-ffi/crt/aws-lc/generated-src/win-aarch64/crypto/fipsmodule/aesv8-gcm-armv8.S +3 -13
- data/aws-crt-ffi/crt/aws-lc/generated-src/win-aarch64/crypto/fipsmodule/armv8-mont.S +4 -14
- data/aws-crt-ffi/crt/aws-lc/generated-src/win-aarch64/crypto/fipsmodule/bn-armv8.S +4 -14
- data/aws-crt-ffi/crt/aws-lc/generated-src/win-aarch64/crypto/fipsmodule/ghash-neon-armv8.S +4 -14
- data/aws-crt-ffi/crt/aws-lc/generated-src/win-aarch64/crypto/fipsmodule/ghashv8-armx.S +3 -13
- data/aws-crt-ffi/crt/aws-lc/generated-src/win-aarch64/crypto/fipsmodule/keccak1600-armv8.S +3 -13
- data/aws-crt-ffi/crt/aws-lc/generated-src/win-aarch64/crypto/fipsmodule/md5-armv8.S +3 -13
- data/aws-crt-ffi/crt/aws-lc/generated-src/win-aarch64/crypto/fipsmodule/p256-armv8-asm.S +4 -14
- data/aws-crt-ffi/crt/aws-lc/generated-src/win-aarch64/crypto/fipsmodule/p256_beeu-armv8-asm.S +4 -14
- data/aws-crt-ffi/crt/aws-lc/generated-src/win-aarch64/crypto/fipsmodule/sha1-armv8.S +4 -14
- data/aws-crt-ffi/crt/aws-lc/generated-src/win-aarch64/crypto/fipsmodule/sha256-armv8.S +4 -14
- data/aws-crt-ffi/crt/aws-lc/generated-src/win-aarch64/crypto/fipsmodule/sha512-armv8.S +4 -14
- data/aws-crt-ffi/crt/aws-lc/generated-src/win-aarch64/crypto/fipsmodule/vpaes-armv8.S +3 -13
- data/aws-crt-ffi/crt/aws-lc/generated-src/win-aarch64/crypto/test/trampoline-armv8.S +4 -14
- data/aws-crt-ffi/crt/aws-lc/go.mod +4 -4
- data/aws-crt-ffi/crt/aws-lc/go.sum +8 -10
- data/aws-crt-ffi/crt/aws-lc/include/openssl/aead.h +2 -2
- data/aws-crt-ffi/crt/aws-lc/include/openssl/arm_arch.h +4 -119
- data/aws-crt-ffi/crt/aws-lc/include/openssl/asm_base.h +185 -0
- data/aws-crt-ffi/crt/aws-lc/include/openssl/asn1.h +5 -0
- data/aws-crt-ffi/crt/aws-lc/include/openssl/base.h +31 -134
- data/aws-crt-ffi/crt/aws-lc/include/openssl/bio.h +30 -18
- data/aws-crt-ffi/crt/aws-lc/include/openssl/bn.h +0 -2
- data/aws-crt-ffi/crt/aws-lc/include/openssl/chacha.h +6 -0
- data/aws-crt-ffi/crt/aws-lc/include/openssl/cipher.h +2 -2
- data/aws-crt-ffi/crt/aws-lc/include/openssl/digest.h +9 -6
- data/aws-crt-ffi/crt/aws-lc/include/openssl/dsa.h +0 -21
- data/aws-crt-ffi/crt/aws-lc/include/openssl/ec.h +1 -1
- data/aws-crt-ffi/crt/aws-lc/include/openssl/err.h +1 -1
- data/aws-crt-ffi/crt/aws-lc/include/openssl/evp.h +8 -5
- data/aws-crt-ffi/crt/aws-lc/include/openssl/nid.h +21 -0
- data/aws-crt-ffi/crt/aws-lc/include/openssl/rsa.h +1 -65
- data/aws-crt-ffi/crt/aws-lc/include/openssl/sha.h +22 -1
- data/aws-crt-ffi/crt/aws-lc/include/openssl/ssl.h +121 -13
- data/aws-crt-ffi/crt/aws-lc/include/openssl/stack.h +229 -208
- data/aws-crt-ffi/crt/aws-lc/include/openssl/target.h +166 -0
- data/aws-crt-ffi/crt/aws-lc/include/openssl/x509.h +30 -10
- data/aws-crt-ffi/crt/aws-lc/include/openssl/x509v3.h +6 -4
- data/aws-crt-ffi/crt/aws-lc/sources.cmake +2 -0
- data/aws-crt-ffi/crt/aws-lc/ssl/extensions.cc +12 -7
- data/aws-crt-ffi/crt/aws-lc/ssl/handshake_server.cc +28 -18
- data/aws-crt-ffi/crt/aws-lc/ssl/internal.h +41 -6
- data/aws-crt-ffi/crt/aws-lc/ssl/s3_both.cc +9 -17
- data/aws-crt-ffi/crt/aws-lc/ssl/ssl_cipher.cc +13 -5
- data/aws-crt-ffi/crt/aws-lc/ssl/ssl_key_share.cc +542 -2
- data/aws-crt-ffi/crt/aws-lc/ssl/ssl_lib.cc +35 -0
- data/aws-crt-ffi/crt/aws-lc/ssl/ssl_test.cc +1847 -14
- data/aws-crt-ffi/crt/aws-lc/ssl/ssl_x509.cc +128 -0
- data/aws-crt-ffi/crt/aws-lc/ssl/test/PORTING.md +10 -7
- data/aws-crt-ffi/crt/aws-lc/ssl/test/bssl_shim.cc +133 -77
- data/aws-crt-ffi/crt/aws-lc/ssl/test/handshake_util.cc +3 -3
- data/aws-crt-ffi/crt/aws-lc/ssl/test/handshaker.cc +4 -0
- data/aws-crt-ffi/crt/aws-lc/ssl/test/runner/handshake_client.go +6 -2
- data/aws-crt-ffi/crt/aws-lc/ssl/test/runner/handshake_messages.go +894 -1042
- data/aws-crt-ffi/crt/aws-lc/ssl/test/runner/handshake_server.go +24 -23
- data/aws-crt-ffi/crt/aws-lc/ssl/test/runner/prf.go +6 -5
- data/aws-crt-ffi/crt/aws-lc/ssl/test/runner/runner.go +56 -55
- data/aws-crt-ffi/crt/aws-lc/ssl/test/runner/shim_dispatcher.go +188 -0
- data/aws-crt-ffi/crt/aws-lc/ssl/test/runner/ticket.go +37 -39
- data/aws-crt-ffi/crt/aws-lc/ssl/test/test_config.cc +59 -24
- data/aws-crt-ffi/crt/aws-lc/ssl/test/test_config.h +3 -2
- data/aws-crt-ffi/crt/aws-lc/ssl/tls13_server.cc +10 -11
- data/aws-crt-ffi/crt/aws-lc/tests/ci/cdk/app.py +4 -4
- data/aws-crt-ffi/crt/aws-lc/tests/ci/cdk/cdk/{aws_lc_mac_arm_ci_stack.py → aws_lc_ec2_test_framework_ci_stack.py} +13 -29
- data/aws-crt-ffi/crt/aws-lc/tests/ci/cdk/cdk/ssm/general_test_run_ssm_document.yaml +43 -0
- data/aws-crt-ffi/crt/aws-lc/tests/ci/common_posix_setup.sh +10 -0
- data/aws-crt-ffi/crt/aws-lc/tests/ci/docker_images/linux-aarch/amazonlinux-2023_base/Dockerfile +5 -1
- data/aws-crt-ffi/crt/aws-lc/tests/ci/docker_images/linux-aarch/ubuntu-22.04_base/Dockerfile +19 -3
- data/aws-crt-ffi/crt/aws-lc/tests/ci/docker_images/linux-x86/amazonlinux-2_gcc-7x-intel-sde/Dockerfile +5 -4
- data/aws-crt-ffi/crt/aws-lc/tests/ci/docker_images/linux-x86/build_images.sh +1 -0
- data/aws-crt-ffi/crt/aws-lc/tests/ci/docker_images/linux-x86/push_images.sh +2 -1
- data/aws-crt-ffi/crt/aws-lc/tests/ci/docker_images/linux-x86/ubuntu-20.04_clang-10x_formal-verification/create_image.sh +1 -1
- data/aws-crt-ffi/crt/aws-lc/tests/ci/docker_images/linux-x86/ubuntu-22.04_base/Dockerfile +1 -0
- data/aws-crt-ffi/crt/aws-lc/tests/ci/docker_images/linux-x86/ubuntu-22.04_clang-14x-sde/Dockerfile +42 -0
- data/aws-crt-ffi/crt/aws-lc/tests/ci/docker_images/windows/vs2017/Dockerfile +14 -0
- data/aws-crt-ffi/crt/aws-lc/tests/ci/docker_images/windows/windows_base/Dockerfile +3 -0
- data/aws-crt-ffi/crt/aws-lc/tests/ci/integration/README.md +12 -0
- data/aws-crt-ffi/crt/aws-lc/tests/ci/integration/nginx_patch/aws-lc-nginx.patch +68 -23
- data/aws-crt-ffi/crt/aws-lc/tests/ci/integration/run_crt_integration.sh +27 -0
- data/aws-crt-ffi/crt/aws-lc/tests/ci/integration/run_monit_integration.sh +56 -0
- data/aws-crt-ffi/crt/aws-lc/tests/ci/integration/sslproxy_patch/aws-lc-sslproxy.patch +2 -2
- data/aws-crt-ffi/crt/aws-lc/tests/ci/run_ec2_test_framework.sh +135 -0
- data/aws-crt-ffi/crt/aws-lc/tests/ci/run_fips_tests.sh +14 -2
- data/aws-crt-ffi/crt/aws-lc/tests/ci/run_tests_with_sde.sh +4 -1
- data/aws-crt-ffi/crt/aws-lc/tests/ci/run_tests_with_sde_asan.sh +14 -0
- data/aws-crt-ffi/crt/aws-lc/tests/ci/run_windows_tests.bat +39 -3
- data/aws-crt-ffi/crt/aws-lc/third_party/fiat/README.md +21 -6
- data/aws-crt-ffi/crt/aws-lc/third_party/s2n-bignum/arm/curve25519/bignum_madd_n25519.S +284 -0
- data/aws-crt-ffi/crt/aws-lc/third_party/s2n-bignum/arm/curve25519/bignum_madd_n25519_alt.S +210 -0
- data/aws-crt-ffi/crt/aws-lc/third_party/s2n-bignum/arm/curve25519/bignum_mod_n25519.S +186 -0
- data/aws-crt-ffi/crt/aws-lc/third_party/s2n-bignum/arm/curve25519/bignum_neg_p25519.S +65 -0
- data/aws-crt-ffi/crt/aws-lc/third_party/s2n-bignum/arm/curve25519/curve25519_x25519.S +1043 -352
- data/aws-crt-ffi/crt/aws-lc/third_party/s2n-bignum/arm/curve25519/curve25519_x25519_alt.S +1043 -352
- data/aws-crt-ffi/crt/aws-lc/third_party/s2n-bignum/arm/curve25519/curve25519_x25519_byte.S +1043 -352
- data/aws-crt-ffi/crt/aws-lc/third_party/s2n-bignum/arm/curve25519/curve25519_x25519_byte_alt.S +1043 -352
- data/aws-crt-ffi/crt/aws-lc/third_party/s2n-bignum/arm/curve25519/curve25519_x25519base.S +1042 -352
- data/aws-crt-ffi/crt/aws-lc/third_party/s2n-bignum/arm/curve25519/curve25519_x25519base_alt.S +1042 -352
- data/aws-crt-ffi/crt/aws-lc/third_party/s2n-bignum/arm/curve25519/curve25519_x25519base_byte.S +1042 -352
- data/aws-crt-ffi/crt/aws-lc/third_party/s2n-bignum/arm/curve25519/curve25519_x25519base_byte_alt.S +1043 -354
- data/aws-crt-ffi/crt/aws-lc/third_party/s2n-bignum/arm/curve25519/edwards25519_decode.S +700 -0
- data/aws-crt-ffi/crt/aws-lc/third_party/s2n-bignum/arm/curve25519/edwards25519_decode_alt.S +563 -0
- data/aws-crt-ffi/crt/aws-lc/third_party/s2n-bignum/arm/curve25519/edwards25519_encode.S +131 -0
- data/aws-crt-ffi/crt/aws-lc/third_party/s2n-bignum/arm/curve25519/edwards25519_scalarmulbase.S +9626 -0
- data/aws-crt-ffi/crt/aws-lc/third_party/s2n-bignum/arm/curve25519/edwards25519_scalarmulbase_alt.S +9468 -0
- data/aws-crt-ffi/crt/aws-lc/third_party/s2n-bignum/arm/curve25519/edwards25519_scalarmuldouble.S +3157 -0
- data/aws-crt-ffi/crt/aws-lc/third_party/s2n-bignum/arm/curve25519/edwards25519_scalarmuldouble_alt.S +2941 -0
- data/aws-crt-ffi/crt/aws-lc/third_party/s2n-bignum/arm/p384/Makefile +1 -1
- data/aws-crt-ffi/crt/aws-lc/third_party/s2n-bignum/arm/p521/Makefile +1 -1
- data/aws-crt-ffi/crt/aws-lc/third_party/s2n-bignum/include/s2n-bignum_aws-lc.h +34 -0
- data/aws-crt-ffi/crt/aws-lc/third_party/s2n-bignum/x86_att/curve25519/bignum_madd_n25519.S +219 -0
- data/aws-crt-ffi/crt/aws-lc/third_party/s2n-bignum/x86_att/curve25519/bignum_madd_n25519_alt.S +245 -0
- data/aws-crt-ffi/crt/aws-lc/third_party/s2n-bignum/x86_att/curve25519/bignum_mod_n25519.S +228 -0
- data/aws-crt-ffi/crt/aws-lc/third_party/s2n-bignum/x86_att/curve25519/bignum_neg_p25519.S +86 -0
- data/aws-crt-ffi/crt/aws-lc/third_party/s2n-bignum/x86_att/curve25519/curve25519_x25519.S +1350 -407
- data/aws-crt-ffi/crt/aws-lc/third_party/s2n-bignum/x86_att/curve25519/curve25519_x25519_alt.S +1350 -407
- data/aws-crt-ffi/crt/aws-lc/third_party/s2n-bignum/x86_att/curve25519/curve25519_x25519base.S +1344 -400
- data/aws-crt-ffi/crt/aws-lc/third_party/s2n-bignum/x86_att/curve25519/curve25519_x25519base_alt.S +1348 -402
- data/aws-crt-ffi/crt/aws-lc/third_party/s2n-bignum/x86_att/curve25519/edwards25519_decode.S +670 -0
- data/aws-crt-ffi/crt/aws-lc/third_party/s2n-bignum/x86_att/curve25519/edwards25519_decode_alt.S +751 -0
- data/aws-crt-ffi/crt/aws-lc/third_party/s2n-bignum/x86_att/curve25519/edwards25519_encode.S +81 -0
- data/aws-crt-ffi/crt/aws-lc/third_party/s2n-bignum/x86_att/curve25519/edwards25519_scalarmulbase.S +9910 -0
- data/aws-crt-ffi/crt/aws-lc/third_party/s2n-bignum/x86_att/curve25519/edwards25519_scalarmulbase_alt.S +9986 -0
- data/aws-crt-ffi/crt/aws-lc/third_party/s2n-bignum/x86_att/curve25519/edwards25519_scalarmuldouble.S +3619 -0
- data/aws-crt-ffi/crt/aws-lc/third_party/s2n-bignum/x86_att/curve25519/edwards25519_scalarmuldouble_alt.S +3736 -0
- data/aws-crt-ffi/crt/aws-lc/third_party/wycheproof_testvectors/hmac_sha512_224_test.json +1978 -0
- data/aws-crt-ffi/crt/aws-lc/third_party/wycheproof_testvectors/hmac_sha512_224_test.txt +1403 -0
- data/aws-crt-ffi/crt/aws-lc/third_party/wycheproof_testvectors/hmac_sha512_256_test.json +1993 -0
- data/aws-crt-ffi/crt/aws-lc/third_party/wycheproof_testvectors/hmac_sha512_256_test.txt +1416 -0
- data/aws-crt-ffi/crt/aws-lc/tool/digest.cc +4 -0
- data/aws-crt-ffi/crt/aws-lc/tool/internal.h +1 -0
- data/aws-crt-ffi/crt/aws-lc/tool/speed.cc +53 -6
- data/aws-crt-ffi/crt/aws-lc/util/all_tests.go +43 -12
- data/aws-crt-ffi/crt/aws-lc/util/all_tests.json +13 -5
- data/aws-crt-ffi/crt/aws-lc/util/bot/DEPS +4 -4
- data/aws-crt-ffi/crt/aws-lc/util/bot/update_clang.py +8 -2
- data/aws-crt-ffi/crt/aws-lc/util/codecov-ci.sh +82 -0
- data/aws-crt-ffi/crt/aws-lc/util/convert_wycheproof/convert_wycheproof.go +7 -5
- data/aws-crt-ffi/crt/aws-lc/util/fipstools/acvp/ACVP.md +7 -0
- data/aws-crt-ffi/crt/aws-lc/util/fipstools/acvp/acvptool/subprocess/hash.go +24 -9
- data/aws-crt-ffi/crt/aws-lc/util/fipstools/acvp/acvptool/subprocess/rsa.go +3 -4
- data/aws-crt-ffi/crt/aws-lc/util/fipstools/acvp/acvptool/subprocess/subprocess.go +15 -10
- data/aws-crt-ffi/crt/aws-lc/util/fipstools/acvp/acvptool/test/expected/HMAC-SHA2-512-224.bz2 +0 -0
- data/aws-crt-ffi/crt/aws-lc/util/fipstools/acvp/acvptool/test/expected/SHA2-512-224.bz2 +0 -0
- data/aws-crt-ffi/crt/aws-lc/util/fipstools/acvp/acvptool/test/expected/SHAKE-128.bz2 +0 -0
- data/aws-crt-ffi/crt/aws-lc/util/fipstools/acvp/acvptool/test/expected/SHAKE-256.bz2 +0 -0
- data/aws-crt-ffi/crt/aws-lc/util/fipstools/acvp/acvptool/test/sha-tests/sha512-224-tests.json +1 -0
- data/aws-crt-ffi/crt/aws-lc/util/fipstools/acvp/acvptool/test/sha-tests/shake-128-tests.json +1 -0
- data/aws-crt-ffi/crt/aws-lc/util/fipstools/acvp/acvptool/test/sha-tests/shake-256-tests.json +1 -0
- data/aws-crt-ffi/crt/aws-lc/util/fipstools/acvp/acvptool/test/tests.json +1 -0
- data/aws-crt-ffi/crt/aws-lc/util/fipstools/acvp/acvptool/test/vectors/HMAC-SHA2-512-224.bz2 +0 -0
- data/aws-crt-ffi/crt/aws-lc/util/fipstools/acvp/acvptool/test/vectors/SHA2-512-224.bz2 +0 -0
- data/aws-crt-ffi/crt/aws-lc/util/fipstools/acvp/acvptool/test/vectors/SHAKE-128.bz2 +0 -0
- data/aws-crt-ffi/crt/aws-lc/util/fipstools/acvp/acvptool/test/vectors/SHAKE-256.bz2 +0 -0
- data/aws-crt-ffi/crt/aws-lc/util/fipstools/acvp/modulewrapper/main.cc +4 -0
- data/aws-crt-ffi/crt/aws-lc/util/fipstools/acvp/modulewrapper/modulewrapper.cc +144 -1
- data/aws-crt-ffi/crt/aws-lc/util/fipstools/delocate/delocate.go +9 -3
- data/aws-crt-ffi/crt/aws-lc/util/fipstools/delocate/testdata/aarch64-Basic/in.s +4 -0
- data/aws-crt-ffi/crt/aws-lc/util/fipstools/delocate/testdata/aarch64-Basic/out.s +11 -0
- data/aws-crt-ffi/crt/aws-lc/util/fipstools/inject_hash/inject_hash.go +13 -4
- data/aws-crt-ffi/crt/aws-lc/util/fipstools/test-break-kat.sh +2 -0
- data/aws-crt-ffi/crt/aws-lc/util/testconfig/testconfig.go +2 -1
- data/aws-crt-ffi/crt/s2n/api/s2n.h +9 -5
- data/aws-crt-ffi/crt/s2n/bindings/rust/bench/benches/handshake.rs +9 -6
- data/aws-crt-ffi/crt/s2n/bindings/rust/bench/benches/resumption.rs +14 -14
- data/aws-crt-ffi/crt/s2n/bindings/rust/bench/benches/throughput.rs +9 -6
- data/aws-crt-ffi/crt/s2n/bindings/rust/bench/src/harness.rs +106 -102
- data/aws-crt-ffi/crt/s2n/bindings/rust/bench/src/openssl.rs +24 -20
- data/aws-crt-ffi/crt/s2n/bindings/rust/bench/src/rustls.rs +28 -24
- data/aws-crt-ffi/crt/s2n/bindings/rust/bench/src/s2n_tls.rs +52 -50
- data/aws-crt-ffi/crt/s2n/bindings/rust/generate/Cargo.toml +1 -0
- data/aws-crt-ffi/crt/s2n/bindings/rust/integration/Cargo.toml +3 -0
- data/aws-crt-ffi/crt/s2n/bindings/rust/s2n-tls/Cargo.toml +2 -2
- data/aws-crt-ffi/crt/s2n/bindings/rust/s2n-tls/src/connection.rs +9 -0
- data/aws-crt-ffi/crt/s2n/bindings/rust/s2n-tls-sys/templates/Cargo.template +2 -1
- data/aws-crt-ffi/crt/s2n/bindings/rust/s2n-tls-tokio/Cargo.toml +2 -2
- data/aws-crt-ffi/crt/s2n/tests/cbmc/sources/make_common_datastructures.c +9 -2
- data/aws-crt-ffi/crt/s2n/tests/fuzz/s2n_client_cert_verify_recv_test.c +1 -1
- data/aws-crt-ffi/crt/s2n/tests/fuzz/s2n_hybrid_ecdhe_kyber_r3_fuzz_test.c +1 -1
- data/aws-crt-ffi/crt/s2n/tests/fuzz/s2n_tls13_cert_verify_recv_test.c +1 -1
- data/aws-crt-ffi/crt/s2n/tests/integrationv2/test_version_negotiation.py +4 -4
- data/aws-crt-ffi/crt/s2n/tests/unit/s2n_auth_selection_test.c +19 -9
- data/aws-crt-ffi/crt/s2n/tests/unit/s2n_client_auth_handshake_test.c +3 -3
- data/aws-crt-ffi/crt/s2n/tests/unit/s2n_client_cert_verify_test.c +1 -1
- data/aws-crt-ffi/crt/s2n/tests/unit/s2n_client_hello_recv_test.c +1 -1
- data/aws-crt-ffi/crt/s2n/tests/unit/s2n_client_hello_test.c +4 -4
- data/aws-crt-ffi/crt/s2n/tests/unit/s2n_client_signature_algorithms_extension_test.c +4 -5
- data/aws-crt-ffi/crt/s2n/tests/unit/s2n_connection_protocol_versions_test.c +390 -0
- data/aws-crt-ffi/crt/s2n/tests/unit/s2n_connection_test.c +8 -4
- data/aws-crt-ffi/crt/s2n/tests/unit/s2n_handshake_test.c +2 -1
- data/aws-crt-ffi/crt/s2n/tests/unit/s2n_quic_support_io_test.c +106 -0
- data/aws-crt-ffi/crt/s2n/tests/unit/s2n_security_policies_test.c +6 -2
- data/aws-crt-ffi/crt/s2n/tests/unit/s2n_self_talk_offload_signing_test.c +3 -3
- data/aws-crt-ffi/crt/s2n/tests/unit/s2n_self_talk_session_resumption_test.c +135 -0
- data/aws-crt-ffi/crt/s2n/tests/unit/s2n_server_new_session_ticket_test.c +32 -0
- data/aws-crt-ffi/crt/s2n/tests/unit/s2n_server_signature_algorithms_extension_test.c +1 -1
- data/aws-crt-ffi/crt/s2n/tests/unit/s2n_signature_algorithms_test.c +307 -283
- data/aws-crt-ffi/crt/s2n/tests/unit/s2n_tls13_cert_request_test.c +1 -1
- data/aws-crt-ffi/crt/s2n/tests/unit/s2n_tls13_cert_verify_test.c +18 -17
- data/aws-crt-ffi/crt/s2n/tests/unit/s2n_x509_validator_test.c +125 -0
- data/aws-crt-ffi/crt/s2n/tls/extensions/s2n_client_signature_algorithms.c +8 -1
- data/aws-crt-ffi/crt/s2n/tls/extensions/s2n_client_supported_versions.c +43 -11
- data/aws-crt-ffi/crt/s2n/tls/extensions/s2n_client_supported_versions.h +3 -0
- data/aws-crt-ffi/crt/s2n/tls/extensions/s2n_server_signature_algorithms.c +8 -1
- data/aws-crt-ffi/crt/s2n/tls/s2n_auth_selection.c +4 -2
- data/aws-crt-ffi/crt/s2n/tls/s2n_client_cert_verify.c +7 -10
- data/aws-crt-ffi/crt/s2n/tls/s2n_client_hello.c +2 -2
- data/aws-crt-ffi/crt/s2n/tls/s2n_connection.c +75 -14
- data/aws-crt-ffi/crt/s2n/tls/s2n_handshake.h +2 -2
- data/aws-crt-ffi/crt/s2n/tls/s2n_post_handshake.c +1 -1
- data/aws-crt-ffi/crt/s2n/tls/s2n_post_handshake.h +1 -0
- data/aws-crt-ffi/crt/s2n/tls/s2n_quic_support.c +29 -0
- data/aws-crt-ffi/crt/s2n/tls/s2n_quic_support.h +5 -0
- data/aws-crt-ffi/crt/s2n/tls/s2n_security_policies.c +40 -0
- data/aws-crt-ffi/crt/s2n/tls/s2n_security_policies.h +4 -0
- data/aws-crt-ffi/crt/s2n/tls/s2n_server_cert_request.c +1 -1
- data/aws-crt-ffi/crt/s2n/tls/s2n_server_hello.c +0 -3
- data/aws-crt-ffi/crt/s2n/tls/s2n_server_key_exchange.c +8 -9
- data/aws-crt-ffi/crt/s2n/tls/s2n_server_new_session_ticket.c +8 -0
- data/aws-crt-ffi/crt/s2n/tls/s2n_signature_algorithms.c +111 -72
- data/aws-crt-ffi/crt/s2n/tls/s2n_signature_algorithms.h +11 -9
- data/aws-crt-ffi/crt/s2n/tls/s2n_signature_scheme.c +9 -0
- data/aws-crt-ffi/crt/s2n/tls/s2n_signature_scheme.h +2 -0
- data/aws-crt-ffi/crt/s2n/tls/s2n_tls13_certificate_verify.c +12 -18
- data/aws-crt-ffi/crt/s2n/tls/s2n_x509_validator.c +7 -7
- data/aws-crt-ffi/src/api.h +1 -0
- data/lib/aws-crt/native.rb +1 -1
- metadata +68 -5
- data/aws-crt-ffi/crt/aws-lc/tests/ci/cdk/cdk/ssm/m1_tests_ssm_document.yaml +0 -34
- data/aws-crt-ffi/crt/aws-lc/tests/ci/run_m1_ec2_instance.sh +0 -96
data/aws-crt-ffi/crt/aws-lc/third_party/s2n-bignum/x86_att/curve25519/edwards25519_decode_alt.S
ADDED
@@ -0,0 +1,751 @@
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
2
|
+
// SPDX-License-Identifier: Apache-2.0 OR ISC
|
3
|
+
|
4
|
+
// ----------------------------------------------------------------------------
|
5
|
+
// Decode compressed 256-bit form of edwards25519 point
|
6
|
+
// Input c[32] (bytes); output function return and z[8]
|
7
|
+
//
|
8
|
+
// extern uint64_t edwards25519_decode_alt(uint64_t z[static 8],uint8_t c[static 32]);
|
9
|
+
//
|
10
|
+
// This interprets the input byte string as a little-endian number
|
11
|
+
// representing a point (x,y) on the edwards25519 curve, encoded as
|
12
|
+
// 2^255 * x_0 + y where x_0 is the least significant bit of x. It
|
13
|
+
// returns the full pair of coordinates x (at z) and y (at z+4). The
|
14
|
+
// return code is 0 for success and 1 for failure, which means that
|
15
|
+
// the input does not correspond to the encoding of any edwards25519
|
16
|
+
// point. This can happen for three reasons, where y = the lowest
|
17
|
+
// 255 bits of the input:
|
18
|
+
//
|
19
|
+
// * y >= p_25519
|
20
|
+
// Input y coordinate is not reduced
|
21
|
+
// * (y^2 - 1) * (1 + d_25519 * y^2) has no modular square root
|
22
|
+
// There is no x such that (x,y) is on the curve
|
23
|
+
// * y^2 = 1 and top bit of input is set
|
24
|
+
// Cannot be the canonical encoding of (0,1) or (0,-1)
|
25
|
+
//
|
26
|
+
// Standard x86-64 ABI: RDI = z, RSI = c
|
27
|
+
// Microsoft x64 ABI: RCX = z, RDX = c
|
28
|
+
// ----------------------------------------------------------------------------
|
29
|
+
#include "_internal_s2n_bignum.h"
|
30
|
+
|
31
|
+
|
32
|
+
S2N_BN_SYM_VISIBILITY_DIRECTIVE(edwards25519_decode_alt)
|
33
|
+
S2N_BN_SYM_PRIVACY_DIRECTIVE(edwards25519_decode_alt)
|
34
|
+
.text
|
35
|
+
|
36
|
+
// Size in bytes of a 64-bit word
|
37
|
+
|
38
|
+
#define N 8
|
39
|
+
|
40
|
+
// Pointer-offset pairs for temporaries on stack
|
41
|
+
|
42
|
+
#define y 0(%rsp)
|
43
|
+
#define s (4*N)(%rsp)
|
44
|
+
#define t (8*N)(%rsp)
|
45
|
+
#define u (12*N)(%rsp)
|
46
|
+
#define v (16*N)(%rsp)
|
47
|
+
#define w (20*N)(%rsp)
|
48
|
+
#define q (24*N)(%rsp)
|
49
|
+
#define res (28*N)(%rsp)
|
50
|
+
#define sgnbit (29*N)(%rsp)
|
51
|
+
#define badun (30*N)(%rsp)
|
52
|
+
|
53
|
+
// Total size to reserve on the stack
|
54
|
+
|
55
|
+
#define NSPACE (32*N)
|
56
|
+
|
57
|
+
// Corrupted versions when stack is down 8 more
|
58
|
+
|
59
|
+
#define q8 (25*N)(%rsp)
|
60
|
+
|
61
|
+
// Syntactic variants to make x86_att version simpler to generate
|
62
|
+
|
63
|
+
#define Y 0
|
64
|
+
#define S (4*N)
|
65
|
+
#define T (8*N)
|
66
|
+
#define U (12*N)
|
67
|
+
#define V (16*N)
|
68
|
+
#define W (20*N)
|
69
|
+
#define Q8 (25*N)
|
70
|
+
|
71
|
+
S2N_BN_SYMBOL(edwards25519_decode_alt):
|
72
|
+
|
73
|
+
// In this case the Windows form literally makes a subroutine call.
|
74
|
+
// This avoids hassle arising from subroutine offsets
|
75
|
+
|
76
|
+
#if WINDOWS_ABI
|
77
|
+
pushq %rdi
|
78
|
+
pushq %rsi
|
79
|
+
movq %rcx, %rdi
|
80
|
+
movq %rdx, %rsi
|
81
|
+
callq edwards25519_decode_alt_standard
|
82
|
+
popq %rsi
|
83
|
+
popq %rdi
|
84
|
+
ret
|
85
|
+
|
86
|
+
edwards25519_decode_alt_standard:
|
87
|
+
#endif
|
88
|
+
|
89
|
+
// Save registers and make room for temporaries
|
90
|
+
|
91
|
+
pushq %rbx
|
92
|
+
pushq %rbp
|
93
|
+
pushq %r12
|
94
|
+
pushq %r13
|
95
|
+
pushq %r14
|
96
|
+
pushq %r15
|
97
|
+
|
98
|
+
subq $NSPACE, %rsp
|
99
|
+
|
100
|
+
// Save the return pointer for the end so we can overwrite %rdi later
|
101
|
+
|
102
|
+
movq %rdi, res
|
103
|
+
|
104
|
+
// Load the inputs, which can be done word-wise since x86 is little-endian.
|
105
|
+
// Let y be the lowest 255 bits of the input and sgnbit the desired parity.
|
106
|
+
// If y >= p_25519 then already flag the input as invalid (badun = 1).
|
107
|
+
|
108
|
+
movq (%rsi), %rax
|
109
|
+
movq %rax, Y(%rsp)
|
110
|
+
movq 8(%rsi), %rbx
|
111
|
+
movq %rbx, Y+8(%rsp)
|
112
|
+
xorl %ebp, %ebp
|
113
|
+
movq 16(%rsi), %rcx
|
114
|
+
movq %rcx, Y+16(%rsp)
|
115
|
+
movq 24(%rsi), %rdx
|
116
|
+
btr $63, %rdx
|
117
|
+
movq %rdx, Y+24(%rsp)
|
118
|
+
adcq %rbp, %rbp
|
119
|
+
movq %rbp, sgnbit
|
120
|
+
|
121
|
+
addq $19, %rax
|
122
|
+
adcq $0, %rbx
|
123
|
+
adcq $0, %rcx
|
124
|
+
adcq $0, %rdx
|
125
|
+
shrq $63, %rdx
|
126
|
+
movq %rdx, badun
|
127
|
+
|
128
|
+
// u = y^2 - 1 (actually y + 2^255-20, not reduced modulo)
|
129
|
+
// v = 1 + d * y^2 (not reduced modulo from the +1)
|
130
|
+
// w = u * v
|
131
|
+
|
132
|
+
leaq V(%rsp), %rdi
|
133
|
+
movq $1, %rsi
|
134
|
+
leaq Y(%rsp), %rdx
|
135
|
+
callq edwards25519_decode_alt_nsqr_p25519
|
136
|
+
movq V(%rsp), %rax
|
137
|
+
subq $20, %rax
|
138
|
+
movq V+8(%rsp), %rbx
|
139
|
+
sbbq $0, %rbx
|
140
|
+
movq V+16(%rsp), %rcx
|
141
|
+
sbbq $0, %rcx
|
142
|
+
movq V+24(%rsp), %rdx
|
143
|
+
sbbq $0, %rdx
|
144
|
+
btc $63, %rdx
|
145
|
+
movq %rax, U(%rsp)
|
146
|
+
movq %rbx, U+8(%rsp)
|
147
|
+
movq %rcx, U+16(%rsp)
|
148
|
+
movq %rdx, U+24(%rsp)
|
149
|
+
|
150
|
+
movq $0x75eb4dca135978a3, %rax
|
151
|
+
movq %rax, W(%rsp)
|
152
|
+
movq $0x00700a4d4141d8ab, %rax
|
153
|
+
movq %rax, W+8(%rsp)
|
154
|
+
movq $0x8cc740797779e898, %rax
|
155
|
+
movq %rax, W+16(%rsp)
|
156
|
+
movq $0x52036cee2b6ffe73, %rax
|
157
|
+
movq %rax, W+24(%rsp)
|
158
|
+
leaq V(%rsp), %rdi
|
159
|
+
leaq W(%rsp), %rsi
|
160
|
+
leaq V(%rsp), %rdx
|
161
|
+
callq edwards25519_decode_alt_mul_p25519
|
162
|
+
movq V(%rsp), %rax
|
163
|
+
addq $1, %rax
|
164
|
+
movq V+8(%rsp), %rbx
|
165
|
+
adcq $0, %rbx
|
166
|
+
movq V+16(%rsp), %rcx
|
167
|
+
adcq $0, %rcx
|
168
|
+
movq V+24(%rsp), %rdx
|
169
|
+
adcq $0, %rdx
|
170
|
+
movq %rax, V(%rsp)
|
171
|
+
movq %rbx, V+8(%rsp)
|
172
|
+
movq %rcx, V+16(%rsp)
|
173
|
+
movq %rdx, V+24(%rsp)
|
174
|
+
|
175
|
+
leaq W(%rsp), %rdi
|
176
|
+
leaq U(%rsp), %rsi
|
177
|
+
leaq V(%rsp), %rdx
|
178
|
+
callq edwards25519_decode_alt_mul_p25519
|
179
|
+
|
180
|
+
// Get s = w^{252-3} as a candidate inverse square root 1/sqrt(w).
|
181
|
+
// This power tower computation is the same as bignum_invsqrt_p25519
|
182
|
+
|
183
|
+
leaq T(%rsp), %rdi
|
184
|
+
movq $1, %rsi
|
185
|
+
leaq W(%rsp), %rdx
|
186
|
+
callq edwards25519_decode_alt_nsqr_p25519
|
187
|
+
|
188
|
+
leaq T(%rsp), %rdi
|
189
|
+
leaq T(%rsp), %rsi
|
190
|
+
leaq W(%rsp), %rdx
|
191
|
+
callq edwards25519_decode_alt_mul_p25519
|
192
|
+
|
193
|
+
leaq S(%rsp), %rdi
|
194
|
+
movq $2, %rsi
|
195
|
+
leaq T(%rsp), %rdx
|
196
|
+
callq edwards25519_decode_alt_nsqr_p25519
|
197
|
+
|
198
|
+
leaq T(%rsp), %rdi
|
199
|
+
leaq S(%rsp), %rsi
|
200
|
+
leaq T(%rsp), %rdx
|
201
|
+
callq edwards25519_decode_alt_mul_p25519
|
202
|
+
|
203
|
+
leaq S(%rsp), %rdi
|
204
|
+
movq $1, %rsi
|
205
|
+
leaq T(%rsp), %rdx
|
206
|
+
callq edwards25519_decode_alt_nsqr_p25519
|
207
|
+
|
208
|
+
leaq V(%rsp), %rdi
|
209
|
+
leaq S(%rsp), %rsi
|
210
|
+
leaq W(%rsp), %rdx
|
211
|
+
callq edwards25519_decode_alt_mul_p25519
|
212
|
+
|
213
|
+
leaq S(%rsp), %rdi
|
214
|
+
movq $5, %rsi
|
215
|
+
leaq V(%rsp), %rdx
|
216
|
+
callq edwards25519_decode_alt_nsqr_p25519
|
217
|
+
|
218
|
+
leaq T(%rsp), %rdi
|
219
|
+
leaq S(%rsp), %rsi
|
220
|
+
leaq V(%rsp), %rdx
|
221
|
+
callq edwards25519_decode_alt_mul_p25519
|
222
|
+
|
223
|
+
leaq S(%rsp), %rdi
|
224
|
+
movq $10, %rsi
|
225
|
+
leaq T(%rsp), %rdx
|
226
|
+
callq edwards25519_decode_alt_nsqr_p25519
|
227
|
+
|
228
|
+
leaq T(%rsp), %rdi
|
229
|
+
leaq S(%rsp), %rsi
|
230
|
+
leaq T(%rsp), %rdx
|
231
|
+
callq edwards25519_decode_alt_mul_p25519
|
232
|
+
|
233
|
+
leaq S(%rsp), %rdi
|
234
|
+
movq $5, %rsi
|
235
|
+
leaq T(%rsp), %rdx
|
236
|
+
callq edwards25519_decode_alt_nsqr_p25519
|
237
|
+
|
238
|
+
leaq V(%rsp), %rdi
|
239
|
+
leaq S(%rsp), %rsi
|
240
|
+
leaq V(%rsp), %rdx
|
241
|
+
callq edwards25519_decode_alt_mul_p25519
|
242
|
+
|
243
|
+
leaq S(%rsp), %rdi
|
244
|
+
movq $25, %rsi
|
245
|
+
leaq V(%rsp), %rdx
|
246
|
+
callq edwards25519_decode_alt_nsqr_p25519
|
247
|
+
|
248
|
+
leaq T(%rsp), %rdi
|
249
|
+
leaq S(%rsp), %rsi
|
250
|
+
leaq V(%rsp), %rdx
|
251
|
+
callq edwards25519_decode_alt_mul_p25519
|
252
|
+
|
253
|
+
leaq S(%rsp), %rdi
|
254
|
+
movq $50, %rsi
|
255
|
+
leaq T(%rsp), %rdx
|
256
|
+
callq edwards25519_decode_alt_nsqr_p25519
|
257
|
+
|
258
|
+
leaq T(%rsp), %rdi
|
259
|
+
leaq S(%rsp), %rsi
|
260
|
+
leaq T(%rsp), %rdx
|
261
|
+
callq edwards25519_decode_alt_mul_p25519
|
262
|
+
|
263
|
+
leaq S(%rsp), %rdi
|
264
|
+
movq $25, %rsi
|
265
|
+
leaq T(%rsp), %rdx
|
266
|
+
callq edwards25519_decode_alt_nsqr_p25519
|
267
|
+
|
268
|
+
leaq V(%rsp), %rdi
|
269
|
+
leaq S(%rsp), %rsi
|
270
|
+
leaq V(%rsp), %rdx
|
271
|
+
callq edwards25519_decode_alt_mul_p25519
|
272
|
+
|
273
|
+
leaq S(%rsp), %rdi
|
274
|
+
movq $125, %rsi
|
275
|
+
leaq V(%rsp), %rdx
|
276
|
+
callq edwards25519_decode_alt_nsqr_p25519
|
277
|
+
|
278
|
+
leaq V(%rsp), %rdi
|
279
|
+
leaq S(%rsp), %rsi
|
280
|
+
leaq V(%rsp), %rdx
|
281
|
+
callq edwards25519_decode_alt_mul_p25519
|
282
|
+
|
283
|
+
leaq S(%rsp), %rdi
|
284
|
+
movq $2, %rsi
|
285
|
+
leaq V(%rsp), %rdx
|
286
|
+
callq edwards25519_decode_alt_nsqr_p25519
|
287
|
+
|
288
|
+
leaq S(%rsp), %rdi
|
289
|
+
leaq S(%rsp), %rsi
|
290
|
+
leaq W(%rsp), %rdx
|
291
|
+
callq edwards25519_decode_alt_mul_p25519
|
292
|
+
|
293
|
+
// Compute v' = s^2 * w to discriminate whether the square root sqrt(u/v)
|
294
|
+
// exists, in which case we should get 0, 1 or -1.
|
295
|
+
|
296
|
+
leaq V(%rsp), %rdi
|
297
|
+
movq $1, %rsi
|
298
|
+
leaq S(%rsp), %rdx
|
299
|
+
callq edwards25519_decode_alt_nsqr_p25519
|
300
|
+
|
301
|
+
leaq V(%rsp), %rdi
|
302
|
+
leaq V(%rsp), %rsi
|
303
|
+
leaq W(%rsp), %rdx
|
304
|
+
callq edwards25519_decode_alt_mul_p25519
|
305
|
+
|
306
|
+
// Get the two candidates for sqrt(u / v), one being s = u * w^{252-3}
|
307
|
+
// and the other being t = s * j_25519 where j_25519 = sqrt(-1).
|
308
|
+
|
309
|
+
leaq S(%rsp), %rdi
|
310
|
+
leaq U(%rsp), %rsi
|
311
|
+
leaq S(%rsp), %rdx
|
312
|
+
callq edwards25519_decode_alt_mul_p25519
|
313
|
+
movq $0xc4ee1b274a0ea0b0, %rax
|
314
|
+
movq %rax, T(%rsp)
|
315
|
+
movq $0x2f431806ad2fe478, %rax
|
316
|
+
movq %rax, T+8(%rsp)
|
317
|
+
movq $0x2b4d00993dfbd7a7, %rax
|
318
|
+
movq %rax, T+16(%rsp)
|
319
|
+
movq $0x2b8324804fc1df0b, %rax
|
320
|
+
movq %rax, T+24(%rsp)
|
321
|
+
leaq T(%rsp), %rdi
|
322
|
+
leaq S(%rsp), %rsi
|
323
|
+
leaq T(%rsp), %rdx
|
324
|
+
callq edwards25519_decode_alt_mul_p25519
|
325
|
+
|
326
|
+
// %rax = 0 <=> s^2 * w = 0 or 1
|
327
|
+
|
328
|
+
movq V(%rsp), %r8
|
329
|
+
movq V+8(%rsp), %r9
|
330
|
+
movq V+16(%rsp), %r10
|
331
|
+
movq V+24(%rsp), %r11
|
332
|
+
movl $1, %eax
|
333
|
+
notq %rax
|
334
|
+
andq %r8, %rax
|
335
|
+
orq %r9, %rax
|
336
|
+
orq %r10, %rax
|
337
|
+
orq %r11, %rax
|
338
|
+
|
339
|
+
// %r8 = 0 <=> s^2 * w = -1 (mod p_25519, i.e. s^2 * w = 2^255 - 20)
|
340
|
+
|
341
|
+
addq $20, %r8
|
342
|
+
notq %r9
|
343
|
+
notq %r10
|
344
|
+
bts $63, %r11
|
345
|
+
addq $1, %r11
|
346
|
+
orq %r9, %r8
|
347
|
+
orq %r11, %r10
|
348
|
+
orq %r10, %r8
|
349
|
+
|
350
|
+
// If s^2 * w is not 0 or 1 then replace s by t
|
351
|
+
|
352
|
+
testq %rax, %rax
|
353
|
+
|
354
|
+
movq S(%rsp), %r12
|
355
|
+
movq T(%rsp), %rbx
|
356
|
+
cmovnzq %rbx, %r12
|
357
|
+
movq S+8(%rsp), %r13
|
358
|
+
movq T+8(%rsp), %rbx
|
359
|
+
cmovnzq %rbx, %r13
|
360
|
+
movq S+16(%rsp), %r14
|
361
|
+
movq T+16(%rsp), %rbx
|
362
|
+
cmovnzq %rbx, %r14
|
363
|
+
movq S+24(%rsp), %r15
|
364
|
+
movq T+24(%rsp), %rbx
|
365
|
+
cmovnzq %rbx, %r15
|
366
|
+
movq %r12, S(%rsp)
|
367
|
+
movq %r13, S+8(%rsp)
|
368
|
+
movq %r14, S+16(%rsp)
|
369
|
+
movq %r15, S+24(%rsp)
|
370
|
+
|
371
|
+
// Check invalidity, occurring if s^2 * w is not in {0,1,-1}
|
372
|
+
|
373
|
+
cmovzq %rax, %r8
|
374
|
+
negq %r8
|
375
|
+
sbbq %r8, %r8
|
376
|
+
negq %r8
|
377
|
+
orq %r8, badun
|
378
|
+
|
379
|
+
// Let [%r11;%r10;%r9;%r8] = s and [%r15;%r14;%r13;%r12] = p_25519 - s
|
380
|
+
|
381
|
+
movq S(%rsp), %r8
|
382
|
+
movq $-19, %r12
|
383
|
+
subq %r8, %r12
|
384
|
+
movq S+8(%rsp), %r9
|
385
|
+
movq $-1, %r13
|
386
|
+
sbbq %r9, %r13
|
387
|
+
movq S+16(%rsp), %r10
|
388
|
+
movq $-1, %r14
|
389
|
+
sbbq %r10, %r14
|
390
|
+
movq S+24(%rsp), %r11
|
391
|
+
movq $0x7FFFFFFFFFFFFFFF, %r15
|
392
|
+
sbbq %r11, %r15
|
393
|
+
|
394
|
+
// Decide whether a flip is apparently indicated, s_0 <=> sgnbit
|
395
|
+
// Decide also if s = 0 by OR-ing its digits. Now if a flip is indicated:
|
396
|
+
// - if s = 0 then mark as invalid
|
397
|
+
// - if s <> 0 then indeed flip
|
398
|
+
|
399
|
+
movl $1, %ecx
|
400
|
+
andq %r8, %rcx
|
401
|
+
xorq sgnbit, %rcx
|
402
|
+
movq badun, %rdx
|
403
|
+
movq %rdx, %rsi
|
404
|
+
orq %rcx, %rdx
|
405
|
+
xorl %ebp, %ebp
|
406
|
+
movq %r8, %rax
|
407
|
+
movq %r9, %rbx
|
408
|
+
orq %r10, %rax
|
409
|
+
orq %r11, %rbx
|
410
|
+
orq %rbx, %rax
|
411
|
+
cmovzq %rbp, %rcx
|
412
|
+
cmovnzq %rsi, %rdx
|
413
|
+
|
414
|
+
// Actual selection of x as s or -s, copying of y and return of validity
|
415
|
+
|
416
|
+
testq %rcx, %rcx
|
417
|
+
|
418
|
+
cmovnzq %r12, %r8
|
419
|
+
cmovnzq %r13, %r9
|
420
|
+
cmovnzq %r14, %r10
|
421
|
+
cmovnzq %r15, %r11
|
422
|
+
|
423
|
+
movq res, %rdi
|
424
|
+
movq %r8, (%rdi)
|
425
|
+
movq %r9, 8(%rdi)
|
426
|
+
movq %r10, 16(%rdi)
|
427
|
+
movq %r11, 24(%rdi)
|
428
|
+
movq Y(%rsp), %rcx
|
429
|
+
movq %rcx, 32(%rdi)
|
430
|
+
movq Y+8(%rsp), %rcx
|
431
|
+
movq %rcx, 40(%rdi)
|
432
|
+
movq Y+16(%rsp), %rcx
|
433
|
+
movq %rcx, 48(%rdi)
|
434
|
+
movq Y+24(%rsp), %rcx
|
435
|
+
movq %rcx, 56(%rdi)
|
436
|
+
|
437
|
+
movq %rdx, %rax
|
438
|
+
|
439
|
+
// Restore stack and registers
|
440
|
+
|
441
|
+
addq $NSPACE, %rsp
|
442
|
+
|
443
|
+
popq %r15
|
444
|
+
popq %r14
|
445
|
+
popq %r13
|
446
|
+
popq %r12
|
447
|
+
popq %rbp
|
448
|
+
popq %rbx
|
449
|
+
ret
|
450
|
+
|
451
|
+
// *************************************************************
|
452
|
+
// Local z = x * y
|
453
|
+
// *************************************************************
|
454
|
+
|
455
|
+
edwards25519_decode_alt_mul_p25519:
|
456
|
+
movq %rdx, %rcx
|
457
|
+
movq (%rsi), %rax
|
458
|
+
mulq (%rcx)
|
459
|
+
movq %rax, %r8
|
460
|
+
movq %rdx, %r9
|
461
|
+
xorq %r10, %r10
|
462
|
+
xorq %r11, %r11
|
463
|
+
movq (%rsi), %rax
|
464
|
+
mulq 0x8(%rcx)
|
465
|
+
addq %rax, %r9
|
466
|
+
adcq %rdx, %r10
|
467
|
+
movq 0x8(%rsi), %rax
|
468
|
+
mulq (%rcx)
|
469
|
+
addq %rax, %r9
|
470
|
+
adcq %rdx, %r10
|
471
|
+
adcq $0x0, %r11
|
472
|
+
xorq %r12, %r12
|
473
|
+
movq (%rsi), %rax
|
474
|
+
mulq 0x10(%rcx)
|
475
|
+
addq %rax, %r10
|
476
|
+
adcq %rdx, %r11
|
477
|
+
adcq %r12, %r12
|
478
|
+
movq 0x8(%rsi), %rax
|
479
|
+
mulq 0x8(%rcx)
|
480
|
+
addq %rax, %r10
|
481
|
+
adcq %rdx, %r11
|
482
|
+
adcq $0x0, %r12
|
483
|
+
movq 0x10(%rsi), %rax
|
484
|
+
mulq (%rcx)
|
485
|
+
addq %rax, %r10
|
486
|
+
adcq %rdx, %r11
|
487
|
+
adcq $0x0, %r12
|
488
|
+
xorq %r13, %r13
|
489
|
+
movq (%rsi), %rax
|
490
|
+
mulq 0x18(%rcx)
|
491
|
+
addq %rax, %r11
|
492
|
+
adcq %rdx, %r12
|
493
|
+
adcq %r13, %r13
|
494
|
+
movq 0x8(%rsi), %rax
|
495
|
+
mulq 0x10(%rcx)
|
496
|
+
addq %rax, %r11
|
497
|
+
adcq %rdx, %r12
|
498
|
+
adcq $0x0, %r13
|
499
|
+
movq 0x10(%rsi), %rax
|
500
|
+
mulq 0x8(%rcx)
|
501
|
+
addq %rax, %r11
|
502
|
+
adcq %rdx, %r12
|
503
|
+
adcq $0x0, %r13
|
504
|
+
movq 0x18(%rsi), %rax
|
505
|
+
mulq (%rcx)
|
506
|
+
addq %rax, %r11
|
507
|
+
adcq %rdx, %r12
|
508
|
+
adcq $0x0, %r13
|
509
|
+
xorq %r14, %r14
|
510
|
+
movq 0x8(%rsi), %rax
|
511
|
+
mulq 0x18(%rcx)
|
512
|
+
addq %rax, %r12
|
513
|
+
adcq %rdx, %r13
|
514
|
+
adcq %r14, %r14
|
515
|
+
movq 0x10(%rsi), %rax
|
516
|
+
mulq 0x10(%rcx)
|
517
|
+
addq %rax, %r12
|
518
|
+
adcq %rdx, %r13
|
519
|
+
adcq $0x0, %r14
|
520
|
+
movq 0x18(%rsi), %rax
|
521
|
+
mulq 0x8(%rcx)
|
522
|
+
addq %rax, %r12
|
523
|
+
adcq %rdx, %r13
|
524
|
+
adcq $0x0, %r14
|
525
|
+
xorq %r15, %r15
|
526
|
+
movq 0x10(%rsi), %rax
|
527
|
+
mulq 0x18(%rcx)
|
528
|
+
addq %rax, %r13
|
529
|
+
adcq %rdx, %r14
|
530
|
+
adcq %r15, %r15
|
531
|
+
movq 0x18(%rsi), %rax
|
532
|
+
mulq 0x10(%rcx)
|
533
|
+
addq %rax, %r13
|
534
|
+
adcq %rdx, %r14
|
535
|
+
adcq $0x0, %r15
|
536
|
+
movq 0x18(%rsi), %rax
|
537
|
+
mulq 0x18(%rcx)
|
538
|
+
addq %rax, %r14
|
539
|
+
adcq %rdx, %r15
|
540
|
+
movl $0x26, %esi
|
541
|
+
movq %r12, %rax
|
542
|
+
mulq %rsi
|
543
|
+
addq %rax, %r8
|
544
|
+
adcq %rdx, %r9
|
545
|
+
sbbq %rcx, %rcx
|
546
|
+
movq %r13, %rax
|
547
|
+
mulq %rsi
|
548
|
+
subq %rcx, %rdx
|
549
|
+
addq %rax, %r9
|
550
|
+
adcq %rdx, %r10
|
551
|
+
sbbq %rcx, %rcx
|
552
|
+
movq %r14, %rax
|
553
|
+
mulq %rsi
|
554
|
+
subq %rcx, %rdx
|
555
|
+
addq %rax, %r10
|
556
|
+
adcq %rdx, %r11
|
557
|
+
sbbq %rcx, %rcx
|
558
|
+
movq %r15, %rax
|
559
|
+
mulq %rsi
|
560
|
+
subq %rcx, %rdx
|
561
|
+
xorq %rcx, %rcx
|
562
|
+
addq %rax, %r11
|
563
|
+
movq %rdx, %r12
|
564
|
+
adcq %rcx, %r12
|
565
|
+
shldq $0x1, %r11, %r12
|
566
|
+
leaq 0x1(%r12), %rax
|
567
|
+
movl $0x13, %esi
|
568
|
+
bts $0x3f, %r11
|
569
|
+
imulq %rsi, %rax
|
570
|
+
addq %rax, %r8
|
571
|
+
adcq %rcx, %r9
|
572
|
+
adcq %rcx, %r10
|
573
|
+
adcq %rcx, %r11
|
574
|
+
sbbq %rax, %rax
|
575
|
+
notq %rax
|
576
|
+
andq %rsi, %rax
|
577
|
+
subq %rax, %r8
|
578
|
+
sbbq %rcx, %r9
|
579
|
+
sbbq %rcx, %r10
|
580
|
+
sbbq %rcx, %r11
|
581
|
+
btr $0x3f, %r11
|
582
|
+
movq %r8, (%rdi)
|
583
|
+
movq %r9, 0x8(%rdi)
|
584
|
+
movq %r10, 0x10(%rdi)
|
585
|
+
movq %r11, 0x18(%rdi)
|
586
|
+
ret
|
587
|
+
|
588
|
+
// *************************************************************
|
589
|
+
// Local z = 2^n * x
|
590
|
+
// *************************************************************
|
591
|
+
|
592
|
+
edwards25519_decode_alt_nsqr_p25519:
|
593
|
+
|
594
|
+
// Copy input argument into q
|
595
|
+
|
596
|
+
movq (%rdx), %rax
|
597
|
+
movq 8(%rdx), %rbx
|
598
|
+
movq 16(%rdx), %rcx
|
599
|
+
movq 24(%rdx), %rdx
|
600
|
+
movq %rax, Q8(%rsp)
|
601
|
+
movq %rbx, Q8+8(%rsp)
|
602
|
+
movq %rcx, Q8+16(%rsp)
|
603
|
+
movq %rdx, Q8+24(%rsp)
|
604
|
+
|
605
|
+
// Main squaring loop, accumulating in u consistently and
|
606
|
+
// only ensuring the intermediates are < 2 * p_25519 = 2^256 - 38
|
607
|
+
|
608
|
+
edwards25519_decode_alt_loop:
|
609
|
+
movq Q8(%rsp), %rax
|
610
|
+
mulq %rax
|
611
|
+
movq %rax, %r8
|
612
|
+
movq %rdx, %r9
|
613
|
+
xorq %r10, %r10
|
614
|
+
xorq %r11, %r11
|
615
|
+
movq Q8(%rsp), %rax
|
616
|
+
mulq Q8+0x8(%rsp)
|
617
|
+
addq %rax, %rax
|
618
|
+
adcq %rdx, %rdx
|
619
|
+
adcq $0x0, %r11
|
620
|
+
addq %rax, %r9
|
621
|
+
adcq %rdx, %r10
|
622
|
+
adcq $0x0, %r11
|
623
|
+
xorq %r12, %r12
|
624
|
+
movq Q8+0x8(%rsp), %rax
|
625
|
+
mulq %rax
|
626
|
+
addq %rax, %r10
|
627
|
+
adcq %rdx, %r11
|
628
|
+
adcq $0x0, %r12
|
629
|
+
movq Q8(%rsp), %rax
|
630
|
+
mulq Q8+0x10(%rsp)
|
631
|
+
addq %rax, %rax
|
632
|
+
adcq %rdx, %rdx
|
633
|
+
adcq $0x0, %r12
|
634
|
+
addq %rax, %r10
|
635
|
+
adcq %rdx, %r11
|
636
|
+
adcq $0x0, %r12
|
637
|
+
xorq %r13, %r13
|
638
|
+
movq Q8(%rsp), %rax
|
639
|
+
mulq Q8+0x18(%rsp)
|
640
|
+
addq %rax, %rax
|
641
|
+
adcq %rdx, %rdx
|
642
|
+
adcq $0x0, %r13
|
643
|
+
addq %rax, %r11
|
644
|
+
adcq %rdx, %r12
|
645
|
+
adcq $0x0, %r13
|
646
|
+
movq Q8+0x8(%rsp), %rax
|
647
|
+
mulq Q8+0x10(%rsp)
|
648
|
+
addq %rax, %rax
|
649
|
+
adcq %rdx, %rdx
|
650
|
+
adcq $0x0, %r13
|
651
|
+
addq %rax, %r11
|
652
|
+
adcq %rdx, %r12
|
653
|
+
adcq $0x0, %r13
|
654
|
+
xorq %r14, %r14
|
655
|
+
movq Q8+0x8(%rsp), %rax
|
656
|
+
mulq Q8+0x18(%rsp)
|
657
|
+
addq %rax, %rax
|
658
|
+
adcq %rdx, %rdx
|
659
|
+
adcq $0x0, %r14
|
660
|
+
addq %rax, %r12
|
661
|
+
adcq %rdx, %r13
|
662
|
+
adcq $0x0, %r14
|
663
|
+
movq Q8+0x10(%rsp), %rax
|
664
|
+
mulq %rax
|
665
|
+
addq %rax, %r12
|
666
|
+
adcq %rdx, %r13
|
667
|
+
adcq $0x0, %r14
|
668
|
+
xorq %r15, %r15
|
669
|
+
movq Q8+0x10(%rsp), %rax
|
670
|
+
mulq Q8+0x18(%rsp)
|
671
|
+
addq %rax, %rax
|
672
|
+
adcq %rdx, %rdx
|
673
|
+
adcq $0x0, %r15
|
674
|
+
addq %rax, %r13
|
675
|
+
adcq %rdx, %r14
|
676
|
+
adcq $0x0, %r15
|
677
|
+
movq Q8+0x18(%rsp), %rax
|
678
|
+
mulq %rax
|
679
|
+
addq %rax, %r14
|
680
|
+
adcq %rdx, %r15
|
681
|
+
movl $0x26, %ebx
|
682
|
+
movq %r12, %rax
|
683
|
+
mulq %rbx
|
684
|
+
addq %rax, %r8
|
685
|
+
adcq %rdx, %r9
|
686
|
+
sbbq %rcx, %rcx
|
687
|
+
movq %r13, %rax
|
688
|
+
mulq %rbx
|
689
|
+
subq %rcx, %rdx
|
690
|
+
addq %rax, %r9
|
691
|
+
adcq %rdx, %r10
|
692
|
+
sbbq %rcx, %rcx
|
693
|
+
movq %r14, %rax
|
694
|
+
mulq %rbx
|
695
|
+
subq %rcx, %rdx
|
696
|
+
addq %rax, %r10
|
697
|
+
adcq %rdx, %r11
|
698
|
+
sbbq %rcx, %rcx
|
699
|
+
movq %r15, %rax
|
700
|
+
mulq %rbx
|
701
|
+
subq %rcx, %rdx
|
702
|
+
xorq %rcx, %rcx
|
703
|
+
addq %rax, %r11
|
704
|
+
movq %rdx, %r12
|
705
|
+
adcq %rcx, %r12
|
706
|
+
shldq $0x1, %r11, %r12
|
707
|
+
btr $0x3f, %r11
|
708
|
+
movl $0x13, %edx
|
709
|
+
imulq %r12, %rdx
|
710
|
+
addq %rdx, %r8
|
711
|
+
adcq %rcx, %r9
|
712
|
+
adcq %rcx, %r10
|
713
|
+
adcq %rcx, %r11
|
714
|
+
movq %r8, Q8(%rsp)
|
715
|
+
movq %r9, Q8+0x8(%rsp)
|
716
|
+
movq %r10, Q8+0x10(%rsp)
|
717
|
+
movq %r11, Q8+0x18(%rsp)
|
718
|
+
|
719
|
+
// Loop as applicable
|
720
|
+
|
721
|
+
decq %rsi
|
722
|
+
jnz edwards25519_decode_alt_loop
|
723
|
+
|
724
|
+
// We know the intermediate result x < 2^256 - 38, and now we do strict
|
725
|
+
// modular reduction mod 2^255 - 19. Note x < 2^255 - 19 <=> x + 19 < 2^255
|
726
|
+
// which is equivalent to a "ns" condition. We just use the results where
|
727
|
+
// they were in registers [%r11;%r10;%r9;%r8] instead of re-loading them.
|
728
|
+
|
729
|
+
movl $19, %eax
|
730
|
+
xorl %ebx, %ebx
|
731
|
+
xorl %ecx, %ecx
|
732
|
+
xorl %edx, %edx
|
733
|
+
addq %r8, %rax
|
734
|
+
adcq %r9, %rbx
|
735
|
+
adcq %r10, %rcx
|
736
|
+
adcq %r11, %rdx
|
737
|
+
|
738
|
+
cmovns %r8, %rax
|
739
|
+
cmovns %r9, %rbx
|
740
|
+
cmovns %r10, %rcx
|
741
|
+
cmovns %r11, %rdx
|
742
|
+
btr $63, %rdx
|
743
|
+
movq %rax, (%rdi)
|
744
|
+
movq %rbx, 8(%rdi)
|
745
|
+
movq %rcx, 16(%rdi)
|
746
|
+
movq %rdx, 24(%rdi)
|
747
|
+
ret
|
748
|
+
|
749
|
+
#if defined(__linux__) && defined(__ELF__)
|
750
|
+
.section .note.GNU-stack, "", %progbits
|
751
|
+
#endif
|