visaljs 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli.js +393 -62
- package/node/include/js_node.h +28 -5
- package/node/include/js_uv.h +36 -0
- package/node/prelude/crypto.js +7 -10
- package/node/prelude/dns.js +99 -0
- package/node/prelude/dns_promises.js +10 -0
- package/node/prelude/http.js +1039 -195
- package/node/prelude/internal/crypto/asym.js +39 -12
- package/node/prelude/internal/crypto/dh_groups.js +12 -0
- package/node/prelude/internal/crypto/diffiehellman.js +354 -0
- package/node/prelude/internal/crypto/hash.js +1 -1
- package/node/prelude/internal/crypto/key_type.js +3 -0
- package/node/prelude/internal/crypto/keys.js +39 -9
- package/node/prelude/internal/http_agent.js +249 -0
- package/node/prelude/internal/net.js +33 -0
- package/node/prelude/internal/socketaddress.js +249 -0
- package/node/prelude/internal/tls/common.js +306 -0
- package/node/prelude/internal/tls/wrap.js +1217 -0
- package/node/prelude/internal/tls/x509.js +394 -0
- package/node/prelude/net.js +1083 -50
- package/node/prelude/stream.js +6 -0
- package/node/prelude/tls.js +141 -0
- package/node/prelude/util.js +5 -2
- package/node/prelude/util_types.js +85 -0
- package/node/src/host_http.c +268 -270
- package/node/src/host_loop.c +84 -0
- package/node/src/host_net.c +495 -0
- package/node/src/host_sys.c +16 -0
- package/package.json +1 -1
- package/runtime/include/js_builtins.h +16 -0
- package/runtime/include/js_console.h +2 -0
- package/runtime/include/js_core.def +23 -0
- package/runtime/include/js_crypto.h +23 -0
- package/runtime/include/js_generator.h +2 -3
- package/runtime/include/js_promise.h +0 -2
- package/runtime/src/async_iter.c +4 -1
- package/runtime/src/boringssl_support.cc +34 -0
- package/runtime/src/builtin_table.c +8 -0
- package/runtime/src/components.c +10 -0
- package/runtime/src/console.c +6 -18
- package/runtime/src/core_all.c +1 -0
- package/runtime/src/crypto_asym.c +450 -241
- package/runtime/src/crypto_bn.c +91 -0
- package/runtime/src/crypto_cipher.c +153 -75
- package/runtime/src/crypto_hash.c +68 -53
- package/runtime/src/crypto_internal.h +55 -26
- package/runtime/src/crypto_pkey.c +198 -61
- package/runtime/src/crypto_subtle.c +42 -16
- package/runtime/src/crypto_tls.c +678 -0
- package/runtime/src/generator.c +8 -1
- package/runtime/src/global.c +2 -4
- package/runtime/src/internal.h +0 -1
- package/runtime/src/jobs.c +2 -1
- package/runtime/src/promise.c +4 -1
- package/runtime/src/tls_roots.gen.h +3215 -0
- package/runtime/src/util_types.c +52 -0
- package/runtime/src/weak.c +2 -1
- package/runtime/third_party/boringssl/LICENSE +238 -0
- package/runtime/third_party/boringssl/README.md +46 -0
- package/runtime/third_party/boringssl/VERSION +1 -0
- package/runtime/third_party/boringssl/crypto/aes/aes.cc +44 -0
- package/runtime/third_party/boringssl/crypto/armv8_feature_parsing.h +67 -0
- package/runtime/third_party/boringssl/crypto/asn1/a_bitstr.cc +297 -0
- package/runtime/third_party/boringssl/crypto/asn1/a_bool.cc +50 -0
- package/runtime/third_party/boringssl/crypto/asn1/a_d2i_fp.cc +47 -0
- package/runtime/third_party/boringssl/crypto/asn1/a_dup.cc +42 -0
- package/runtime/third_party/boringssl/crypto/asn1/a_gentm.cc +130 -0
- package/runtime/third_party/boringssl/crypto/asn1/a_i2d_fp.cc +44 -0
- package/runtime/third_party/boringssl/crypto/asn1/a_int.cc +467 -0
- package/runtime/third_party/boringssl/crypto/asn1/a_mbstr.cc +242 -0
- package/runtime/third_party/boringssl/crypto/asn1/a_object.cc +191 -0
- package/runtime/third_party/boringssl/crypto/asn1/a_octet.cc +32 -0
- package/runtime/third_party/boringssl/crypto/asn1/a_strex.cc +411 -0
- package/runtime/third_party/boringssl/crypto/asn1/a_strnid.cc +208 -0
- package/runtime/third_party/boringssl/crypto/asn1/a_time.cc +248 -0
- package/runtime/third_party/boringssl/crypto/asn1/a_type.cc +467 -0
- package/runtime/third_party/boringssl/crypto/asn1/a_utctm.cc +128 -0
- package/runtime/third_party/boringssl/crypto/asn1/asn1_lib.cc +453 -0
- package/runtime/third_party/boringssl/crypto/asn1/asn1_par.cc +61 -0
- package/runtime/third_party/boringssl/crypto/asn1/asn_pack.cc +56 -0
- package/runtime/third_party/boringssl/crypto/asn1/f_int.cc +63 -0
- package/runtime/third_party/boringssl/crypto/asn1/f_string.cc +52 -0
- package/runtime/third_party/boringssl/crypto/asn1/internal.h +430 -0
- package/runtime/third_party/boringssl/crypto/asn1/posix_time.cc +244 -0
- package/runtime/third_party/boringssl/crypto/asn1/tasn_dec.cc +611 -0
- package/runtime/third_party/boringssl/crypto/asn1/tasn_enc.cc +348 -0
- package/runtime/third_party/boringssl/crypto/asn1/tasn_fre.cc +163 -0
- package/runtime/third_party/boringssl/crypto/asn1/tasn_new.cc +274 -0
- package/runtime/third_party/boringssl/crypto/asn1/tasn_typ.cc +92 -0
- package/runtime/third_party/boringssl/crypto/asn1/tasn_utl.cc +218 -0
- package/runtime/third_party/boringssl/crypto/base64/base64.cc +433 -0
- package/runtime/third_party/boringssl/crypto/bcm_support.h +62 -0
- package/runtime/third_party/boringssl/crypto/bio/bio.cc +715 -0
- package/runtime/third_party/boringssl/crypto/bio/bio_mem.cc +260 -0
- package/runtime/third_party/boringssl/crypto/bio/connect.cc +463 -0
- package/runtime/third_party/boringssl/crypto/bio/errno.cc +52 -0
- package/runtime/third_party/boringssl/crypto/bio/fd.cc +193 -0
- package/runtime/third_party/boringssl/crypto/bio/file.cc +283 -0
- package/runtime/third_party/boringssl/crypto/bio/hexdump.cc +154 -0
- package/runtime/third_party/boringssl/crypto/bio/internal.h +128 -0
- package/runtime/third_party/boringssl/crypto/bio/pair.cc +426 -0
- package/runtime/third_party/boringssl/crypto/bio/printf.cc +59 -0
- package/runtime/third_party/boringssl/crypto/bio/socket.cc +210 -0
- package/runtime/third_party/boringssl/crypto/bio/socket_helper.cc +179 -0
- package/runtime/third_party/boringssl/crypto/blake2/blake2.cc +173 -0
- package/runtime/third_party/boringssl/crypto/bn/bn_asn1.cc +57 -0
- package/runtime/third_party/boringssl/crypto/bn/convert.cc +409 -0
- package/runtime/third_party/boringssl/crypto/bn/div.cc +102 -0
- package/runtime/third_party/boringssl/crypto/bn/exponentiation.cc +168 -0
- package/runtime/third_party/boringssl/crypto/bn/sqrt.cc +93 -0
- package/runtime/third_party/boringssl/crypto/buf/buf.cc +119 -0
- package/runtime/third_party/boringssl/crypto/bytestring/asn1_compat.cc +54 -0
- package/runtime/third_party/boringssl/crypto/bytestring/ber.cc +268 -0
- package/runtime/third_party/boringssl/crypto/bytestring/cbb.cc +787 -0
- package/runtime/third_party/boringssl/crypto/bytestring/cbs.cc +977 -0
- package/runtime/third_party/boringssl/crypto/bytestring/internal.h +134 -0
- package/runtime/third_party/boringssl/crypto/bytestring/unicode.cc +156 -0
- package/runtime/third_party/boringssl/crypto/chacha/chacha.cc +226 -0
- package/runtime/third_party/boringssl/crypto/chacha/internal.h +103 -0
- package/runtime/third_party/boringssl/crypto/cipher/derive_key.cc +106 -0
- package/runtime/third_party/boringssl/crypto/cipher/e_aesctrhmac.cc +294 -0
- package/runtime/third_party/boringssl/crypto/cipher/e_aeseax.cc +351 -0
- package/runtime/third_party/boringssl/crypto/cipher/e_aesgcmsiv.cc +918 -0
- package/runtime/third_party/boringssl/crypto/cipher/e_chacha20poly1305.cc +404 -0
- package/runtime/third_party/boringssl/crypto/cipher/e_des.cc +214 -0
- package/runtime/third_party/boringssl/crypto/cipher/e_null.cc +55 -0
- package/runtime/third_party/boringssl/crypto/cipher/e_rc2.cc +432 -0
- package/runtime/third_party/boringssl/crypto/cipher/e_rc4.cc +56 -0
- package/runtime/third_party/boringssl/crypto/cipher/e_tls.cc +615 -0
- package/runtime/third_party/boringssl/crypto/cipher/get_cipher.cc +85 -0
- package/runtime/third_party/boringssl/crypto/cipher/internal.h +399 -0
- package/runtime/third_party/boringssl/crypto/cipher/tls_cbc.cc +476 -0
- package/runtime/third_party/boringssl/crypto/cms/cms.cc +178 -0
- package/runtime/third_party/boringssl/crypto/conf/conf.cc +637 -0
- package/runtime/third_party/boringssl/crypto/conf/internal.h +54 -0
- package/runtime/third_party/boringssl/crypto/cpu_aarch64_apple.cc +76 -0
- package/runtime/third_party/boringssl/crypto/cpu_aarch64_fuchsia.cc +58 -0
- package/runtime/third_party/boringssl/crypto/cpu_aarch64_linux.cc +66 -0
- package/runtime/third_party/boringssl/crypto/cpu_aarch64_openbsd.cc +45 -0
- package/runtime/third_party/boringssl/crypto/cpu_aarch64_sysreg.cc +66 -0
- package/runtime/third_party/boringssl/crypto/cpu_aarch64_win.cc +52 -0
- package/runtime/third_party/boringssl/crypto/cpu_arm_freebsd.cc +55 -0
- package/runtime/third_party/boringssl/crypto/cpu_arm_linux.cc +173 -0
- package/runtime/third_party/boringssl/crypto/cpu_arm_linux.h +141 -0
- package/runtime/third_party/boringssl/crypto/cpu_intel.cc +287 -0
- package/runtime/third_party/boringssl/crypto/crypto.cc +152 -0
- package/runtime/third_party/boringssl/crypto/curve25519/asm/x25519-asm-arm.S +2124 -0
- package/runtime/third_party/boringssl/crypto/curve25519/cpace.cc +227 -0
- package/runtime/third_party/boringssl/crypto/curve25519/curve25519.cc +2436 -0
- package/runtime/third_party/boringssl/crypto/curve25519/curve25519_64_adx.cc +18 -0
- package/runtime/third_party/boringssl/crypto/curve25519/curve25519_tables.h +3264 -0
- package/runtime/third_party/boringssl/crypto/curve25519/internal.h +202 -0
- package/runtime/third_party/boringssl/crypto/curve25519/spake25519.cc +532 -0
- package/runtime/third_party/boringssl/crypto/des/des.cc +837 -0
- package/runtime/third_party/boringssl/crypto/des/internal.h +144 -0
- package/runtime/third_party/boringssl/crypto/dh/dh_asn1.cc +109 -0
- package/runtime/third_party/boringssl/crypto/dh/params.cc +411 -0
- package/runtime/third_party/boringssl/crypto/digest/digest_extra.cc +361 -0
- package/runtime/third_party/boringssl/crypto/dsa/dsa.cc +922 -0
- package/runtime/third_party/boringssl/crypto/dsa/dsa_asn1.cc +306 -0
- package/runtime/third_party/boringssl/crypto/dsa/internal.h +56 -0
- package/runtime/third_party/boringssl/crypto/ec/ec_asn1.cc +542 -0
- package/runtime/third_party/boringssl/crypto/ec/ec_derive.cc +94 -0
- package/runtime/third_party/boringssl/crypto/ec/hash_to_curve.cc +773 -0
- package/runtime/third_party/boringssl/crypto/ec/internal.h +114 -0
- package/runtime/third_party/boringssl/crypto/ecdh/ecdh.cc +75 -0
- package/runtime/third_party/boringssl/crypto/ecdsa/ecdsa_asn1.cc +337 -0
- package/runtime/third_party/boringssl/crypto/ecdsa/ecdsa_p1363.cc +54 -0
- package/runtime/third_party/boringssl/crypto/engine/engine.cc +95 -0
- package/runtime/third_party/boringssl/crypto/err/err.cc +820 -0
- package/runtime/third_party/boringssl/crypto/err/internal.h +45 -0
- package/runtime/third_party/boringssl/crypto/evp/evp.cc +454 -0
- package/runtime/third_party/boringssl/crypto/evp/evp_asn1.cc +439 -0
- package/runtime/third_party/boringssl/crypto/evp/evp_ctx.cc +541 -0
- package/runtime/third_party/boringssl/crypto/evp/evp_kem.cc +101 -0
- package/runtime/third_party/boringssl/crypto/evp/internal.h +427 -0
- package/runtime/third_party/boringssl/crypto/evp/p_dh.cc +326 -0
- package/runtime/third_party/boringssl/crypto/evp/p_dsa.cc +333 -0
- package/runtime/third_party/boringssl/crypto/evp/p_ec.cc +736 -0
- package/runtime/third_party/boringssl/crypto/evp/p_ed25519.cc +359 -0
- package/runtime/third_party/boringssl/crypto/evp/p_hkdf.cc +204 -0
- package/runtime/third_party/boringssl/crypto/evp/p_mldsa.cc +549 -0
- package/runtime/third_party/boringssl/crypto/evp/p_mlkem.cc +510 -0
- package/runtime/third_party/boringssl/crypto/evp/p_rsa.cc +1185 -0
- package/runtime/third_party/boringssl/crypto/evp/p_x25519.cc +371 -0
- package/runtime/third_party/boringssl/crypto/evp/p_xwing.cc +300 -0
- package/runtime/third_party/boringssl/crypto/evp/pbkdf.cc +105 -0
- package/runtime/third_party/boringssl/crypto/evp/print.cc +287 -0
- package/runtime/third_party/boringssl/crypto/evp/scrypt.cc +218 -0
- package/runtime/third_party/boringssl/crypto/evp/sign.cc +95 -0
- package/runtime/third_party/boringssl/crypto/ex_data.cc +140 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/aes/aes.cc.inc +208 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/aes/aes_nohw.cc.inc +1279 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/aes/cbc.cc.inc +132 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/aes/cfb.cc.inc +168 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/aes/ctr.cc.inc +102 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/aes/gcm.cc.inc +614 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/aes/gcm_nohw.cc.inc +304 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/aes/internal.h +590 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/aes/key_wrap.cc.inc +211 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/aes/mode_wrappers.cc.inc +97 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/aes/ofb.cc.inc +55 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/bcm.cc +288 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/bcm_interface.h +953 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/bn/add.cc.inc +276 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/bn/asm/x86_64-gcc.cc.inc +573 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/bn/bn.cc.inc +377 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/bn/bytes.cc.inc +230 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/bn/cmp.cc.inc +161 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/bn/ctx.cc.inc +127 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/bn/div.cc.inc +738 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/bn/div_extra.cc.inc +90 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/bn/exponentiation.cc.inc +743 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/bn/gcd.cc.inc +281 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/bn/gcd_extra.cc.inc +327 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/bn/generic.cc.inc +579 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/bn/internal.h +810 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/bn/jacobi.cc.inc +101 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/bn/montgomery.cc.inc +408 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/bn/montgomery_inv.cc.inc +179 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/bn/mul.cc.inc +347 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/bn/prime.cc.inc +931 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/bn/random.cc.inc +261 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/bn/rsaz_exp.cc.inc +144 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/bn/rsaz_exp.h +109 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/bn/shift.cc.inc +317 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/bn/sqrt.cc.inc +370 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/cipher/aead.cc.inc +619 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/cipher/cipher.cc.inc +837 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/cipher/e_aes.cc.inc +1240 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/cipher/e_aesccm.cc.inc +440 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/cipher/internal.h +461 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/cmac/cmac.cc.inc +293 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/delocate.h +95 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/dh/check.cc.inc +198 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/dh/dh.cc.inc +401 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/dh/internal.h +63 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/digest/digest.cc.inc +221 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/digest/digests.cc.inc +184 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/digest/internal.h +72 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/digest/md32_common.h +166 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/digestsign/digestsign.cc.inc +230 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/ec/builtin_curves.h +277 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/ec/ec.cc.inc +1024 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/ec/ec_key.cc.inc +536 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/ec/ec_montgomery.cc.inc +379 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/ec/felem.cc.inc +250 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/ec/internal.h +752 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/ec/oct.cc.inc +174 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/ec/p256-nistz-table.h +9502 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/ec/p256-nistz.cc.inc +740 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/ec/p256-nistz.h +207 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/ec/p256.cc.inc +578 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/ec/p256_table.h +297 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/ec/scalar.cc.inc +184 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/ec/simple.cc.inc +246 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/ec/simple_mul.cc.inc +274 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/ec/util.cc.inc +258 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/ec/wnaf.cc.inc +224 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/ecdh/ecdh.cc.inc +91 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/ecdsa/ecdsa.cc.inc +288 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/ecdsa/internal.h +57 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/entropy/internal.h +38 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/entropy/jitter.cc.inc +487 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/entropy/sha512.cc.inc +329 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/fips_shared_support.cc +28 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/hkdf/hkdf.cc.inc +114 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/hmac/hmac.cc.inc +218 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/keccak/internal.h +165 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/keccak/keccak.cc.inc +647 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/mldsa/fips_known_values.inc +1345 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/mldsa/mldsa.cc.inc +3323 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/mlkem/fips_known_values.inc +411 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/mlkem/mlkem.cc.inc +1856 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/rand/android_entropy_client.cc.inc +82 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/rand/ctrdrbg.cc.inc +401 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/rand/internal.h +99 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/rand/rand.cc.inc +486 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/rsa/internal.h +167 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/rsa/padding.cc.inc +371 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/rsa/rsa.cc.inc +996 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/rsa/rsa_impl.cc.inc +1000 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/self_check/fips.cc.inc +129 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/self_check/self_check.cc.inc +1093 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/service_indicator/internal.h +112 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/service_indicator/service_indicator.cc.inc +330 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/sha/internal.h +205 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/sha/sha1.cc.inc +404 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/sha/sha256.cc.inc +315 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/sha/sha512.cc.inc +473 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/slhdsa/address.h +144 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/slhdsa/fips_known_values.inc +674 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/slhdsa/fors.cc.inc +179 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/slhdsa/fors.h +48 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/slhdsa/merkle.cc.inc +164 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/slhdsa/merkle.h +58 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/slhdsa/params.h +178 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/slhdsa/slhdsa.cc.inc +690 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/slhdsa/thash.cc.inc +326 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/slhdsa/thash.h +71 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/slhdsa/wots.cc.inc +172 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/slhdsa/wots.h +40 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/tls/internal.h +33 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/tls/kdf.cc.inc +180 -0
- package/runtime/third_party/boringssl/crypto/fuzzer_mode.cc +30 -0
- package/runtime/third_party/boringssl/crypto/hpke/hpke.cc +1514 -0
- package/runtime/third_party/boringssl/crypto/hrss/asm/poly_rq_mul.S +8489 -0
- package/runtime/third_party/boringssl/crypto/hrss/hrss.cc +2189 -0
- package/runtime/third_party/boringssl/crypto/hrss/internal.h +64 -0
- package/runtime/third_party/boringssl/crypto/internal.h +1767 -0
- package/runtime/third_party/boringssl/crypto/lhash/internal.h +222 -0
- package/runtime/third_party/boringssl/crypto/lhash/lhash.cc +312 -0
- package/runtime/third_party/boringssl/crypto/md4/md4.cc +207 -0
- package/runtime/third_party/boringssl/crypto/md5/internal.h +34 -0
- package/runtime/third_party/boringssl/crypto/md5/md5.cc +255 -0
- package/runtime/third_party/boringssl/crypto/mem.cc +577 -0
- package/runtime/third_party/boringssl/crypto/mem_internal.h +706 -0
- package/runtime/third_party/boringssl/crypto/mldsa/mldsa.cc +296 -0
- package/runtime/third_party/boringssl/crypto/mlkem/mlkem.cc +108 -0
- package/runtime/third_party/boringssl/crypto/obj/obj.cc +494 -0
- package/runtime/third_party/boringssl/crypto/obj/obj_dat.h +11722 -0
- package/runtime/third_party/boringssl/crypto/obj/obj_xref.cc +83 -0
- package/runtime/third_party/boringssl/crypto/params_internal.h +30 -0
- package/runtime/third_party/boringssl/crypto/pem/internal.h +135 -0
- package/runtime/third_party/boringssl/crypto/pem/pem_all.cc +153 -0
- package/runtime/third_party/boringssl/crypto/pem/pem_info.cc +250 -0
- package/runtime/third_party/boringssl/crypto/pem/pem_lib.cc +707 -0
- package/runtime/third_party/boringssl/crypto/pem/pem_oth.cc +45 -0
- package/runtime/third_party/boringssl/crypto/pem/pem_pk8.cc +211 -0
- package/runtime/third_party/boringssl/crypto/pem/pem_pkey.cc +147 -0
- package/runtime/third_party/boringssl/crypto/pem/pem_x509.cc +25 -0
- package/runtime/third_party/boringssl/crypto/pem/pem_xaux.cc +25 -0
- package/runtime/third_party/boringssl/crypto/pkcs7/internal.h +67 -0
- package/runtime/third_party/boringssl/crypto/pkcs7/pkcs7.cc +198 -0
- package/runtime/third_party/boringssl/crypto/pkcs7/pkcs7_x509.cc +527 -0
- package/runtime/third_party/boringssl/crypto/pkcs8/internal.h +98 -0
- package/runtime/third_party/boringssl/crypto/pkcs8/p5_pbev2.cc +286 -0
- package/runtime/third_party/boringssl/crypto/pkcs8/pkcs8.cc +473 -0
- package/runtime/third_party/boringssl/crypto/pkcs8/pkcs8_x509.cc +1328 -0
- package/runtime/third_party/boringssl/crypto/poly1305/internal.h +54 -0
- package/runtime/third_party/boringssl/crypto/poly1305/poly1305.cc +315 -0
- package/runtime/third_party/boringssl/crypto/poly1305/poly1305_arm.cc +294 -0
- package/runtime/third_party/boringssl/crypto/poly1305/poly1305_arm_asm.S +2017 -0
- package/runtime/third_party/boringssl/crypto/poly1305/poly1305_vec.cc +853 -0
- package/runtime/third_party/boringssl/crypto/pool/internal.h +95 -0
- package/runtime/third_party/boringssl/crypto/pool/pool.cc +282 -0
- package/runtime/third_party/boringssl/crypto/rand/deterministic.cc +58 -0
- package/runtime/third_party/boringssl/crypto/rand/fork_detect.cc +222 -0
- package/runtime/third_party/boringssl/crypto/rand/forkunsafe.cc +44 -0
- package/runtime/third_party/boringssl/crypto/rand/getentropy.cc +53 -0
- package/runtime/third_party/boringssl/crypto/rand/internal.h +67 -0
- package/runtime/third_party/boringssl/crypto/rand/ios.cc +35 -0
- package/runtime/third_party/boringssl/crypto/rand/rand.cc +79 -0
- package/runtime/third_party/boringssl/crypto/rand/trusty.cc +39 -0
- package/runtime/third_party/boringssl/crypto/rand/urandom.cc +149 -0
- package/runtime/third_party/boringssl/crypto/rand/windows.cc +91 -0
- package/runtime/third_party/boringssl/crypto/rc4/rc4.cc +56 -0
- package/runtime/third_party/boringssl/crypto/refcount.cc +49 -0
- package/runtime/third_party/boringssl/crypto/rsa/internal.h +51 -0
- package/runtime/third_party/boringssl/crypto/rsa/rsa_asn1.cc +404 -0
- package/runtime/third_party/boringssl/crypto/rsa/rsa_crypt.cc +530 -0
- package/runtime/third_party/boringssl/crypto/rsa/rsa_extra.cc +30 -0
- package/runtime/third_party/boringssl/crypto/rsa/rsa_print.cc +25 -0
- package/runtime/third_party/boringssl/crypto/sha/sha1.cc +55 -0
- package/runtime/third_party/boringssl/crypto/sha/sha256.cc +89 -0
- package/runtime/third_party/boringssl/crypto/sha/sha512.cc +106 -0
- package/runtime/third_party/boringssl/crypto/siphash/siphash.cc +81 -0
- package/runtime/third_party/boringssl/crypto/slhdsa/slhdsa.cc +167 -0
- package/runtime/third_party/boringssl/crypto/spake2plus/internal.h +204 -0
- package/runtime/third_party/boringssl/crypto/spake2plus/spake2plus.cc +501 -0
- package/runtime/third_party/boringssl/crypto/stack/stack.cc +462 -0
- package/runtime/third_party/boringssl/crypto/thread.cc +68 -0
- package/runtime/third_party/boringssl/crypto/thread_none.cc +48 -0
- package/runtime/third_party/boringssl/crypto/thread_pthread.cc +138 -0
- package/runtime/third_party/boringssl/crypto/thread_win.cc +227 -0
- package/runtime/third_party/boringssl/crypto/trust_token/internal.h +405 -0
- package/runtime/third_party/boringssl/crypto/trust_token/pmbtoken.cc +1672 -0
- package/runtime/third_party/boringssl/crypto/trust_token/trust_token.cc +701 -0
- package/runtime/third_party/boringssl/crypto/trust_token/voprf.cc +1266 -0
- package/runtime/third_party/boringssl/crypto/x509/a_digest.cc +52 -0
- package/runtime/third_party/boringssl/crypto/x509/a_sign.cc +100 -0
- package/runtime/third_party/boringssl/crypto/x509/a_verify.cc +77 -0
- package/runtime/third_party/boringssl/crypto/x509/algorithm.cc +167 -0
- package/runtime/third_party/boringssl/crypto/x509/asn1_gen.cc +540 -0
- package/runtime/third_party/boringssl/crypto/x509/by_dir.cc +301 -0
- package/runtime/third_party/boringssl/crypto/x509/by_file.cc +226 -0
- package/runtime/third_party/boringssl/crypto/x509/i2d_pr.cc +37 -0
- package/runtime/third_party/boringssl/crypto/x509/internal.h +697 -0
- package/runtime/third_party/boringssl/crypto/x509/name_print.cc +187 -0
- package/runtime/third_party/boringssl/crypto/x509/policy.cc +686 -0
- package/runtime/third_party/boringssl/crypto/x509/rsa_pss.cc +187 -0
- package/runtime/third_party/boringssl/crypto/x509/t_crl.cc +106 -0
- package/runtime/third_party/boringssl/crypto/x509/t_req.cc +206 -0
- package/runtime/third_party/boringssl/crypto/x509/t_x509.cc +292 -0
- package/runtime/third_party/boringssl/crypto/x509/t_x509a.cc +81 -0
- package/runtime/third_party/boringssl/crypto/x509/v3_akey.cc +174 -0
- package/runtime/third_party/boringssl/crypto/x509/v3_akeya.cc +31 -0
- package/runtime/third_party/boringssl/crypto/x509/v3_alt.cc +636 -0
- package/runtime/third_party/boringssl/crypto/x509/v3_bcons.cc +96 -0
- package/runtime/third_party/boringssl/crypto/x509/v3_bitst.cc +100 -0
- package/runtime/third_party/boringssl/crypto/x509/v3_conf.cc +369 -0
- package/runtime/third_party/boringssl/crypto/x509/v3_cpols.cc +417 -0
- package/runtime/third_party/boringssl/crypto/x509/v3_crld.cc +471 -0
- package/runtime/third_party/boringssl/crypto/x509/v3_enum.cc +74 -0
- package/runtime/third_party/boringssl/crypto/x509/v3_extku.cc +97 -0
- package/runtime/third_party/boringssl/crypto/x509/v3_genn.cc +238 -0
- package/runtime/third_party/boringssl/crypto/x509/v3_ia5.cc +83 -0
- package/runtime/third_party/boringssl/crypto/x509/v3_info.cc +162 -0
- package/runtime/third_party/boringssl/crypto/x509/v3_int.cc +83 -0
- package/runtime/third_party/boringssl/crypto/x509/v3_lib.cc +349 -0
- package/runtime/third_party/boringssl/crypto/x509/v3_ncons.cc +798 -0
- package/runtime/third_party/boringssl/crypto/x509/v3_ocsp.cc +92 -0
- package/runtime/third_party/boringssl/crypto/x509/v3_pcons.cc +102 -0
- package/runtime/third_party/boringssl/crypto/x509/v3_pmaps.cc +110 -0
- package/runtime/third_party/boringssl/crypto/x509/v3_prn.cc +183 -0
- package/runtime/third_party/boringssl/crypto/x509/v3_purp.cc +580 -0
- package/runtime/third_party/boringssl/crypto/x509/v3_skey.cc +128 -0
- package/runtime/third_party/boringssl/crypto/x509/v3_utl.cc +1311 -0
- package/runtime/third_party/boringssl/crypto/x509/x509.cc +47 -0
- package/runtime/third_party/boringssl/crypto/x509/x509_att.cc +188 -0
- package/runtime/third_party/boringssl/crypto/x509/x509_cmp.cc +243 -0
- package/runtime/third_party/boringssl/crypto/x509/x509_d2.cc +66 -0
- package/runtime/third_party/boringssl/crypto/x509/x509_def.cc +42 -0
- package/runtime/third_party/boringssl/crypto/x509/x509_ext.cc +161 -0
- package/runtime/third_party/boringssl/crypto/x509/x509_lu.cc +570 -0
- package/runtime/third_party/boringssl/crypto/x509/x509_mtc.cc +598 -0
- package/runtime/third_party/boringssl/crypto/x509/x509_obj.cc +169 -0
- package/runtime/third_party/boringssl/crypto/x509/x509_req.cc +248 -0
- package/runtime/third_party/boringssl/crypto/x509/x509_set.cc +166 -0
- package/runtime/third_party/boringssl/crypto/x509/x509_trs.cc +123 -0
- package/runtime/third_party/boringssl/crypto/x509/x509_txt.cc +147 -0
- package/runtime/third_party/boringssl/crypto/x509/x509_v3.cc +249 -0
- package/runtime/third_party/boringssl/crypto/x509/x509_vfy.cc +1531 -0
- package/runtime/third_party/boringssl/crypto/x509/x509_vpm.cc +449 -0
- package/runtime/third_party/boringssl/crypto/x509/x509cset.cc +222 -0
- package/runtime/third_party/boringssl/crypto/x509/x509name.cc +377 -0
- package/runtime/third_party/boringssl/crypto/x509/x509rset.cc +55 -0
- package/runtime/third_party/boringssl/crypto/x509/x509spki.cc +91 -0
- package/runtime/third_party/boringssl/crypto/x509/x_algor.cc +223 -0
- package/runtime/third_party/boringssl/crypto/x509/x_all.cc +352 -0
- package/runtime/third_party/boringssl/crypto/x509/x_attrib.cc +61 -0
- package/runtime/third_party/boringssl/crypto/x509/x_crl.cc +325 -0
- package/runtime/third_party/boringssl/crypto/x509/x_exten.cc +42 -0
- package/runtime/third_party/boringssl/crypto/x509/x_name.cc +407 -0
- package/runtime/third_party/boringssl/crypto/x509/x_pubkey.cc +199 -0
- package/runtime/third_party/boringssl/crypto/x509/x_req.cc +80 -0
- package/runtime/third_party/boringssl/crypto/x509/x_sig.cc +51 -0
- package/runtime/third_party/boringssl/crypto/x509/x_spki.cc +44 -0
- package/runtime/third_party/boringssl/crypto/x509/x_x509.cc +495 -0
- package/runtime/third_party/boringssl/crypto/x509/x_x509a.cc +169 -0
- package/runtime/third_party/boringssl/crypto/xwing/xwing.cc +257 -0
- package/runtime/third_party/boringssl/gen/bcm/aes-gcm-avx2-x86_64-apple.S +1326 -0
- package/runtime/third_party/boringssl/gen/bcm/aes-gcm-avx2-x86_64-linux.S +1327 -0
- package/runtime/third_party/boringssl/gen/bcm/aes-gcm-avx512-x86_64-apple.S +1252 -0
- package/runtime/third_party/boringssl/gen/bcm/aes-gcm-avx512-x86_64-linux.S +1253 -0
- package/runtime/third_party/boringssl/gen/bcm/aesni-gcm-x86_64-apple.S +873 -0
- package/runtime/third_party/boringssl/gen/bcm/aesni-gcm-x86_64-linux.S +885 -0
- package/runtime/third_party/boringssl/gen/bcm/aesni-x86-apple.S +2490 -0
- package/runtime/third_party/boringssl/gen/bcm/aesni-x86-linux.S +2530 -0
- package/runtime/third_party/boringssl/gen/bcm/aesni-x86_64-apple.S +2413 -0
- package/runtime/third_party/boringssl/gen/bcm/aesni-x86_64-linux.S +2397 -0
- package/runtime/third_party/boringssl/gen/bcm/aesv8-armv7-linux.S +784 -0
- package/runtime/third_party/boringssl/gen/bcm/aesv8-armv8-apple.S +792 -0
- package/runtime/third_party/boringssl/gen/bcm/aesv8-armv8-linux.S +786 -0
- package/runtime/third_party/boringssl/gen/bcm/aesv8-armv8-win.S +798 -0
- package/runtime/third_party/boringssl/gen/bcm/aesv8-gcm-armv8-apple.S +2912 -0
- package/runtime/third_party/boringssl/gen/bcm/aesv8-gcm-armv8-linux.S +2907 -0
- package/runtime/third_party/boringssl/gen/bcm/aesv8-gcm-armv8-win.S +2915 -0
- package/runtime/third_party/boringssl/gen/bcm/armv4-mont-linux.S +932 -0
- package/runtime/third_party/boringssl/gen/bcm/armv8-mont-apple.S +1440 -0
- package/runtime/third_party/boringssl/gen/bcm/armv8-mont-linux.S +1440 -0
- package/runtime/third_party/boringssl/gen/bcm/armv8-mont-win.S +1446 -0
- package/runtime/third_party/boringssl/gen/bcm/bn-586-apple.S +530 -0
- package/runtime/third_party/boringssl/gen/bcm/bn-586-linux.S +540 -0
- package/runtime/third_party/boringssl/gen/bcm/bn-armv8-apple.S +88 -0
- package/runtime/third_party/boringssl/gen/bcm/bn-armv8-linux.S +87 -0
- package/runtime/third_party/boringssl/gen/bcm/bn-armv8-win.S +87 -0
- package/runtime/third_party/boringssl/gen/bcm/bsaes-armv7-linux.S +1520 -0
- package/runtime/third_party/boringssl/gen/bcm/co-586-apple.S +1256 -0
- package/runtime/third_party/boringssl/gen/bcm/co-586-linux.S +1264 -0
- package/runtime/third_party/boringssl/gen/bcm/ghash-armv4-linux.S +242 -0
- package/runtime/third_party/boringssl/gen/bcm/ghash-neon-armv8-apple.S +337 -0
- package/runtime/third_party/boringssl/gen/bcm/ghash-neon-armv8-linux.S +335 -0
- package/runtime/third_party/boringssl/gen/bcm/ghash-neon-armv8-win.S +341 -0
- package/runtime/third_party/boringssl/gen/bcm/ghash-ssse3-x86-apple.S +288 -0
- package/runtime/third_party/boringssl/gen/bcm/ghash-ssse3-x86-linux.S +292 -0
- package/runtime/third_party/boringssl/gen/bcm/ghash-ssse3-x86_64-apple.S +426 -0
- package/runtime/third_party/boringssl/gen/bcm/ghash-ssse3-x86_64-linux.S +425 -0
- package/runtime/third_party/boringssl/gen/bcm/ghash-x86-apple.S +322 -0
- package/runtime/third_party/boringssl/gen/bcm/ghash-x86-linux.S +328 -0
- package/runtime/third_party/boringssl/gen/bcm/ghash-x86_64-apple.S +1134 -0
- package/runtime/third_party/boringssl/gen/bcm/ghash-x86_64-linux.S +1129 -0
- package/runtime/third_party/boringssl/gen/bcm/ghashv8-armv7-linux.S +244 -0
- package/runtime/third_party/boringssl/gen/bcm/ghashv8-armv8-apple.S +567 -0
- package/runtime/third_party/boringssl/gen/bcm/ghashv8-armv8-linux.S +563 -0
- package/runtime/third_party/boringssl/gen/bcm/ghashv8-armv8-win.S +571 -0
- package/runtime/third_party/boringssl/gen/bcm/p256-armv8-asm-apple.S +1744 -0
- package/runtime/third_party/boringssl/gen/bcm/p256-armv8-asm-linux.S +1725 -0
- package/runtime/third_party/boringssl/gen/bcm/p256-armv8-asm-win.S +1765 -0
- package/runtime/third_party/boringssl/gen/bcm/p256-x86_64-asm-apple.S +4544 -0
- package/runtime/third_party/boringssl/gen/bcm/p256-x86_64-asm-linux.S +4600 -0
- package/runtime/third_party/boringssl/gen/bcm/p256_beeu-armv8-asm-apple.S +310 -0
- package/runtime/third_party/boringssl/gen/bcm/p256_beeu-armv8-asm-linux.S +310 -0
- package/runtime/third_party/boringssl/gen/bcm/p256_beeu-armv8-asm-win.S +310 -0
- package/runtime/third_party/boringssl/gen/bcm/p256_beeu-x86_64-asm-apple.S +321 -0
- package/runtime/third_party/boringssl/gen/bcm/p256_beeu-x86_64-asm-linux.S +335 -0
- package/runtime/third_party/boringssl/gen/bcm/rdrand-x86_64-apple.S +58 -0
- package/runtime/third_party/boringssl/gen/bcm/rdrand-x86_64-linux.S +57 -0
- package/runtime/third_party/boringssl/gen/bcm/rsaz-avx2-apple.S +1756 -0
- package/runtime/third_party/boringssl/gen/bcm/rsaz-avx2-linux.S +1751 -0
- package/runtime/third_party/boringssl/gen/bcm/sha1-586-apple.S +3782 -0
- package/runtime/third_party/boringssl/gen/bcm/sha1-586-linux.S +3788 -0
- package/runtime/third_party/boringssl/gen/bcm/sha1-armv4-large-linux.S +1479 -0
- package/runtime/third_party/boringssl/gen/bcm/sha1-armv8-apple.S +1219 -0
- package/runtime/third_party/boringssl/gen/bcm/sha1-armv8-linux.S +1218 -0
- package/runtime/third_party/boringssl/gen/bcm/sha1-armv8-win.S +1222 -0
- package/runtime/third_party/boringssl/gen/bcm/sha1-x86_64-apple.S +5454 -0
- package/runtime/third_party/boringssl/gen/bcm/sha1-x86_64-linux.S +5450 -0
- package/runtime/third_party/boringssl/gen/bcm/sha256-586-apple.S +5593 -0
- package/runtime/third_party/boringssl/gen/bcm/sha256-586-linux.S +5599 -0
- package/runtime/third_party/boringssl/gen/bcm/sha256-armv4-linux.S +2840 -0
- package/runtime/third_party/boringssl/gen/bcm/sha256-armv8-apple.S +1195 -0
- package/runtime/third_party/boringssl/gen/bcm/sha256-armv8-linux.S +1194 -0
- package/runtime/third_party/boringssl/gen/bcm/sha256-armv8-win.S +1198 -0
- package/runtime/third_party/boringssl/gen/bcm/sha256-x86_64-apple.S +4173 -0
- package/runtime/third_party/boringssl/gen/bcm/sha256-x86_64-linux.S +4170 -0
- package/runtime/third_party/boringssl/gen/bcm/sha512-586-apple.S +2406 -0
- package/runtime/third_party/boringssl/gen/bcm/sha512-586-linux.S +2410 -0
- package/runtime/third_party/boringssl/gen/bcm/sha512-armv4-linux.S +1857 -0
- package/runtime/third_party/boringssl/gen/bcm/sha512-armv8-apple.S +1598 -0
- package/runtime/third_party/boringssl/gen/bcm/sha512-armv8-linux.S +1597 -0
- package/runtime/third_party/boringssl/gen/bcm/sha512-armv8-win.S +1601 -0
- package/runtime/third_party/boringssl/gen/bcm/sha512-x86_64-apple.S +2979 -0
- package/runtime/third_party/boringssl/gen/bcm/sha512-x86_64-linux.S +2978 -0
- package/runtime/third_party/boringssl/gen/bcm/vpaes-armv7-linux.S +1225 -0
- package/runtime/third_party/boringssl/gen/bcm/vpaes-armv8-apple.S +1238 -0
- package/runtime/third_party/boringssl/gen/bcm/vpaes-armv8-linux.S +1220 -0
- package/runtime/third_party/boringssl/gen/bcm/vpaes-armv8-win.S +1256 -0
- package/runtime/third_party/boringssl/gen/bcm/vpaes-x86-apple.S +680 -0
- package/runtime/third_party/boringssl/gen/bcm/vpaes-x86-linux.S +706 -0
- package/runtime/third_party/boringssl/gen/bcm/vpaes-x86_64-apple.S +1146 -0
- package/runtime/third_party/boringssl/gen/bcm/vpaes-x86_64-linux.S +1133 -0
- package/runtime/third_party/boringssl/gen/bcm/x86-mont-apple.S +216 -0
- package/runtime/third_party/boringssl/gen/bcm/x86-mont-linux.S +218 -0
- package/runtime/third_party/boringssl/gen/bcm/x86_64-mont-apple.S +1238 -0
- package/runtime/third_party/boringssl/gen/bcm/x86_64-mont-linux.S +1237 -0
- package/runtime/third_party/boringssl/gen/bcm/x86_64-mont5-apple.S +3644 -0
- package/runtime/third_party/boringssl/gen/bcm/x86_64-mont5-linux.S +3628 -0
- package/runtime/third_party/boringssl/gen/boringssl_prefix_symbols_internal_x86_64_win_asm.inc +325 -0
- package/runtime/third_party/boringssl/gen/boringssl_prefix_symbols_internal_x86_win_asm.inc +325 -0
- package/runtime/third_party/boringssl/gen/crypto/aes128gcmsiv-x86_64-apple.S +3113 -0
- package/runtime/third_party/boringssl/gen/crypto/aes128gcmsiv-x86_64-linux.S +3091 -0
- package/runtime/third_party/boringssl/gen/crypto/chacha-armv4-linux.S +1450 -0
- package/runtime/third_party/boringssl/gen/crypto/chacha-armv8-apple.S +1969 -0
- package/runtime/third_party/boringssl/gen/crypto/chacha-armv8-linux.S +1967 -0
- package/runtime/third_party/boringssl/gen/crypto/chacha-armv8-win.S +1973 -0
- package/runtime/third_party/boringssl/gen/crypto/chacha-x86-apple.S +957 -0
- package/runtime/third_party/boringssl/gen/crypto/chacha-x86-linux.S +961 -0
- package/runtime/third_party/boringssl/gen/crypto/chacha-x86_64-apple.S +1608 -0
- package/runtime/third_party/boringssl/gen/crypto/chacha-x86_64-linux.S +1611 -0
- package/runtime/third_party/boringssl/gen/crypto/chacha20_poly1305_armv8-apple.S +3010 -0
- package/runtime/third_party/boringssl/gen/crypto/chacha20_poly1305_armv8-linux.S +3008 -0
- package/runtime/third_party/boringssl/gen/crypto/chacha20_poly1305_armv8-win.S +3014 -0
- package/runtime/third_party/boringssl/gen/crypto/chacha20_poly1305_x86_64-apple.S +8903 -0
- package/runtime/third_party/boringssl/gen/crypto/chacha20_poly1305_x86_64-linux.S +8940 -0
- package/runtime/third_party/boringssl/gen/crypto/err_data.cc +1578 -0
- package/runtime/third_party/boringssl/gen/crypto/md5-586-apple.S +684 -0
- package/runtime/third_party/boringssl/gen/crypto/md5-586-linux.S +686 -0
- package/runtime/third_party/boringssl/gen/crypto/md5-x86_64-apple.S +690 -0
- package/runtime/third_party/boringssl/gen/crypto/md5-x86_64-linux.S +695 -0
- package/runtime/third_party/boringssl/include/openssl/aead.h +650 -0
- package/runtime/third_party/boringssl/include/openssl/aes.h +173 -0
- package/runtime/third_party/boringssl/include/openssl/arm_arch.h +24 -0
- package/runtime/third_party/boringssl/include/openssl/asm_base.h +219 -0
- package/runtime/third_party/boringssl/include/openssl/asn1.h +2002 -0
- package/runtime/third_party/boringssl/include/openssl/asn1_mac.h +18 -0
- package/runtime/third_party/boringssl/include/openssl/asn1t.h +584 -0
- package/runtime/third_party/boringssl/include/openssl/base.h +548 -0
- package/runtime/third_party/boringssl/include/openssl/base64.h +156 -0
- package/runtime/third_party/boringssl/include/openssl/bio.h +1061 -0
- package/runtime/third_party/boringssl/include/openssl/blake2.h +63 -0
- package/runtime/third_party/boringssl/include/openssl/blowfish.h +58 -0
- package/runtime/third_party/boringssl/include/openssl/bn.h +986 -0
- package/runtime/third_party/boringssl/include/openssl/buf.h +95 -0
- package/runtime/third_party/boringssl/include/openssl/buffer.h +18 -0
- package/runtime/third_party/boringssl/include/openssl/bytestring.h +798 -0
- package/runtime/third_party/boringssl/include/openssl/cast.h +91 -0
- package/runtime/third_party/boringssl/include/openssl/chacha.h +47 -0
- package/runtime/third_party/boringssl/include/openssl/cipher.h +819 -0
- package/runtime/third_party/boringssl/include/openssl/cmac.h +91 -0
- package/runtime/third_party/boringssl/include/openssl/cms.h +147 -0
- package/runtime/third_party/boringssl/include/openssl/conf.h +136 -0
- package/runtime/third_party/boringssl/include/openssl/configuration.h +18 -0
- package/runtime/third_party/boringssl/include/openssl/cpu.h +18 -0
- package/runtime/third_party/boringssl/include/openssl/crypto.h +235 -0
- package/runtime/third_party/boringssl/include/openssl/ctrdrbg.h +116 -0
- package/runtime/third_party/boringssl/include/openssl/curve25519.h +309 -0
- package/runtime/third_party/boringssl/include/openssl/des.h +134 -0
- package/runtime/third_party/boringssl/include/openssl/dh.h +336 -0
- package/runtime/third_party/boringssl/include/openssl/digest.h +399 -0
- package/runtime/third_party/boringssl/include/openssl/dsa.h +392 -0
- package/runtime/third_party/boringssl/include/openssl/dtls1.h +16 -0
- package/runtime/third_party/boringssl/include/openssl/e_os2.h +18 -0
- package/runtime/third_party/boringssl/include/openssl/ec.h +530 -0
- package/runtime/third_party/boringssl/include/openssl/ec_key.h +358 -0
- package/runtime/third_party/boringssl/include/openssl/ecdh.h +67 -0
- package/runtime/third_party/boringssl/include/openssl/ecdsa.h +242 -0
- package/runtime/third_party/boringssl/include/openssl/engine.h +109 -0
- package/runtime/third_party/boringssl/include/openssl/err.h +416 -0
- package/runtime/third_party/boringssl/include/openssl/evp.h +1645 -0
- package/runtime/third_party/boringssl/include/openssl/evp_errors.h +66 -0
- package/runtime/third_party/boringssl/include/openssl/ex_data.h +117 -0
- package/runtime/third_party/boringssl/include/openssl/hkdf.h +68 -0
- package/runtime/third_party/boringssl/include/openssl/hmac.h +151 -0
- package/runtime/third_party/boringssl/include/openssl/hpke.h +456 -0
- package/runtime/third_party/boringssl/include/openssl/hrss.h +108 -0
- package/runtime/third_party/boringssl/include/openssl/is_boringssl.h +16 -0
- package/runtime/third_party/boringssl/include/openssl/kdf.h +92 -0
- package/runtime/third_party/boringssl/include/openssl/lhash.h +18 -0
- package/runtime/third_party/boringssl/include/openssl/md4.h +73 -0
- package/runtime/third_party/boringssl/include/openssl/md5.h +67 -0
- package/runtime/third_party/boringssl/include/openssl/mem.h +215 -0
- package/runtime/third_party/boringssl/include/openssl/mldsa.h +486 -0
- package/runtime/third_party/boringssl/include/openssl/mlkem.h +222 -0
- package/runtime/third_party/boringssl/include/openssl/nid.h +5561 -0
- package/runtime/third_party/boringssl/include/openssl/obj.h +225 -0
- package/runtime/third_party/boringssl/include/openssl/obj_mac.h +18 -0
- package/runtime/third_party/boringssl/include/openssl/objects.h +18 -0
- package/runtime/third_party/boringssl/include/openssl/opensslconf.h +108 -0
- package/runtime/third_party/boringssl/include/openssl/opensslv.h +18 -0
- package/runtime/third_party/boringssl/include/openssl/ossl_typ.h +18 -0
- package/runtime/third_party/boringssl/include/openssl/params.h +42 -0
- package/runtime/third_party/boringssl/include/openssl/pem.h +769 -0
- package/runtime/third_party/boringssl/include/openssl/pkcs12.h +18 -0
- package/runtime/third_party/boringssl/include/openssl/pkcs7.h +239 -0
- package/runtime/third_party/boringssl/include/openssl/pkcs8.h +267 -0
- package/runtime/third_party/boringssl/include/openssl/poly1305.h +52 -0
- package/runtime/third_party/boringssl/include/openssl/pool.h +137 -0
- package/runtime/third_party/boringssl/include/openssl/posix_time.h +51 -0
- package/runtime/third_party/boringssl/include/openssl/prefix_symbols.h +8000 -0
- package/runtime/third_party/boringssl/include/openssl/prefix_symbols_internal_S.h +633 -0
- package/runtime/third_party/boringssl/include/openssl/prefix_symbols_internal_c.h +329 -0
- package/runtime/third_party/boringssl/include/openssl/rand.h +138 -0
- package/runtime/third_party/boringssl/include/openssl/rc4.h +54 -0
- package/runtime/third_party/boringssl/include/openssl/ripemd.h +71 -0
- package/runtime/third_party/boringssl/include/openssl/rsa.h +893 -0
- package/runtime/third_party/boringssl/include/openssl/safestack.h +16 -0
- package/runtime/third_party/boringssl/include/openssl/service_indicator.h +19 -0
- package/runtime/third_party/boringssl/include/openssl/sha.h +108 -0
- package/runtime/third_party/boringssl/include/openssl/sha2.h +201 -0
- package/runtime/third_party/boringssl/include/openssl/siphash.h +37 -0
- package/runtime/third_party/boringssl/include/openssl/slhdsa.h +250 -0
- package/runtime/third_party/boringssl/include/openssl/span.h +376 -0
- package/runtime/third_party/boringssl/include/openssl/srtp.h +18 -0
- package/runtime/third_party/boringssl/include/openssl/ssl.h +7211 -0
- package/runtime/third_party/boringssl/include/openssl/ssl3.h +171 -0
- package/runtime/third_party/boringssl/include/openssl/stack.h +688 -0
- package/runtime/third_party/boringssl/include/openssl/target.h +246 -0
- package/runtime/third_party/boringssl/include/openssl/thread.h +114 -0
- package/runtime/third_party/boringssl/include/openssl/time.h +22 -0
- package/runtime/third_party/boringssl/include/openssl/tls1.h +263 -0
- package/runtime/third_party/boringssl/include/openssl/tls_prf.h +47 -0
- package/runtime/third_party/boringssl/include/openssl/trust_token.h +349 -0
- package/runtime/third_party/boringssl/include/openssl/type_check.h +37 -0
- package/runtime/third_party/boringssl/include/openssl/types.h +18 -0
- package/runtime/third_party/boringssl/include/openssl/x509.h +5404 -0
- package/runtime/third_party/boringssl/include/openssl/x509_vfy.h +18 -0
- package/runtime/third_party/boringssl/include/openssl/x509v3.h +63 -0
- package/runtime/third_party/boringssl/include/openssl/x509v3_errors.h +84 -0
- package/runtime/third_party/boringssl/include/openssl/xwing.h +115 -0
- package/runtime/third_party/boringssl/sources.json +696 -0
- package/runtime/third_party/boringssl/ssl/bio_ssl.cc +196 -0
- package/runtime/third_party/boringssl/ssl/d1_both.cc +1137 -0
- package/runtime/third_party/boringssl/ssl/d1_lib.cc +245 -0
- package/runtime/third_party/boringssl/ssl/d1_pkt.cc +322 -0
- package/runtime/third_party/boringssl/ssl/d1_srtp.cc +128 -0
- package/runtime/third_party/boringssl/ssl/dtls_method.cc +216 -0
- package/runtime/third_party/boringssl/ssl/dtls_record.cc +586 -0
- package/runtime/third_party/boringssl/ssl/encrypted_client_hello.cc +1110 -0
- package/runtime/third_party/boringssl/ssl/extensions.cc +5368 -0
- package/runtime/third_party/boringssl/ssl/handoff.cc +625 -0
- package/runtime/third_party/boringssl/ssl/handshake.cc +694 -0
- package/runtime/third_party/boringssl/ssl/handshake_client.cc +1958 -0
- package/runtime/third_party/boringssl/ssl/handshake_server.cc +1875 -0
- package/runtime/third_party/boringssl/ssl/internal.h +4506 -0
- package/runtime/third_party/boringssl/ssl/s3_both.cc +555 -0
- package/runtime/third_party/boringssl/ssl/s3_lib.cc +88 -0
- package/runtime/third_party/boringssl/ssl/s3_pkt.cc +396 -0
- package/runtime/third_party/boringssl/ssl/ssl_aead_ctx.cc +416 -0
- package/runtime/third_party/boringssl/ssl/ssl_asn1.cc +851 -0
- package/runtime/third_party/boringssl/ssl/ssl_buffer.cc +304 -0
- package/runtime/third_party/boringssl/ssl/ssl_cert.cc +723 -0
- package/runtime/third_party/boringssl/ssl/ssl_cipher.cc +1762 -0
- package/runtime/third_party/boringssl/ssl/ssl_credential.cc +913 -0
- package/runtime/third_party/boringssl/ssl/ssl_file.cc +375 -0
- package/runtime/third_party/boringssl/ssl/ssl_key_share.cc +445 -0
- package/runtime/third_party/boringssl/ssl/ssl_lib.cc +4132 -0
- package/runtime/third_party/boringssl/ssl/ssl_privkey.cc +973 -0
- package/runtime/third_party/boringssl/ssl/ssl_session.cc +1273 -0
- package/runtime/third_party/boringssl/ssl/ssl_stat.cc +162 -0
- package/runtime/third_party/boringssl/ssl/ssl_transcript.cc +224 -0
- package/runtime/third_party/boringssl/ssl/ssl_versions.cc +436 -0
- package/runtime/third_party/boringssl/ssl/ssl_x509.cc +1229 -0
- package/runtime/third_party/boringssl/ssl/t1_enc.cc +266 -0
- package/runtime/third_party/boringssl/ssl/tls13_both.cc +764 -0
- package/runtime/third_party/boringssl/ssl/tls13_client.cc +1325 -0
- package/runtime/third_party/boringssl/ssl/tls13_enc.cc +746 -0
- package/runtime/third_party/boringssl/ssl/tls13_server.cc +1623 -0
- package/runtime/third_party/boringssl/ssl/tls_method.cc +266 -0
- package/runtime/third_party/boringssl/ssl/tls_record.cc +524 -0
- package/runtime/third_party/boringssl/third_party/fiat/asm/fiat_curve25519_adx_mul.S +178 -0
- package/runtime/third_party/boringssl/third_party/fiat/asm/fiat_curve25519_adx_square.S +146 -0
- package/runtime/third_party/boringssl/third_party/fiat/asm/fiat_p256_adx_mul.S +177 -0
- package/runtime/third_party/boringssl/third_party/fiat/asm/fiat_p256_adx_sqr.S +166 -0
- package/runtime/third_party/boringssl/third_party/fiat/bedrock_unverified_bareminimum.c.inc +47 -0
- package/runtime/third_party/boringssl/third_party/fiat/bedrock_unverified_platform.c.inc +137 -0
- package/runtime/third_party/boringssl/third_party/fiat/curve25519_32.h +1571 -0
- package/runtime/third_party/boringssl/third_party/fiat/curve25519_64.h +978 -0
- package/runtime/third_party/boringssl/third_party/fiat/curve25519_64_adx.h +700 -0
- package/runtime/third_party/boringssl/third_party/fiat/curve25519_64_msvc.h +1281 -0
- package/runtime/third_party/boringssl/third_party/fiat/p256_32.h +4760 -0
- package/runtime/third_party/boringssl/third_party/fiat/p256_64.h +1984 -0
- package/runtime/third_party/boringssl/third_party/fiat/p256_64_msvc.h +1939 -0
- package/runtime/third_party/boringssl/third_party/fiat/p256_field.c.inc +26 -0
- package/runtime/third_party/boringssl/third_party/fiat/p256_field_32.br.c.inc +71 -0
- package/runtime/third_party/boringssl/third_party/fiat/p256_field_64.br.c.inc +84 -0
- package/runtime/third_party/boringssl/third_party/fiat/p256_point.br.c.inc +112 -0
- package/runtime/third_party/v8-ieee754/README.md +2 -1
- package/runtime/third_party/v8-ieee754/convert.py +4 -0
- package/runtime/third_party/v8-ieee754/ieee754.c +1 -1
- package/runtime/third_party/bearssl/LICENSE.txt +0 -21
- package/runtime/third_party/bearssl/README.txt +0 -136
- package/runtime/third_party/bearssl/VERSION +0 -1
- package/runtime/third_party/bearssl/inc/bearssl.h +0 -183
- package/runtime/third_party/bearssl/inc/bearssl_aead.h +0 -1059
- package/runtime/third_party/bearssl/inc/bearssl_block.h +0 -2618
- package/runtime/third_party/bearssl/inc/bearssl_ec.h +0 -967
- package/runtime/third_party/bearssl/inc/bearssl_hash.h +0 -1346
- package/runtime/third_party/bearssl/inc/bearssl_hmac.h +0 -241
- package/runtime/third_party/bearssl/inc/bearssl_kdf.h +0 -284
- package/runtime/third_party/bearssl/inc/bearssl_pem.h +0 -294
- package/runtime/third_party/bearssl/inc/bearssl_prf.h +0 -150
- package/runtime/third_party/bearssl/inc/bearssl_rand.h +0 -397
- package/runtime/third_party/bearssl/inc/bearssl_rsa.h +0 -1655
- package/runtime/third_party/bearssl/inc/bearssl_ssl.h +0 -4296
- package/runtime/third_party/bearssl/inc/bearssl_x509.h +0 -1474
- package/runtime/third_party/bearssl/src/aead/ccm.c +0 -346
- package/runtime/third_party/bearssl/src/aead/eax.c +0 -525
- package/runtime/third_party/bearssl/src/aead/gcm.c +0 -318
- package/runtime/third_party/bearssl/src/codec/ccopy.c +0 -44
- package/runtime/third_party/bearssl/src/codec/dec16be.c +0 -38
- package/runtime/third_party/bearssl/src/codec/dec16le.c +0 -38
- package/runtime/third_party/bearssl/src/codec/dec32be.c +0 -38
- package/runtime/third_party/bearssl/src/codec/dec32le.c +0 -38
- package/runtime/third_party/bearssl/src/codec/dec64be.c +0 -38
- package/runtime/third_party/bearssl/src/codec/dec64le.c +0 -38
- package/runtime/third_party/bearssl/src/codec/enc16be.c +0 -38
- package/runtime/third_party/bearssl/src/codec/enc16le.c +0 -38
- package/runtime/third_party/bearssl/src/codec/enc32be.c +0 -38
- package/runtime/third_party/bearssl/src/codec/enc32le.c +0 -38
- package/runtime/third_party/bearssl/src/codec/enc64be.c +0 -38
- package/runtime/third_party/bearssl/src/codec/enc64le.c +0 -38
- package/runtime/third_party/bearssl/src/codec/pemdec.c +0 -526
- package/runtime/third_party/bearssl/src/codec/pemdec.t0 +0 -314
- package/runtime/third_party/bearssl/src/codec/pemenc.c +0 -173
- package/runtime/third_party/bearssl/src/config.h +0 -247
- package/runtime/third_party/bearssl/src/ec/ec_all_m15.c +0 -121
- package/runtime/third_party/bearssl/src/ec/ec_all_m31.c +0 -171
- package/runtime/third_party/bearssl/src/ec/ec_c25519_i15.c +0 -398
- package/runtime/third_party/bearssl/src/ec/ec_c25519_i31.c +0 -390
- package/runtime/third_party/bearssl/src/ec/ec_c25519_m15.c +0 -1478
- package/runtime/third_party/bearssl/src/ec/ec_c25519_m31.c +0 -800
- package/runtime/third_party/bearssl/src/ec/ec_c25519_m62.c +0 -605
- package/runtime/third_party/bearssl/src/ec/ec_c25519_m64.c +0 -831
- package/runtime/third_party/bearssl/src/ec/ec_curve25519.c +0 -46
- package/runtime/third_party/bearssl/src/ec/ec_default.c +0 -36
- package/runtime/third_party/bearssl/src/ec/ec_keygen.c +0 -86
- package/runtime/third_party/bearssl/src/ec/ec_p256_m15.c +0 -2124
- package/runtime/third_party/bearssl/src/ec/ec_p256_m31.c +0 -1469
- package/runtime/third_party/bearssl/src/ec/ec_p256_m62.c +0 -1765
- package/runtime/third_party/bearssl/src/ec/ec_p256_m64.c +0 -1781
- package/runtime/third_party/bearssl/src/ec/ec_prime_i15.c +0 -824
- package/runtime/third_party/bearssl/src/ec/ec_prime_i31.c +0 -826
- package/runtime/third_party/bearssl/src/ec/ec_pubkey.c +0 -85
- package/runtime/third_party/bearssl/src/ec/ec_secp256r1.c +0 -51
- package/runtime/third_party/bearssl/src/ec/ec_secp384r1.c +0 -57
- package/runtime/third_party/bearssl/src/ec/ec_secp521r1.c +0 -64
- package/runtime/third_party/bearssl/src/ec/ecdsa_atr.c +0 -134
- package/runtime/third_party/bearssl/src/ec/ecdsa_default_sign_asn1.c +0 -36
- package/runtime/third_party/bearssl/src/ec/ecdsa_default_sign_raw.c +0 -36
- package/runtime/third_party/bearssl/src/ec/ecdsa_default_vrfy_asn1.c +0 -36
- package/runtime/third_party/bearssl/src/ec/ecdsa_default_vrfy_raw.c +0 -36
- package/runtime/third_party/bearssl/src/ec/ecdsa_i15_bits.c +0 -47
- package/runtime/third_party/bearssl/src/ec/ecdsa_i15_sign_asn1.c +0 -45
- package/runtime/third_party/bearssl/src/ec/ecdsa_i15_sign_raw.c +0 -174
- package/runtime/third_party/bearssl/src/ec/ecdsa_i15_vrfy_asn1.c +0 -48
- package/runtime/third_party/bearssl/src/ec/ecdsa_i15_vrfy_raw.c +0 -166
- package/runtime/third_party/bearssl/src/ec/ecdsa_i31_bits.c +0 -47
- package/runtime/third_party/bearssl/src/ec/ecdsa_i31_sign_asn1.c +0 -45
- package/runtime/third_party/bearssl/src/ec/ecdsa_i31_sign_raw.c +0 -173
- package/runtime/third_party/bearssl/src/ec/ecdsa_i31_vrfy_asn1.c +0 -48
- package/runtime/third_party/bearssl/src/ec/ecdsa_i31_vrfy_raw.c +0 -165
- package/runtime/third_party/bearssl/src/ec/ecdsa_rta.c +0 -121
- package/runtime/third_party/bearssl/src/hash/dig_oid.c +0 -84
- package/runtime/third_party/bearssl/src/hash/dig_size.c +0 -50
- package/runtime/third_party/bearssl/src/hash/ghash_ctmul.c +0 -345
- package/runtime/third_party/bearssl/src/hash/ghash_ctmul32.c +0 -251
- package/runtime/third_party/bearssl/src/hash/ghash_ctmul64.c +0 -154
- package/runtime/third_party/bearssl/src/hash/ghash_pclmul.c +0 -389
- package/runtime/third_party/bearssl/src/hash/ghash_pwr8.c +0 -411
- package/runtime/third_party/bearssl/src/hash/md5.c +0 -208
- package/runtime/third_party/bearssl/src/hash/md5sha1.c +0 -141
- package/runtime/third_party/bearssl/src/hash/mgf1.c +0 -56
- package/runtime/third_party/bearssl/src/hash/multihash.c +0 -166
- package/runtime/third_party/bearssl/src/hash/sha1.c +0 -191
- package/runtime/third_party/bearssl/src/hash/sha2big.c +0 -285
- package/runtime/third_party/bearssl/src/hash/sha2small.c +0 -341
- package/runtime/third_party/bearssl/src/inner.h +0 -2577
- package/runtime/third_party/bearssl/src/int/i15_add.c +0 -46
- package/runtime/third_party/bearssl/src/int/i15_bitlen.c +0 -44
- package/runtime/third_party/bearssl/src/int/i15_decmod.c +0 -124
- package/runtime/third_party/bearssl/src/int/i15_decode.c +0 -56
- package/runtime/third_party/bearssl/src/int/i15_decred.c +0 -100
- package/runtime/third_party/bearssl/src/int/i15_encode.c +0 -56
- package/runtime/third_party/bearssl/src/int/i15_fmont.c +0 -59
- package/runtime/third_party/bearssl/src/int/i15_iszero.c +0 -39
- package/runtime/third_party/bearssl/src/int/i15_moddiv.c +0 -465
- package/runtime/third_party/bearssl/src/int/i15_modpow.c +0 -50
- package/runtime/third_party/bearssl/src/int/i15_modpow2.c +0 -160
- package/runtime/third_party/bearssl/src/int/i15_montmul.c +0 -184
- package/runtime/third_party/bearssl/src/int/i15_mulacc.c +0 -61
- package/runtime/third_party/bearssl/src/int/i15_muladd.c +0 -173
- package/runtime/third_party/bearssl/src/int/i15_ninv15.c +0 -38
- package/runtime/third_party/bearssl/src/int/i15_reduce.c +0 -66
- package/runtime/third_party/bearssl/src/int/i15_rshift.c +0 -47
- package/runtime/third_party/bearssl/src/int/i15_sub.c +0 -46
- package/runtime/third_party/bearssl/src/int/i15_tmont.c +0 -36
- package/runtime/third_party/bearssl/src/int/i31_add.c +0 -46
- package/runtime/third_party/bearssl/src/int/i31_bitlen.c +0 -44
- package/runtime/third_party/bearssl/src/int/i31_decmod.c +0 -124
- package/runtime/third_party/bearssl/src/int/i31_decode.c +0 -57
- package/runtime/third_party/bearssl/src/int/i31_decred.c +0 -103
- package/runtime/third_party/bearssl/src/int/i31_encode.c +0 -79
- package/runtime/third_party/bearssl/src/int/i31_fmont.c +0 -60
- package/runtime/third_party/bearssl/src/int/i31_iszero.c +0 -39
- package/runtime/third_party/bearssl/src/int/i31_moddiv.c +0 -488
- package/runtime/third_party/bearssl/src/int/i31_modpow.c +0 -65
- package/runtime/third_party/bearssl/src/int/i31_modpow2.c +0 -160
- package/runtime/third_party/bearssl/src/int/i31_montmul.c +0 -127
- package/runtime/third_party/bearssl/src/int/i31_mulacc.c +0 -74
- package/runtime/third_party/bearssl/src/int/i31_muladd.c +0 -157
- package/runtime/third_party/bearssl/src/int/i31_ninv31.c +0 -39
- package/runtime/third_party/bearssl/src/int/i31_reduce.c +0 -66
- package/runtime/third_party/bearssl/src/int/i31_rshift.c +0 -47
- package/runtime/third_party/bearssl/src/int/i31_sub.c +0 -46
- package/runtime/third_party/bearssl/src/int/i31_tmont.c +0 -36
- package/runtime/third_party/bearssl/src/int/i32_add.c +0 -51
- package/runtime/third_party/bearssl/src/int/i32_bitlen.c +0 -44
- package/runtime/third_party/bearssl/src/int/i32_decmod.c +0 -77
- package/runtime/third_party/bearssl/src/int/i32_decode.c +0 -63
- package/runtime/third_party/bearssl/src/int/i32_decred.c +0 -107
- package/runtime/third_party/bearssl/src/int/i32_div32.c +0 -56
- package/runtime/third_party/bearssl/src/int/i32_encode.c +0 -72
- package/runtime/third_party/bearssl/src/int/i32_fmont.c +0 -60
- package/runtime/third_party/bearssl/src/int/i32_iszero.c +0 -39
- package/runtime/third_party/bearssl/src/int/i32_modpow.c +0 -65
- package/runtime/third_party/bearssl/src/int/i32_montmul.c +0 -69
- package/runtime/third_party/bearssl/src/int/i32_mulacc.c +0 -56
- package/runtime/third_party/bearssl/src/int/i32_muladd.c +0 -138
- package/runtime/third_party/bearssl/src/int/i32_ninv32.c +0 -39
- package/runtime/third_party/bearssl/src/int/i32_reduce.c +0 -66
- package/runtime/third_party/bearssl/src/int/i32_sub.c +0 -51
- package/runtime/third_party/bearssl/src/int/i32_tmont.c +0 -36
- package/runtime/third_party/bearssl/src/int/i62_modpow2.c +0 -493
- package/runtime/third_party/bearssl/src/kdf/hkdf.c +0 -107
- package/runtime/third_party/bearssl/src/kdf/shake.c +0 -590
- package/runtime/third_party/bearssl/src/mac/hmac.c +0 -122
- package/runtime/third_party/bearssl/src/mac/hmac_ct.c +0 -193
- package/runtime/third_party/bearssl/src/rand/aesctr_drbg.c +0 -206
- package/runtime/third_party/bearssl/src/rand/hmac_drbg.c +0 -157
- package/runtime/third_party/bearssl/src/rand/sysrng.c +0 -252
- package/runtime/third_party/bearssl/src/rsa/rsa_default_keygen.c +0 -38
- package/runtime/third_party/bearssl/src/rsa/rsa_default_modulus.c +0 -36
- package/runtime/third_party/bearssl/src/rsa/rsa_default_oaep_decrypt.c +0 -38
- package/runtime/third_party/bearssl/src/rsa/rsa_default_oaep_encrypt.c +0 -38
- package/runtime/third_party/bearssl/src/rsa/rsa_default_pkcs1_sign.c +0 -38
- package/runtime/third_party/bearssl/src/rsa/rsa_default_pkcs1_vrfy.c +0 -38
- package/runtime/third_party/bearssl/src/rsa/rsa_default_priv.c +0 -38
- package/runtime/third_party/bearssl/src/rsa/rsa_default_privexp.c +0 -36
- package/runtime/third_party/bearssl/src/rsa/rsa_default_pss_sign.c +0 -38
- package/runtime/third_party/bearssl/src/rsa/rsa_default_pss_vrfy.c +0 -38
- package/runtime/third_party/bearssl/src/rsa/rsa_default_pub.c +0 -38
- package/runtime/third_party/bearssl/src/rsa/rsa_default_pubexp.c +0 -36
- package/runtime/third_party/bearssl/src/rsa/rsa_i15_keygen.c +0 -583
- package/runtime/third_party/bearssl/src/rsa/rsa_i15_modulus.c +0 -99
- package/runtime/third_party/bearssl/src/rsa/rsa_i15_oaep_decrypt.c +0 -41
- package/runtime/third_party/bearssl/src/rsa/rsa_i15_oaep_encrypt.c +0 -44
- package/runtime/third_party/bearssl/src/rsa/rsa_i15_pkcs1_sign.c +0 -37
- package/runtime/third_party/bearssl/src/rsa/rsa_i15_pkcs1_vrfy.c +0 -43
- package/runtime/third_party/bearssl/src/rsa/rsa_i15_priv.c +0 -209
- package/runtime/third_party/bearssl/src/rsa/rsa_i15_privexp.c +0 -320
- package/runtime/third_party/bearssl/src/rsa/rsa_i15_pss_sign.c +0 -40
- package/runtime/third_party/bearssl/src/rsa/rsa_i15_pss_vrfy.c +0 -44
- package/runtime/third_party/bearssl/src/rsa/rsa_i15_pub.c +0 -113
- package/runtime/third_party/bearssl/src/rsa/rsa_i15_pubexp.c +0 -152
- package/runtime/third_party/bearssl/src/rsa/rsa_i31_keygen.c +0 -37
- package/runtime/third_party/bearssl/src/rsa/rsa_i31_keygen_inner.c +0 -608
- package/runtime/third_party/bearssl/src/rsa/rsa_i31_modulus.c +0 -99
- package/runtime/third_party/bearssl/src/rsa/rsa_i31_oaep_decrypt.c +0 -41
- package/runtime/third_party/bearssl/src/rsa/rsa_i31_oaep_encrypt.c +0 -44
- package/runtime/third_party/bearssl/src/rsa/rsa_i31_pkcs1_sign.c +0 -37
- package/runtime/third_party/bearssl/src/rsa/rsa_i31_pkcs1_vrfy.c +0 -43
- package/runtime/third_party/bearssl/src/rsa/rsa_i31_priv.c +0 -203
- package/runtime/third_party/bearssl/src/rsa/rsa_i31_privexp.c +0 -318
- package/runtime/third_party/bearssl/src/rsa/rsa_i31_pss_sign.c +0 -40
- package/runtime/third_party/bearssl/src/rsa/rsa_i31_pss_vrfy.c +0 -44
- package/runtime/third_party/bearssl/src/rsa/rsa_i31_pub.c +0 -106
- package/runtime/third_party/bearssl/src/rsa/rsa_i31_pubexp.c +0 -152
- package/runtime/third_party/bearssl/src/rsa/rsa_i32_oaep_decrypt.c +0 -41
- package/runtime/third_party/bearssl/src/rsa/rsa_i32_oaep_encrypt.c +0 -44
- package/runtime/third_party/bearssl/src/rsa/rsa_i32_pkcs1_sign.c +0 -37
- package/runtime/third_party/bearssl/src/rsa/rsa_i32_pkcs1_vrfy.c +0 -43
- package/runtime/third_party/bearssl/src/rsa/rsa_i32_priv.c +0 -160
- package/runtime/third_party/bearssl/src/rsa/rsa_i32_pss_sign.c +0 -40
- package/runtime/third_party/bearssl/src/rsa/rsa_i32_pss_vrfy.c +0 -44
- package/runtime/third_party/bearssl/src/rsa/rsa_i32_pub.c +0 -77
- package/runtime/third_party/bearssl/src/rsa/rsa_i62_keygen.c +0 -57
- package/runtime/third_party/bearssl/src/rsa/rsa_i62_oaep_decrypt.c +0 -61
- package/runtime/third_party/bearssl/src/rsa/rsa_i62_oaep_encrypt.c +0 -64
- package/runtime/third_party/bearssl/src/rsa/rsa_i62_pkcs1_sign.c +0 -57
- package/runtime/third_party/bearssl/src/rsa/rsa_i62_pkcs1_vrfy.c +0 -63
- package/runtime/third_party/bearssl/src/rsa/rsa_i62_priv.c +0 -223
- package/runtime/third_party/bearssl/src/rsa/rsa_i62_pss_sign.c +0 -60
- package/runtime/third_party/bearssl/src/rsa/rsa_i62_pss_vrfy.c +0 -64
- package/runtime/third_party/bearssl/src/rsa/rsa_i62_pub.c +0 -125
- package/runtime/third_party/bearssl/src/rsa/rsa_oaep_pad.c +0 -112
- package/runtime/third_party/bearssl/src/rsa/rsa_oaep_unpad.c +0 -145
- package/runtime/third_party/bearssl/src/rsa/rsa_pkcs1_sig_pad.c +0 -100
- package/runtime/third_party/bearssl/src/rsa/rsa_pkcs1_sig_unpad.c +0 -121
- package/runtime/third_party/bearssl/src/rsa/rsa_pss_sig_pad.c +0 -106
- package/runtime/third_party/bearssl/src/rsa/rsa_pss_sig_unpad.c +0 -121
- package/runtime/third_party/bearssl/src/rsa/rsa_ssl_decrypt.c +0 -52
- package/runtime/third_party/bearssl/src/settings.c +0 -306
- package/runtime/third_party/bearssl/src/symcipher/aes_big_cbcdec.c +0 -69
- package/runtime/third_party/bearssl/src/symcipher/aes_big_cbcenc.c +0 -67
- package/runtime/third_party/bearssl/src/symcipher/aes_big_ctr.c +0 -84
- package/runtime/third_party/bearssl/src/symcipher/aes_big_ctrcbc.c +0 -142
- package/runtime/third_party/bearssl/src/symcipher/aes_big_dec.c +0 -254
- package/runtime/third_party/bearssl/src/symcipher/aes_big_enc.c +0 -157
- package/runtime/third_party/bearssl/src/symcipher/aes_common.c +0 -112
- package/runtime/third_party/bearssl/src/symcipher/aes_ct.c +0 -328
- package/runtime/third_party/bearssl/src/symcipher/aes_ct64.c +0 -398
- package/runtime/third_party/bearssl/src/symcipher/aes_ct64_cbcdec.c +0 -104
- package/runtime/third_party/bearssl/src/symcipher/aes_ct64_cbcenc.c +0 -81
- package/runtime/third_party/bearssl/src/symcipher/aes_ct64_ctr.c +0 -114
- package/runtime/third_party/bearssl/src/symcipher/aes_ct64_ctrcbc.c +0 -433
- package/runtime/third_party/bearssl/src/symcipher/aes_ct64_dec.c +0 -159
- package/runtime/third_party/bearssl/src/symcipher/aes_ct64_enc.c +0 -115
- package/runtime/third_party/bearssl/src/symcipher/aes_ct_cbcdec.c +0 -111
- package/runtime/third_party/bearssl/src/symcipher/aes_ct_cbcenc.c +0 -91
- package/runtime/third_party/bearssl/src/symcipher/aes_ct_ctr.c +0 -116
- package/runtime/third_party/bearssl/src/symcipher/aes_ct_ctrcbc.c +0 -422
- package/runtime/third_party/bearssl/src/symcipher/aes_ct_dec.c +0 -170
- package/runtime/third_party/bearssl/src/symcipher/aes_ct_enc.c +0 -112
- package/runtime/third_party/bearssl/src/symcipher/aes_pwr8.c +0 -445
- package/runtime/third_party/bearssl/src/symcipher/aes_pwr8_cbcdec.c +0 -670
- package/runtime/third_party/bearssl/src/symcipher/aes_pwr8_cbcenc.c +0 -417
- package/runtime/third_party/bearssl/src/symcipher/aes_pwr8_ctr.c +0 -717
- package/runtime/third_party/bearssl/src/symcipher/aes_pwr8_ctrcbc.c +0 -946
- package/runtime/third_party/bearssl/src/symcipher/aes_small_cbcdec.c +0 -69
- package/runtime/third_party/bearssl/src/symcipher/aes_small_cbcenc.c +0 -67
- package/runtime/third_party/bearssl/src/symcipher/aes_small_ctr.c +0 -84
- package/runtime/third_party/bearssl/src/symcipher/aes_small_ctrcbc.c +0 -142
- package/runtime/third_party/bearssl/src/symcipher/aes_small_dec.c +0 -176
- package/runtime/third_party/bearssl/src/symcipher/aes_small_enc.c +0 -129
- package/runtime/third_party/bearssl/src/symcipher/aes_x86ni.c +0 -240
- package/runtime/third_party/bearssl/src/symcipher/aes_x86ni_cbcdec.c +0 -223
- package/runtime/third_party/bearssl/src/symcipher/aes_x86ni_cbcenc.c +0 -122
- package/runtime/third_party/bearssl/src/symcipher/aes_x86ni_ctr.c +0 -211
- package/runtime/third_party/bearssl/src/symcipher/aes_x86ni_ctrcbc.c +0 -596
- package/runtime/third_party/bearssl/src/symcipher/chacha20_ct.c +0 -106
- package/runtime/third_party/bearssl/src/symcipher/chacha20_sse2.c +0 -237
- package/runtime/third_party/bearssl/src/symcipher/des_ct.c +0 -411
- package/runtime/third_party/bearssl/src/symcipher/des_ct_cbcdec.c +0 -87
- package/runtime/third_party/bearssl/src/symcipher/des_ct_cbcenc.c +0 -69
- package/runtime/third_party/bearssl/src/symcipher/des_support.c +0 -166
- package/runtime/third_party/bearssl/src/symcipher/des_tab.c +0 -310
- package/runtime/third_party/bearssl/src/symcipher/des_tab_cbcdec.c +0 -85
- package/runtime/third_party/bearssl/src/symcipher/des_tab_cbcenc.c +0 -67
- package/runtime/third_party/bearssl/src/symcipher/poly1305_ctmul.c +0 -260
- package/runtime/third_party/bearssl/src/symcipher/poly1305_ctmul32.c +0 -297
- package/runtime/third_party/bearssl/src/symcipher/poly1305_ctmulq.c +0 -475
- package/runtime/third_party/bearssl/src/symcipher/poly1305_i15.c +0 -221
- package/runtime/third_party/bearssl/src/x509/asn1.t0 +0 -757
- package/runtime/third_party/bearssl/src/x509/asn1enc.c +0 -93
- package/runtime/third_party/bearssl/src/x509/encode_ec_pk8der.c +0 -110
- package/runtime/third_party/bearssl/src/x509/encode_ec_rawder.c +0 -161
- package/runtime/third_party/bearssl/src/x509/encode_rsa_pk8der.c +0 -97
- package/runtime/third_party/bearssl/src/x509/encode_rsa_rawder.c +0 -96
- package/runtime/third_party/bearssl/src/x509/skey_decoder.c +0 -653
- package/runtime/third_party/bearssl/src/x509/skey_decoder.t0 +0 -376
- package/runtime/third_party/bearssl/src/x509/x509_decoder.c +0 -776
- package/runtime/third_party/bearssl/src/x509/x509_decoder.t0 +0 -324
- package/runtime/third_party/bearssl/src/x509/x509_knownkey.c +0 -105
- package/runtime/third_party/bearssl/src/x509/x509_minimal.c +0 -1722
- package/runtime/third_party/bearssl/src/x509/x509_minimal.t0 +0 -1526
- package/runtime/third_party/bearssl/src/x509/x509_minimal_full.c +0 -59
|
@@ -0,0 +1,752 @@
|
|
|
1
|
+
// Copyright 2001-2016 The OpenSSL Project Authors. All Rights Reserved.
|
|
2
|
+
// Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
|
|
3
|
+
//
|
|
4
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
// you may not use this file except in compliance with the License.
|
|
6
|
+
// You may obtain a copy of the License at
|
|
7
|
+
//
|
|
8
|
+
// https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
//
|
|
10
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
// See the License for the specific language governing permissions and
|
|
14
|
+
// limitations under the License.
|
|
15
|
+
|
|
16
|
+
#ifndef OPENSSL_HEADER_CRYPTO_FIPSMODULE_EC_INTERNAL_H
|
|
17
|
+
#define OPENSSL_HEADER_CRYPTO_FIPSMODULE_EC_INTERNAL_H
|
|
18
|
+
|
|
19
|
+
#include <openssl/base.h>
|
|
20
|
+
|
|
21
|
+
#include <assert.h>
|
|
22
|
+
|
|
23
|
+
#include <openssl/bn.h>
|
|
24
|
+
#include <openssl/ec.h>
|
|
25
|
+
#include <openssl/ex_data.h>
|
|
26
|
+
|
|
27
|
+
#include "../../mem_internal.h"
|
|
28
|
+
#include "../bn/internal.h"
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
DECLARE_OPAQUE_STRUCT(ec_key_st, ECKey)
|
|
32
|
+
|
|
33
|
+
BSSL_NAMESPACE_BEGIN
|
|
34
|
+
|
|
35
|
+
// EC internals.
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
// Cap the size of all field elements and scalars, including custom curves, to
|
|
39
|
+
// 66 bytes, large enough to fit secp521r1 and brainpoolP512r1, which appear to
|
|
40
|
+
// be the largest fields anyone plausibly uses.
|
|
41
|
+
#define EC_MAX_BYTES 66
|
|
42
|
+
#define EC_MAX_WORDS ((EC_MAX_BYTES + BN_BYTES - 1) / BN_BYTES)
|
|
43
|
+
#define EC_MAX_COMPRESSED (EC_MAX_BYTES + 1)
|
|
44
|
+
#define EC_MAX_UNCOMPRESSED (2 * EC_MAX_BYTES + 1)
|
|
45
|
+
|
|
46
|
+
static_assert(EC_MAX_WORDS <= BN_SMALL_MAX_WORDS,
|
|
47
|
+
"bn_*_small functions not usable");
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
// Scalars.
|
|
51
|
+
|
|
52
|
+
// An EC_SCALAR is an integer fully reduced modulo the order. Only the first
|
|
53
|
+
// `order->width` words are used. An `EC_SCALAR` is specific to an `EC_GROUP`
|
|
54
|
+
// and must not be mixed between groups.
|
|
55
|
+
typedef struct {
|
|
56
|
+
BN_ULONG words[EC_MAX_WORDS];
|
|
57
|
+
} EC_SCALAR;
|
|
58
|
+
|
|
59
|
+
// ec_bignum_to_scalar converts `in` to an `EC_SCALAR` and writes it to
|
|
60
|
+
// `*out`. It returns one on success and zero if `in` is out of range.
|
|
61
|
+
int ec_bignum_to_scalar(const EC_GROUP *group, EC_SCALAR *out,
|
|
62
|
+
const BIGNUM *in);
|
|
63
|
+
|
|
64
|
+
// ec_scalar_to_bytes serializes `in` as a big-endian bytestring to `out` and
|
|
65
|
+
// sets `*out_len` to the number of bytes written. The number of bytes written
|
|
66
|
+
// is `BN_num_bytes(&group->order)`, which is at most `EC_MAX_BYTES`.
|
|
67
|
+
void ec_scalar_to_bytes(const EC_GROUP *group, uint8_t *out, size_t *out_len,
|
|
68
|
+
const EC_SCALAR *in);
|
|
69
|
+
|
|
70
|
+
// ec_scalar_from_bytes deserializes `in` and stores the resulting scalar over
|
|
71
|
+
// group `group` to `out`. It returns one on success and zero if `in` is
|
|
72
|
+
// invalid.
|
|
73
|
+
int ec_scalar_from_bytes(const EC_GROUP *group, EC_SCALAR *out,
|
|
74
|
+
const uint8_t *in, size_t len);
|
|
75
|
+
|
|
76
|
+
// ec_scalar_reduce sets `out` to `words`, reduced modulo the group order.
|
|
77
|
+
// `words` must be less than order². `num` must be at most twice the width of
|
|
78
|
+
// group order. This function treats `words` as secret.
|
|
79
|
+
void ec_scalar_reduce(const EC_GROUP *group, EC_SCALAR *out,
|
|
80
|
+
const BN_ULONG *words, size_t num);
|
|
81
|
+
|
|
82
|
+
// ec_random_nonzero_scalar sets `out` to a uniformly selected random value from
|
|
83
|
+
// zero to `group->order` - 1. It returns one on success and zero on error.
|
|
84
|
+
int ec_random_scalar(const EC_GROUP *group, EC_SCALAR *out,
|
|
85
|
+
const uint8_t additional_data[32]);
|
|
86
|
+
|
|
87
|
+
// ec_random_nonzero_scalar sets `out` to a uniformly selected random value from
|
|
88
|
+
// 1 to `group->order` - 1. It returns one on success and zero on error.
|
|
89
|
+
int ec_random_nonzero_scalar(const EC_GROUP *group, EC_SCALAR *out,
|
|
90
|
+
const uint8_t additional_data[32]);
|
|
91
|
+
|
|
92
|
+
// ec_scalar_equal_vartime returns one if `a` and `b` are equal and zero
|
|
93
|
+
// otherwise. Both values are treated as public.
|
|
94
|
+
int ec_scalar_equal_vartime(const EC_GROUP *group, const EC_SCALAR *a,
|
|
95
|
+
const EC_SCALAR *b);
|
|
96
|
+
|
|
97
|
+
// ec_scalar_is_zero returns one if `a` is zero and zero otherwise.
|
|
98
|
+
int ec_scalar_is_zero(const EC_GROUP *group, const EC_SCALAR *a);
|
|
99
|
+
|
|
100
|
+
// ec_scalar_add sets `r` to `a` + `b`.
|
|
101
|
+
void ec_scalar_add(const EC_GROUP *group, EC_SCALAR *r, const EC_SCALAR *a,
|
|
102
|
+
const EC_SCALAR *b);
|
|
103
|
+
|
|
104
|
+
// ec_scalar_sub sets `r` to `a` - `b`.
|
|
105
|
+
void ec_scalar_sub(const EC_GROUP *group, EC_SCALAR *r, const EC_SCALAR *a,
|
|
106
|
+
const EC_SCALAR *b);
|
|
107
|
+
|
|
108
|
+
// ec_scalar_neg sets `r` to -`a`.
|
|
109
|
+
void ec_scalar_neg(const EC_GROUP *group, EC_SCALAR *r, const EC_SCALAR *a);
|
|
110
|
+
|
|
111
|
+
// ec_scalar_to_montgomery sets `r` to `a` in Montgomery form.
|
|
112
|
+
void ec_scalar_to_montgomery(const EC_GROUP *group, EC_SCALAR *r,
|
|
113
|
+
const EC_SCALAR *a);
|
|
114
|
+
|
|
115
|
+
// ec_scalar_to_montgomery sets `r` to `a` converted from Montgomery form.
|
|
116
|
+
void ec_scalar_from_montgomery(const EC_GROUP *group, EC_SCALAR *r,
|
|
117
|
+
const EC_SCALAR *a);
|
|
118
|
+
|
|
119
|
+
// ec_scalar_mul_montgomery sets `r` to `a` * `b` where inputs and outputs are
|
|
120
|
+
// in Montgomery form.
|
|
121
|
+
void ec_scalar_mul_montgomery(const EC_GROUP *group, EC_SCALAR *r,
|
|
122
|
+
const EC_SCALAR *a, const EC_SCALAR *b);
|
|
123
|
+
|
|
124
|
+
// ec_scalar_inv0_montgomery sets `r` to `a`^-1 where inputs and outputs are in
|
|
125
|
+
// Montgomery form. If `a` is zero, `r` is set to zero.
|
|
126
|
+
void ec_scalar_inv0_montgomery(const EC_GROUP *group, EC_SCALAR *r,
|
|
127
|
+
const EC_SCALAR *a);
|
|
128
|
+
|
|
129
|
+
// ec_scalar_to_montgomery_inv_vartime sets `r` to `a`^-1 R. That is, it takes
|
|
130
|
+
// in `a` not in Montgomery form and computes the inverse in Montgomery form. It
|
|
131
|
+
// returns one on success and zero if `a` has no inverse. This function assumes
|
|
132
|
+
// `a` is public and may leak information about it via timing.
|
|
133
|
+
//
|
|
134
|
+
// Note this is not the same operation as `ec_scalar_inv0_montgomery`.
|
|
135
|
+
int ec_scalar_to_montgomery_inv_vartime(const EC_GROUP *group, EC_SCALAR *r,
|
|
136
|
+
const EC_SCALAR *a);
|
|
137
|
+
|
|
138
|
+
// ec_scalar_select, in constant time, sets `out` to `a` if `mask` is all ones
|
|
139
|
+
// and `b` if `mask` is all zeros.
|
|
140
|
+
void ec_scalar_select(const EC_GROUP *group, EC_SCALAR *out, BN_ULONG mask,
|
|
141
|
+
const EC_SCALAR *a, const EC_SCALAR *b);
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
// Field elements.
|
|
145
|
+
|
|
146
|
+
// An EC_FELEM represents a field element. Only the first `field->width` words
|
|
147
|
+
// are used. An `EC_FELEM` is specific to an `EC_GROUP` and must not be mixed
|
|
148
|
+
// between groups. Unless otherwise stated, all inputs and outputs are in
|
|
149
|
+
// Montgomery form.
|
|
150
|
+
typedef struct {
|
|
151
|
+
BN_ULONG words[EC_MAX_WORDS];
|
|
152
|
+
} EC_FELEM;
|
|
153
|
+
|
|
154
|
+
// ec_felem_one returns one in `group`'s field.
|
|
155
|
+
const EC_FELEM *ec_felem_one(const EC_GROUP *group);
|
|
156
|
+
|
|
157
|
+
// ec_bignum_to_felem converts `in` to an `EC_FELEM`. It returns one on success
|
|
158
|
+
// and zero if `in` is out of range.
|
|
159
|
+
int ec_bignum_to_felem(const EC_GROUP *group, EC_FELEM *out, const BIGNUM *in);
|
|
160
|
+
|
|
161
|
+
// ec_felem_to_bignum converts `in` to a `BIGNUM`. It returns one on success and
|
|
162
|
+
// zero on allocation failure.
|
|
163
|
+
int ec_felem_to_bignum(const EC_GROUP *group, BIGNUM *out, const EC_FELEM *in);
|
|
164
|
+
|
|
165
|
+
// ec_felem_to_bytes serializes `in` as a big-endian bytestring to `out` and
|
|
166
|
+
// sets `*out_len` to the number of bytes written. The number of bytes written
|
|
167
|
+
// is `BN_num_bytes(&group->order)`, which is at most `EC_MAX_BYTES`.
|
|
168
|
+
void ec_felem_to_bytes(const EC_GROUP *group, uint8_t *out, size_t *out_len,
|
|
169
|
+
const EC_FELEM *in);
|
|
170
|
+
|
|
171
|
+
// ec_felem_from_bytes deserializes `in` as a big-endian field element and
|
|
172
|
+
// stores the result to `out`. It returns one on success and zero if `in` is
|
|
173
|
+
// invalid.
|
|
174
|
+
int ec_felem_from_bytes(const EC_GROUP *group, EC_FELEM *out, const uint8_t *in,
|
|
175
|
+
size_t len);
|
|
176
|
+
|
|
177
|
+
// ec_felem_from_bytes_or_placeholder deserializes `in` as a big-endian field
|
|
178
|
+
// element. On success, it stores the resulting field element to `out` and
|
|
179
|
+
// returns `CONSTTIME_TRUE_W`. If `in` is out of range, it sets `out` to an
|
|
180
|
+
// arbitrary field element and returns `CONSTTIME_FALSE_W`. Both `in`, and
|
|
181
|
+
// whether it was in range, are treated as secret. `len` must be equal to
|
|
182
|
+
// `BN_num_words(field)` or the function will abort.
|
|
183
|
+
crypto_word_t ec_felem_from_bytes_or_placeholder(const EC_GROUP *group,
|
|
184
|
+
EC_FELEM *out,
|
|
185
|
+
const uint8_t *in, size_t len);
|
|
186
|
+
|
|
187
|
+
// ec_felem_neg sets `out` to -`a`.
|
|
188
|
+
void ec_felem_neg(const EC_GROUP *group, EC_FELEM *out, const EC_FELEM *a);
|
|
189
|
+
|
|
190
|
+
// ec_felem_add sets `out` to `a` + `b`.
|
|
191
|
+
void ec_felem_add(const EC_GROUP *group, EC_FELEM *out, const EC_FELEM *a,
|
|
192
|
+
const EC_FELEM *b);
|
|
193
|
+
|
|
194
|
+
// ec_felem_add sets `out` to `a` - `b`.
|
|
195
|
+
void ec_felem_sub(const EC_GROUP *group, EC_FELEM *out, const EC_FELEM *a,
|
|
196
|
+
const EC_FELEM *b);
|
|
197
|
+
|
|
198
|
+
// ec_felem_non_zero_mask returns all ones if `a` is non-zero and all zeros
|
|
199
|
+
// otherwise.
|
|
200
|
+
BN_ULONG ec_felem_non_zero_mask(const EC_GROUP *group, const EC_FELEM *a);
|
|
201
|
+
|
|
202
|
+
// ec_felem_select, in constant time, sets `out` to `a` if `mask` is all ones
|
|
203
|
+
// and `b` if `mask` is all zeros.
|
|
204
|
+
void ec_felem_select(const EC_GROUP *group, EC_FELEM *out, BN_ULONG mask,
|
|
205
|
+
const EC_FELEM *a, const EC_FELEM *b);
|
|
206
|
+
|
|
207
|
+
// ec_felem_equal returns one if `a` and `b` are equal and zero otherwise.
|
|
208
|
+
int ec_felem_equal(const EC_GROUP *group, const EC_FELEM *a, const EC_FELEM *b);
|
|
209
|
+
|
|
210
|
+
// ec_felem_mul sets `out` to `a` * `b`.
|
|
211
|
+
void ec_felem_mul(const EC_GROUP *group, EC_FELEM *out, const EC_FELEM *a,
|
|
212
|
+
const EC_FELEM *b);
|
|
213
|
+
|
|
214
|
+
// ec_felem_sqr sets `out` to `a`².
|
|
215
|
+
void ec_felem_sqr(const EC_GROUP *group, EC_FELEM *out, const EC_FELEM *a);
|
|
216
|
+
|
|
217
|
+
// ec_felem_to_montgomery sets `out` to `a` converted to Montgomery form.
|
|
218
|
+
void ec_felem_to_montgomery(const EC_GROUP *group, EC_FELEM *out,
|
|
219
|
+
const EC_FELEM *a);
|
|
220
|
+
|
|
221
|
+
// ec_felem_from_montgomery sets `out` to `a` converted from Montgomery form.
|
|
222
|
+
void ec_felem_from_montgomery(const EC_GROUP *group, EC_FELEM *out,
|
|
223
|
+
const EC_FELEM *a);
|
|
224
|
+
|
|
225
|
+
// ec_felem_reduce sets `out` to `words`, reduced modulo the field size, p.
|
|
226
|
+
// `words` must be less than p². `num` must be at most twice the width of p.
|
|
227
|
+
// This function treats `words` as secret.
|
|
228
|
+
void ec_felem_reduce(const EC_GROUP *group, EC_FELEM *out,
|
|
229
|
+
const BN_ULONG *words, size_t num);
|
|
230
|
+
|
|
231
|
+
// ec_felem_exp sets `out` to `a`^`exp`. It treats `a` is secret but `exp` as
|
|
232
|
+
// public.
|
|
233
|
+
//
|
|
234
|
+
// TODO(crbug.com/42290435): hash-to-curve uses this as part of computing a
|
|
235
|
+
// square root, which is what compressed coordinates ultimately needs to avoid
|
|
236
|
+
// `BIGNUM`. Can we unify this a bit? By generalizing to arbitrary
|
|
237
|
+
// exponentiation, we also miss an opportunity to use a specialized addition
|
|
238
|
+
// chain. We also miss our specialized field arithmetic for P-256.
|
|
239
|
+
void ec_felem_exp(const EC_GROUP *group, EC_FELEM *out, const EC_FELEM *a,
|
|
240
|
+
const BN_ULONG *exp, size_t num_exp);
|
|
241
|
+
|
|
242
|
+
// ec_felem_sqrt sets `out` to the square root of `a` whose least significant
|
|
243
|
+
// bit is `y_bit`. It returns one on success and zero on error or if `a` is not
|
|
244
|
+
// a square.
|
|
245
|
+
int ec_felem_sqrt(const EC_GROUP *group, EC_FELEM *out, const EC_FELEM *a,
|
|
246
|
+
crypto_word_t y_bit);
|
|
247
|
+
|
|
248
|
+
// ec_felem_sqrt_secret sets `out` to the square root of `a` whose least
|
|
249
|
+
// significant bit is `y_bit`. It returns `CONSTTIME_TRUE_W` on success and
|
|
250
|
+
// `CONSTTIME_FALSE_W` if `a` is not a square.
|
|
251
|
+
//
|
|
252
|
+
// This function treats `a`, `y_bit`, and whether `a` is a square, as secret. If
|
|
253
|
+
// `a` is not a square, `out` will be set to some arbitrary field element. This
|
|
254
|
+
// function is only implemented for curves whose field is 3 mod 4. (In
|
|
255
|
+
// particular, it is *not* implemented for P-224.) It aborts on invalid group.
|
|
256
|
+
crypto_word_t ec_felem_sqrt_secret(const EC_GROUP *group, EC_FELEM *out,
|
|
257
|
+
const EC_FELEM *a, crypto_word_t y_bit);
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
// Points.
|
|
261
|
+
//
|
|
262
|
+
// Points may represented in affine coordinates as `EC_AFFINE` or Jacobian
|
|
263
|
+
// coordinates as `EC_JACOBIAN`. Affine coordinates directly represent a
|
|
264
|
+
// point on the curve, but point addition over affine coordinates requires
|
|
265
|
+
// costly field inversions, so arithmetic is done in Jacobian coordinates.
|
|
266
|
+
// Converting from affine to Jacobian is cheap, while converting from Jacobian
|
|
267
|
+
// to affine costs a field inversion. (Jacobian coordinates amortize the field
|
|
268
|
+
// inversions needed in a sequence of point operations.)
|
|
269
|
+
|
|
270
|
+
// An EC_JACOBIAN represents an elliptic curve point in Jacobian coordinates.
|
|
271
|
+
// Unlike `EC_POINT`, it is a plain struct which can be stack-allocated and
|
|
272
|
+
// needs no cleanup. It is specific to an `EC_GROUP` and must not be mixed
|
|
273
|
+
// between groups.
|
|
274
|
+
typedef struct {
|
|
275
|
+
// X, Y, and Z are Jacobian projective coordinates. They represent
|
|
276
|
+
// (X/Z^2, Y/Z^3) if Z != 0 and the point at infinity otherwise.
|
|
277
|
+
EC_FELEM X, Y, Z;
|
|
278
|
+
} EC_JACOBIAN;
|
|
279
|
+
|
|
280
|
+
// An EC_AFFINE represents an elliptic curve point in affine coordinates.
|
|
281
|
+
// coordinates. Note the point at infinity cannot be represented in affine
|
|
282
|
+
// coordinates.
|
|
283
|
+
typedef struct {
|
|
284
|
+
EC_FELEM X, Y;
|
|
285
|
+
} EC_AFFINE;
|
|
286
|
+
|
|
287
|
+
// ec_affine_to_jacobian converts `p` to Jacobian form and writes the result to
|
|
288
|
+
// `*out`. This operation is very cheap and only costs a few copies.
|
|
289
|
+
void ec_affine_to_jacobian(const EC_GROUP *group, EC_JACOBIAN *out,
|
|
290
|
+
const EC_AFFINE *p);
|
|
291
|
+
|
|
292
|
+
// ec_jacobian_to_affine converts `p` to affine form and writes the result to
|
|
293
|
+
// `*out`. It returns one on success and zero if `p` was the point at infinity.
|
|
294
|
+
// This operation performs a field inversion and should only be done once per
|
|
295
|
+
// point.
|
|
296
|
+
//
|
|
297
|
+
// If only extracting the x-coordinate, use `ec_get_x_coordinate_*` which is
|
|
298
|
+
// slightly faster.
|
|
299
|
+
int ec_jacobian_to_affine(const EC_GROUP *group, EC_AFFINE *out,
|
|
300
|
+
const EC_JACOBIAN *p);
|
|
301
|
+
|
|
302
|
+
// ec_jacobian_to_affine_batch converts `num` points in `in` from Jacobian
|
|
303
|
+
// coordinates to affine coordinates and writes the results to `out`. It returns
|
|
304
|
+
// one on success and zero if any of the input points were infinity.
|
|
305
|
+
//
|
|
306
|
+
// This function is not implemented for all curves. Add implementations as
|
|
307
|
+
// needed.
|
|
308
|
+
int ec_jacobian_to_affine_batch(const EC_GROUP *group, EC_AFFINE *out,
|
|
309
|
+
const EC_JACOBIAN *in, size_t num);
|
|
310
|
+
|
|
311
|
+
// ec_y_sqr_from_x sets `out` to `x^3 + ax + b`, the expected value of y^2.
|
|
312
|
+
void ec_y_sqr_from_x(const EC_GROUP *group, EC_FELEM *out, const EC_FELEM *x);
|
|
313
|
+
|
|
314
|
+
// ec_point_set_affine_coordinates sets `out` to a point with affine coordinates
|
|
315
|
+
// `x` and `y`. It returns one if the point is on the curve and zero otherwise.
|
|
316
|
+
// If the point is not on the curve, the value of `out` is undefined.
|
|
317
|
+
int ec_point_set_affine_coordinates(const EC_GROUP *group, EC_AFFINE *out,
|
|
318
|
+
const EC_FELEM *x, const EC_FELEM *y);
|
|
319
|
+
|
|
320
|
+
// ec_point_set_compressed_coordinates sets `out` to a point with compressed
|
|
321
|
+
// coordinates `x` and `y_bit`. It returns one if the point is on the curve and
|
|
322
|
+
// zero otherwise. If the point is not on the curve, the value of `out` is
|
|
323
|
+
// undefined.
|
|
324
|
+
int ec_point_set_compressed_coordinates(const EC_GROUP *group, EC_AFFINE *out,
|
|
325
|
+
const EC_FELEM *x, crypto_word_t y_bit);
|
|
326
|
+
|
|
327
|
+
// ec_point_mul_no_self_test does the same as `EC_POINT_mul`, but doesn't try to
|
|
328
|
+
// run the self-test first. This is for use in the self tests themselves, to
|
|
329
|
+
// prevent an infinite loop.
|
|
330
|
+
int ec_point_mul_no_self_test(const EC_GROUP *group, EC_POINT *r,
|
|
331
|
+
const BIGNUM *g_scalar, const EC_POINT *p,
|
|
332
|
+
const BIGNUM *p_scalar, BN_CTX *ctx);
|
|
333
|
+
|
|
334
|
+
// ec_point_mul_scalar sets `r` to `p` * `scalar`. Both inputs are considered
|
|
335
|
+
// secret.
|
|
336
|
+
int ec_point_mul_scalar(const EC_GROUP *group, EC_JACOBIAN *r,
|
|
337
|
+
const EC_JACOBIAN *p, const EC_SCALAR *scalar);
|
|
338
|
+
|
|
339
|
+
// ec_point_mul_scalar_base sets `r` to generator * `scalar`. `scalar` is
|
|
340
|
+
// treated as secret.
|
|
341
|
+
int ec_point_mul_scalar_base(const EC_GROUP *group, EC_JACOBIAN *r,
|
|
342
|
+
const EC_SCALAR *scalar);
|
|
343
|
+
|
|
344
|
+
// ec_point_mul_scalar_batch sets `r` to `p0` * `scalar0` + `p1` * `scalar1` +
|
|
345
|
+
// `p2` * `scalar2`. `p2` may be NULL to skip that term.
|
|
346
|
+
//
|
|
347
|
+
// The inputs are treated as secret, however, this function leaks information
|
|
348
|
+
// about whether intermediate computations add a point to itself. Callers must
|
|
349
|
+
// ensure that discrete logs between `p0`, `p1`, and `p2` are uniformly
|
|
350
|
+
// distributed and independent of the scalars, which should be uniformly
|
|
351
|
+
// selected and not under the attackers control. This ensures the doubling case
|
|
352
|
+
// will occur with negligible probability.
|
|
353
|
+
//
|
|
354
|
+
// This function is not implemented for all curves. Add implementations as
|
|
355
|
+
// needed.
|
|
356
|
+
//
|
|
357
|
+
// TODO(davidben): This function does not use base point tables. For now, it is
|
|
358
|
+
// only used with the generic `EC_GFp_mont_method` implementation which has
|
|
359
|
+
// none. If generalizing to tuned curves, this may be useful. However, we still
|
|
360
|
+
// must double up to the least efficient input, so precomputed tables can only
|
|
361
|
+
// save table setup and allow a wider window size.
|
|
362
|
+
int ec_point_mul_scalar_batch(const EC_GROUP *group, EC_JACOBIAN *r,
|
|
363
|
+
const EC_JACOBIAN *p0, const EC_SCALAR *scalar0,
|
|
364
|
+
const EC_JACOBIAN *p1, const EC_SCALAR *scalar1,
|
|
365
|
+
const EC_JACOBIAN *p2, const EC_SCALAR *scalar2);
|
|
366
|
+
|
|
367
|
+
#define EC_MONT_PRECOMP_COMB_SIZE 5
|
|
368
|
+
|
|
369
|
+
// An `EC_PRECOMP` stores precomputed information about a point, to optimize
|
|
370
|
+
// repeated multiplications involving it. It is a union so different
|
|
371
|
+
// `EC_METHOD`s can store different information in it.
|
|
372
|
+
typedef union {
|
|
373
|
+
EC_AFFINE comb[(1 << EC_MONT_PRECOMP_COMB_SIZE) - 1];
|
|
374
|
+
} EC_PRECOMP;
|
|
375
|
+
|
|
376
|
+
// ec_init_precomp precomputes multiples of `p` and writes the result to `out`.
|
|
377
|
+
// It returns one on success and zero on error. The resulting table may be used
|
|
378
|
+
// with `ec_point_mul_scalar_precomp`. This function will fail if `p` is the
|
|
379
|
+
// point at infinity.
|
|
380
|
+
//
|
|
381
|
+
// This function is not implemented for all curves. Add implementations as
|
|
382
|
+
// needed.
|
|
383
|
+
int ec_init_precomp(const EC_GROUP *group, EC_PRECOMP *out,
|
|
384
|
+
const EC_JACOBIAN *p);
|
|
385
|
+
|
|
386
|
+
// ec_point_mul_scalar_precomp sets `r` to `p0` * `scalar0` + `p1` * `scalar1` +
|
|
387
|
+
// `p2` * `scalar2`. `p1` or `p2` may be NULL to skip the corresponding term.
|
|
388
|
+
// The points are represented as `EC_PRECOMP` and must be initialized with
|
|
389
|
+
// `ec_init_precomp`. This function runs faster than `ec_point_mul_scalar_batch`
|
|
390
|
+
// but requires setup work per input point, so it is only appropriate for points
|
|
391
|
+
// which are used frequently.
|
|
392
|
+
//
|
|
393
|
+
// The inputs are treated as secret, however, this function leaks information
|
|
394
|
+
// about whether intermediate computations add a point to itself. Callers must
|
|
395
|
+
// ensure that discrete logs between `p0`, `p1`, and `p2` are uniformly
|
|
396
|
+
// distributed and independent of the scalars, which should be uniformly
|
|
397
|
+
// selected and not under the attackers control. This ensures the doubling case
|
|
398
|
+
// will occur with negligible probability.
|
|
399
|
+
//
|
|
400
|
+
// This function is not implemented for all curves. Add implementations as
|
|
401
|
+
// needed.
|
|
402
|
+
//
|
|
403
|
+
// TODO(davidben): This function does not use base point tables. For now, it is
|
|
404
|
+
// only used with the generic `EC_GFp_mont_method` implementation which has
|
|
405
|
+
// none. If generalizing to tuned curves, we should add a parameter for the base
|
|
406
|
+
// point and arrange for the generic implementation to have base point tables
|
|
407
|
+
// available.
|
|
408
|
+
int ec_point_mul_scalar_precomp(const EC_GROUP *group, EC_JACOBIAN *r,
|
|
409
|
+
const EC_PRECOMP *p0, const EC_SCALAR *scalar0,
|
|
410
|
+
const EC_PRECOMP *p1, const EC_SCALAR *scalar1,
|
|
411
|
+
const EC_PRECOMP *p2, const EC_SCALAR *scalar2);
|
|
412
|
+
|
|
413
|
+
// ec_point_mul_scalar_public sets `r` to
|
|
414
|
+
// generator * `g_scalar` + `p` * `p_scalar`. It assumes that the inputs are
|
|
415
|
+
// public so there is no concern about leaking their values through timing.
|
|
416
|
+
int ec_point_mul_scalar_public(const EC_GROUP *group, EC_JACOBIAN *r,
|
|
417
|
+
const EC_SCALAR *g_scalar, const EC_JACOBIAN *p,
|
|
418
|
+
const EC_SCALAR *p_scalar);
|
|
419
|
+
|
|
420
|
+
// ec_point_mul_scalar_public_batch sets `r` to the sum of generator *
|
|
421
|
+
// `g_scalar` and `points[i]` * `scalars[i]` where `points` and `scalars` have
|
|
422
|
+
// `num` elements. It assumes that the inputs are public so there is no concern
|
|
423
|
+
// about leaking their values through timing. `g_scalar` may be NULL to skip
|
|
424
|
+
// that term.
|
|
425
|
+
//
|
|
426
|
+
// This function is not implemented for all curves. Add implementations as
|
|
427
|
+
// needed.
|
|
428
|
+
int ec_point_mul_scalar_public_batch(const EC_GROUP *group, EC_JACOBIAN *r,
|
|
429
|
+
const EC_SCALAR *g_scalar,
|
|
430
|
+
const EC_JACOBIAN *points,
|
|
431
|
+
const EC_SCALAR *scalars, size_t num);
|
|
432
|
+
|
|
433
|
+
// ec_point_select, in constant time, sets `out` to `a` if `mask` is all ones
|
|
434
|
+
// and `b` if `mask` is all zeros.
|
|
435
|
+
void ec_point_select(const EC_GROUP *group, EC_JACOBIAN *out, BN_ULONG mask,
|
|
436
|
+
const EC_JACOBIAN *a, const EC_JACOBIAN *b);
|
|
437
|
+
|
|
438
|
+
// ec_affine_select behaves like `ec_point_select` but acts on affine points.
|
|
439
|
+
void ec_affine_select(const EC_GROUP *group, EC_AFFINE *out, BN_ULONG mask,
|
|
440
|
+
const EC_AFFINE *a, const EC_AFFINE *b);
|
|
441
|
+
|
|
442
|
+
// ec_precomp_select behaves like `ec_point_select` but acts on `EC_PRECOMP`.
|
|
443
|
+
void ec_precomp_select(const EC_GROUP *group, EC_PRECOMP *out, BN_ULONG mask,
|
|
444
|
+
const EC_PRECOMP *a, const EC_PRECOMP *b);
|
|
445
|
+
|
|
446
|
+
// ec_cmp_x_coordinate compares the x (affine) coordinate of `p`, mod the group
|
|
447
|
+
// order, with `r`. It returns one if the values match and zero if `p` is the
|
|
448
|
+
// point at infinity of the values do not match. `p` is treated as public.
|
|
449
|
+
int ec_cmp_x_coordinate(const EC_GROUP *group, const EC_JACOBIAN *p,
|
|
450
|
+
const EC_SCALAR *r);
|
|
451
|
+
|
|
452
|
+
// ec_get_x_coordinate_as_scalar sets `*out` to `p`'s x-coordinate, modulo
|
|
453
|
+
// `group->order`. It returns one on success and zero if `p` is the point at
|
|
454
|
+
// infinity.
|
|
455
|
+
int ec_get_x_coordinate_as_scalar(const EC_GROUP *group, EC_SCALAR *out,
|
|
456
|
+
const EC_JACOBIAN *p);
|
|
457
|
+
|
|
458
|
+
// ec_get_x_coordinate_as_bytes writes `p`'s affine x-coordinate to `out`, which
|
|
459
|
+
// must have at must `max_out` bytes. It sets `*out_len` to the number of bytes
|
|
460
|
+
// written. The value is written big-endian and zero-padded to the size of the
|
|
461
|
+
// field. This function returns one on success and zero on failure.
|
|
462
|
+
int ec_get_x_coordinate_as_bytes(const EC_GROUP *group, uint8_t *out,
|
|
463
|
+
size_t *out_len, size_t max_out,
|
|
464
|
+
const EC_JACOBIAN *p);
|
|
465
|
+
|
|
466
|
+
// ec_point_byte_len returns the number of bytes in the byte representation of
|
|
467
|
+
// a non-infinity point in `group`, encoded according to `form`, or zero if
|
|
468
|
+
// `form` is invalid.
|
|
469
|
+
size_t ec_point_byte_len(const EC_GROUP *group, point_conversion_form_t form);
|
|
470
|
+
|
|
471
|
+
// ec_point_to_bytes encodes `point` according to `form` and writes the result
|
|
472
|
+
// `buf`. It returns the size of the output on success or zero on error. At most
|
|
473
|
+
// `max_out` bytes will be written. The buffer should be at least
|
|
474
|
+
// `ec_point_byte_len` long to guarantee success.
|
|
475
|
+
size_t ec_point_to_bytes(const EC_GROUP *group, const EC_AFFINE *point,
|
|
476
|
+
point_conversion_form_t form, uint8_t *buf,
|
|
477
|
+
size_t max_out);
|
|
478
|
+
|
|
479
|
+
// ec_point_from_uncompressed parses `in` as a point in uncompressed form and
|
|
480
|
+
// sets `out` to the result. It returns one on success and zero if the input was
|
|
481
|
+
// invalid.
|
|
482
|
+
int ec_point_from_uncompressed(const EC_GROUP *group, EC_AFFINE *out,
|
|
483
|
+
const uint8_t *in, size_t len);
|
|
484
|
+
|
|
485
|
+
// ec_point_from_compressed parses `in` as a point in compressed form and sets
|
|
486
|
+
// `out` to the result`. It returns one on success and zero if the input was
|
|
487
|
+
// invalid.
|
|
488
|
+
int ec_point_from_compressed(const EC_GROUP *group, EC_AFFINE *out,
|
|
489
|
+
const uint8_t *in, size_t len);
|
|
490
|
+
|
|
491
|
+
// ec_set_to_safe_point sets `out` to an arbitrary point on `group`, either the
|
|
492
|
+
// generator or the point at infinity. This is used to guard against callers of
|
|
493
|
+
// external APIs not checking the return value.
|
|
494
|
+
void ec_set_to_safe_point(const EC_GROUP *group, EC_JACOBIAN *out);
|
|
495
|
+
|
|
496
|
+
// ec_affine_jacobian_equal returns one if `a` and `b` represent the same point
|
|
497
|
+
// and zero otherwise. It treats both inputs as secret.
|
|
498
|
+
int ec_affine_jacobian_equal(const EC_GROUP *group, const EC_AFFINE *a,
|
|
499
|
+
const EC_JACOBIAN *b);
|
|
500
|
+
|
|
501
|
+
BSSL_NAMESPACE_END
|
|
502
|
+
|
|
503
|
+
// Implementation details.
|
|
504
|
+
|
|
505
|
+
struct ec_method_st {
|
|
506
|
+
// point_get_affine_coordinates sets `*x` and `*y` to the affine coordinates
|
|
507
|
+
// of `p`. Either `x` or `y` may be NULL to omit it. It returns one on success
|
|
508
|
+
// and zero if `p` is the point at infinity. It leaks whether `p` was the
|
|
509
|
+
// point at infinity, but otherwise treats `p` as secret.
|
|
510
|
+
int (*point_get_affine_coordinates)(const EC_GROUP *,
|
|
511
|
+
const bssl::EC_JACOBIAN *p,
|
|
512
|
+
bssl::EC_FELEM *x, bssl::EC_FELEM *y);
|
|
513
|
+
|
|
514
|
+
// jacobian_to_affine_batch implements `ec_jacobian_to_affine_batch`.
|
|
515
|
+
int (*jacobian_to_affine_batch)(const EC_GROUP *group, bssl::EC_AFFINE *out,
|
|
516
|
+
const bssl::EC_JACOBIAN *in, size_t num);
|
|
517
|
+
|
|
518
|
+
// add sets `r` to `a` + `b`.
|
|
519
|
+
void (*add)(const EC_GROUP *group, bssl::EC_JACOBIAN *r,
|
|
520
|
+
const bssl::EC_JACOBIAN *a, const bssl::EC_JACOBIAN *b);
|
|
521
|
+
// dbl sets `r` to `a` + `a`.
|
|
522
|
+
void (*dbl)(const EC_GROUP *group, bssl::EC_JACOBIAN *r,
|
|
523
|
+
const bssl::EC_JACOBIAN *a);
|
|
524
|
+
|
|
525
|
+
// mul sets `r` to `scalar`*`p`.
|
|
526
|
+
void (*mul)(const EC_GROUP *group, bssl::EC_JACOBIAN *r,
|
|
527
|
+
const bssl::EC_JACOBIAN *p, const bssl::EC_SCALAR *scalar);
|
|
528
|
+
// mul_base sets `r` to `scalar`*generator.
|
|
529
|
+
void (*mul_base)(const EC_GROUP *group, bssl::EC_JACOBIAN *r,
|
|
530
|
+
const bssl::EC_SCALAR *scalar);
|
|
531
|
+
// mul_batch implements `ec_mul_scalar_batch`.
|
|
532
|
+
void (*mul_batch)(const EC_GROUP *group, bssl::EC_JACOBIAN *r,
|
|
533
|
+
const bssl::EC_JACOBIAN *p0, const bssl::EC_SCALAR *scalar0,
|
|
534
|
+
const bssl::EC_JACOBIAN *p1, const bssl::EC_SCALAR *scalar1,
|
|
535
|
+
const bssl::EC_JACOBIAN *p2,
|
|
536
|
+
const bssl::EC_SCALAR *scalar2);
|
|
537
|
+
// mul_public sets `r` to `g_scalar`*generator + `p_scalar`*`p`. It assumes
|
|
538
|
+
// that the inputs are public so there is no concern about leaking their
|
|
539
|
+
// values through timing.
|
|
540
|
+
//
|
|
541
|
+
// This function may be omitted if `mul_public_batch` is provided.
|
|
542
|
+
void (*mul_public)(const EC_GROUP *group, bssl::EC_JACOBIAN *r,
|
|
543
|
+
const bssl::EC_SCALAR *g_scalar,
|
|
544
|
+
const bssl::EC_JACOBIAN *p,
|
|
545
|
+
const bssl::EC_SCALAR *p_scalar);
|
|
546
|
+
// mul_public_batch implements `ec_point_mul_scalar_public_batch`.
|
|
547
|
+
int (*mul_public_batch)(const EC_GROUP *group, bssl::EC_JACOBIAN *r,
|
|
548
|
+
const bssl::EC_SCALAR *g_scalar,
|
|
549
|
+
const bssl::EC_JACOBIAN *points,
|
|
550
|
+
const bssl::EC_SCALAR *scalars, size_t num);
|
|
551
|
+
|
|
552
|
+
// init_precomp implements `ec_init_precomp`.
|
|
553
|
+
int (*init_precomp)(const EC_GROUP *group, bssl::EC_PRECOMP *out,
|
|
554
|
+
const bssl::EC_JACOBIAN *p);
|
|
555
|
+
// mul_precomp implements `ec_point_mul_scalar_precomp`.
|
|
556
|
+
void (*mul_precomp)(const EC_GROUP *group, bssl::EC_JACOBIAN *r,
|
|
557
|
+
const bssl::EC_PRECOMP *p0,
|
|
558
|
+
const bssl::EC_SCALAR *scalar0,
|
|
559
|
+
const bssl::EC_PRECOMP *p1,
|
|
560
|
+
const bssl::EC_SCALAR *scalar1,
|
|
561
|
+
const bssl::EC_PRECOMP *p2,
|
|
562
|
+
const bssl::EC_SCALAR *scalar2);
|
|
563
|
+
|
|
564
|
+
// scalar_inv0_montgomery implements `ec_scalar_inv0_montgomery`.
|
|
565
|
+
void (*scalar_inv0_montgomery)(const EC_GROUP *group, bssl::EC_SCALAR *out,
|
|
566
|
+
const bssl::EC_SCALAR *in);
|
|
567
|
+
|
|
568
|
+
// scalar_to_montgomery_inv_vartime implements
|
|
569
|
+
// `ec_scalar_to_montgomery_inv_vartime`.
|
|
570
|
+
int (*scalar_to_montgomery_inv_vartime)(const EC_GROUP *group,
|
|
571
|
+
bssl::EC_SCALAR *out,
|
|
572
|
+
const bssl::EC_SCALAR *in);
|
|
573
|
+
|
|
574
|
+
// cmp_x_coordinate compares the x (affine) coordinate of `p`, mod the group
|
|
575
|
+
// order, with `r`. It returns one if the values match and zero if `p` is the
|
|
576
|
+
// point at infinity of the values do not match.
|
|
577
|
+
int (*cmp_x_coordinate)(const EC_GROUP *group, const bssl::EC_JACOBIAN *p,
|
|
578
|
+
const bssl::EC_SCALAR *r);
|
|
579
|
+
} /* EC_METHOD */;
|
|
580
|
+
|
|
581
|
+
BSSL_NAMESPACE_BEGIN
|
|
582
|
+
|
|
583
|
+
const EC_METHOD *EC_GFp_mont_method();
|
|
584
|
+
|
|
585
|
+
BSSL_NAMESPACE_END
|
|
586
|
+
|
|
587
|
+
struct ec_point_st {
|
|
588
|
+
// group is an owning reference to `group`, unless this is
|
|
589
|
+
// `group->generator`.
|
|
590
|
+
EC_GROUP *group;
|
|
591
|
+
// raw is the group-specific point data. Functions that take `EC_POINT`
|
|
592
|
+
// typically check consistency with `EC_GROUP` while functions that take
|
|
593
|
+
// `EC_JACOBIAN` do not. Thus accesses to this field should be externally
|
|
594
|
+
// checked for consistency.
|
|
595
|
+
bssl::EC_JACOBIAN raw;
|
|
596
|
+
} /* EC_POINT */;
|
|
597
|
+
|
|
598
|
+
struct ec_group_st {
|
|
599
|
+
const EC_METHOD *meth;
|
|
600
|
+
|
|
601
|
+
// Unlike all other `EC_POINT`s, `generator` does not own `generator->group`
|
|
602
|
+
// to avoid a reference cycle. Additionally, Z is guaranteed to be one, so X
|
|
603
|
+
// and Y are suitable for use as an `EC_AFFINE`. Before `has_order` is set, Z
|
|
604
|
+
// is one, but X and Y are uninitialized.
|
|
605
|
+
EC_POINT generator;
|
|
606
|
+
|
|
607
|
+
BN_MONT_CTX order;
|
|
608
|
+
BN_MONT_CTX field;
|
|
609
|
+
|
|
610
|
+
bssl::EC_FELEM a, b; // Curve coefficients.
|
|
611
|
+
|
|
612
|
+
// comment is a human-readable string describing the curve.
|
|
613
|
+
const char *comment;
|
|
614
|
+
|
|
615
|
+
// curve_name is the optional NID for named curve.
|
|
616
|
+
//
|
|
617
|
+
// If curve_name is NID_undef, the actual type is ECCustomGroup and the
|
|
618
|
+
// refcount must be respected when allocating/freeing.
|
|
619
|
+
int curve_name;
|
|
620
|
+
|
|
621
|
+
uint8_t oid[9];
|
|
622
|
+
uint8_t oid_len;
|
|
623
|
+
|
|
624
|
+
// a_is_minus3 is whether `a` is -3 mod `field`. Point arithmetic is optimized
|
|
625
|
+
// for -3.
|
|
626
|
+
bool a_is_minus3;
|
|
627
|
+
|
|
628
|
+
// field_is_3_mod_4 is whether `field` is 3 mod 4.
|
|
629
|
+
bool field_is_3_mod_4;
|
|
630
|
+
|
|
631
|
+
// has_order is whether `generator` and `order` have been initialized.
|
|
632
|
+
bool has_order;
|
|
633
|
+
|
|
634
|
+
// field_greater_than_order is whether `field` is greater than `order`.
|
|
635
|
+
bool field_greater_than_order;
|
|
636
|
+
} /* EC_GROUP */;
|
|
637
|
+
|
|
638
|
+
BSSL_NAMESPACE_BEGIN
|
|
639
|
+
|
|
640
|
+
class ECCustomGroup : public ec_group_st, public RefCounted<ECCustomGroup> {
|
|
641
|
+
public:
|
|
642
|
+
explicit ECCustomGroup(const EC_METHOD *meth);
|
|
643
|
+
|
|
644
|
+
private:
|
|
645
|
+
~ECCustomGroup();
|
|
646
|
+
friend RefCounted;
|
|
647
|
+
};
|
|
648
|
+
|
|
649
|
+
EC_GROUP *ec_group_new(const EC_METHOD *meth, const BIGNUM *p, const BIGNUM *a,
|
|
650
|
+
const BIGNUM *b, BN_CTX *ctx);
|
|
651
|
+
|
|
652
|
+
void ec_GFp_mont_mul(const EC_GROUP *group, EC_JACOBIAN *r,
|
|
653
|
+
const EC_JACOBIAN *p, const EC_SCALAR *scalar);
|
|
654
|
+
void ec_GFp_mont_mul_base(const EC_GROUP *group, EC_JACOBIAN *r,
|
|
655
|
+
const EC_SCALAR *scalar);
|
|
656
|
+
void ec_GFp_mont_mul_batch(const EC_GROUP *group, EC_JACOBIAN *r,
|
|
657
|
+
const EC_JACOBIAN *p0, const EC_SCALAR *scalar0,
|
|
658
|
+
const EC_JACOBIAN *p1, const EC_SCALAR *scalar1,
|
|
659
|
+
const EC_JACOBIAN *p2, const EC_SCALAR *scalar2);
|
|
660
|
+
int ec_GFp_mont_init_precomp(const EC_GROUP *group, EC_PRECOMP *out,
|
|
661
|
+
const EC_JACOBIAN *p);
|
|
662
|
+
void ec_GFp_mont_mul_precomp(const EC_GROUP *group, EC_JACOBIAN *r,
|
|
663
|
+
const EC_PRECOMP *p0, const EC_SCALAR *scalar0,
|
|
664
|
+
const EC_PRECOMP *p1, const EC_SCALAR *scalar1,
|
|
665
|
+
const EC_PRECOMP *p2, const EC_SCALAR *scalar2);
|
|
666
|
+
|
|
667
|
+
// ec_compute_wNAF writes the modified width-(w+1) Non-Adjacent Form (wNAF) of
|
|
668
|
+
// `scalar` to `out`. `out` must have room for `bits` + 1 elements, each of
|
|
669
|
+
// which will be either zero or odd with an absolute value less than 2^w
|
|
670
|
+
// satisfying
|
|
671
|
+
// scalar = \sum_j out[j]*2^j
|
|
672
|
+
// where at most one of any w+1 consecutive digits is non-zero
|
|
673
|
+
// with the exception that the most significant digit may be only
|
|
674
|
+
// w-1 zeros away from that next non-zero digit.
|
|
675
|
+
void ec_compute_wNAF(const EC_GROUP *group, int8_t *out,
|
|
676
|
+
const EC_SCALAR *scalar, size_t bits, int w);
|
|
677
|
+
|
|
678
|
+
int ec_GFp_mont_mul_public_batch(const EC_GROUP *group, EC_JACOBIAN *r,
|
|
679
|
+
const EC_SCALAR *g_scalar,
|
|
680
|
+
const EC_JACOBIAN *points,
|
|
681
|
+
const EC_SCALAR *scalars, size_t num);
|
|
682
|
+
|
|
683
|
+
// method functions in simple.c
|
|
684
|
+
int ec_GFp_simple_group_set_curve(EC_GROUP *, const BIGNUM *p, const BIGNUM *a,
|
|
685
|
+
const BIGNUM *b, BN_CTX *);
|
|
686
|
+
int ec_GFp_simple_group_get_curve(const EC_GROUP *, BIGNUM *p, BIGNUM *a,
|
|
687
|
+
BIGNUM *b);
|
|
688
|
+
void ec_GFp_simple_point_init(EC_JACOBIAN *);
|
|
689
|
+
void ec_GFp_simple_point_copy(EC_JACOBIAN *, const EC_JACOBIAN *);
|
|
690
|
+
void ec_GFp_simple_point_set_to_infinity(const EC_GROUP *, EC_JACOBIAN *);
|
|
691
|
+
void ec_GFp_mont_add(const EC_GROUP *, EC_JACOBIAN *r, const EC_JACOBIAN *a,
|
|
692
|
+
const EC_JACOBIAN *b);
|
|
693
|
+
void ec_GFp_mont_dbl(const EC_GROUP *, EC_JACOBIAN *r, const EC_JACOBIAN *a);
|
|
694
|
+
void ec_GFp_simple_invert(const EC_GROUP *, EC_JACOBIAN *);
|
|
695
|
+
int ec_GFp_simple_is_at_infinity(const EC_GROUP *, const EC_JACOBIAN *);
|
|
696
|
+
int ec_GFp_simple_is_on_curve(const EC_GROUP *, const EC_JACOBIAN *);
|
|
697
|
+
int ec_GFp_simple_points_equal(const EC_GROUP *, const EC_JACOBIAN *a,
|
|
698
|
+
const EC_JACOBIAN *b);
|
|
699
|
+
void ec_simple_scalar_inv0_montgomery(const EC_GROUP *group, EC_SCALAR *r,
|
|
700
|
+
const EC_SCALAR *a);
|
|
701
|
+
|
|
702
|
+
int ec_simple_scalar_to_montgomery_inv_vartime(const EC_GROUP *group,
|
|
703
|
+
EC_SCALAR *r,
|
|
704
|
+
const EC_SCALAR *a);
|
|
705
|
+
|
|
706
|
+
int ec_GFp_simple_cmp_x_coordinate(const EC_GROUP *group, const EC_JACOBIAN *p,
|
|
707
|
+
const EC_SCALAR *r);
|
|
708
|
+
|
|
709
|
+
void ec_GFp_nistp_recode_scalar_bits(crypto_word_t *sign, crypto_word_t *digit,
|
|
710
|
+
crypto_word_t in);
|
|
711
|
+
|
|
712
|
+
const EC_METHOD *EC_GFp_nistp256_method();
|
|
713
|
+
|
|
714
|
+
// EC_GFp_nistz256_method is a GFp method using montgomery multiplication, with
|
|
715
|
+
// x86-64 optimized P256. See http://eprint.iacr.org/2013/816.
|
|
716
|
+
const EC_METHOD *EC_GFp_nistz256_method();
|
|
717
|
+
|
|
718
|
+
// An EC_WRAPPED_SCALAR is an `EC_SCALAR` with a parallel `BIGNUM`
|
|
719
|
+
// representation. It exists to support the `EC_KEY_get0_private_key` API.
|
|
720
|
+
typedef struct {
|
|
721
|
+
BIGNUM bignum;
|
|
722
|
+
EC_SCALAR scalar;
|
|
723
|
+
} EC_WRAPPED_SCALAR;
|
|
724
|
+
|
|
725
|
+
class ECKey : public ec_key_st, public RefCounted<ECKey> {
|
|
726
|
+
public:
|
|
727
|
+
explicit ECKey(const ENGINE *engine);
|
|
728
|
+
|
|
729
|
+
EC_GROUP *group = nullptr;
|
|
730
|
+
|
|
731
|
+
// Ideally `pub_key` would be an `EC_AFFINE` so serializing it does not pay an
|
|
732
|
+
// inversion each time, but the `EC_KEY_get0_public_key` API implies public
|
|
733
|
+
// keys are stored in an `EC_POINT`-compatible form.
|
|
734
|
+
EC_POINT *pub_key = nullptr;
|
|
735
|
+
bssl::EC_WRAPPED_SCALAR *priv_key = nullptr;
|
|
736
|
+
|
|
737
|
+
unsigned int enc_flag = 0;
|
|
738
|
+
point_conversion_form_t conv_form = POINT_CONVERSION_UNCOMPRESSED;
|
|
739
|
+
|
|
740
|
+
ECDSA_METHOD *ecdsa_meth = nullptr;
|
|
741
|
+
|
|
742
|
+
CRYPTO_EX_DATA ex_data = {};
|
|
743
|
+
|
|
744
|
+
private:
|
|
745
|
+
~ECKey();
|
|
746
|
+
friend RefCounted;
|
|
747
|
+
} /* EC_KEY */;
|
|
748
|
+
|
|
749
|
+
BSSL_NAMESPACE_END
|
|
750
|
+
|
|
751
|
+
|
|
752
|
+
#endif // OPENSSL_HEADER_CRYPTO_FIPSMODULE_EC_INTERNAL_H
|