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,3014 @@
|
|
|
1
|
+
// This file is generated from a similarly-named Perl script in the BoringSSL
|
|
2
|
+
// source tree. Do not edit by hand.
|
|
3
|
+
|
|
4
|
+
#include <openssl/asm_base.h>
|
|
5
|
+
|
|
6
|
+
#if !defined(OPENSSL_NO_ASM) && defined(OPENSSL_AARCH64) && defined(_WIN32)
|
|
7
|
+
.section .rodata
|
|
8
|
+
|
|
9
|
+
.align 7
|
|
10
|
+
chacha20_poly1305_constants:
|
|
11
|
+
Lchacha20_consts:
|
|
12
|
+
.byte 'e','x','p','a','n','d',' ','3','2','-','b','y','t','e',' ','k'
|
|
13
|
+
Linc:
|
|
14
|
+
.long 1,2,3,4
|
|
15
|
+
Lrol8:
|
|
16
|
+
.byte 3,0,1,2, 7,4,5,6, 11,8,9,10, 15,12,13,14
|
|
17
|
+
Lclamp:
|
|
18
|
+
.quad 0x0FFFFFFC0FFFFFFF, 0x0FFFFFFC0FFFFFFC
|
|
19
|
+
|
|
20
|
+
.text
|
|
21
|
+
|
|
22
|
+
.def Lpoly_hash_ad_internal
|
|
23
|
+
.type 32
|
|
24
|
+
.endef
|
|
25
|
+
.align 6
|
|
26
|
+
chacha20_poly1305_helpers:
|
|
27
|
+
Lpoly_hash_ad_internal:
|
|
28
|
+
.cfi_startproc
|
|
29
|
+
cbnz x4, Lpoly_hash_intro
|
|
30
|
+
ret
|
|
31
|
+
|
|
32
|
+
Lpoly_hash_intro:
|
|
33
|
+
cmp x4, #16
|
|
34
|
+
b.lt Lpoly_hash_ad_tail
|
|
35
|
+
ldp x11, x12, [x3], 16
|
|
36
|
+
adds x8, x8, x11
|
|
37
|
+
adcs x9, x9, x12
|
|
38
|
+
adc x10, x10, x15
|
|
39
|
+
mul x11, x8, x16 // [t2:t1:t0] = [acc2:acc1:acc0] * r0
|
|
40
|
+
umulh x12, x8, x16
|
|
41
|
+
mul x13, x9, x16
|
|
42
|
+
umulh x14, x9, x16
|
|
43
|
+
adds x12, x12, x13
|
|
44
|
+
mul x13, x10, x16
|
|
45
|
+
adc x13, x13, x14
|
|
46
|
+
mul x14, x8, x17 // [t3:t2:t1:t0] = [acc2:acc1:acc0] * [r1:r0]
|
|
47
|
+
umulh x8, x8, x17
|
|
48
|
+
adds x12, x12, x14
|
|
49
|
+
mul x14, x9, x17
|
|
50
|
+
umulh x9, x9, x17
|
|
51
|
+
adcs x14, x14, x8
|
|
52
|
+
mul x10, x10, x17
|
|
53
|
+
adc x10, x10, x9
|
|
54
|
+
adds x13, x13, x14
|
|
55
|
+
adc x14, x10, xzr
|
|
56
|
+
and x10, x13, #3 // At this point acc2 is 2 bits at most (value of 3)
|
|
57
|
+
and x8, x13, #-4
|
|
58
|
+
extr x13, x14, x13, #2
|
|
59
|
+
adds x8, x8, x11
|
|
60
|
+
lsr x11, x14, #2
|
|
61
|
+
adc x9, x14, x11 // No carry out since t0 is 61 bits and t3 is 63 bits
|
|
62
|
+
adds x8, x8, x13
|
|
63
|
+
adcs x9, x9, x12
|
|
64
|
+
adc x10, x10, xzr // At this point acc2 has the value of 4 at most
|
|
65
|
+
sub x4, x4, #16
|
|
66
|
+
b Lpoly_hash_ad_internal
|
|
67
|
+
|
|
68
|
+
Lpoly_hash_ad_tail:
|
|
69
|
+
cbz x4, Lpoly_hash_ad_ret
|
|
70
|
+
|
|
71
|
+
eor v20.16b, v20.16b, v20.16b // Use T0 to load the AAD
|
|
72
|
+
sub x4, x4, #1
|
|
73
|
+
|
|
74
|
+
Lpoly_hash_tail_16_compose:
|
|
75
|
+
ext v20.16b, v20.16b, v20.16b, #15
|
|
76
|
+
ldrb w11, [x3, x4]
|
|
77
|
+
mov v20.b[0], w11
|
|
78
|
+
subs x4, x4, #1
|
|
79
|
+
b.ge Lpoly_hash_tail_16_compose
|
|
80
|
+
mov x11, v20.d[0]
|
|
81
|
+
mov x12, v20.d[1]
|
|
82
|
+
adds x8, x8, x11
|
|
83
|
+
adcs x9, x9, x12
|
|
84
|
+
adc x10, x10, x15
|
|
85
|
+
mul x11, x8, x16 // [t2:t1:t0] = [acc2:acc1:acc0] * r0
|
|
86
|
+
umulh x12, x8, x16
|
|
87
|
+
mul x13, x9, x16
|
|
88
|
+
umulh x14, x9, x16
|
|
89
|
+
adds x12, x12, x13
|
|
90
|
+
mul x13, x10, x16
|
|
91
|
+
adc x13, x13, x14
|
|
92
|
+
mul x14, x8, x17 // [t3:t2:t1:t0] = [acc2:acc1:acc0] * [r1:r0]
|
|
93
|
+
umulh x8, x8, x17
|
|
94
|
+
adds x12, x12, x14
|
|
95
|
+
mul x14, x9, x17
|
|
96
|
+
umulh x9, x9, x17
|
|
97
|
+
adcs x14, x14, x8
|
|
98
|
+
mul x10, x10, x17
|
|
99
|
+
adc x10, x10, x9
|
|
100
|
+
adds x13, x13, x14
|
|
101
|
+
adc x14, x10, xzr
|
|
102
|
+
and x10, x13, #3 // At this point acc2 is 2 bits at most (value of 3)
|
|
103
|
+
and x8, x13, #-4
|
|
104
|
+
extr x13, x14, x13, #2
|
|
105
|
+
adds x8, x8, x11
|
|
106
|
+
lsr x11, x14, #2
|
|
107
|
+
adc x9, x14, x11 // No carry out since t0 is 61 bits and t3 is 63 bits
|
|
108
|
+
adds x8, x8, x13
|
|
109
|
+
adcs x9, x9, x12
|
|
110
|
+
adc x10, x10, xzr // At this point acc2 has the value of 4 at most
|
|
111
|
+
|
|
112
|
+
Lpoly_hash_ad_ret:
|
|
113
|
+
ret
|
|
114
|
+
.cfi_endproc
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
/////////////////////////////////
|
|
118
|
+
//
|
|
119
|
+
// void chacha20_poly1305_seal(uint8_t *pt, uint8_t *ct, size_t len_in, uint8_t *ad, size_t len_ad, union open_data *seal_data);
|
|
120
|
+
//
|
|
121
|
+
.globl chacha20_poly1305_seal
|
|
122
|
+
|
|
123
|
+
.def chacha20_poly1305_seal
|
|
124
|
+
.type 32
|
|
125
|
+
.endef
|
|
126
|
+
.align 6
|
|
127
|
+
chacha20_poly1305_seal:
|
|
128
|
+
AARCH64_SIGN_LINK_REGISTER
|
|
129
|
+
.cfi_startproc
|
|
130
|
+
stp x29, x30, [sp, #-80]!
|
|
131
|
+
.cfi_def_cfa_offset 80
|
|
132
|
+
.cfi_offset w30, -72
|
|
133
|
+
.cfi_offset w29, -80
|
|
134
|
+
mov x29, sp
|
|
135
|
+
// We probably could do .cfi_def_cfa w29, 80 at this point, but since
|
|
136
|
+
// we don't actually use the frame pointer like that, it's probably not
|
|
137
|
+
// worth bothering.
|
|
138
|
+
stp d8, d9, [sp, #16]
|
|
139
|
+
stp d10, d11, [sp, #32]
|
|
140
|
+
stp d12, d13, [sp, #48]
|
|
141
|
+
stp d14, d15, [sp, #64]
|
|
142
|
+
.cfi_offset b15, -8
|
|
143
|
+
.cfi_offset b14, -16
|
|
144
|
+
.cfi_offset b13, -24
|
|
145
|
+
.cfi_offset b12, -32
|
|
146
|
+
.cfi_offset b11, -40
|
|
147
|
+
.cfi_offset b10, -48
|
|
148
|
+
.cfi_offset b9, -56
|
|
149
|
+
.cfi_offset b8, -64
|
|
150
|
+
|
|
151
|
+
adrp x11, Lchacha20_consts
|
|
152
|
+
add x11, x11, :lo12:Lchacha20_consts
|
|
153
|
+
|
|
154
|
+
ld1 {v24.16b - v27.16b}, [x11] // Load the CONSTS, INC, ROL8 and CLAMP values
|
|
155
|
+
ld1 {v28.16b - v30.16b}, [x5]
|
|
156
|
+
|
|
157
|
+
mov x15, #1 // Prepare the Poly1305 state
|
|
158
|
+
mov x8, #0
|
|
159
|
+
mov x9, #0
|
|
160
|
+
mov x10, #0
|
|
161
|
+
|
|
162
|
+
ldr x12, [x5, #56] // The total cipher text length includes extra_in_len
|
|
163
|
+
add x12, x12, x2
|
|
164
|
+
mov v31.d[0], x4 // Store the input and aad lengths
|
|
165
|
+
mov v31.d[1], x12
|
|
166
|
+
|
|
167
|
+
cmp x2, #128
|
|
168
|
+
b.le Lseal_128 // Optimization for smaller buffers
|
|
169
|
+
|
|
170
|
+
// Initially we prepare 5 ChaCha20 blocks. Four to encrypt up to 4 blocks (256 bytes) of plaintext,
|
|
171
|
+
// and one for the Poly1305 R and S keys. The first four blocks (A0-A3..D0-D3) are computed vertically,
|
|
172
|
+
// the fifth block (A4-D4) horizontally.
|
|
173
|
+
ld4r {v0.4s,v1.4s,v2.4s,v3.4s}, [x11]
|
|
174
|
+
mov v4.16b, v24.16b
|
|
175
|
+
|
|
176
|
+
ld4r {v5.4s,v6.4s,v7.4s,v8.4s}, [x5], #16
|
|
177
|
+
mov v9.16b, v28.16b
|
|
178
|
+
|
|
179
|
+
ld4r {v10.4s,v11.4s,v12.4s,v13.4s}, [x5], #16
|
|
180
|
+
mov v14.16b, v29.16b
|
|
181
|
+
|
|
182
|
+
ld4r {v15.4s,v16.4s,v17.4s,v18.4s}, [x5]
|
|
183
|
+
add v15.4s, v15.4s, v25.4s
|
|
184
|
+
mov v19.16b, v30.16b
|
|
185
|
+
|
|
186
|
+
sub x5, x5, #32
|
|
187
|
+
|
|
188
|
+
mov x6, #10
|
|
189
|
+
|
|
190
|
+
.align 5
|
|
191
|
+
Lseal_init_rounds:
|
|
192
|
+
add v0.4s, v0.4s, v5.4s
|
|
193
|
+
add v1.4s, v1.4s, v6.4s
|
|
194
|
+
add v2.4s, v2.4s, v7.4s
|
|
195
|
+
add v3.4s, v3.4s, v8.4s
|
|
196
|
+
add v4.4s, v4.4s, v9.4s
|
|
197
|
+
|
|
198
|
+
eor v15.16b, v15.16b, v0.16b
|
|
199
|
+
eor v16.16b, v16.16b, v1.16b
|
|
200
|
+
eor v17.16b, v17.16b, v2.16b
|
|
201
|
+
eor v18.16b, v18.16b, v3.16b
|
|
202
|
+
eor v19.16b, v19.16b, v4.16b
|
|
203
|
+
|
|
204
|
+
rev32 v15.8h, v15.8h
|
|
205
|
+
rev32 v16.8h, v16.8h
|
|
206
|
+
rev32 v17.8h, v17.8h
|
|
207
|
+
rev32 v18.8h, v18.8h
|
|
208
|
+
rev32 v19.8h, v19.8h
|
|
209
|
+
|
|
210
|
+
add v10.4s, v10.4s, v15.4s
|
|
211
|
+
add v11.4s, v11.4s, v16.4s
|
|
212
|
+
add v12.4s, v12.4s, v17.4s
|
|
213
|
+
add v13.4s, v13.4s, v18.4s
|
|
214
|
+
add v14.4s, v14.4s, v19.4s
|
|
215
|
+
|
|
216
|
+
eor v5.16b, v5.16b, v10.16b
|
|
217
|
+
eor v6.16b, v6.16b, v11.16b
|
|
218
|
+
eor v7.16b, v7.16b, v12.16b
|
|
219
|
+
eor v8.16b, v8.16b, v13.16b
|
|
220
|
+
eor v9.16b, v9.16b, v14.16b
|
|
221
|
+
|
|
222
|
+
ushr v20.4s, v5.4s, #20
|
|
223
|
+
sli v20.4s, v5.4s, #12
|
|
224
|
+
ushr v5.4s, v6.4s, #20
|
|
225
|
+
sli v5.4s, v6.4s, #12
|
|
226
|
+
ushr v6.4s, v7.4s, #20
|
|
227
|
+
sli v6.4s, v7.4s, #12
|
|
228
|
+
ushr v7.4s, v8.4s, #20
|
|
229
|
+
sli v7.4s, v8.4s, #12
|
|
230
|
+
ushr v8.4s, v9.4s, #20
|
|
231
|
+
sli v8.4s, v9.4s, #12
|
|
232
|
+
|
|
233
|
+
add v0.4s, v0.4s, v20.4s
|
|
234
|
+
add v1.4s, v1.4s, v5.4s
|
|
235
|
+
add v2.4s, v2.4s, v6.4s
|
|
236
|
+
add v3.4s, v3.4s, v7.4s
|
|
237
|
+
add v4.4s, v4.4s, v8.4s
|
|
238
|
+
|
|
239
|
+
eor v15.16b, v15.16b, v0.16b
|
|
240
|
+
eor v16.16b, v16.16b, v1.16b
|
|
241
|
+
eor v17.16b, v17.16b, v2.16b
|
|
242
|
+
eor v18.16b, v18.16b, v3.16b
|
|
243
|
+
eor v19.16b, v19.16b, v4.16b
|
|
244
|
+
|
|
245
|
+
tbl v15.16b, {v15.16b}, v26.16b
|
|
246
|
+
tbl v16.16b, {v16.16b}, v26.16b
|
|
247
|
+
tbl v17.16b, {v17.16b}, v26.16b
|
|
248
|
+
tbl v18.16b, {v18.16b}, v26.16b
|
|
249
|
+
tbl v19.16b, {v19.16b}, v26.16b
|
|
250
|
+
|
|
251
|
+
add v10.4s, v10.4s, v15.4s
|
|
252
|
+
add v11.4s, v11.4s, v16.4s
|
|
253
|
+
add v12.4s, v12.4s, v17.4s
|
|
254
|
+
add v13.4s, v13.4s, v18.4s
|
|
255
|
+
add v14.4s, v14.4s, v19.4s
|
|
256
|
+
|
|
257
|
+
eor v20.16b, v20.16b, v10.16b
|
|
258
|
+
eor v5.16b, v5.16b, v11.16b
|
|
259
|
+
eor v6.16b, v6.16b, v12.16b
|
|
260
|
+
eor v7.16b, v7.16b, v13.16b
|
|
261
|
+
eor v8.16b, v8.16b, v14.16b
|
|
262
|
+
|
|
263
|
+
ushr v9.4s, v8.4s, #25
|
|
264
|
+
sli v9.4s, v8.4s, #7
|
|
265
|
+
ushr v8.4s, v7.4s, #25
|
|
266
|
+
sli v8.4s, v7.4s, #7
|
|
267
|
+
ushr v7.4s, v6.4s, #25
|
|
268
|
+
sli v7.4s, v6.4s, #7
|
|
269
|
+
ushr v6.4s, v5.4s, #25
|
|
270
|
+
sli v6.4s, v5.4s, #7
|
|
271
|
+
ushr v5.4s, v20.4s, #25
|
|
272
|
+
sli v5.4s, v20.4s, #7
|
|
273
|
+
|
|
274
|
+
ext v9.16b, v9.16b, v9.16b, #4
|
|
275
|
+
ext v14.16b, v14.16b, v14.16b, #8
|
|
276
|
+
ext v19.16b, v19.16b, v19.16b, #12
|
|
277
|
+
add v0.4s, v0.4s, v6.4s
|
|
278
|
+
add v1.4s, v1.4s, v7.4s
|
|
279
|
+
add v2.4s, v2.4s, v8.4s
|
|
280
|
+
add v3.4s, v3.4s, v5.4s
|
|
281
|
+
add v4.4s, v4.4s, v9.4s
|
|
282
|
+
|
|
283
|
+
eor v18.16b, v18.16b, v0.16b
|
|
284
|
+
eor v15.16b, v15.16b, v1.16b
|
|
285
|
+
eor v16.16b, v16.16b, v2.16b
|
|
286
|
+
eor v17.16b, v17.16b, v3.16b
|
|
287
|
+
eor v19.16b, v19.16b, v4.16b
|
|
288
|
+
|
|
289
|
+
rev32 v18.8h, v18.8h
|
|
290
|
+
rev32 v15.8h, v15.8h
|
|
291
|
+
rev32 v16.8h, v16.8h
|
|
292
|
+
rev32 v17.8h, v17.8h
|
|
293
|
+
rev32 v19.8h, v19.8h
|
|
294
|
+
|
|
295
|
+
add v12.4s, v12.4s, v18.4s
|
|
296
|
+
add v13.4s, v13.4s, v15.4s
|
|
297
|
+
add v10.4s, v10.4s, v16.4s
|
|
298
|
+
add v11.4s, v11.4s, v17.4s
|
|
299
|
+
add v14.4s, v14.4s, v19.4s
|
|
300
|
+
|
|
301
|
+
eor v6.16b, v6.16b, v12.16b
|
|
302
|
+
eor v7.16b, v7.16b, v13.16b
|
|
303
|
+
eor v8.16b, v8.16b, v10.16b
|
|
304
|
+
eor v5.16b, v5.16b, v11.16b
|
|
305
|
+
eor v9.16b, v9.16b, v14.16b
|
|
306
|
+
|
|
307
|
+
ushr v20.4s, v6.4s, #20
|
|
308
|
+
sli v20.4s, v6.4s, #12
|
|
309
|
+
ushr v6.4s, v7.4s, #20
|
|
310
|
+
sli v6.4s, v7.4s, #12
|
|
311
|
+
ushr v7.4s, v8.4s, #20
|
|
312
|
+
sli v7.4s, v8.4s, #12
|
|
313
|
+
ushr v8.4s, v5.4s, #20
|
|
314
|
+
sli v8.4s, v5.4s, #12
|
|
315
|
+
ushr v5.4s, v9.4s, #20
|
|
316
|
+
sli v5.4s, v9.4s, #12
|
|
317
|
+
|
|
318
|
+
add v0.4s, v0.4s, v20.4s
|
|
319
|
+
add v1.4s, v1.4s, v6.4s
|
|
320
|
+
add v2.4s, v2.4s, v7.4s
|
|
321
|
+
add v3.4s, v3.4s, v8.4s
|
|
322
|
+
add v4.4s, v4.4s, v5.4s
|
|
323
|
+
|
|
324
|
+
eor v18.16b, v18.16b, v0.16b
|
|
325
|
+
eor v15.16b, v15.16b, v1.16b
|
|
326
|
+
eor v16.16b, v16.16b, v2.16b
|
|
327
|
+
eor v17.16b, v17.16b, v3.16b
|
|
328
|
+
eor v19.16b, v19.16b, v4.16b
|
|
329
|
+
|
|
330
|
+
tbl v18.16b, {v18.16b}, v26.16b
|
|
331
|
+
tbl v15.16b, {v15.16b}, v26.16b
|
|
332
|
+
tbl v16.16b, {v16.16b}, v26.16b
|
|
333
|
+
tbl v17.16b, {v17.16b}, v26.16b
|
|
334
|
+
tbl v19.16b, {v19.16b}, v26.16b
|
|
335
|
+
|
|
336
|
+
add v12.4s, v12.4s, v18.4s
|
|
337
|
+
add v13.4s, v13.4s, v15.4s
|
|
338
|
+
add v10.4s, v10.4s, v16.4s
|
|
339
|
+
add v11.4s, v11.4s, v17.4s
|
|
340
|
+
add v14.4s, v14.4s, v19.4s
|
|
341
|
+
|
|
342
|
+
eor v20.16b, v20.16b, v12.16b
|
|
343
|
+
eor v6.16b, v6.16b, v13.16b
|
|
344
|
+
eor v7.16b, v7.16b, v10.16b
|
|
345
|
+
eor v8.16b, v8.16b, v11.16b
|
|
346
|
+
eor v5.16b, v5.16b, v14.16b
|
|
347
|
+
|
|
348
|
+
ushr v9.4s, v5.4s, #25
|
|
349
|
+
sli v9.4s, v5.4s, #7
|
|
350
|
+
ushr v5.4s, v8.4s, #25
|
|
351
|
+
sli v5.4s, v8.4s, #7
|
|
352
|
+
ushr v8.4s, v7.4s, #25
|
|
353
|
+
sli v8.4s, v7.4s, #7
|
|
354
|
+
ushr v7.4s, v6.4s, #25
|
|
355
|
+
sli v7.4s, v6.4s, #7
|
|
356
|
+
ushr v6.4s, v20.4s, #25
|
|
357
|
+
sli v6.4s, v20.4s, #7
|
|
358
|
+
|
|
359
|
+
ext v9.16b, v9.16b, v9.16b, #12
|
|
360
|
+
ext v14.16b, v14.16b, v14.16b, #8
|
|
361
|
+
ext v19.16b, v19.16b, v19.16b, #4
|
|
362
|
+
subs x6, x6, #1
|
|
363
|
+
b.hi Lseal_init_rounds
|
|
364
|
+
|
|
365
|
+
add v15.4s, v15.4s, v25.4s
|
|
366
|
+
mov x11, #4
|
|
367
|
+
dup v20.4s, w11
|
|
368
|
+
add v25.4s, v25.4s, v20.4s
|
|
369
|
+
|
|
370
|
+
zip1 v20.4s, v0.4s, v1.4s
|
|
371
|
+
zip2 v21.4s, v0.4s, v1.4s
|
|
372
|
+
zip1 v22.4s, v2.4s, v3.4s
|
|
373
|
+
zip2 v23.4s, v2.4s, v3.4s
|
|
374
|
+
|
|
375
|
+
zip1 v0.2d, v20.2d, v22.2d
|
|
376
|
+
zip2 v1.2d, v20.2d, v22.2d
|
|
377
|
+
zip1 v2.2d, v21.2d, v23.2d
|
|
378
|
+
zip2 v3.2d, v21.2d, v23.2d
|
|
379
|
+
|
|
380
|
+
zip1 v20.4s, v5.4s, v6.4s
|
|
381
|
+
zip2 v21.4s, v5.4s, v6.4s
|
|
382
|
+
zip1 v22.4s, v7.4s, v8.4s
|
|
383
|
+
zip2 v23.4s, v7.4s, v8.4s
|
|
384
|
+
|
|
385
|
+
zip1 v5.2d, v20.2d, v22.2d
|
|
386
|
+
zip2 v6.2d, v20.2d, v22.2d
|
|
387
|
+
zip1 v7.2d, v21.2d, v23.2d
|
|
388
|
+
zip2 v8.2d, v21.2d, v23.2d
|
|
389
|
+
|
|
390
|
+
zip1 v20.4s, v10.4s, v11.4s
|
|
391
|
+
zip2 v21.4s, v10.4s, v11.4s
|
|
392
|
+
zip1 v22.4s, v12.4s, v13.4s
|
|
393
|
+
zip2 v23.4s, v12.4s, v13.4s
|
|
394
|
+
|
|
395
|
+
zip1 v10.2d, v20.2d, v22.2d
|
|
396
|
+
zip2 v11.2d, v20.2d, v22.2d
|
|
397
|
+
zip1 v12.2d, v21.2d, v23.2d
|
|
398
|
+
zip2 v13.2d, v21.2d, v23.2d
|
|
399
|
+
|
|
400
|
+
zip1 v20.4s, v15.4s, v16.4s
|
|
401
|
+
zip2 v21.4s, v15.4s, v16.4s
|
|
402
|
+
zip1 v22.4s, v17.4s, v18.4s
|
|
403
|
+
zip2 v23.4s, v17.4s, v18.4s
|
|
404
|
+
|
|
405
|
+
zip1 v15.2d, v20.2d, v22.2d
|
|
406
|
+
zip2 v16.2d, v20.2d, v22.2d
|
|
407
|
+
zip1 v17.2d, v21.2d, v23.2d
|
|
408
|
+
zip2 v18.2d, v21.2d, v23.2d
|
|
409
|
+
|
|
410
|
+
add v4.4s, v4.4s, v24.4s
|
|
411
|
+
add v9.4s, v9.4s, v28.4s
|
|
412
|
+
and v4.16b, v4.16b, v27.16b
|
|
413
|
+
|
|
414
|
+
add v0.4s, v0.4s, v24.4s
|
|
415
|
+
add v5.4s, v5.4s, v28.4s
|
|
416
|
+
add v10.4s, v10.4s, v29.4s
|
|
417
|
+
add v15.4s, v15.4s, v30.4s
|
|
418
|
+
|
|
419
|
+
add v1.4s, v1.4s, v24.4s
|
|
420
|
+
add v6.4s, v6.4s, v28.4s
|
|
421
|
+
add v11.4s, v11.4s, v29.4s
|
|
422
|
+
add v16.4s, v16.4s, v30.4s
|
|
423
|
+
|
|
424
|
+
add v2.4s, v2.4s, v24.4s
|
|
425
|
+
add v7.4s, v7.4s, v28.4s
|
|
426
|
+
add v12.4s, v12.4s, v29.4s
|
|
427
|
+
add v17.4s, v17.4s, v30.4s
|
|
428
|
+
|
|
429
|
+
add v3.4s, v3.4s, v24.4s
|
|
430
|
+
add v8.4s, v8.4s, v28.4s
|
|
431
|
+
add v13.4s, v13.4s, v29.4s
|
|
432
|
+
add v18.4s, v18.4s, v30.4s
|
|
433
|
+
|
|
434
|
+
mov x16, v4.d[0] // Move the R key to GPRs
|
|
435
|
+
mov x17, v4.d[1]
|
|
436
|
+
mov v27.16b, v9.16b // Store the S key
|
|
437
|
+
|
|
438
|
+
bl Lpoly_hash_ad_internal
|
|
439
|
+
|
|
440
|
+
mov x3, x0
|
|
441
|
+
cmp x2, #256
|
|
442
|
+
b.le Lseal_tail
|
|
443
|
+
|
|
444
|
+
ld1 {v20.16b - v23.16b}, [x1], #64
|
|
445
|
+
eor v20.16b, v20.16b, v0.16b
|
|
446
|
+
eor v21.16b, v21.16b, v5.16b
|
|
447
|
+
eor v22.16b, v22.16b, v10.16b
|
|
448
|
+
eor v23.16b, v23.16b, v15.16b
|
|
449
|
+
st1 {v20.16b - v23.16b}, [x0], #64
|
|
450
|
+
|
|
451
|
+
ld1 {v20.16b - v23.16b}, [x1], #64
|
|
452
|
+
eor v20.16b, v20.16b, v1.16b
|
|
453
|
+
eor v21.16b, v21.16b, v6.16b
|
|
454
|
+
eor v22.16b, v22.16b, v11.16b
|
|
455
|
+
eor v23.16b, v23.16b, v16.16b
|
|
456
|
+
st1 {v20.16b - v23.16b}, [x0], #64
|
|
457
|
+
|
|
458
|
+
ld1 {v20.16b - v23.16b}, [x1], #64
|
|
459
|
+
eor v20.16b, v20.16b, v2.16b
|
|
460
|
+
eor v21.16b, v21.16b, v7.16b
|
|
461
|
+
eor v22.16b, v22.16b, v12.16b
|
|
462
|
+
eor v23.16b, v23.16b, v17.16b
|
|
463
|
+
st1 {v20.16b - v23.16b}, [x0], #64
|
|
464
|
+
|
|
465
|
+
ld1 {v20.16b - v23.16b}, [x1], #64
|
|
466
|
+
eor v20.16b, v20.16b, v3.16b
|
|
467
|
+
eor v21.16b, v21.16b, v8.16b
|
|
468
|
+
eor v22.16b, v22.16b, v13.16b
|
|
469
|
+
eor v23.16b, v23.16b, v18.16b
|
|
470
|
+
st1 {v20.16b - v23.16b}, [x0], #64
|
|
471
|
+
|
|
472
|
+
sub x2, x2, #256
|
|
473
|
+
|
|
474
|
+
mov x6, #4 // In the first run of the loop we need to hash 256 bytes, therefore we hash one block for the first 4 rounds
|
|
475
|
+
mov x7, #6 // and two blocks for the remaining 6, for a total of (1 * 4 + 2 * 6) * 16 = 256
|
|
476
|
+
|
|
477
|
+
Lseal_main_loop:
|
|
478
|
+
adrp x11, Lchacha20_consts
|
|
479
|
+
add x11, x11, :lo12:Lchacha20_consts
|
|
480
|
+
|
|
481
|
+
ld4r {v0.4s,v1.4s,v2.4s,v3.4s}, [x11]
|
|
482
|
+
mov v4.16b, v24.16b
|
|
483
|
+
|
|
484
|
+
ld4r {v5.4s,v6.4s,v7.4s,v8.4s}, [x5], #16
|
|
485
|
+
mov v9.16b, v28.16b
|
|
486
|
+
|
|
487
|
+
ld4r {v10.4s,v11.4s,v12.4s,v13.4s}, [x5], #16
|
|
488
|
+
mov v14.16b, v29.16b
|
|
489
|
+
|
|
490
|
+
ld4r {v15.4s,v16.4s,v17.4s,v18.4s}, [x5]
|
|
491
|
+
add v15.4s, v15.4s, v25.4s
|
|
492
|
+
mov v19.16b, v30.16b
|
|
493
|
+
|
|
494
|
+
eor v20.16b, v20.16b, v20.16b //zero
|
|
495
|
+
not v21.16b, v20.16b // -1
|
|
496
|
+
sub v21.4s, v25.4s, v21.4s // Add +1
|
|
497
|
+
ext v20.16b, v21.16b, v20.16b, #12 // Get the last element (counter)
|
|
498
|
+
add v19.4s, v19.4s, v20.4s
|
|
499
|
+
|
|
500
|
+
sub x5, x5, #32
|
|
501
|
+
.align 5
|
|
502
|
+
Lseal_main_loop_rounds:
|
|
503
|
+
add v0.4s, v0.4s, v5.4s
|
|
504
|
+
add v1.4s, v1.4s, v6.4s
|
|
505
|
+
add v2.4s, v2.4s, v7.4s
|
|
506
|
+
add v3.4s, v3.4s, v8.4s
|
|
507
|
+
add v4.4s, v4.4s, v9.4s
|
|
508
|
+
|
|
509
|
+
eor v15.16b, v15.16b, v0.16b
|
|
510
|
+
eor v16.16b, v16.16b, v1.16b
|
|
511
|
+
eor v17.16b, v17.16b, v2.16b
|
|
512
|
+
eor v18.16b, v18.16b, v3.16b
|
|
513
|
+
eor v19.16b, v19.16b, v4.16b
|
|
514
|
+
|
|
515
|
+
rev32 v15.8h, v15.8h
|
|
516
|
+
rev32 v16.8h, v16.8h
|
|
517
|
+
rev32 v17.8h, v17.8h
|
|
518
|
+
rev32 v18.8h, v18.8h
|
|
519
|
+
rev32 v19.8h, v19.8h
|
|
520
|
+
|
|
521
|
+
add v10.4s, v10.4s, v15.4s
|
|
522
|
+
add v11.4s, v11.4s, v16.4s
|
|
523
|
+
add v12.4s, v12.4s, v17.4s
|
|
524
|
+
add v13.4s, v13.4s, v18.4s
|
|
525
|
+
add v14.4s, v14.4s, v19.4s
|
|
526
|
+
|
|
527
|
+
eor v5.16b, v5.16b, v10.16b
|
|
528
|
+
eor v6.16b, v6.16b, v11.16b
|
|
529
|
+
eor v7.16b, v7.16b, v12.16b
|
|
530
|
+
eor v8.16b, v8.16b, v13.16b
|
|
531
|
+
eor v9.16b, v9.16b, v14.16b
|
|
532
|
+
|
|
533
|
+
ushr v20.4s, v5.4s, #20
|
|
534
|
+
sli v20.4s, v5.4s, #12
|
|
535
|
+
ushr v5.4s, v6.4s, #20
|
|
536
|
+
sli v5.4s, v6.4s, #12
|
|
537
|
+
ushr v6.4s, v7.4s, #20
|
|
538
|
+
sli v6.4s, v7.4s, #12
|
|
539
|
+
ushr v7.4s, v8.4s, #20
|
|
540
|
+
sli v7.4s, v8.4s, #12
|
|
541
|
+
ushr v8.4s, v9.4s, #20
|
|
542
|
+
sli v8.4s, v9.4s, #12
|
|
543
|
+
|
|
544
|
+
add v0.4s, v0.4s, v20.4s
|
|
545
|
+
add v1.4s, v1.4s, v5.4s
|
|
546
|
+
add v2.4s, v2.4s, v6.4s
|
|
547
|
+
add v3.4s, v3.4s, v7.4s
|
|
548
|
+
add v4.4s, v4.4s, v8.4s
|
|
549
|
+
|
|
550
|
+
eor v15.16b, v15.16b, v0.16b
|
|
551
|
+
eor v16.16b, v16.16b, v1.16b
|
|
552
|
+
eor v17.16b, v17.16b, v2.16b
|
|
553
|
+
eor v18.16b, v18.16b, v3.16b
|
|
554
|
+
eor v19.16b, v19.16b, v4.16b
|
|
555
|
+
|
|
556
|
+
tbl v15.16b, {v15.16b}, v26.16b
|
|
557
|
+
tbl v16.16b, {v16.16b}, v26.16b
|
|
558
|
+
tbl v17.16b, {v17.16b}, v26.16b
|
|
559
|
+
tbl v18.16b, {v18.16b}, v26.16b
|
|
560
|
+
tbl v19.16b, {v19.16b}, v26.16b
|
|
561
|
+
|
|
562
|
+
add v10.4s, v10.4s, v15.4s
|
|
563
|
+
add v11.4s, v11.4s, v16.4s
|
|
564
|
+
add v12.4s, v12.4s, v17.4s
|
|
565
|
+
add v13.4s, v13.4s, v18.4s
|
|
566
|
+
add v14.4s, v14.4s, v19.4s
|
|
567
|
+
|
|
568
|
+
eor v20.16b, v20.16b, v10.16b
|
|
569
|
+
eor v5.16b, v5.16b, v11.16b
|
|
570
|
+
eor v6.16b, v6.16b, v12.16b
|
|
571
|
+
eor v7.16b, v7.16b, v13.16b
|
|
572
|
+
eor v8.16b, v8.16b, v14.16b
|
|
573
|
+
|
|
574
|
+
ushr v9.4s, v8.4s, #25
|
|
575
|
+
sli v9.4s, v8.4s, #7
|
|
576
|
+
ushr v8.4s, v7.4s, #25
|
|
577
|
+
sli v8.4s, v7.4s, #7
|
|
578
|
+
ushr v7.4s, v6.4s, #25
|
|
579
|
+
sli v7.4s, v6.4s, #7
|
|
580
|
+
ushr v6.4s, v5.4s, #25
|
|
581
|
+
sli v6.4s, v5.4s, #7
|
|
582
|
+
ushr v5.4s, v20.4s, #25
|
|
583
|
+
sli v5.4s, v20.4s, #7
|
|
584
|
+
|
|
585
|
+
ext v9.16b, v9.16b, v9.16b, #4
|
|
586
|
+
ext v14.16b, v14.16b, v14.16b, #8
|
|
587
|
+
ext v19.16b, v19.16b, v19.16b, #12
|
|
588
|
+
ldp x11, x12, [x3], 16
|
|
589
|
+
adds x8, x8, x11
|
|
590
|
+
adcs x9, x9, x12
|
|
591
|
+
adc x10, x10, x15
|
|
592
|
+
mul x11, x8, x16 // [t2:t1:t0] = [acc2:acc1:acc0] * r0
|
|
593
|
+
umulh x12, x8, x16
|
|
594
|
+
mul x13, x9, x16
|
|
595
|
+
umulh x14, x9, x16
|
|
596
|
+
adds x12, x12, x13
|
|
597
|
+
mul x13, x10, x16
|
|
598
|
+
adc x13, x13, x14
|
|
599
|
+
mul x14, x8, x17 // [t3:t2:t1:t0] = [acc2:acc1:acc0] * [r1:r0]
|
|
600
|
+
umulh x8, x8, x17
|
|
601
|
+
adds x12, x12, x14
|
|
602
|
+
mul x14, x9, x17
|
|
603
|
+
umulh x9, x9, x17
|
|
604
|
+
adcs x14, x14, x8
|
|
605
|
+
mul x10, x10, x17
|
|
606
|
+
adc x10, x10, x9
|
|
607
|
+
adds x13, x13, x14
|
|
608
|
+
adc x14, x10, xzr
|
|
609
|
+
and x10, x13, #3 // At this point acc2 is 2 bits at most (value of 3)
|
|
610
|
+
and x8, x13, #-4
|
|
611
|
+
extr x13, x14, x13, #2
|
|
612
|
+
adds x8, x8, x11
|
|
613
|
+
lsr x11, x14, #2
|
|
614
|
+
adc x9, x14, x11 // No carry out since t0 is 61 bits and t3 is 63 bits
|
|
615
|
+
adds x8, x8, x13
|
|
616
|
+
adcs x9, x9, x12
|
|
617
|
+
adc x10, x10, xzr // At this point acc2 has the value of 4 at most
|
|
618
|
+
add v0.4s, v0.4s, v6.4s
|
|
619
|
+
add v1.4s, v1.4s, v7.4s
|
|
620
|
+
add v2.4s, v2.4s, v8.4s
|
|
621
|
+
add v3.4s, v3.4s, v5.4s
|
|
622
|
+
add v4.4s, v4.4s, v9.4s
|
|
623
|
+
|
|
624
|
+
eor v18.16b, v18.16b, v0.16b
|
|
625
|
+
eor v15.16b, v15.16b, v1.16b
|
|
626
|
+
eor v16.16b, v16.16b, v2.16b
|
|
627
|
+
eor v17.16b, v17.16b, v3.16b
|
|
628
|
+
eor v19.16b, v19.16b, v4.16b
|
|
629
|
+
|
|
630
|
+
rev32 v18.8h, v18.8h
|
|
631
|
+
rev32 v15.8h, v15.8h
|
|
632
|
+
rev32 v16.8h, v16.8h
|
|
633
|
+
rev32 v17.8h, v17.8h
|
|
634
|
+
rev32 v19.8h, v19.8h
|
|
635
|
+
|
|
636
|
+
add v12.4s, v12.4s, v18.4s
|
|
637
|
+
add v13.4s, v13.4s, v15.4s
|
|
638
|
+
add v10.4s, v10.4s, v16.4s
|
|
639
|
+
add v11.4s, v11.4s, v17.4s
|
|
640
|
+
add v14.4s, v14.4s, v19.4s
|
|
641
|
+
|
|
642
|
+
eor v6.16b, v6.16b, v12.16b
|
|
643
|
+
eor v7.16b, v7.16b, v13.16b
|
|
644
|
+
eor v8.16b, v8.16b, v10.16b
|
|
645
|
+
eor v5.16b, v5.16b, v11.16b
|
|
646
|
+
eor v9.16b, v9.16b, v14.16b
|
|
647
|
+
|
|
648
|
+
ushr v20.4s, v6.4s, #20
|
|
649
|
+
sli v20.4s, v6.4s, #12
|
|
650
|
+
ushr v6.4s, v7.4s, #20
|
|
651
|
+
sli v6.4s, v7.4s, #12
|
|
652
|
+
ushr v7.4s, v8.4s, #20
|
|
653
|
+
sli v7.4s, v8.4s, #12
|
|
654
|
+
ushr v8.4s, v5.4s, #20
|
|
655
|
+
sli v8.4s, v5.4s, #12
|
|
656
|
+
ushr v5.4s, v9.4s, #20
|
|
657
|
+
sli v5.4s, v9.4s, #12
|
|
658
|
+
|
|
659
|
+
add v0.4s, v0.4s, v20.4s
|
|
660
|
+
add v1.4s, v1.4s, v6.4s
|
|
661
|
+
add v2.4s, v2.4s, v7.4s
|
|
662
|
+
add v3.4s, v3.4s, v8.4s
|
|
663
|
+
add v4.4s, v4.4s, v5.4s
|
|
664
|
+
|
|
665
|
+
eor v18.16b, v18.16b, v0.16b
|
|
666
|
+
eor v15.16b, v15.16b, v1.16b
|
|
667
|
+
eor v16.16b, v16.16b, v2.16b
|
|
668
|
+
eor v17.16b, v17.16b, v3.16b
|
|
669
|
+
eor v19.16b, v19.16b, v4.16b
|
|
670
|
+
|
|
671
|
+
tbl v18.16b, {v18.16b}, v26.16b
|
|
672
|
+
tbl v15.16b, {v15.16b}, v26.16b
|
|
673
|
+
tbl v16.16b, {v16.16b}, v26.16b
|
|
674
|
+
tbl v17.16b, {v17.16b}, v26.16b
|
|
675
|
+
tbl v19.16b, {v19.16b}, v26.16b
|
|
676
|
+
|
|
677
|
+
add v12.4s, v12.4s, v18.4s
|
|
678
|
+
add v13.4s, v13.4s, v15.4s
|
|
679
|
+
add v10.4s, v10.4s, v16.4s
|
|
680
|
+
add v11.4s, v11.4s, v17.4s
|
|
681
|
+
add v14.4s, v14.4s, v19.4s
|
|
682
|
+
|
|
683
|
+
eor v20.16b, v20.16b, v12.16b
|
|
684
|
+
eor v6.16b, v6.16b, v13.16b
|
|
685
|
+
eor v7.16b, v7.16b, v10.16b
|
|
686
|
+
eor v8.16b, v8.16b, v11.16b
|
|
687
|
+
eor v5.16b, v5.16b, v14.16b
|
|
688
|
+
|
|
689
|
+
ushr v9.4s, v5.4s, #25
|
|
690
|
+
sli v9.4s, v5.4s, #7
|
|
691
|
+
ushr v5.4s, v8.4s, #25
|
|
692
|
+
sli v5.4s, v8.4s, #7
|
|
693
|
+
ushr v8.4s, v7.4s, #25
|
|
694
|
+
sli v8.4s, v7.4s, #7
|
|
695
|
+
ushr v7.4s, v6.4s, #25
|
|
696
|
+
sli v7.4s, v6.4s, #7
|
|
697
|
+
ushr v6.4s, v20.4s, #25
|
|
698
|
+
sli v6.4s, v20.4s, #7
|
|
699
|
+
|
|
700
|
+
ext v9.16b, v9.16b, v9.16b, #12
|
|
701
|
+
ext v14.16b, v14.16b, v14.16b, #8
|
|
702
|
+
ext v19.16b, v19.16b, v19.16b, #4
|
|
703
|
+
subs x6, x6, #1
|
|
704
|
+
b.ge Lseal_main_loop_rounds
|
|
705
|
+
ldp x11, x12, [x3], 16
|
|
706
|
+
adds x8, x8, x11
|
|
707
|
+
adcs x9, x9, x12
|
|
708
|
+
adc x10, x10, x15
|
|
709
|
+
mul x11, x8, x16 // [t2:t1:t0] = [acc2:acc1:acc0] * r0
|
|
710
|
+
umulh x12, x8, x16
|
|
711
|
+
mul x13, x9, x16
|
|
712
|
+
umulh x14, x9, x16
|
|
713
|
+
adds x12, x12, x13
|
|
714
|
+
mul x13, x10, x16
|
|
715
|
+
adc x13, x13, x14
|
|
716
|
+
mul x14, x8, x17 // [t3:t2:t1:t0] = [acc2:acc1:acc0] * [r1:r0]
|
|
717
|
+
umulh x8, x8, x17
|
|
718
|
+
adds x12, x12, x14
|
|
719
|
+
mul x14, x9, x17
|
|
720
|
+
umulh x9, x9, x17
|
|
721
|
+
adcs x14, x14, x8
|
|
722
|
+
mul x10, x10, x17
|
|
723
|
+
adc x10, x10, x9
|
|
724
|
+
adds x13, x13, x14
|
|
725
|
+
adc x14, x10, xzr
|
|
726
|
+
and x10, x13, #3 // At this point acc2 is 2 bits at most (value of 3)
|
|
727
|
+
and x8, x13, #-4
|
|
728
|
+
extr x13, x14, x13, #2
|
|
729
|
+
adds x8, x8, x11
|
|
730
|
+
lsr x11, x14, #2
|
|
731
|
+
adc x9, x14, x11 // No carry out since t0 is 61 bits and t3 is 63 bits
|
|
732
|
+
adds x8, x8, x13
|
|
733
|
+
adcs x9, x9, x12
|
|
734
|
+
adc x10, x10, xzr // At this point acc2 has the value of 4 at most
|
|
735
|
+
subs x7, x7, #1
|
|
736
|
+
b.gt Lseal_main_loop_rounds
|
|
737
|
+
|
|
738
|
+
eor v20.16b, v20.16b, v20.16b //zero
|
|
739
|
+
not v21.16b, v20.16b // -1
|
|
740
|
+
sub v21.4s, v25.4s, v21.4s // Add +1
|
|
741
|
+
ext v20.16b, v21.16b, v20.16b, #12 // Get the last element (counter)
|
|
742
|
+
add v19.4s, v19.4s, v20.4s
|
|
743
|
+
|
|
744
|
+
add v15.4s, v15.4s, v25.4s
|
|
745
|
+
mov x11, #5
|
|
746
|
+
dup v20.4s, w11
|
|
747
|
+
add v25.4s, v25.4s, v20.4s
|
|
748
|
+
|
|
749
|
+
zip1 v20.4s, v0.4s, v1.4s
|
|
750
|
+
zip2 v21.4s, v0.4s, v1.4s
|
|
751
|
+
zip1 v22.4s, v2.4s, v3.4s
|
|
752
|
+
zip2 v23.4s, v2.4s, v3.4s
|
|
753
|
+
|
|
754
|
+
zip1 v0.2d, v20.2d, v22.2d
|
|
755
|
+
zip2 v1.2d, v20.2d, v22.2d
|
|
756
|
+
zip1 v2.2d, v21.2d, v23.2d
|
|
757
|
+
zip2 v3.2d, v21.2d, v23.2d
|
|
758
|
+
|
|
759
|
+
zip1 v20.4s, v5.4s, v6.4s
|
|
760
|
+
zip2 v21.4s, v5.4s, v6.4s
|
|
761
|
+
zip1 v22.4s, v7.4s, v8.4s
|
|
762
|
+
zip2 v23.4s, v7.4s, v8.4s
|
|
763
|
+
|
|
764
|
+
zip1 v5.2d, v20.2d, v22.2d
|
|
765
|
+
zip2 v6.2d, v20.2d, v22.2d
|
|
766
|
+
zip1 v7.2d, v21.2d, v23.2d
|
|
767
|
+
zip2 v8.2d, v21.2d, v23.2d
|
|
768
|
+
|
|
769
|
+
zip1 v20.4s, v10.4s, v11.4s
|
|
770
|
+
zip2 v21.4s, v10.4s, v11.4s
|
|
771
|
+
zip1 v22.4s, v12.4s, v13.4s
|
|
772
|
+
zip2 v23.4s, v12.4s, v13.4s
|
|
773
|
+
|
|
774
|
+
zip1 v10.2d, v20.2d, v22.2d
|
|
775
|
+
zip2 v11.2d, v20.2d, v22.2d
|
|
776
|
+
zip1 v12.2d, v21.2d, v23.2d
|
|
777
|
+
zip2 v13.2d, v21.2d, v23.2d
|
|
778
|
+
|
|
779
|
+
zip1 v20.4s, v15.4s, v16.4s
|
|
780
|
+
zip2 v21.4s, v15.4s, v16.4s
|
|
781
|
+
zip1 v22.4s, v17.4s, v18.4s
|
|
782
|
+
zip2 v23.4s, v17.4s, v18.4s
|
|
783
|
+
|
|
784
|
+
zip1 v15.2d, v20.2d, v22.2d
|
|
785
|
+
zip2 v16.2d, v20.2d, v22.2d
|
|
786
|
+
zip1 v17.2d, v21.2d, v23.2d
|
|
787
|
+
zip2 v18.2d, v21.2d, v23.2d
|
|
788
|
+
|
|
789
|
+
add v0.4s, v0.4s, v24.4s
|
|
790
|
+
add v5.4s, v5.4s, v28.4s
|
|
791
|
+
add v10.4s, v10.4s, v29.4s
|
|
792
|
+
add v15.4s, v15.4s, v30.4s
|
|
793
|
+
|
|
794
|
+
add v1.4s, v1.4s, v24.4s
|
|
795
|
+
add v6.4s, v6.4s, v28.4s
|
|
796
|
+
add v11.4s, v11.4s, v29.4s
|
|
797
|
+
add v16.4s, v16.4s, v30.4s
|
|
798
|
+
|
|
799
|
+
add v2.4s, v2.4s, v24.4s
|
|
800
|
+
add v7.4s, v7.4s, v28.4s
|
|
801
|
+
add v12.4s, v12.4s, v29.4s
|
|
802
|
+
add v17.4s, v17.4s, v30.4s
|
|
803
|
+
|
|
804
|
+
add v3.4s, v3.4s, v24.4s
|
|
805
|
+
add v8.4s, v8.4s, v28.4s
|
|
806
|
+
add v13.4s, v13.4s, v29.4s
|
|
807
|
+
add v18.4s, v18.4s, v30.4s
|
|
808
|
+
|
|
809
|
+
add v4.4s, v4.4s, v24.4s
|
|
810
|
+
add v9.4s, v9.4s, v28.4s
|
|
811
|
+
add v14.4s, v14.4s, v29.4s
|
|
812
|
+
add v19.4s, v19.4s, v30.4s
|
|
813
|
+
|
|
814
|
+
cmp x2, #320
|
|
815
|
+
b.le Lseal_tail
|
|
816
|
+
|
|
817
|
+
ld1 {v20.16b - v23.16b}, [x1], #64
|
|
818
|
+
eor v20.16b, v20.16b, v0.16b
|
|
819
|
+
eor v21.16b, v21.16b, v5.16b
|
|
820
|
+
eor v22.16b, v22.16b, v10.16b
|
|
821
|
+
eor v23.16b, v23.16b, v15.16b
|
|
822
|
+
st1 {v20.16b - v23.16b}, [x0], #64
|
|
823
|
+
|
|
824
|
+
ld1 {v20.16b - v23.16b}, [x1], #64
|
|
825
|
+
eor v20.16b, v20.16b, v1.16b
|
|
826
|
+
eor v21.16b, v21.16b, v6.16b
|
|
827
|
+
eor v22.16b, v22.16b, v11.16b
|
|
828
|
+
eor v23.16b, v23.16b, v16.16b
|
|
829
|
+
st1 {v20.16b - v23.16b}, [x0], #64
|
|
830
|
+
|
|
831
|
+
ld1 {v20.16b - v23.16b}, [x1], #64
|
|
832
|
+
eor v20.16b, v20.16b, v2.16b
|
|
833
|
+
eor v21.16b, v21.16b, v7.16b
|
|
834
|
+
eor v22.16b, v22.16b, v12.16b
|
|
835
|
+
eor v23.16b, v23.16b, v17.16b
|
|
836
|
+
st1 {v20.16b - v23.16b}, [x0], #64
|
|
837
|
+
|
|
838
|
+
ld1 {v20.16b - v23.16b}, [x1], #64
|
|
839
|
+
eor v20.16b, v20.16b, v3.16b
|
|
840
|
+
eor v21.16b, v21.16b, v8.16b
|
|
841
|
+
eor v22.16b, v22.16b, v13.16b
|
|
842
|
+
eor v23.16b, v23.16b, v18.16b
|
|
843
|
+
st1 {v20.16b - v23.16b}, [x0], #64
|
|
844
|
+
|
|
845
|
+
ld1 {v20.16b - v23.16b}, [x1], #64
|
|
846
|
+
eor v20.16b, v20.16b, v4.16b
|
|
847
|
+
eor v21.16b, v21.16b, v9.16b
|
|
848
|
+
eor v22.16b, v22.16b, v14.16b
|
|
849
|
+
eor v23.16b, v23.16b, v19.16b
|
|
850
|
+
st1 {v20.16b - v23.16b}, [x0], #64
|
|
851
|
+
|
|
852
|
+
sub x2, x2, #320
|
|
853
|
+
|
|
854
|
+
mov x6, #0
|
|
855
|
+
mov x7, #10 // For the remainder of the loop we always hash and encrypt 320 bytes per iteration
|
|
856
|
+
|
|
857
|
+
b Lseal_main_loop
|
|
858
|
+
|
|
859
|
+
Lseal_tail:
|
|
860
|
+
// This part of the function handles the storage and authentication of the last [0,320) bytes
|
|
861
|
+
// We assume A0-A4 ... D0-D4 hold at least inl (320 max) bytes of the stream data.
|
|
862
|
+
cmp x2, #64
|
|
863
|
+
b.lt Lseal_tail_64
|
|
864
|
+
|
|
865
|
+
// Store and authenticate 64B blocks per iteration
|
|
866
|
+
ld1 {v20.16b - v23.16b}, [x1], #64
|
|
867
|
+
|
|
868
|
+
eor v20.16b, v20.16b, v0.16b
|
|
869
|
+
eor v21.16b, v21.16b, v5.16b
|
|
870
|
+
eor v22.16b, v22.16b, v10.16b
|
|
871
|
+
eor v23.16b, v23.16b, v15.16b
|
|
872
|
+
mov x11, v20.d[0]
|
|
873
|
+
mov x12, v20.d[1]
|
|
874
|
+
adds x8, x8, x11
|
|
875
|
+
adcs x9, x9, x12
|
|
876
|
+
adc x10, x10, x15
|
|
877
|
+
mul x11, x8, x16 // [t2:t1:t0] = [acc2:acc1:acc0] * r0
|
|
878
|
+
umulh x12, x8, x16
|
|
879
|
+
mul x13, x9, x16
|
|
880
|
+
umulh x14, x9, x16
|
|
881
|
+
adds x12, x12, x13
|
|
882
|
+
mul x13, x10, x16
|
|
883
|
+
adc x13, x13, x14
|
|
884
|
+
mul x14, x8, x17 // [t3:t2:t1:t0] = [acc2:acc1:acc0] * [r1:r0]
|
|
885
|
+
umulh x8, x8, x17
|
|
886
|
+
adds x12, x12, x14
|
|
887
|
+
mul x14, x9, x17
|
|
888
|
+
umulh x9, x9, x17
|
|
889
|
+
adcs x14, x14, x8
|
|
890
|
+
mul x10, x10, x17
|
|
891
|
+
adc x10, x10, x9
|
|
892
|
+
adds x13, x13, x14
|
|
893
|
+
adc x14, x10, xzr
|
|
894
|
+
and x10, x13, #3 // At this point acc2 is 2 bits at most (value of 3)
|
|
895
|
+
and x8, x13, #-4
|
|
896
|
+
extr x13, x14, x13, #2
|
|
897
|
+
adds x8, x8, x11
|
|
898
|
+
lsr x11, x14, #2
|
|
899
|
+
adc x9, x14, x11 // No carry out since t0 is 61 bits and t3 is 63 bits
|
|
900
|
+
adds x8, x8, x13
|
|
901
|
+
adcs x9, x9, x12
|
|
902
|
+
adc x10, x10, xzr // At this point acc2 has the value of 4 at most
|
|
903
|
+
mov x11, v21.d[0]
|
|
904
|
+
mov x12, v21.d[1]
|
|
905
|
+
adds x8, x8, x11
|
|
906
|
+
adcs x9, x9, x12
|
|
907
|
+
adc x10, x10, x15
|
|
908
|
+
mul x11, x8, x16 // [t2:t1:t0] = [acc2:acc1:acc0] * r0
|
|
909
|
+
umulh x12, x8, x16
|
|
910
|
+
mul x13, x9, x16
|
|
911
|
+
umulh x14, x9, x16
|
|
912
|
+
adds x12, x12, x13
|
|
913
|
+
mul x13, x10, x16
|
|
914
|
+
adc x13, x13, x14
|
|
915
|
+
mul x14, x8, x17 // [t3:t2:t1:t0] = [acc2:acc1:acc0] * [r1:r0]
|
|
916
|
+
umulh x8, x8, x17
|
|
917
|
+
adds x12, x12, x14
|
|
918
|
+
mul x14, x9, x17
|
|
919
|
+
umulh x9, x9, x17
|
|
920
|
+
adcs x14, x14, x8
|
|
921
|
+
mul x10, x10, x17
|
|
922
|
+
adc x10, x10, x9
|
|
923
|
+
adds x13, x13, x14
|
|
924
|
+
adc x14, x10, xzr
|
|
925
|
+
and x10, x13, #3 // At this point acc2 is 2 bits at most (value of 3)
|
|
926
|
+
and x8, x13, #-4
|
|
927
|
+
extr x13, x14, x13, #2
|
|
928
|
+
adds x8, x8, x11
|
|
929
|
+
lsr x11, x14, #2
|
|
930
|
+
adc x9, x14, x11 // No carry out since t0 is 61 bits and t3 is 63 bits
|
|
931
|
+
adds x8, x8, x13
|
|
932
|
+
adcs x9, x9, x12
|
|
933
|
+
adc x10, x10, xzr // At this point acc2 has the value of 4 at most
|
|
934
|
+
mov x11, v22.d[0]
|
|
935
|
+
mov x12, v22.d[1]
|
|
936
|
+
adds x8, x8, x11
|
|
937
|
+
adcs x9, x9, x12
|
|
938
|
+
adc x10, x10, x15
|
|
939
|
+
mul x11, x8, x16 // [t2:t1:t0] = [acc2:acc1:acc0] * r0
|
|
940
|
+
umulh x12, x8, x16
|
|
941
|
+
mul x13, x9, x16
|
|
942
|
+
umulh x14, x9, x16
|
|
943
|
+
adds x12, x12, x13
|
|
944
|
+
mul x13, x10, x16
|
|
945
|
+
adc x13, x13, x14
|
|
946
|
+
mul x14, x8, x17 // [t3:t2:t1:t0] = [acc2:acc1:acc0] * [r1:r0]
|
|
947
|
+
umulh x8, x8, x17
|
|
948
|
+
adds x12, x12, x14
|
|
949
|
+
mul x14, x9, x17
|
|
950
|
+
umulh x9, x9, x17
|
|
951
|
+
adcs x14, x14, x8
|
|
952
|
+
mul x10, x10, x17
|
|
953
|
+
adc x10, x10, x9
|
|
954
|
+
adds x13, x13, x14
|
|
955
|
+
adc x14, x10, xzr
|
|
956
|
+
and x10, x13, #3 // At this point acc2 is 2 bits at most (value of 3)
|
|
957
|
+
and x8, x13, #-4
|
|
958
|
+
extr x13, x14, x13, #2
|
|
959
|
+
adds x8, x8, x11
|
|
960
|
+
lsr x11, x14, #2
|
|
961
|
+
adc x9, x14, x11 // No carry out since t0 is 61 bits and t3 is 63 bits
|
|
962
|
+
adds x8, x8, x13
|
|
963
|
+
adcs x9, x9, x12
|
|
964
|
+
adc x10, x10, xzr // At this point acc2 has the value of 4 at most
|
|
965
|
+
mov x11, v23.d[0]
|
|
966
|
+
mov x12, v23.d[1]
|
|
967
|
+
adds x8, x8, x11
|
|
968
|
+
adcs x9, x9, x12
|
|
969
|
+
adc x10, x10, x15
|
|
970
|
+
mul x11, x8, x16 // [t2:t1:t0] = [acc2:acc1:acc0] * r0
|
|
971
|
+
umulh x12, x8, x16
|
|
972
|
+
mul x13, x9, x16
|
|
973
|
+
umulh x14, x9, x16
|
|
974
|
+
adds x12, x12, x13
|
|
975
|
+
mul x13, x10, x16
|
|
976
|
+
adc x13, x13, x14
|
|
977
|
+
mul x14, x8, x17 // [t3:t2:t1:t0] = [acc2:acc1:acc0] * [r1:r0]
|
|
978
|
+
umulh x8, x8, x17
|
|
979
|
+
adds x12, x12, x14
|
|
980
|
+
mul x14, x9, x17
|
|
981
|
+
umulh x9, x9, x17
|
|
982
|
+
adcs x14, x14, x8
|
|
983
|
+
mul x10, x10, x17
|
|
984
|
+
adc x10, x10, x9
|
|
985
|
+
adds x13, x13, x14
|
|
986
|
+
adc x14, x10, xzr
|
|
987
|
+
and x10, x13, #3 // At this point acc2 is 2 bits at most (value of 3)
|
|
988
|
+
and x8, x13, #-4
|
|
989
|
+
extr x13, x14, x13, #2
|
|
990
|
+
adds x8, x8, x11
|
|
991
|
+
lsr x11, x14, #2
|
|
992
|
+
adc x9, x14, x11 // No carry out since t0 is 61 bits and t3 is 63 bits
|
|
993
|
+
adds x8, x8, x13
|
|
994
|
+
adcs x9, x9, x12
|
|
995
|
+
adc x10, x10, xzr // At this point acc2 has the value of 4 at most
|
|
996
|
+
st1 {v20.16b - v23.16b}, [x0], #64
|
|
997
|
+
sub x2, x2, #64
|
|
998
|
+
|
|
999
|
+
// Shift the state left by 64 bytes for the next iteration of the loop
|
|
1000
|
+
mov v0.16b, v1.16b
|
|
1001
|
+
mov v5.16b, v6.16b
|
|
1002
|
+
mov v10.16b, v11.16b
|
|
1003
|
+
mov v15.16b, v16.16b
|
|
1004
|
+
|
|
1005
|
+
mov v1.16b, v2.16b
|
|
1006
|
+
mov v6.16b, v7.16b
|
|
1007
|
+
mov v11.16b, v12.16b
|
|
1008
|
+
mov v16.16b, v17.16b
|
|
1009
|
+
|
|
1010
|
+
mov v2.16b, v3.16b
|
|
1011
|
+
mov v7.16b, v8.16b
|
|
1012
|
+
mov v12.16b, v13.16b
|
|
1013
|
+
mov v17.16b, v18.16b
|
|
1014
|
+
|
|
1015
|
+
mov v3.16b, v4.16b
|
|
1016
|
+
mov v8.16b, v9.16b
|
|
1017
|
+
mov v13.16b, v14.16b
|
|
1018
|
+
mov v18.16b, v19.16b
|
|
1019
|
+
|
|
1020
|
+
b Lseal_tail
|
|
1021
|
+
|
|
1022
|
+
Lseal_tail_64:
|
|
1023
|
+
ldp x3, x4, [x5, #48] // extra_in_len and extra_in_ptr
|
|
1024
|
+
|
|
1025
|
+
// Here we handle the last [0,64) bytes of plaintext
|
|
1026
|
+
cmp x2, #16
|
|
1027
|
+
b.lt Lseal_tail_16
|
|
1028
|
+
// Each iteration encrypt and authenticate a 16B block
|
|
1029
|
+
ld1 {v20.16b}, [x1], #16
|
|
1030
|
+
eor v20.16b, v20.16b, v0.16b
|
|
1031
|
+
mov x11, v20.d[0]
|
|
1032
|
+
mov x12, v20.d[1]
|
|
1033
|
+
adds x8, x8, x11
|
|
1034
|
+
adcs x9, x9, x12
|
|
1035
|
+
adc x10, x10, x15
|
|
1036
|
+
mul x11, x8, x16 // [t2:t1:t0] = [acc2:acc1:acc0] * r0
|
|
1037
|
+
umulh x12, x8, x16
|
|
1038
|
+
mul x13, x9, x16
|
|
1039
|
+
umulh x14, x9, x16
|
|
1040
|
+
adds x12, x12, x13
|
|
1041
|
+
mul x13, x10, x16
|
|
1042
|
+
adc x13, x13, x14
|
|
1043
|
+
mul x14, x8, x17 // [t3:t2:t1:t0] = [acc2:acc1:acc0] * [r1:r0]
|
|
1044
|
+
umulh x8, x8, x17
|
|
1045
|
+
adds x12, x12, x14
|
|
1046
|
+
mul x14, x9, x17
|
|
1047
|
+
umulh x9, x9, x17
|
|
1048
|
+
adcs x14, x14, x8
|
|
1049
|
+
mul x10, x10, x17
|
|
1050
|
+
adc x10, x10, x9
|
|
1051
|
+
adds x13, x13, x14
|
|
1052
|
+
adc x14, x10, xzr
|
|
1053
|
+
and x10, x13, #3 // At this point acc2 is 2 bits at most (value of 3)
|
|
1054
|
+
and x8, x13, #-4
|
|
1055
|
+
extr x13, x14, x13, #2
|
|
1056
|
+
adds x8, x8, x11
|
|
1057
|
+
lsr x11, x14, #2
|
|
1058
|
+
adc x9, x14, x11 // No carry out since t0 is 61 bits and t3 is 63 bits
|
|
1059
|
+
adds x8, x8, x13
|
|
1060
|
+
adcs x9, x9, x12
|
|
1061
|
+
adc x10, x10, xzr // At this point acc2 has the value of 4 at most
|
|
1062
|
+
st1 {v20.16b}, [x0], #16
|
|
1063
|
+
|
|
1064
|
+
sub x2, x2, #16
|
|
1065
|
+
|
|
1066
|
+
// Shift the state left by 16 bytes for the next iteration of the loop
|
|
1067
|
+
mov v0.16b, v5.16b
|
|
1068
|
+
mov v5.16b, v10.16b
|
|
1069
|
+
mov v10.16b, v15.16b
|
|
1070
|
+
|
|
1071
|
+
b Lseal_tail_64
|
|
1072
|
+
|
|
1073
|
+
Lseal_tail_16:
|
|
1074
|
+
// Here we handle the last [0,16) bytes of ciphertext that require a padded block
|
|
1075
|
+
cbz x2, Lseal_hash_extra
|
|
1076
|
+
|
|
1077
|
+
eor v20.16b, v20.16b, v20.16b // Use T0 to load the plaintext/extra in
|
|
1078
|
+
eor v21.16b, v21.16b, v21.16b // Use T1 to generate an AND mask that will only mask the ciphertext bytes
|
|
1079
|
+
not v22.16b, v20.16b
|
|
1080
|
+
|
|
1081
|
+
mov x6, x2
|
|
1082
|
+
add x1, x1, x2
|
|
1083
|
+
|
|
1084
|
+
cbz x4, Lseal_tail_16_compose // No extra data to pad with, zero padding
|
|
1085
|
+
|
|
1086
|
+
mov x7, #16 // We need to load some extra_in first for padding
|
|
1087
|
+
sub x7, x7, x2
|
|
1088
|
+
cmp x4, x7
|
|
1089
|
+
csel x7, x4, x7, lt // Load the minimum of extra_in_len and the amount needed to fill the register
|
|
1090
|
+
mov x12, x7
|
|
1091
|
+
add x3, x3, x7
|
|
1092
|
+
sub x4, x4, x7
|
|
1093
|
+
|
|
1094
|
+
Lseal_tail16_compose_extra_in:
|
|
1095
|
+
ext v20.16b, v20.16b, v20.16b, #15
|
|
1096
|
+
ldrb w11, [x3, #-1]!
|
|
1097
|
+
mov v20.b[0], w11
|
|
1098
|
+
subs x7, x7, #1
|
|
1099
|
+
b.gt Lseal_tail16_compose_extra_in
|
|
1100
|
+
|
|
1101
|
+
add x3, x3, x12
|
|
1102
|
+
|
|
1103
|
+
Lseal_tail_16_compose:
|
|
1104
|
+
ext v20.16b, v20.16b, v20.16b, #15
|
|
1105
|
+
ldrb w11, [x1, #-1]!
|
|
1106
|
+
mov v20.b[0], w11
|
|
1107
|
+
ext v21.16b, v22.16b, v21.16b, #15
|
|
1108
|
+
subs x2, x2, #1
|
|
1109
|
+
b.gt Lseal_tail_16_compose
|
|
1110
|
+
|
|
1111
|
+
and v0.16b, v0.16b, v21.16b
|
|
1112
|
+
eor v20.16b, v20.16b, v0.16b
|
|
1113
|
+
mov v21.16b, v20.16b
|
|
1114
|
+
|
|
1115
|
+
Lseal_tail_16_store:
|
|
1116
|
+
umov w11, v20.b[0]
|
|
1117
|
+
strb w11, [x0], #1
|
|
1118
|
+
ext v20.16b, v20.16b, v20.16b, #1
|
|
1119
|
+
subs x6, x6, #1
|
|
1120
|
+
b.gt Lseal_tail_16_store
|
|
1121
|
+
|
|
1122
|
+
// Hash in the final ct block concatenated with extra_in
|
|
1123
|
+
mov x11, v21.d[0]
|
|
1124
|
+
mov x12, v21.d[1]
|
|
1125
|
+
adds x8, x8, x11
|
|
1126
|
+
adcs x9, x9, x12
|
|
1127
|
+
adc x10, x10, x15
|
|
1128
|
+
mul x11, x8, x16 // [t2:t1:t0] = [acc2:acc1:acc0] * r0
|
|
1129
|
+
umulh x12, x8, x16
|
|
1130
|
+
mul x13, x9, x16
|
|
1131
|
+
umulh x14, x9, x16
|
|
1132
|
+
adds x12, x12, x13
|
|
1133
|
+
mul x13, x10, x16
|
|
1134
|
+
adc x13, x13, x14
|
|
1135
|
+
mul x14, x8, x17 // [t3:t2:t1:t0] = [acc2:acc1:acc0] * [r1:r0]
|
|
1136
|
+
umulh x8, x8, x17
|
|
1137
|
+
adds x12, x12, x14
|
|
1138
|
+
mul x14, x9, x17
|
|
1139
|
+
umulh x9, x9, x17
|
|
1140
|
+
adcs x14, x14, x8
|
|
1141
|
+
mul x10, x10, x17
|
|
1142
|
+
adc x10, x10, x9
|
|
1143
|
+
adds x13, x13, x14
|
|
1144
|
+
adc x14, x10, xzr
|
|
1145
|
+
and x10, x13, #3 // At this point acc2 is 2 bits at most (value of 3)
|
|
1146
|
+
and x8, x13, #-4
|
|
1147
|
+
extr x13, x14, x13, #2
|
|
1148
|
+
adds x8, x8, x11
|
|
1149
|
+
lsr x11, x14, #2
|
|
1150
|
+
adc x9, x14, x11 // No carry out since t0 is 61 bits and t3 is 63 bits
|
|
1151
|
+
adds x8, x8, x13
|
|
1152
|
+
adcs x9, x9, x12
|
|
1153
|
+
adc x10, x10, xzr // At this point acc2 has the value of 4 at most
|
|
1154
|
+
|
|
1155
|
+
Lseal_hash_extra:
|
|
1156
|
+
cbz x4, Lseal_finalize
|
|
1157
|
+
|
|
1158
|
+
Lseal_hash_extra_loop:
|
|
1159
|
+
cmp x4, #16
|
|
1160
|
+
b.lt Lseal_hash_extra_tail
|
|
1161
|
+
ld1 {v20.16b}, [x3], #16
|
|
1162
|
+
mov x11, v20.d[0]
|
|
1163
|
+
mov x12, v20.d[1]
|
|
1164
|
+
adds x8, x8, x11
|
|
1165
|
+
adcs x9, x9, x12
|
|
1166
|
+
adc x10, x10, x15
|
|
1167
|
+
mul x11, x8, x16 // [t2:t1:t0] = [acc2:acc1:acc0] * r0
|
|
1168
|
+
umulh x12, x8, x16
|
|
1169
|
+
mul x13, x9, x16
|
|
1170
|
+
umulh x14, x9, x16
|
|
1171
|
+
adds x12, x12, x13
|
|
1172
|
+
mul x13, x10, x16
|
|
1173
|
+
adc x13, x13, x14
|
|
1174
|
+
mul x14, x8, x17 // [t3:t2:t1:t0] = [acc2:acc1:acc0] * [r1:r0]
|
|
1175
|
+
umulh x8, x8, x17
|
|
1176
|
+
adds x12, x12, x14
|
|
1177
|
+
mul x14, x9, x17
|
|
1178
|
+
umulh x9, x9, x17
|
|
1179
|
+
adcs x14, x14, x8
|
|
1180
|
+
mul x10, x10, x17
|
|
1181
|
+
adc x10, x10, x9
|
|
1182
|
+
adds x13, x13, x14
|
|
1183
|
+
adc x14, x10, xzr
|
|
1184
|
+
and x10, x13, #3 // At this point acc2 is 2 bits at most (value of 3)
|
|
1185
|
+
and x8, x13, #-4
|
|
1186
|
+
extr x13, x14, x13, #2
|
|
1187
|
+
adds x8, x8, x11
|
|
1188
|
+
lsr x11, x14, #2
|
|
1189
|
+
adc x9, x14, x11 // No carry out since t0 is 61 bits and t3 is 63 bits
|
|
1190
|
+
adds x8, x8, x13
|
|
1191
|
+
adcs x9, x9, x12
|
|
1192
|
+
adc x10, x10, xzr // At this point acc2 has the value of 4 at most
|
|
1193
|
+
sub x4, x4, #16
|
|
1194
|
+
b Lseal_hash_extra_loop
|
|
1195
|
+
|
|
1196
|
+
Lseal_hash_extra_tail:
|
|
1197
|
+
cbz x4, Lseal_finalize
|
|
1198
|
+
eor v20.16b, v20.16b, v20.16b // Use T0 to load the remaining extra ciphertext
|
|
1199
|
+
add x3, x3, x4
|
|
1200
|
+
|
|
1201
|
+
Lseal_hash_extra_load:
|
|
1202
|
+
ext v20.16b, v20.16b, v20.16b, #15
|
|
1203
|
+
ldrb w11, [x3, #-1]!
|
|
1204
|
+
mov v20.b[0], w11
|
|
1205
|
+
subs x4, x4, #1
|
|
1206
|
+
b.gt Lseal_hash_extra_load
|
|
1207
|
+
|
|
1208
|
+
// Hash in the final padded extra_in block
|
|
1209
|
+
mov x11, v20.d[0]
|
|
1210
|
+
mov x12, v20.d[1]
|
|
1211
|
+
adds x8, x8, x11
|
|
1212
|
+
adcs x9, x9, x12
|
|
1213
|
+
adc x10, x10, x15
|
|
1214
|
+
mul x11, x8, x16 // [t2:t1:t0] = [acc2:acc1:acc0] * r0
|
|
1215
|
+
umulh x12, x8, x16
|
|
1216
|
+
mul x13, x9, x16
|
|
1217
|
+
umulh x14, x9, x16
|
|
1218
|
+
adds x12, x12, x13
|
|
1219
|
+
mul x13, x10, x16
|
|
1220
|
+
adc x13, x13, x14
|
|
1221
|
+
mul x14, x8, x17 // [t3:t2:t1:t0] = [acc2:acc1:acc0] * [r1:r0]
|
|
1222
|
+
umulh x8, x8, x17
|
|
1223
|
+
adds x12, x12, x14
|
|
1224
|
+
mul x14, x9, x17
|
|
1225
|
+
umulh x9, x9, x17
|
|
1226
|
+
adcs x14, x14, x8
|
|
1227
|
+
mul x10, x10, x17
|
|
1228
|
+
adc x10, x10, x9
|
|
1229
|
+
adds x13, x13, x14
|
|
1230
|
+
adc x14, x10, xzr
|
|
1231
|
+
and x10, x13, #3 // At this point acc2 is 2 bits at most (value of 3)
|
|
1232
|
+
and x8, x13, #-4
|
|
1233
|
+
extr x13, x14, x13, #2
|
|
1234
|
+
adds x8, x8, x11
|
|
1235
|
+
lsr x11, x14, #2
|
|
1236
|
+
adc x9, x14, x11 // No carry out since t0 is 61 bits and t3 is 63 bits
|
|
1237
|
+
adds x8, x8, x13
|
|
1238
|
+
adcs x9, x9, x12
|
|
1239
|
+
adc x10, x10, xzr // At this point acc2 has the value of 4 at most
|
|
1240
|
+
|
|
1241
|
+
Lseal_finalize:
|
|
1242
|
+
mov x11, v31.d[0]
|
|
1243
|
+
mov x12, v31.d[1]
|
|
1244
|
+
adds x8, x8, x11
|
|
1245
|
+
adcs x9, x9, x12
|
|
1246
|
+
adc x10, x10, x15
|
|
1247
|
+
mul x11, x8, x16 // [t2:t1:t0] = [acc2:acc1:acc0] * r0
|
|
1248
|
+
umulh x12, x8, x16
|
|
1249
|
+
mul x13, x9, x16
|
|
1250
|
+
umulh x14, x9, x16
|
|
1251
|
+
adds x12, x12, x13
|
|
1252
|
+
mul x13, x10, x16
|
|
1253
|
+
adc x13, x13, x14
|
|
1254
|
+
mul x14, x8, x17 // [t3:t2:t1:t0] = [acc2:acc1:acc0] * [r1:r0]
|
|
1255
|
+
umulh x8, x8, x17
|
|
1256
|
+
adds x12, x12, x14
|
|
1257
|
+
mul x14, x9, x17
|
|
1258
|
+
umulh x9, x9, x17
|
|
1259
|
+
adcs x14, x14, x8
|
|
1260
|
+
mul x10, x10, x17
|
|
1261
|
+
adc x10, x10, x9
|
|
1262
|
+
adds x13, x13, x14
|
|
1263
|
+
adc x14, x10, xzr
|
|
1264
|
+
and x10, x13, #3 // At this point acc2 is 2 bits at most (value of 3)
|
|
1265
|
+
and x8, x13, #-4
|
|
1266
|
+
extr x13, x14, x13, #2
|
|
1267
|
+
adds x8, x8, x11
|
|
1268
|
+
lsr x11, x14, #2
|
|
1269
|
+
adc x9, x14, x11 // No carry out since t0 is 61 bits and t3 is 63 bits
|
|
1270
|
+
adds x8, x8, x13
|
|
1271
|
+
adcs x9, x9, x12
|
|
1272
|
+
adc x10, x10, xzr // At this point acc2 has the value of 4 at most
|
|
1273
|
+
// Final reduction step
|
|
1274
|
+
sub x12, xzr, x15
|
|
1275
|
+
orr x13, xzr, #3
|
|
1276
|
+
subs x11, x8, #-5
|
|
1277
|
+
sbcs x12, x9, x12
|
|
1278
|
+
sbcs x13, x10, x13
|
|
1279
|
+
csel x8, x11, x8, cs
|
|
1280
|
+
csel x9, x12, x9, cs
|
|
1281
|
+
csel x10, x13, x10, cs
|
|
1282
|
+
mov x11, v27.d[0]
|
|
1283
|
+
mov x12, v27.d[1]
|
|
1284
|
+
adds x8, x8, x11
|
|
1285
|
+
adcs x9, x9, x12
|
|
1286
|
+
adc x10, x10, x15
|
|
1287
|
+
|
|
1288
|
+
stp x8, x9, [x5]
|
|
1289
|
+
|
|
1290
|
+
ldp d8, d9, [sp, #16]
|
|
1291
|
+
ldp d10, d11, [sp, #32]
|
|
1292
|
+
ldp d12, d13, [sp, #48]
|
|
1293
|
+
ldp d14, d15, [sp, #64]
|
|
1294
|
+
.cfi_restore b15
|
|
1295
|
+
.cfi_restore b14
|
|
1296
|
+
.cfi_restore b13
|
|
1297
|
+
.cfi_restore b12
|
|
1298
|
+
.cfi_restore b11
|
|
1299
|
+
.cfi_restore b10
|
|
1300
|
+
.cfi_restore b9
|
|
1301
|
+
.cfi_restore b8
|
|
1302
|
+
ldp x29, x30, [sp], 80
|
|
1303
|
+
.cfi_restore w29
|
|
1304
|
+
.cfi_restore w30
|
|
1305
|
+
.cfi_def_cfa_offset 0
|
|
1306
|
+
AARCH64_VALIDATE_LINK_REGISTER
|
|
1307
|
+
ret
|
|
1308
|
+
|
|
1309
|
+
Lseal_128:
|
|
1310
|
+
// On some architectures preparing 5 blocks for small buffers is wasteful
|
|
1311
|
+
eor v25.16b, v25.16b, v25.16b
|
|
1312
|
+
mov x11, #1
|
|
1313
|
+
mov v25.s[0], w11
|
|
1314
|
+
mov v0.16b, v24.16b
|
|
1315
|
+
mov v1.16b, v24.16b
|
|
1316
|
+
mov v2.16b, v24.16b
|
|
1317
|
+
mov v5.16b, v28.16b
|
|
1318
|
+
mov v6.16b, v28.16b
|
|
1319
|
+
mov v7.16b, v28.16b
|
|
1320
|
+
mov v10.16b, v29.16b
|
|
1321
|
+
mov v11.16b, v29.16b
|
|
1322
|
+
mov v12.16b, v29.16b
|
|
1323
|
+
mov v17.16b, v30.16b
|
|
1324
|
+
add v15.4s, v17.4s, v25.4s
|
|
1325
|
+
add v16.4s, v15.4s, v25.4s
|
|
1326
|
+
|
|
1327
|
+
mov x6, #10
|
|
1328
|
+
|
|
1329
|
+
Lseal_128_rounds:
|
|
1330
|
+
add v0.4s, v0.4s, v5.4s
|
|
1331
|
+
add v1.4s, v1.4s, v6.4s
|
|
1332
|
+
add v2.4s, v2.4s, v7.4s
|
|
1333
|
+
eor v15.16b, v15.16b, v0.16b
|
|
1334
|
+
eor v16.16b, v16.16b, v1.16b
|
|
1335
|
+
eor v17.16b, v17.16b, v2.16b
|
|
1336
|
+
rev32 v15.8h, v15.8h
|
|
1337
|
+
rev32 v16.8h, v16.8h
|
|
1338
|
+
rev32 v17.8h, v17.8h
|
|
1339
|
+
|
|
1340
|
+
add v10.4s, v10.4s, v15.4s
|
|
1341
|
+
add v11.4s, v11.4s, v16.4s
|
|
1342
|
+
add v12.4s, v12.4s, v17.4s
|
|
1343
|
+
eor v5.16b, v5.16b, v10.16b
|
|
1344
|
+
eor v6.16b, v6.16b, v11.16b
|
|
1345
|
+
eor v7.16b, v7.16b, v12.16b
|
|
1346
|
+
ushr v20.4s, v5.4s, #20
|
|
1347
|
+
sli v20.4s, v5.4s, #12
|
|
1348
|
+
ushr v5.4s, v6.4s, #20
|
|
1349
|
+
sli v5.4s, v6.4s, #12
|
|
1350
|
+
ushr v6.4s, v7.4s, #20
|
|
1351
|
+
sli v6.4s, v7.4s, #12
|
|
1352
|
+
|
|
1353
|
+
add v0.4s, v0.4s, v20.4s
|
|
1354
|
+
add v1.4s, v1.4s, v5.4s
|
|
1355
|
+
add v2.4s, v2.4s, v6.4s
|
|
1356
|
+
eor v15.16b, v15.16b, v0.16b
|
|
1357
|
+
eor v16.16b, v16.16b, v1.16b
|
|
1358
|
+
eor v17.16b, v17.16b, v2.16b
|
|
1359
|
+
tbl v15.16b, {v15.16b}, v26.16b
|
|
1360
|
+
tbl v16.16b, {v16.16b}, v26.16b
|
|
1361
|
+
tbl v17.16b, {v17.16b}, v26.16b
|
|
1362
|
+
|
|
1363
|
+
add v10.4s, v10.4s, v15.4s
|
|
1364
|
+
add v11.4s, v11.4s, v16.4s
|
|
1365
|
+
add v12.4s, v12.4s, v17.4s
|
|
1366
|
+
eor v20.16b, v20.16b, v10.16b
|
|
1367
|
+
eor v5.16b, v5.16b, v11.16b
|
|
1368
|
+
eor v6.16b, v6.16b, v12.16b
|
|
1369
|
+
ushr v7.4s, v6.4s, #25
|
|
1370
|
+
sli v7.4s, v6.4s, #7
|
|
1371
|
+
ushr v6.4s, v5.4s, #25
|
|
1372
|
+
sli v6.4s, v5.4s, #7
|
|
1373
|
+
ushr v5.4s, v20.4s, #25
|
|
1374
|
+
sli v5.4s, v20.4s, #7
|
|
1375
|
+
|
|
1376
|
+
ext v5.16b, v5.16b, v5.16b, #4
|
|
1377
|
+
ext v6.16b, v6.16b, v6.16b, #4
|
|
1378
|
+
ext v7.16b, v7.16b, v7.16b, #4
|
|
1379
|
+
|
|
1380
|
+
ext v10.16b, v10.16b, v10.16b, #8
|
|
1381
|
+
ext v11.16b, v11.16b, v11.16b, #8
|
|
1382
|
+
ext v12.16b, v12.16b, v12.16b, #8
|
|
1383
|
+
|
|
1384
|
+
ext v15.16b, v15.16b, v15.16b, #12
|
|
1385
|
+
ext v16.16b, v16.16b, v16.16b, #12
|
|
1386
|
+
ext v17.16b, v17.16b, v17.16b, #12
|
|
1387
|
+
add v0.4s, v0.4s, v5.4s
|
|
1388
|
+
add v1.4s, v1.4s, v6.4s
|
|
1389
|
+
add v2.4s, v2.4s, v7.4s
|
|
1390
|
+
eor v15.16b, v15.16b, v0.16b
|
|
1391
|
+
eor v16.16b, v16.16b, v1.16b
|
|
1392
|
+
eor v17.16b, v17.16b, v2.16b
|
|
1393
|
+
rev32 v15.8h, v15.8h
|
|
1394
|
+
rev32 v16.8h, v16.8h
|
|
1395
|
+
rev32 v17.8h, v17.8h
|
|
1396
|
+
|
|
1397
|
+
add v10.4s, v10.4s, v15.4s
|
|
1398
|
+
add v11.4s, v11.4s, v16.4s
|
|
1399
|
+
add v12.4s, v12.4s, v17.4s
|
|
1400
|
+
eor v5.16b, v5.16b, v10.16b
|
|
1401
|
+
eor v6.16b, v6.16b, v11.16b
|
|
1402
|
+
eor v7.16b, v7.16b, v12.16b
|
|
1403
|
+
ushr v20.4s, v5.4s, #20
|
|
1404
|
+
sli v20.4s, v5.4s, #12
|
|
1405
|
+
ushr v5.4s, v6.4s, #20
|
|
1406
|
+
sli v5.4s, v6.4s, #12
|
|
1407
|
+
ushr v6.4s, v7.4s, #20
|
|
1408
|
+
sli v6.4s, v7.4s, #12
|
|
1409
|
+
|
|
1410
|
+
add v0.4s, v0.4s, v20.4s
|
|
1411
|
+
add v1.4s, v1.4s, v5.4s
|
|
1412
|
+
add v2.4s, v2.4s, v6.4s
|
|
1413
|
+
eor v15.16b, v15.16b, v0.16b
|
|
1414
|
+
eor v16.16b, v16.16b, v1.16b
|
|
1415
|
+
eor v17.16b, v17.16b, v2.16b
|
|
1416
|
+
tbl v15.16b, {v15.16b}, v26.16b
|
|
1417
|
+
tbl v16.16b, {v16.16b}, v26.16b
|
|
1418
|
+
tbl v17.16b, {v17.16b}, v26.16b
|
|
1419
|
+
|
|
1420
|
+
add v10.4s, v10.4s, v15.4s
|
|
1421
|
+
add v11.4s, v11.4s, v16.4s
|
|
1422
|
+
add v12.4s, v12.4s, v17.4s
|
|
1423
|
+
eor v20.16b, v20.16b, v10.16b
|
|
1424
|
+
eor v5.16b, v5.16b, v11.16b
|
|
1425
|
+
eor v6.16b, v6.16b, v12.16b
|
|
1426
|
+
ushr v7.4s, v6.4s, #25
|
|
1427
|
+
sli v7.4s, v6.4s, #7
|
|
1428
|
+
ushr v6.4s, v5.4s, #25
|
|
1429
|
+
sli v6.4s, v5.4s, #7
|
|
1430
|
+
ushr v5.4s, v20.4s, #25
|
|
1431
|
+
sli v5.4s, v20.4s, #7
|
|
1432
|
+
|
|
1433
|
+
ext v5.16b, v5.16b, v5.16b, #12
|
|
1434
|
+
ext v6.16b, v6.16b, v6.16b, #12
|
|
1435
|
+
ext v7.16b, v7.16b, v7.16b, #12
|
|
1436
|
+
|
|
1437
|
+
ext v10.16b, v10.16b, v10.16b, #8
|
|
1438
|
+
ext v11.16b, v11.16b, v11.16b, #8
|
|
1439
|
+
ext v12.16b, v12.16b, v12.16b, #8
|
|
1440
|
+
|
|
1441
|
+
ext v15.16b, v15.16b, v15.16b, #4
|
|
1442
|
+
ext v16.16b, v16.16b, v16.16b, #4
|
|
1443
|
+
ext v17.16b, v17.16b, v17.16b, #4
|
|
1444
|
+
subs x6, x6, #1
|
|
1445
|
+
b.hi Lseal_128_rounds
|
|
1446
|
+
|
|
1447
|
+
add v0.4s, v0.4s, v24.4s
|
|
1448
|
+
add v1.4s, v1.4s, v24.4s
|
|
1449
|
+
add v2.4s, v2.4s, v24.4s
|
|
1450
|
+
|
|
1451
|
+
add v5.4s, v5.4s, v28.4s
|
|
1452
|
+
add v6.4s, v6.4s, v28.4s
|
|
1453
|
+
add v7.4s, v7.4s, v28.4s
|
|
1454
|
+
|
|
1455
|
+
// Only the first 32 bytes of the third block (counter = 0) are needed,
|
|
1456
|
+
// so skip updating v12 and v17.
|
|
1457
|
+
add v10.4s, v10.4s, v29.4s
|
|
1458
|
+
add v11.4s, v11.4s, v29.4s
|
|
1459
|
+
|
|
1460
|
+
add v30.4s, v30.4s, v25.4s
|
|
1461
|
+
add v15.4s, v15.4s, v30.4s
|
|
1462
|
+
add v30.4s, v30.4s, v25.4s
|
|
1463
|
+
add v16.4s, v16.4s, v30.4s
|
|
1464
|
+
|
|
1465
|
+
and v2.16b, v2.16b, v27.16b
|
|
1466
|
+
mov x16, v2.d[0] // Move the R key to GPRs
|
|
1467
|
+
mov x17, v2.d[1]
|
|
1468
|
+
mov v27.16b, v7.16b // Store the S key
|
|
1469
|
+
|
|
1470
|
+
bl Lpoly_hash_ad_internal
|
|
1471
|
+
b Lseal_tail
|
|
1472
|
+
.cfi_endproc
|
|
1473
|
+
|
|
1474
|
+
|
|
1475
|
+
/////////////////////////////////
|
|
1476
|
+
//
|
|
1477
|
+
// void chacha20_poly1305_open(uint8_t *pt, uint8_t *ct, size_t len_in, uint8_t *ad, size_t len_ad, union open_data *aead_data);
|
|
1478
|
+
//
|
|
1479
|
+
.globl chacha20_poly1305_open
|
|
1480
|
+
|
|
1481
|
+
.def chacha20_poly1305_open
|
|
1482
|
+
.type 32
|
|
1483
|
+
.endef
|
|
1484
|
+
.align 6
|
|
1485
|
+
chacha20_poly1305_open:
|
|
1486
|
+
AARCH64_SIGN_LINK_REGISTER
|
|
1487
|
+
.cfi_startproc
|
|
1488
|
+
stp x29, x30, [sp, #-80]!
|
|
1489
|
+
.cfi_def_cfa_offset 80
|
|
1490
|
+
.cfi_offset w30, -72
|
|
1491
|
+
.cfi_offset w29, -80
|
|
1492
|
+
mov x29, sp
|
|
1493
|
+
// We probably could do .cfi_def_cfa w29, 80 at this point, but since
|
|
1494
|
+
// we don't actually use the frame pointer like that, it's probably not
|
|
1495
|
+
// worth bothering.
|
|
1496
|
+
stp d8, d9, [sp, #16]
|
|
1497
|
+
stp d10, d11, [sp, #32]
|
|
1498
|
+
stp d12, d13, [sp, #48]
|
|
1499
|
+
stp d14, d15, [sp, #64]
|
|
1500
|
+
.cfi_offset b15, -8
|
|
1501
|
+
.cfi_offset b14, -16
|
|
1502
|
+
.cfi_offset b13, -24
|
|
1503
|
+
.cfi_offset b12, -32
|
|
1504
|
+
.cfi_offset b11, -40
|
|
1505
|
+
.cfi_offset b10, -48
|
|
1506
|
+
.cfi_offset b9, -56
|
|
1507
|
+
.cfi_offset b8, -64
|
|
1508
|
+
|
|
1509
|
+
adrp x11, Lchacha20_consts
|
|
1510
|
+
add x11, x11, :lo12:Lchacha20_consts
|
|
1511
|
+
|
|
1512
|
+
ld1 {v24.16b - v27.16b}, [x11] // Load the CONSTS, INC, ROL8 and CLAMP values
|
|
1513
|
+
ld1 {v28.16b - v30.16b}, [x5]
|
|
1514
|
+
|
|
1515
|
+
mov x15, #1 // Prepare the Poly1305 state
|
|
1516
|
+
mov x8, #0
|
|
1517
|
+
mov x9, #0
|
|
1518
|
+
mov x10, #0
|
|
1519
|
+
|
|
1520
|
+
mov v31.d[0], x4 // Store the input and aad lengths
|
|
1521
|
+
mov v31.d[1], x2
|
|
1522
|
+
|
|
1523
|
+
cmp x2, #128
|
|
1524
|
+
b.le Lopen_128 // Optimization for smaller buffers
|
|
1525
|
+
|
|
1526
|
+
// Initially we prepare a single ChaCha20 block for the Poly1305 R and S keys
|
|
1527
|
+
mov v0.16b, v24.16b
|
|
1528
|
+
mov v5.16b, v28.16b
|
|
1529
|
+
mov v10.16b, v29.16b
|
|
1530
|
+
mov v15.16b, v30.16b
|
|
1531
|
+
|
|
1532
|
+
mov x6, #10
|
|
1533
|
+
|
|
1534
|
+
.align 5
|
|
1535
|
+
Lopen_init_rounds:
|
|
1536
|
+
add v0.4s, v0.4s, v5.4s
|
|
1537
|
+
eor v15.16b, v15.16b, v0.16b
|
|
1538
|
+
rev32 v15.8h, v15.8h
|
|
1539
|
+
|
|
1540
|
+
add v10.4s, v10.4s, v15.4s
|
|
1541
|
+
eor v5.16b, v5.16b, v10.16b
|
|
1542
|
+
ushr v20.4s, v5.4s, #20
|
|
1543
|
+
sli v20.4s, v5.4s, #12
|
|
1544
|
+
add v0.4s, v0.4s, v20.4s
|
|
1545
|
+
eor v15.16b, v15.16b, v0.16b
|
|
1546
|
+
tbl v15.16b, {v15.16b}, v26.16b
|
|
1547
|
+
|
|
1548
|
+
add v10.4s, v10.4s, v15.4s
|
|
1549
|
+
eor v20.16b, v20.16b, v10.16b
|
|
1550
|
+
ushr v5.4s, v20.4s, #25
|
|
1551
|
+
sli v5.4s, v20.4s, #7
|
|
1552
|
+
ext v5.16b, v5.16b, v5.16b, #4
|
|
1553
|
+
ext v10.16b, v10.16b, v10.16b, #8
|
|
1554
|
+
ext v15.16b, v15.16b, v15.16b, #12
|
|
1555
|
+
add v0.4s, v0.4s, v5.4s
|
|
1556
|
+
eor v15.16b, v15.16b, v0.16b
|
|
1557
|
+
rev32 v15.8h, v15.8h
|
|
1558
|
+
|
|
1559
|
+
add v10.4s, v10.4s, v15.4s
|
|
1560
|
+
eor v5.16b, v5.16b, v10.16b
|
|
1561
|
+
ushr v20.4s, v5.4s, #20
|
|
1562
|
+
sli v20.4s, v5.4s, #12
|
|
1563
|
+
add v0.4s, v0.4s, v20.4s
|
|
1564
|
+
eor v15.16b, v15.16b, v0.16b
|
|
1565
|
+
tbl v15.16b, {v15.16b}, v26.16b
|
|
1566
|
+
|
|
1567
|
+
add v10.4s, v10.4s, v15.4s
|
|
1568
|
+
eor v20.16b, v20.16b, v10.16b
|
|
1569
|
+
ushr v5.4s, v20.4s, #25
|
|
1570
|
+
sli v5.4s, v20.4s, #7
|
|
1571
|
+
ext v5.16b, v5.16b, v5.16b, #12
|
|
1572
|
+
ext v10.16b, v10.16b, v10.16b, #8
|
|
1573
|
+
ext v15.16b, v15.16b, v15.16b, #4
|
|
1574
|
+
subs x6, x6, #1
|
|
1575
|
+
b.hi Lopen_init_rounds
|
|
1576
|
+
|
|
1577
|
+
add v0.4s, v0.4s, v24.4s
|
|
1578
|
+
add v5.4s, v5.4s, v28.4s
|
|
1579
|
+
|
|
1580
|
+
and v0.16b, v0.16b, v27.16b
|
|
1581
|
+
mov x16, v0.d[0] // Move the R key to GPRs
|
|
1582
|
+
mov x17, v0.d[1]
|
|
1583
|
+
mov v27.16b, v5.16b // Store the S key
|
|
1584
|
+
|
|
1585
|
+
bl Lpoly_hash_ad_internal
|
|
1586
|
+
|
|
1587
|
+
mov x3, x1
|
|
1588
|
+
|
|
1589
|
+
// Each iteration of the loop hash 320 bytes, and prepare stream for 320 bytes
|
|
1590
|
+
Lopen_main_loop:
|
|
1591
|
+
|
|
1592
|
+
cmp x2, #192
|
|
1593
|
+
b.lt Lopen_tail
|
|
1594
|
+
|
|
1595
|
+
adrp x11, Lchacha20_consts
|
|
1596
|
+
add x11, x11, :lo12:Lchacha20_consts
|
|
1597
|
+
|
|
1598
|
+
ld4r {v0.4s,v1.4s,v2.4s,v3.4s}, [x11]
|
|
1599
|
+
mov v4.16b, v24.16b
|
|
1600
|
+
|
|
1601
|
+
ld4r {v5.4s,v6.4s,v7.4s,v8.4s}, [x5], #16
|
|
1602
|
+
mov v9.16b, v28.16b
|
|
1603
|
+
|
|
1604
|
+
ld4r {v10.4s,v11.4s,v12.4s,v13.4s}, [x5], #16
|
|
1605
|
+
mov v14.16b, v29.16b
|
|
1606
|
+
|
|
1607
|
+
ld4r {v15.4s,v16.4s,v17.4s,v18.4s}, [x5]
|
|
1608
|
+
sub x5, x5, #32
|
|
1609
|
+
add v15.4s, v15.4s, v25.4s
|
|
1610
|
+
mov v19.16b, v30.16b
|
|
1611
|
+
|
|
1612
|
+
eor v20.16b, v20.16b, v20.16b //zero
|
|
1613
|
+
not v21.16b, v20.16b // -1
|
|
1614
|
+
sub v21.4s, v25.4s, v21.4s // Add +1
|
|
1615
|
+
ext v20.16b, v21.16b, v20.16b, #12 // Get the last element (counter)
|
|
1616
|
+
add v19.4s, v19.4s, v20.4s
|
|
1617
|
+
|
|
1618
|
+
lsr x4, x2, #4 // How many whole blocks we have to hash, will always be at least 12
|
|
1619
|
+
sub x4, x4, #10
|
|
1620
|
+
|
|
1621
|
+
mov x7, #10
|
|
1622
|
+
subs x6, x7, x4 // itr1 can be negative if we have more than 320 bytes to hash
|
|
1623
|
+
csel x7, x7, x4, le // if itr1 is zero or less, itr2 should be 10 to indicate all 10 rounds are full
|
|
1624
|
+
|
|
1625
|
+
cbz x7, Lopen_main_loop_rounds_short
|
|
1626
|
+
|
|
1627
|
+
.align 5
|
|
1628
|
+
Lopen_main_loop_rounds:
|
|
1629
|
+
ldp x11, x12, [x3], 16
|
|
1630
|
+
adds x8, x8, x11
|
|
1631
|
+
adcs x9, x9, x12
|
|
1632
|
+
adc x10, x10, x15
|
|
1633
|
+
mul x11, x8, x16 // [t2:t1:t0] = [acc2:acc1:acc0] * r0
|
|
1634
|
+
umulh x12, x8, x16
|
|
1635
|
+
mul x13, x9, x16
|
|
1636
|
+
umulh x14, x9, x16
|
|
1637
|
+
adds x12, x12, x13
|
|
1638
|
+
mul x13, x10, x16
|
|
1639
|
+
adc x13, x13, x14
|
|
1640
|
+
mul x14, x8, x17 // [t3:t2:t1:t0] = [acc2:acc1:acc0] * [r1:r0]
|
|
1641
|
+
umulh x8, x8, x17
|
|
1642
|
+
adds x12, x12, x14
|
|
1643
|
+
mul x14, x9, x17
|
|
1644
|
+
umulh x9, x9, x17
|
|
1645
|
+
adcs x14, x14, x8
|
|
1646
|
+
mul x10, x10, x17
|
|
1647
|
+
adc x10, x10, x9
|
|
1648
|
+
adds x13, x13, x14
|
|
1649
|
+
adc x14, x10, xzr
|
|
1650
|
+
and x10, x13, #3 // At this point acc2 is 2 bits at most (value of 3)
|
|
1651
|
+
and x8, x13, #-4
|
|
1652
|
+
extr x13, x14, x13, #2
|
|
1653
|
+
adds x8, x8, x11
|
|
1654
|
+
lsr x11, x14, #2
|
|
1655
|
+
adc x9, x14, x11 // No carry out since t0 is 61 bits and t3 is 63 bits
|
|
1656
|
+
adds x8, x8, x13
|
|
1657
|
+
adcs x9, x9, x12
|
|
1658
|
+
adc x10, x10, xzr // At this point acc2 has the value of 4 at most
|
|
1659
|
+
Lopen_main_loop_rounds_short:
|
|
1660
|
+
add v0.4s, v0.4s, v5.4s
|
|
1661
|
+
add v1.4s, v1.4s, v6.4s
|
|
1662
|
+
add v2.4s, v2.4s, v7.4s
|
|
1663
|
+
add v3.4s, v3.4s, v8.4s
|
|
1664
|
+
add v4.4s, v4.4s, v9.4s
|
|
1665
|
+
|
|
1666
|
+
eor v15.16b, v15.16b, v0.16b
|
|
1667
|
+
eor v16.16b, v16.16b, v1.16b
|
|
1668
|
+
eor v17.16b, v17.16b, v2.16b
|
|
1669
|
+
eor v18.16b, v18.16b, v3.16b
|
|
1670
|
+
eor v19.16b, v19.16b, v4.16b
|
|
1671
|
+
|
|
1672
|
+
rev32 v15.8h, v15.8h
|
|
1673
|
+
rev32 v16.8h, v16.8h
|
|
1674
|
+
rev32 v17.8h, v17.8h
|
|
1675
|
+
rev32 v18.8h, v18.8h
|
|
1676
|
+
rev32 v19.8h, v19.8h
|
|
1677
|
+
|
|
1678
|
+
add v10.4s, v10.4s, v15.4s
|
|
1679
|
+
add v11.4s, v11.4s, v16.4s
|
|
1680
|
+
add v12.4s, v12.4s, v17.4s
|
|
1681
|
+
add v13.4s, v13.4s, v18.4s
|
|
1682
|
+
add v14.4s, v14.4s, v19.4s
|
|
1683
|
+
|
|
1684
|
+
eor v5.16b, v5.16b, v10.16b
|
|
1685
|
+
eor v6.16b, v6.16b, v11.16b
|
|
1686
|
+
eor v7.16b, v7.16b, v12.16b
|
|
1687
|
+
eor v8.16b, v8.16b, v13.16b
|
|
1688
|
+
eor v9.16b, v9.16b, v14.16b
|
|
1689
|
+
|
|
1690
|
+
ushr v20.4s, v5.4s, #20
|
|
1691
|
+
sli v20.4s, v5.4s, #12
|
|
1692
|
+
ushr v5.4s, v6.4s, #20
|
|
1693
|
+
sli v5.4s, v6.4s, #12
|
|
1694
|
+
ushr v6.4s, v7.4s, #20
|
|
1695
|
+
sli v6.4s, v7.4s, #12
|
|
1696
|
+
ushr v7.4s, v8.4s, #20
|
|
1697
|
+
sli v7.4s, v8.4s, #12
|
|
1698
|
+
ushr v8.4s, v9.4s, #20
|
|
1699
|
+
sli v8.4s, v9.4s, #12
|
|
1700
|
+
|
|
1701
|
+
add v0.4s, v0.4s, v20.4s
|
|
1702
|
+
add v1.4s, v1.4s, v5.4s
|
|
1703
|
+
add v2.4s, v2.4s, v6.4s
|
|
1704
|
+
add v3.4s, v3.4s, v7.4s
|
|
1705
|
+
add v4.4s, v4.4s, v8.4s
|
|
1706
|
+
|
|
1707
|
+
eor v15.16b, v15.16b, v0.16b
|
|
1708
|
+
eor v16.16b, v16.16b, v1.16b
|
|
1709
|
+
eor v17.16b, v17.16b, v2.16b
|
|
1710
|
+
eor v18.16b, v18.16b, v3.16b
|
|
1711
|
+
eor v19.16b, v19.16b, v4.16b
|
|
1712
|
+
|
|
1713
|
+
tbl v15.16b, {v15.16b}, v26.16b
|
|
1714
|
+
tbl v16.16b, {v16.16b}, v26.16b
|
|
1715
|
+
tbl v17.16b, {v17.16b}, v26.16b
|
|
1716
|
+
tbl v18.16b, {v18.16b}, v26.16b
|
|
1717
|
+
tbl v19.16b, {v19.16b}, v26.16b
|
|
1718
|
+
|
|
1719
|
+
add v10.4s, v10.4s, v15.4s
|
|
1720
|
+
add v11.4s, v11.4s, v16.4s
|
|
1721
|
+
add v12.4s, v12.4s, v17.4s
|
|
1722
|
+
add v13.4s, v13.4s, v18.4s
|
|
1723
|
+
add v14.4s, v14.4s, v19.4s
|
|
1724
|
+
|
|
1725
|
+
eor v20.16b, v20.16b, v10.16b
|
|
1726
|
+
eor v5.16b, v5.16b, v11.16b
|
|
1727
|
+
eor v6.16b, v6.16b, v12.16b
|
|
1728
|
+
eor v7.16b, v7.16b, v13.16b
|
|
1729
|
+
eor v8.16b, v8.16b, v14.16b
|
|
1730
|
+
|
|
1731
|
+
ushr v9.4s, v8.4s, #25
|
|
1732
|
+
sli v9.4s, v8.4s, #7
|
|
1733
|
+
ushr v8.4s, v7.4s, #25
|
|
1734
|
+
sli v8.4s, v7.4s, #7
|
|
1735
|
+
ushr v7.4s, v6.4s, #25
|
|
1736
|
+
sli v7.4s, v6.4s, #7
|
|
1737
|
+
ushr v6.4s, v5.4s, #25
|
|
1738
|
+
sli v6.4s, v5.4s, #7
|
|
1739
|
+
ushr v5.4s, v20.4s, #25
|
|
1740
|
+
sli v5.4s, v20.4s, #7
|
|
1741
|
+
|
|
1742
|
+
ext v9.16b, v9.16b, v9.16b, #4
|
|
1743
|
+
ext v14.16b, v14.16b, v14.16b, #8
|
|
1744
|
+
ext v19.16b, v19.16b, v19.16b, #12
|
|
1745
|
+
ldp x11, x12, [x3], 16
|
|
1746
|
+
adds x8, x8, x11
|
|
1747
|
+
adcs x9, x9, x12
|
|
1748
|
+
adc x10, x10, x15
|
|
1749
|
+
mul x11, x8, x16 // [t2:t1:t0] = [acc2:acc1:acc0] * r0
|
|
1750
|
+
umulh x12, x8, x16
|
|
1751
|
+
mul x13, x9, x16
|
|
1752
|
+
umulh x14, x9, x16
|
|
1753
|
+
adds x12, x12, x13
|
|
1754
|
+
mul x13, x10, x16
|
|
1755
|
+
adc x13, x13, x14
|
|
1756
|
+
mul x14, x8, x17 // [t3:t2:t1:t0] = [acc2:acc1:acc0] * [r1:r0]
|
|
1757
|
+
umulh x8, x8, x17
|
|
1758
|
+
adds x12, x12, x14
|
|
1759
|
+
mul x14, x9, x17
|
|
1760
|
+
umulh x9, x9, x17
|
|
1761
|
+
adcs x14, x14, x8
|
|
1762
|
+
mul x10, x10, x17
|
|
1763
|
+
adc x10, x10, x9
|
|
1764
|
+
adds x13, x13, x14
|
|
1765
|
+
adc x14, x10, xzr
|
|
1766
|
+
and x10, x13, #3 // At this point acc2 is 2 bits at most (value of 3)
|
|
1767
|
+
and x8, x13, #-4
|
|
1768
|
+
extr x13, x14, x13, #2
|
|
1769
|
+
adds x8, x8, x11
|
|
1770
|
+
lsr x11, x14, #2
|
|
1771
|
+
adc x9, x14, x11 // No carry out since t0 is 61 bits and t3 is 63 bits
|
|
1772
|
+
adds x8, x8, x13
|
|
1773
|
+
adcs x9, x9, x12
|
|
1774
|
+
adc x10, x10, xzr // At this point acc2 has the value of 4 at most
|
|
1775
|
+
add v0.4s, v0.4s, v6.4s
|
|
1776
|
+
add v1.4s, v1.4s, v7.4s
|
|
1777
|
+
add v2.4s, v2.4s, v8.4s
|
|
1778
|
+
add v3.4s, v3.4s, v5.4s
|
|
1779
|
+
add v4.4s, v4.4s, v9.4s
|
|
1780
|
+
|
|
1781
|
+
eor v18.16b, v18.16b, v0.16b
|
|
1782
|
+
eor v15.16b, v15.16b, v1.16b
|
|
1783
|
+
eor v16.16b, v16.16b, v2.16b
|
|
1784
|
+
eor v17.16b, v17.16b, v3.16b
|
|
1785
|
+
eor v19.16b, v19.16b, v4.16b
|
|
1786
|
+
|
|
1787
|
+
rev32 v18.8h, v18.8h
|
|
1788
|
+
rev32 v15.8h, v15.8h
|
|
1789
|
+
rev32 v16.8h, v16.8h
|
|
1790
|
+
rev32 v17.8h, v17.8h
|
|
1791
|
+
rev32 v19.8h, v19.8h
|
|
1792
|
+
|
|
1793
|
+
add v12.4s, v12.4s, v18.4s
|
|
1794
|
+
add v13.4s, v13.4s, v15.4s
|
|
1795
|
+
add v10.4s, v10.4s, v16.4s
|
|
1796
|
+
add v11.4s, v11.4s, v17.4s
|
|
1797
|
+
add v14.4s, v14.4s, v19.4s
|
|
1798
|
+
|
|
1799
|
+
eor v6.16b, v6.16b, v12.16b
|
|
1800
|
+
eor v7.16b, v7.16b, v13.16b
|
|
1801
|
+
eor v8.16b, v8.16b, v10.16b
|
|
1802
|
+
eor v5.16b, v5.16b, v11.16b
|
|
1803
|
+
eor v9.16b, v9.16b, v14.16b
|
|
1804
|
+
|
|
1805
|
+
ushr v20.4s, v6.4s, #20
|
|
1806
|
+
sli v20.4s, v6.4s, #12
|
|
1807
|
+
ushr v6.4s, v7.4s, #20
|
|
1808
|
+
sli v6.4s, v7.4s, #12
|
|
1809
|
+
ushr v7.4s, v8.4s, #20
|
|
1810
|
+
sli v7.4s, v8.4s, #12
|
|
1811
|
+
ushr v8.4s, v5.4s, #20
|
|
1812
|
+
sli v8.4s, v5.4s, #12
|
|
1813
|
+
ushr v5.4s, v9.4s, #20
|
|
1814
|
+
sli v5.4s, v9.4s, #12
|
|
1815
|
+
|
|
1816
|
+
add v0.4s, v0.4s, v20.4s
|
|
1817
|
+
add v1.4s, v1.4s, v6.4s
|
|
1818
|
+
add v2.4s, v2.4s, v7.4s
|
|
1819
|
+
add v3.4s, v3.4s, v8.4s
|
|
1820
|
+
add v4.4s, v4.4s, v5.4s
|
|
1821
|
+
|
|
1822
|
+
eor v18.16b, v18.16b, v0.16b
|
|
1823
|
+
eor v15.16b, v15.16b, v1.16b
|
|
1824
|
+
eor v16.16b, v16.16b, v2.16b
|
|
1825
|
+
eor v17.16b, v17.16b, v3.16b
|
|
1826
|
+
eor v19.16b, v19.16b, v4.16b
|
|
1827
|
+
|
|
1828
|
+
tbl v18.16b, {v18.16b}, v26.16b
|
|
1829
|
+
tbl v15.16b, {v15.16b}, v26.16b
|
|
1830
|
+
tbl v16.16b, {v16.16b}, v26.16b
|
|
1831
|
+
tbl v17.16b, {v17.16b}, v26.16b
|
|
1832
|
+
tbl v19.16b, {v19.16b}, v26.16b
|
|
1833
|
+
|
|
1834
|
+
add v12.4s, v12.4s, v18.4s
|
|
1835
|
+
add v13.4s, v13.4s, v15.4s
|
|
1836
|
+
add v10.4s, v10.4s, v16.4s
|
|
1837
|
+
add v11.4s, v11.4s, v17.4s
|
|
1838
|
+
add v14.4s, v14.4s, v19.4s
|
|
1839
|
+
|
|
1840
|
+
eor v20.16b, v20.16b, v12.16b
|
|
1841
|
+
eor v6.16b, v6.16b, v13.16b
|
|
1842
|
+
eor v7.16b, v7.16b, v10.16b
|
|
1843
|
+
eor v8.16b, v8.16b, v11.16b
|
|
1844
|
+
eor v5.16b, v5.16b, v14.16b
|
|
1845
|
+
|
|
1846
|
+
ushr v9.4s, v5.4s, #25
|
|
1847
|
+
sli v9.4s, v5.4s, #7
|
|
1848
|
+
ushr v5.4s, v8.4s, #25
|
|
1849
|
+
sli v5.4s, v8.4s, #7
|
|
1850
|
+
ushr v8.4s, v7.4s, #25
|
|
1851
|
+
sli v8.4s, v7.4s, #7
|
|
1852
|
+
ushr v7.4s, v6.4s, #25
|
|
1853
|
+
sli v7.4s, v6.4s, #7
|
|
1854
|
+
ushr v6.4s, v20.4s, #25
|
|
1855
|
+
sli v6.4s, v20.4s, #7
|
|
1856
|
+
|
|
1857
|
+
ext v9.16b, v9.16b, v9.16b, #12
|
|
1858
|
+
ext v14.16b, v14.16b, v14.16b, #8
|
|
1859
|
+
ext v19.16b, v19.16b, v19.16b, #4
|
|
1860
|
+
subs x7, x7, #1
|
|
1861
|
+
b.gt Lopen_main_loop_rounds
|
|
1862
|
+
subs x6, x6, #1
|
|
1863
|
+
b.ge Lopen_main_loop_rounds_short
|
|
1864
|
+
|
|
1865
|
+
eor v20.16b, v20.16b, v20.16b //zero
|
|
1866
|
+
not v21.16b, v20.16b // -1
|
|
1867
|
+
sub v21.4s, v25.4s, v21.4s // Add +1
|
|
1868
|
+
ext v20.16b, v21.16b, v20.16b, #12 // Get the last element (counter)
|
|
1869
|
+
add v19.4s, v19.4s, v20.4s
|
|
1870
|
+
|
|
1871
|
+
add v15.4s, v15.4s, v25.4s
|
|
1872
|
+
mov x11, #5
|
|
1873
|
+
dup v20.4s, w11
|
|
1874
|
+
add v25.4s, v25.4s, v20.4s
|
|
1875
|
+
|
|
1876
|
+
zip1 v20.4s, v0.4s, v1.4s
|
|
1877
|
+
zip2 v21.4s, v0.4s, v1.4s
|
|
1878
|
+
zip1 v22.4s, v2.4s, v3.4s
|
|
1879
|
+
zip2 v23.4s, v2.4s, v3.4s
|
|
1880
|
+
|
|
1881
|
+
zip1 v0.2d, v20.2d, v22.2d
|
|
1882
|
+
zip2 v1.2d, v20.2d, v22.2d
|
|
1883
|
+
zip1 v2.2d, v21.2d, v23.2d
|
|
1884
|
+
zip2 v3.2d, v21.2d, v23.2d
|
|
1885
|
+
|
|
1886
|
+
zip1 v20.4s, v5.4s, v6.4s
|
|
1887
|
+
zip2 v21.4s, v5.4s, v6.4s
|
|
1888
|
+
zip1 v22.4s, v7.4s, v8.4s
|
|
1889
|
+
zip2 v23.4s, v7.4s, v8.4s
|
|
1890
|
+
|
|
1891
|
+
zip1 v5.2d, v20.2d, v22.2d
|
|
1892
|
+
zip2 v6.2d, v20.2d, v22.2d
|
|
1893
|
+
zip1 v7.2d, v21.2d, v23.2d
|
|
1894
|
+
zip2 v8.2d, v21.2d, v23.2d
|
|
1895
|
+
|
|
1896
|
+
zip1 v20.4s, v10.4s, v11.4s
|
|
1897
|
+
zip2 v21.4s, v10.4s, v11.4s
|
|
1898
|
+
zip1 v22.4s, v12.4s, v13.4s
|
|
1899
|
+
zip2 v23.4s, v12.4s, v13.4s
|
|
1900
|
+
|
|
1901
|
+
zip1 v10.2d, v20.2d, v22.2d
|
|
1902
|
+
zip2 v11.2d, v20.2d, v22.2d
|
|
1903
|
+
zip1 v12.2d, v21.2d, v23.2d
|
|
1904
|
+
zip2 v13.2d, v21.2d, v23.2d
|
|
1905
|
+
|
|
1906
|
+
zip1 v20.4s, v15.4s, v16.4s
|
|
1907
|
+
zip2 v21.4s, v15.4s, v16.4s
|
|
1908
|
+
zip1 v22.4s, v17.4s, v18.4s
|
|
1909
|
+
zip2 v23.4s, v17.4s, v18.4s
|
|
1910
|
+
|
|
1911
|
+
zip1 v15.2d, v20.2d, v22.2d
|
|
1912
|
+
zip2 v16.2d, v20.2d, v22.2d
|
|
1913
|
+
zip1 v17.2d, v21.2d, v23.2d
|
|
1914
|
+
zip2 v18.2d, v21.2d, v23.2d
|
|
1915
|
+
|
|
1916
|
+
add v0.4s, v0.4s, v24.4s
|
|
1917
|
+
add v5.4s, v5.4s, v28.4s
|
|
1918
|
+
add v10.4s, v10.4s, v29.4s
|
|
1919
|
+
add v15.4s, v15.4s, v30.4s
|
|
1920
|
+
|
|
1921
|
+
add v1.4s, v1.4s, v24.4s
|
|
1922
|
+
add v6.4s, v6.4s, v28.4s
|
|
1923
|
+
add v11.4s, v11.4s, v29.4s
|
|
1924
|
+
add v16.4s, v16.4s, v30.4s
|
|
1925
|
+
|
|
1926
|
+
add v2.4s, v2.4s, v24.4s
|
|
1927
|
+
add v7.4s, v7.4s, v28.4s
|
|
1928
|
+
add v12.4s, v12.4s, v29.4s
|
|
1929
|
+
add v17.4s, v17.4s, v30.4s
|
|
1930
|
+
|
|
1931
|
+
add v3.4s, v3.4s, v24.4s
|
|
1932
|
+
add v8.4s, v8.4s, v28.4s
|
|
1933
|
+
add v13.4s, v13.4s, v29.4s
|
|
1934
|
+
add v18.4s, v18.4s, v30.4s
|
|
1935
|
+
|
|
1936
|
+
add v4.4s, v4.4s, v24.4s
|
|
1937
|
+
add v9.4s, v9.4s, v28.4s
|
|
1938
|
+
add v14.4s, v14.4s, v29.4s
|
|
1939
|
+
add v19.4s, v19.4s, v30.4s
|
|
1940
|
+
|
|
1941
|
+
// We can always safely store 192 bytes
|
|
1942
|
+
ld1 {v20.16b - v23.16b}, [x1], #64
|
|
1943
|
+
eor v20.16b, v20.16b, v0.16b
|
|
1944
|
+
eor v21.16b, v21.16b, v5.16b
|
|
1945
|
+
eor v22.16b, v22.16b, v10.16b
|
|
1946
|
+
eor v23.16b, v23.16b, v15.16b
|
|
1947
|
+
st1 {v20.16b - v23.16b}, [x0], #64
|
|
1948
|
+
|
|
1949
|
+
ld1 {v20.16b - v23.16b}, [x1], #64
|
|
1950
|
+
eor v20.16b, v20.16b, v1.16b
|
|
1951
|
+
eor v21.16b, v21.16b, v6.16b
|
|
1952
|
+
eor v22.16b, v22.16b, v11.16b
|
|
1953
|
+
eor v23.16b, v23.16b, v16.16b
|
|
1954
|
+
st1 {v20.16b - v23.16b}, [x0], #64
|
|
1955
|
+
|
|
1956
|
+
ld1 {v20.16b - v23.16b}, [x1], #64
|
|
1957
|
+
eor v20.16b, v20.16b, v2.16b
|
|
1958
|
+
eor v21.16b, v21.16b, v7.16b
|
|
1959
|
+
eor v22.16b, v22.16b, v12.16b
|
|
1960
|
+
eor v23.16b, v23.16b, v17.16b
|
|
1961
|
+
st1 {v20.16b - v23.16b}, [x0], #64
|
|
1962
|
+
|
|
1963
|
+
sub x2, x2, #192
|
|
1964
|
+
|
|
1965
|
+
mov v0.16b, v3.16b
|
|
1966
|
+
mov v5.16b, v8.16b
|
|
1967
|
+
mov v10.16b, v13.16b
|
|
1968
|
+
mov v15.16b, v18.16b
|
|
1969
|
+
|
|
1970
|
+
cmp x2, #64
|
|
1971
|
+
b.lt Lopen_tail_64_store
|
|
1972
|
+
|
|
1973
|
+
ld1 {v20.16b - v23.16b}, [x1], #64
|
|
1974
|
+
eor v20.16b, v20.16b, v3.16b
|
|
1975
|
+
eor v21.16b, v21.16b, v8.16b
|
|
1976
|
+
eor v22.16b, v22.16b, v13.16b
|
|
1977
|
+
eor v23.16b, v23.16b, v18.16b
|
|
1978
|
+
st1 {v20.16b - v23.16b}, [x0], #64
|
|
1979
|
+
|
|
1980
|
+
sub x2, x2, #64
|
|
1981
|
+
|
|
1982
|
+
mov v0.16b, v4.16b
|
|
1983
|
+
mov v5.16b, v9.16b
|
|
1984
|
+
mov v10.16b, v14.16b
|
|
1985
|
+
mov v15.16b, v19.16b
|
|
1986
|
+
|
|
1987
|
+
cmp x2, #64
|
|
1988
|
+
b.lt Lopen_tail_64_store
|
|
1989
|
+
|
|
1990
|
+
ld1 {v20.16b - v23.16b}, [x1], #64
|
|
1991
|
+
eor v20.16b, v20.16b, v4.16b
|
|
1992
|
+
eor v21.16b, v21.16b, v9.16b
|
|
1993
|
+
eor v22.16b, v22.16b, v14.16b
|
|
1994
|
+
eor v23.16b, v23.16b, v19.16b
|
|
1995
|
+
st1 {v20.16b - v23.16b}, [x0], #64
|
|
1996
|
+
|
|
1997
|
+
sub x2, x2, #64
|
|
1998
|
+
b Lopen_main_loop
|
|
1999
|
+
|
|
2000
|
+
Lopen_tail:
|
|
2001
|
+
|
|
2002
|
+
cbz x2, Lopen_finalize
|
|
2003
|
+
|
|
2004
|
+
lsr x4, x2, #4 // How many whole blocks we have to hash
|
|
2005
|
+
|
|
2006
|
+
cmp x2, #64
|
|
2007
|
+
b.le Lopen_tail_64
|
|
2008
|
+
cmp x2, #128
|
|
2009
|
+
b.le Lopen_tail_128
|
|
2010
|
+
|
|
2011
|
+
Lopen_tail_192:
|
|
2012
|
+
// We need three more blocks
|
|
2013
|
+
mov v0.16b, v24.16b
|
|
2014
|
+
mov v1.16b, v24.16b
|
|
2015
|
+
mov v2.16b, v24.16b
|
|
2016
|
+
mov v5.16b, v28.16b
|
|
2017
|
+
mov v6.16b, v28.16b
|
|
2018
|
+
mov v7.16b, v28.16b
|
|
2019
|
+
mov v10.16b, v29.16b
|
|
2020
|
+
mov v11.16b, v29.16b
|
|
2021
|
+
mov v12.16b, v29.16b
|
|
2022
|
+
mov v15.16b, v30.16b
|
|
2023
|
+
mov v16.16b, v30.16b
|
|
2024
|
+
mov v17.16b, v30.16b
|
|
2025
|
+
eor v23.16b, v23.16b, v23.16b
|
|
2026
|
+
eor v21.16b, v21.16b, v21.16b
|
|
2027
|
+
ins v23.s[0], v25.s[0]
|
|
2028
|
+
ins v21.d[0], x15
|
|
2029
|
+
|
|
2030
|
+
add v22.4s, v23.4s, v21.4s
|
|
2031
|
+
add v21.4s, v22.4s, v21.4s
|
|
2032
|
+
|
|
2033
|
+
add v15.4s, v15.4s, v21.4s
|
|
2034
|
+
add v16.4s, v16.4s, v23.4s
|
|
2035
|
+
add v17.4s, v17.4s, v22.4s
|
|
2036
|
+
|
|
2037
|
+
mov x7, #10
|
|
2038
|
+
subs x6, x7, x4 // itr1 can be negative if we have more than 160 bytes to hash
|
|
2039
|
+
csel x7, x7, x4, le // if itr1 is zero or less, itr2 should be 10 to indicate all 10 rounds are hashing
|
|
2040
|
+
sub x4, x4, x7
|
|
2041
|
+
|
|
2042
|
+
cbz x7, Lopen_tail_192_rounds_no_hash
|
|
2043
|
+
|
|
2044
|
+
Lopen_tail_192_rounds:
|
|
2045
|
+
ldp x11, x12, [x3], 16
|
|
2046
|
+
adds x8, x8, x11
|
|
2047
|
+
adcs x9, x9, x12
|
|
2048
|
+
adc x10, x10, x15
|
|
2049
|
+
mul x11, x8, x16 // [t2:t1:t0] = [acc2:acc1:acc0] * r0
|
|
2050
|
+
umulh x12, x8, x16
|
|
2051
|
+
mul x13, x9, x16
|
|
2052
|
+
umulh x14, x9, x16
|
|
2053
|
+
adds x12, x12, x13
|
|
2054
|
+
mul x13, x10, x16
|
|
2055
|
+
adc x13, x13, x14
|
|
2056
|
+
mul x14, x8, x17 // [t3:t2:t1:t0] = [acc2:acc1:acc0] * [r1:r0]
|
|
2057
|
+
umulh x8, x8, x17
|
|
2058
|
+
adds x12, x12, x14
|
|
2059
|
+
mul x14, x9, x17
|
|
2060
|
+
umulh x9, x9, x17
|
|
2061
|
+
adcs x14, x14, x8
|
|
2062
|
+
mul x10, x10, x17
|
|
2063
|
+
adc x10, x10, x9
|
|
2064
|
+
adds x13, x13, x14
|
|
2065
|
+
adc x14, x10, xzr
|
|
2066
|
+
and x10, x13, #3 // At this point acc2 is 2 bits at most (value of 3)
|
|
2067
|
+
and x8, x13, #-4
|
|
2068
|
+
extr x13, x14, x13, #2
|
|
2069
|
+
adds x8, x8, x11
|
|
2070
|
+
lsr x11, x14, #2
|
|
2071
|
+
adc x9, x14, x11 // No carry out since t0 is 61 bits and t3 is 63 bits
|
|
2072
|
+
adds x8, x8, x13
|
|
2073
|
+
adcs x9, x9, x12
|
|
2074
|
+
adc x10, x10, xzr // At this point acc2 has the value of 4 at most
|
|
2075
|
+
Lopen_tail_192_rounds_no_hash:
|
|
2076
|
+
add v0.4s, v0.4s, v5.4s
|
|
2077
|
+
add v1.4s, v1.4s, v6.4s
|
|
2078
|
+
add v2.4s, v2.4s, v7.4s
|
|
2079
|
+
eor v15.16b, v15.16b, v0.16b
|
|
2080
|
+
eor v16.16b, v16.16b, v1.16b
|
|
2081
|
+
eor v17.16b, v17.16b, v2.16b
|
|
2082
|
+
rev32 v15.8h, v15.8h
|
|
2083
|
+
rev32 v16.8h, v16.8h
|
|
2084
|
+
rev32 v17.8h, v17.8h
|
|
2085
|
+
|
|
2086
|
+
add v10.4s, v10.4s, v15.4s
|
|
2087
|
+
add v11.4s, v11.4s, v16.4s
|
|
2088
|
+
add v12.4s, v12.4s, v17.4s
|
|
2089
|
+
eor v5.16b, v5.16b, v10.16b
|
|
2090
|
+
eor v6.16b, v6.16b, v11.16b
|
|
2091
|
+
eor v7.16b, v7.16b, v12.16b
|
|
2092
|
+
ushr v20.4s, v5.4s, #20
|
|
2093
|
+
sli v20.4s, v5.4s, #12
|
|
2094
|
+
ushr v5.4s, v6.4s, #20
|
|
2095
|
+
sli v5.4s, v6.4s, #12
|
|
2096
|
+
ushr v6.4s, v7.4s, #20
|
|
2097
|
+
sli v6.4s, v7.4s, #12
|
|
2098
|
+
|
|
2099
|
+
add v0.4s, v0.4s, v20.4s
|
|
2100
|
+
add v1.4s, v1.4s, v5.4s
|
|
2101
|
+
add v2.4s, v2.4s, v6.4s
|
|
2102
|
+
eor v15.16b, v15.16b, v0.16b
|
|
2103
|
+
eor v16.16b, v16.16b, v1.16b
|
|
2104
|
+
eor v17.16b, v17.16b, v2.16b
|
|
2105
|
+
tbl v15.16b, {v15.16b}, v26.16b
|
|
2106
|
+
tbl v16.16b, {v16.16b}, v26.16b
|
|
2107
|
+
tbl v17.16b, {v17.16b}, v26.16b
|
|
2108
|
+
|
|
2109
|
+
add v10.4s, v10.4s, v15.4s
|
|
2110
|
+
add v11.4s, v11.4s, v16.4s
|
|
2111
|
+
add v12.4s, v12.4s, v17.4s
|
|
2112
|
+
eor v20.16b, v20.16b, v10.16b
|
|
2113
|
+
eor v5.16b, v5.16b, v11.16b
|
|
2114
|
+
eor v6.16b, v6.16b, v12.16b
|
|
2115
|
+
ushr v7.4s, v6.4s, #25
|
|
2116
|
+
sli v7.4s, v6.4s, #7
|
|
2117
|
+
ushr v6.4s, v5.4s, #25
|
|
2118
|
+
sli v6.4s, v5.4s, #7
|
|
2119
|
+
ushr v5.4s, v20.4s, #25
|
|
2120
|
+
sli v5.4s, v20.4s, #7
|
|
2121
|
+
|
|
2122
|
+
ext v5.16b, v5.16b, v5.16b, #4
|
|
2123
|
+
ext v6.16b, v6.16b, v6.16b, #4
|
|
2124
|
+
ext v7.16b, v7.16b, v7.16b, #4
|
|
2125
|
+
|
|
2126
|
+
ext v10.16b, v10.16b, v10.16b, #8
|
|
2127
|
+
ext v11.16b, v11.16b, v11.16b, #8
|
|
2128
|
+
ext v12.16b, v12.16b, v12.16b, #8
|
|
2129
|
+
|
|
2130
|
+
ext v15.16b, v15.16b, v15.16b, #12
|
|
2131
|
+
ext v16.16b, v16.16b, v16.16b, #12
|
|
2132
|
+
ext v17.16b, v17.16b, v17.16b, #12
|
|
2133
|
+
add v0.4s, v0.4s, v5.4s
|
|
2134
|
+
add v1.4s, v1.4s, v6.4s
|
|
2135
|
+
add v2.4s, v2.4s, v7.4s
|
|
2136
|
+
eor v15.16b, v15.16b, v0.16b
|
|
2137
|
+
eor v16.16b, v16.16b, v1.16b
|
|
2138
|
+
eor v17.16b, v17.16b, v2.16b
|
|
2139
|
+
rev32 v15.8h, v15.8h
|
|
2140
|
+
rev32 v16.8h, v16.8h
|
|
2141
|
+
rev32 v17.8h, v17.8h
|
|
2142
|
+
|
|
2143
|
+
add v10.4s, v10.4s, v15.4s
|
|
2144
|
+
add v11.4s, v11.4s, v16.4s
|
|
2145
|
+
add v12.4s, v12.4s, v17.4s
|
|
2146
|
+
eor v5.16b, v5.16b, v10.16b
|
|
2147
|
+
eor v6.16b, v6.16b, v11.16b
|
|
2148
|
+
eor v7.16b, v7.16b, v12.16b
|
|
2149
|
+
ushr v20.4s, v5.4s, #20
|
|
2150
|
+
sli v20.4s, v5.4s, #12
|
|
2151
|
+
ushr v5.4s, v6.4s, #20
|
|
2152
|
+
sli v5.4s, v6.4s, #12
|
|
2153
|
+
ushr v6.4s, v7.4s, #20
|
|
2154
|
+
sli v6.4s, v7.4s, #12
|
|
2155
|
+
|
|
2156
|
+
add v0.4s, v0.4s, v20.4s
|
|
2157
|
+
add v1.4s, v1.4s, v5.4s
|
|
2158
|
+
add v2.4s, v2.4s, v6.4s
|
|
2159
|
+
eor v15.16b, v15.16b, v0.16b
|
|
2160
|
+
eor v16.16b, v16.16b, v1.16b
|
|
2161
|
+
eor v17.16b, v17.16b, v2.16b
|
|
2162
|
+
tbl v15.16b, {v15.16b}, v26.16b
|
|
2163
|
+
tbl v16.16b, {v16.16b}, v26.16b
|
|
2164
|
+
tbl v17.16b, {v17.16b}, v26.16b
|
|
2165
|
+
|
|
2166
|
+
add v10.4s, v10.4s, v15.4s
|
|
2167
|
+
add v11.4s, v11.4s, v16.4s
|
|
2168
|
+
add v12.4s, v12.4s, v17.4s
|
|
2169
|
+
eor v20.16b, v20.16b, v10.16b
|
|
2170
|
+
eor v5.16b, v5.16b, v11.16b
|
|
2171
|
+
eor v6.16b, v6.16b, v12.16b
|
|
2172
|
+
ushr v7.4s, v6.4s, #25
|
|
2173
|
+
sli v7.4s, v6.4s, #7
|
|
2174
|
+
ushr v6.4s, v5.4s, #25
|
|
2175
|
+
sli v6.4s, v5.4s, #7
|
|
2176
|
+
ushr v5.4s, v20.4s, #25
|
|
2177
|
+
sli v5.4s, v20.4s, #7
|
|
2178
|
+
|
|
2179
|
+
ext v5.16b, v5.16b, v5.16b, #12
|
|
2180
|
+
ext v6.16b, v6.16b, v6.16b, #12
|
|
2181
|
+
ext v7.16b, v7.16b, v7.16b, #12
|
|
2182
|
+
|
|
2183
|
+
ext v10.16b, v10.16b, v10.16b, #8
|
|
2184
|
+
ext v11.16b, v11.16b, v11.16b, #8
|
|
2185
|
+
ext v12.16b, v12.16b, v12.16b, #8
|
|
2186
|
+
|
|
2187
|
+
ext v15.16b, v15.16b, v15.16b, #4
|
|
2188
|
+
ext v16.16b, v16.16b, v16.16b, #4
|
|
2189
|
+
ext v17.16b, v17.16b, v17.16b, #4
|
|
2190
|
+
subs x7, x7, #1
|
|
2191
|
+
b.gt Lopen_tail_192_rounds
|
|
2192
|
+
subs x6, x6, #1
|
|
2193
|
+
b.ge Lopen_tail_192_rounds_no_hash
|
|
2194
|
+
|
|
2195
|
+
// We hashed 160 bytes at most, may still have 32 bytes left
|
|
2196
|
+
Lopen_tail_192_hash:
|
|
2197
|
+
cbz x4, Lopen_tail_192_hash_done
|
|
2198
|
+
ldp x11, x12, [x3], 16
|
|
2199
|
+
adds x8, x8, x11
|
|
2200
|
+
adcs x9, x9, x12
|
|
2201
|
+
adc x10, x10, x15
|
|
2202
|
+
mul x11, x8, x16 // [t2:t1:t0] = [acc2:acc1:acc0] * r0
|
|
2203
|
+
umulh x12, x8, x16
|
|
2204
|
+
mul x13, x9, x16
|
|
2205
|
+
umulh x14, x9, x16
|
|
2206
|
+
adds x12, x12, x13
|
|
2207
|
+
mul x13, x10, x16
|
|
2208
|
+
adc x13, x13, x14
|
|
2209
|
+
mul x14, x8, x17 // [t3:t2:t1:t0] = [acc2:acc1:acc0] * [r1:r0]
|
|
2210
|
+
umulh x8, x8, x17
|
|
2211
|
+
adds x12, x12, x14
|
|
2212
|
+
mul x14, x9, x17
|
|
2213
|
+
umulh x9, x9, x17
|
|
2214
|
+
adcs x14, x14, x8
|
|
2215
|
+
mul x10, x10, x17
|
|
2216
|
+
adc x10, x10, x9
|
|
2217
|
+
adds x13, x13, x14
|
|
2218
|
+
adc x14, x10, xzr
|
|
2219
|
+
and x10, x13, #3 // At this point acc2 is 2 bits at most (value of 3)
|
|
2220
|
+
and x8, x13, #-4
|
|
2221
|
+
extr x13, x14, x13, #2
|
|
2222
|
+
adds x8, x8, x11
|
|
2223
|
+
lsr x11, x14, #2
|
|
2224
|
+
adc x9, x14, x11 // No carry out since t0 is 61 bits and t3 is 63 bits
|
|
2225
|
+
adds x8, x8, x13
|
|
2226
|
+
adcs x9, x9, x12
|
|
2227
|
+
adc x10, x10, xzr // At this point acc2 has the value of 4 at most
|
|
2228
|
+
sub x4, x4, #1
|
|
2229
|
+
b Lopen_tail_192_hash
|
|
2230
|
+
|
|
2231
|
+
Lopen_tail_192_hash_done:
|
|
2232
|
+
|
|
2233
|
+
add v0.4s, v0.4s, v24.4s
|
|
2234
|
+
add v1.4s, v1.4s, v24.4s
|
|
2235
|
+
add v2.4s, v2.4s, v24.4s
|
|
2236
|
+
add v5.4s, v5.4s, v28.4s
|
|
2237
|
+
add v6.4s, v6.4s, v28.4s
|
|
2238
|
+
add v7.4s, v7.4s, v28.4s
|
|
2239
|
+
add v10.4s, v10.4s, v29.4s
|
|
2240
|
+
add v11.4s, v11.4s, v29.4s
|
|
2241
|
+
add v12.4s, v12.4s, v29.4s
|
|
2242
|
+
add v15.4s, v15.4s, v30.4s
|
|
2243
|
+
add v16.4s, v16.4s, v30.4s
|
|
2244
|
+
add v17.4s, v17.4s, v30.4s
|
|
2245
|
+
|
|
2246
|
+
add v15.4s, v15.4s, v21.4s
|
|
2247
|
+
add v16.4s, v16.4s, v23.4s
|
|
2248
|
+
add v17.4s, v17.4s, v22.4s
|
|
2249
|
+
|
|
2250
|
+
ld1 {v20.16b - v23.16b}, [x1], #64
|
|
2251
|
+
|
|
2252
|
+
eor v20.16b, v20.16b, v1.16b
|
|
2253
|
+
eor v21.16b, v21.16b, v6.16b
|
|
2254
|
+
eor v22.16b, v22.16b, v11.16b
|
|
2255
|
+
eor v23.16b, v23.16b, v16.16b
|
|
2256
|
+
|
|
2257
|
+
st1 {v20.16b - v23.16b}, [x0], #64
|
|
2258
|
+
|
|
2259
|
+
ld1 {v20.16b - v23.16b}, [x1], #64
|
|
2260
|
+
|
|
2261
|
+
eor v20.16b, v20.16b, v2.16b
|
|
2262
|
+
eor v21.16b, v21.16b, v7.16b
|
|
2263
|
+
eor v22.16b, v22.16b, v12.16b
|
|
2264
|
+
eor v23.16b, v23.16b, v17.16b
|
|
2265
|
+
|
|
2266
|
+
st1 {v20.16b - v23.16b}, [x0], #64
|
|
2267
|
+
|
|
2268
|
+
sub x2, x2, #128
|
|
2269
|
+
b Lopen_tail_64_store
|
|
2270
|
+
|
|
2271
|
+
Lopen_tail_128:
|
|
2272
|
+
// We need two more blocks
|
|
2273
|
+
mov v0.16b, v24.16b
|
|
2274
|
+
mov v1.16b, v24.16b
|
|
2275
|
+
mov v5.16b, v28.16b
|
|
2276
|
+
mov v6.16b, v28.16b
|
|
2277
|
+
mov v10.16b, v29.16b
|
|
2278
|
+
mov v11.16b, v29.16b
|
|
2279
|
+
mov v15.16b, v30.16b
|
|
2280
|
+
mov v16.16b, v30.16b
|
|
2281
|
+
eor v23.16b, v23.16b, v23.16b
|
|
2282
|
+
eor v22.16b, v22.16b, v22.16b
|
|
2283
|
+
ins v23.s[0], v25.s[0]
|
|
2284
|
+
ins v22.d[0], x15
|
|
2285
|
+
add v22.4s, v22.4s, v23.4s
|
|
2286
|
+
|
|
2287
|
+
add v15.4s, v15.4s, v22.4s
|
|
2288
|
+
add v16.4s, v16.4s, v23.4s
|
|
2289
|
+
|
|
2290
|
+
mov x6, #10
|
|
2291
|
+
sub x6, x6, x4
|
|
2292
|
+
|
|
2293
|
+
Lopen_tail_128_rounds:
|
|
2294
|
+
add v0.4s, v0.4s, v5.4s
|
|
2295
|
+
eor v15.16b, v15.16b, v0.16b
|
|
2296
|
+
rev32 v15.8h, v15.8h
|
|
2297
|
+
|
|
2298
|
+
add v10.4s, v10.4s, v15.4s
|
|
2299
|
+
eor v5.16b, v5.16b, v10.16b
|
|
2300
|
+
ushr v20.4s, v5.4s, #20
|
|
2301
|
+
sli v20.4s, v5.4s, #12
|
|
2302
|
+
add v0.4s, v0.4s, v20.4s
|
|
2303
|
+
eor v15.16b, v15.16b, v0.16b
|
|
2304
|
+
tbl v15.16b, {v15.16b}, v26.16b
|
|
2305
|
+
|
|
2306
|
+
add v10.4s, v10.4s, v15.4s
|
|
2307
|
+
eor v20.16b, v20.16b, v10.16b
|
|
2308
|
+
ushr v5.4s, v20.4s, #25
|
|
2309
|
+
sli v5.4s, v20.4s, #7
|
|
2310
|
+
ext v5.16b, v5.16b, v5.16b, #4
|
|
2311
|
+
ext v10.16b, v10.16b, v10.16b, #8
|
|
2312
|
+
ext v15.16b, v15.16b, v15.16b, #12
|
|
2313
|
+
add v1.4s, v1.4s, v6.4s
|
|
2314
|
+
eor v16.16b, v16.16b, v1.16b
|
|
2315
|
+
rev32 v16.8h, v16.8h
|
|
2316
|
+
|
|
2317
|
+
add v11.4s, v11.4s, v16.4s
|
|
2318
|
+
eor v6.16b, v6.16b, v11.16b
|
|
2319
|
+
ushr v20.4s, v6.4s, #20
|
|
2320
|
+
sli v20.4s, v6.4s, #12
|
|
2321
|
+
add v1.4s, v1.4s, v20.4s
|
|
2322
|
+
eor v16.16b, v16.16b, v1.16b
|
|
2323
|
+
tbl v16.16b, {v16.16b}, v26.16b
|
|
2324
|
+
|
|
2325
|
+
add v11.4s, v11.4s, v16.4s
|
|
2326
|
+
eor v20.16b, v20.16b, v11.16b
|
|
2327
|
+
ushr v6.4s, v20.4s, #25
|
|
2328
|
+
sli v6.4s, v20.4s, #7
|
|
2329
|
+
ext v6.16b, v6.16b, v6.16b, #4
|
|
2330
|
+
ext v11.16b, v11.16b, v11.16b, #8
|
|
2331
|
+
ext v16.16b, v16.16b, v16.16b, #12
|
|
2332
|
+
add v0.4s, v0.4s, v5.4s
|
|
2333
|
+
eor v15.16b, v15.16b, v0.16b
|
|
2334
|
+
rev32 v15.8h, v15.8h
|
|
2335
|
+
|
|
2336
|
+
add v10.4s, v10.4s, v15.4s
|
|
2337
|
+
eor v5.16b, v5.16b, v10.16b
|
|
2338
|
+
ushr v20.4s, v5.4s, #20
|
|
2339
|
+
sli v20.4s, v5.4s, #12
|
|
2340
|
+
add v0.4s, v0.4s, v20.4s
|
|
2341
|
+
eor v15.16b, v15.16b, v0.16b
|
|
2342
|
+
tbl v15.16b, {v15.16b}, v26.16b
|
|
2343
|
+
|
|
2344
|
+
add v10.4s, v10.4s, v15.4s
|
|
2345
|
+
eor v20.16b, v20.16b, v10.16b
|
|
2346
|
+
ushr v5.4s, v20.4s, #25
|
|
2347
|
+
sli v5.4s, v20.4s, #7
|
|
2348
|
+
ext v5.16b, v5.16b, v5.16b, #12
|
|
2349
|
+
ext v10.16b, v10.16b, v10.16b, #8
|
|
2350
|
+
ext v15.16b, v15.16b, v15.16b, #4
|
|
2351
|
+
add v1.4s, v1.4s, v6.4s
|
|
2352
|
+
eor v16.16b, v16.16b, v1.16b
|
|
2353
|
+
rev32 v16.8h, v16.8h
|
|
2354
|
+
|
|
2355
|
+
add v11.4s, v11.4s, v16.4s
|
|
2356
|
+
eor v6.16b, v6.16b, v11.16b
|
|
2357
|
+
ushr v20.4s, v6.4s, #20
|
|
2358
|
+
sli v20.4s, v6.4s, #12
|
|
2359
|
+
add v1.4s, v1.4s, v20.4s
|
|
2360
|
+
eor v16.16b, v16.16b, v1.16b
|
|
2361
|
+
tbl v16.16b, {v16.16b}, v26.16b
|
|
2362
|
+
|
|
2363
|
+
add v11.4s, v11.4s, v16.4s
|
|
2364
|
+
eor v20.16b, v20.16b, v11.16b
|
|
2365
|
+
ushr v6.4s, v20.4s, #25
|
|
2366
|
+
sli v6.4s, v20.4s, #7
|
|
2367
|
+
ext v6.16b, v6.16b, v6.16b, #12
|
|
2368
|
+
ext v11.16b, v11.16b, v11.16b, #8
|
|
2369
|
+
ext v16.16b, v16.16b, v16.16b, #4
|
|
2370
|
+
subs x6, x6, #1
|
|
2371
|
+
b.gt Lopen_tail_128_rounds
|
|
2372
|
+
cbz x4, Lopen_tail_128_rounds_done
|
|
2373
|
+
subs x4, x4, #1
|
|
2374
|
+
ldp x11, x12, [x3], 16
|
|
2375
|
+
adds x8, x8, x11
|
|
2376
|
+
adcs x9, x9, x12
|
|
2377
|
+
adc x10, x10, x15
|
|
2378
|
+
mul x11, x8, x16 // [t2:t1:t0] = [acc2:acc1:acc0] * r0
|
|
2379
|
+
umulh x12, x8, x16
|
|
2380
|
+
mul x13, x9, x16
|
|
2381
|
+
umulh x14, x9, x16
|
|
2382
|
+
adds x12, x12, x13
|
|
2383
|
+
mul x13, x10, x16
|
|
2384
|
+
adc x13, x13, x14
|
|
2385
|
+
mul x14, x8, x17 // [t3:t2:t1:t0] = [acc2:acc1:acc0] * [r1:r0]
|
|
2386
|
+
umulh x8, x8, x17
|
|
2387
|
+
adds x12, x12, x14
|
|
2388
|
+
mul x14, x9, x17
|
|
2389
|
+
umulh x9, x9, x17
|
|
2390
|
+
adcs x14, x14, x8
|
|
2391
|
+
mul x10, x10, x17
|
|
2392
|
+
adc x10, x10, x9
|
|
2393
|
+
adds x13, x13, x14
|
|
2394
|
+
adc x14, x10, xzr
|
|
2395
|
+
and x10, x13, #3 // At this point acc2 is 2 bits at most (value of 3)
|
|
2396
|
+
and x8, x13, #-4
|
|
2397
|
+
extr x13, x14, x13, #2
|
|
2398
|
+
adds x8, x8, x11
|
|
2399
|
+
lsr x11, x14, #2
|
|
2400
|
+
adc x9, x14, x11 // No carry out since t0 is 61 bits and t3 is 63 bits
|
|
2401
|
+
adds x8, x8, x13
|
|
2402
|
+
adcs x9, x9, x12
|
|
2403
|
+
adc x10, x10, xzr // At this point acc2 has the value of 4 at most
|
|
2404
|
+
b Lopen_tail_128_rounds
|
|
2405
|
+
|
|
2406
|
+
Lopen_tail_128_rounds_done:
|
|
2407
|
+
add v0.4s, v0.4s, v24.4s
|
|
2408
|
+
add v1.4s, v1.4s, v24.4s
|
|
2409
|
+
add v5.4s, v5.4s, v28.4s
|
|
2410
|
+
add v6.4s, v6.4s, v28.4s
|
|
2411
|
+
add v10.4s, v10.4s, v29.4s
|
|
2412
|
+
add v11.4s, v11.4s, v29.4s
|
|
2413
|
+
add v15.4s, v15.4s, v30.4s
|
|
2414
|
+
add v16.4s, v16.4s, v30.4s
|
|
2415
|
+
add v15.4s, v15.4s, v22.4s
|
|
2416
|
+
add v16.4s, v16.4s, v23.4s
|
|
2417
|
+
|
|
2418
|
+
ld1 {v20.16b - v23.16b}, [x1], #64
|
|
2419
|
+
|
|
2420
|
+
eor v20.16b, v20.16b, v1.16b
|
|
2421
|
+
eor v21.16b, v21.16b, v6.16b
|
|
2422
|
+
eor v22.16b, v22.16b, v11.16b
|
|
2423
|
+
eor v23.16b, v23.16b, v16.16b
|
|
2424
|
+
|
|
2425
|
+
st1 {v20.16b - v23.16b}, [x0], #64
|
|
2426
|
+
sub x2, x2, #64
|
|
2427
|
+
|
|
2428
|
+
b Lopen_tail_64_store
|
|
2429
|
+
|
|
2430
|
+
Lopen_tail_64:
|
|
2431
|
+
// We just need a single block
|
|
2432
|
+
mov v0.16b, v24.16b
|
|
2433
|
+
mov v5.16b, v28.16b
|
|
2434
|
+
mov v10.16b, v29.16b
|
|
2435
|
+
mov v15.16b, v30.16b
|
|
2436
|
+
eor v23.16b, v23.16b, v23.16b
|
|
2437
|
+
ins v23.s[0], v25.s[0]
|
|
2438
|
+
add v15.4s, v15.4s, v23.4s
|
|
2439
|
+
|
|
2440
|
+
mov x6, #10
|
|
2441
|
+
sub x6, x6, x4
|
|
2442
|
+
|
|
2443
|
+
Lopen_tail_64_rounds:
|
|
2444
|
+
add v0.4s, v0.4s, v5.4s
|
|
2445
|
+
eor v15.16b, v15.16b, v0.16b
|
|
2446
|
+
rev32 v15.8h, v15.8h
|
|
2447
|
+
|
|
2448
|
+
add v10.4s, v10.4s, v15.4s
|
|
2449
|
+
eor v5.16b, v5.16b, v10.16b
|
|
2450
|
+
ushr v20.4s, v5.4s, #20
|
|
2451
|
+
sli v20.4s, v5.4s, #12
|
|
2452
|
+
add v0.4s, v0.4s, v20.4s
|
|
2453
|
+
eor v15.16b, v15.16b, v0.16b
|
|
2454
|
+
tbl v15.16b, {v15.16b}, v26.16b
|
|
2455
|
+
|
|
2456
|
+
add v10.4s, v10.4s, v15.4s
|
|
2457
|
+
eor v20.16b, v20.16b, v10.16b
|
|
2458
|
+
ushr v5.4s, v20.4s, #25
|
|
2459
|
+
sli v5.4s, v20.4s, #7
|
|
2460
|
+
ext v5.16b, v5.16b, v5.16b, #4
|
|
2461
|
+
ext v10.16b, v10.16b, v10.16b, #8
|
|
2462
|
+
ext v15.16b, v15.16b, v15.16b, #12
|
|
2463
|
+
add v0.4s, v0.4s, v5.4s
|
|
2464
|
+
eor v15.16b, v15.16b, v0.16b
|
|
2465
|
+
rev32 v15.8h, v15.8h
|
|
2466
|
+
|
|
2467
|
+
add v10.4s, v10.4s, v15.4s
|
|
2468
|
+
eor v5.16b, v5.16b, v10.16b
|
|
2469
|
+
ushr v20.4s, v5.4s, #20
|
|
2470
|
+
sli v20.4s, v5.4s, #12
|
|
2471
|
+
add v0.4s, v0.4s, v20.4s
|
|
2472
|
+
eor v15.16b, v15.16b, v0.16b
|
|
2473
|
+
tbl v15.16b, {v15.16b}, v26.16b
|
|
2474
|
+
|
|
2475
|
+
add v10.4s, v10.4s, v15.4s
|
|
2476
|
+
eor v20.16b, v20.16b, v10.16b
|
|
2477
|
+
ushr v5.4s, v20.4s, #25
|
|
2478
|
+
sli v5.4s, v20.4s, #7
|
|
2479
|
+
ext v5.16b, v5.16b, v5.16b, #12
|
|
2480
|
+
ext v10.16b, v10.16b, v10.16b, #8
|
|
2481
|
+
ext v15.16b, v15.16b, v15.16b, #4
|
|
2482
|
+
subs x6, x6, #1
|
|
2483
|
+
b.gt Lopen_tail_64_rounds
|
|
2484
|
+
cbz x4, Lopen_tail_64_rounds_done
|
|
2485
|
+
subs x4, x4, #1
|
|
2486
|
+
ldp x11, x12, [x3], 16
|
|
2487
|
+
adds x8, x8, x11
|
|
2488
|
+
adcs x9, x9, x12
|
|
2489
|
+
adc x10, x10, x15
|
|
2490
|
+
mul x11, x8, x16 // [t2:t1:t0] = [acc2:acc1:acc0] * r0
|
|
2491
|
+
umulh x12, x8, x16
|
|
2492
|
+
mul x13, x9, x16
|
|
2493
|
+
umulh x14, x9, x16
|
|
2494
|
+
adds x12, x12, x13
|
|
2495
|
+
mul x13, x10, x16
|
|
2496
|
+
adc x13, x13, x14
|
|
2497
|
+
mul x14, x8, x17 // [t3:t2:t1:t0] = [acc2:acc1:acc0] * [r1:r0]
|
|
2498
|
+
umulh x8, x8, x17
|
|
2499
|
+
adds x12, x12, x14
|
|
2500
|
+
mul x14, x9, x17
|
|
2501
|
+
umulh x9, x9, x17
|
|
2502
|
+
adcs x14, x14, x8
|
|
2503
|
+
mul x10, x10, x17
|
|
2504
|
+
adc x10, x10, x9
|
|
2505
|
+
adds x13, x13, x14
|
|
2506
|
+
adc x14, x10, xzr
|
|
2507
|
+
and x10, x13, #3 // At this point acc2 is 2 bits at most (value of 3)
|
|
2508
|
+
and x8, x13, #-4
|
|
2509
|
+
extr x13, x14, x13, #2
|
|
2510
|
+
adds x8, x8, x11
|
|
2511
|
+
lsr x11, x14, #2
|
|
2512
|
+
adc x9, x14, x11 // No carry out since t0 is 61 bits and t3 is 63 bits
|
|
2513
|
+
adds x8, x8, x13
|
|
2514
|
+
adcs x9, x9, x12
|
|
2515
|
+
adc x10, x10, xzr // At this point acc2 has the value of 4 at most
|
|
2516
|
+
b Lopen_tail_64_rounds
|
|
2517
|
+
|
|
2518
|
+
Lopen_tail_64_rounds_done:
|
|
2519
|
+
add v0.4s, v0.4s, v24.4s
|
|
2520
|
+
add v5.4s, v5.4s, v28.4s
|
|
2521
|
+
add v10.4s, v10.4s, v29.4s
|
|
2522
|
+
add v15.4s, v15.4s, v30.4s
|
|
2523
|
+
add v15.4s, v15.4s, v23.4s
|
|
2524
|
+
|
|
2525
|
+
Lopen_tail_64_store:
|
|
2526
|
+
cmp x2, #16
|
|
2527
|
+
b.lt Lopen_tail_16
|
|
2528
|
+
|
|
2529
|
+
ld1 {v20.16b}, [x1], #16
|
|
2530
|
+
eor v20.16b, v20.16b, v0.16b
|
|
2531
|
+
st1 {v20.16b}, [x0], #16
|
|
2532
|
+
mov v0.16b, v5.16b
|
|
2533
|
+
mov v5.16b, v10.16b
|
|
2534
|
+
mov v10.16b, v15.16b
|
|
2535
|
+
sub x2, x2, #16
|
|
2536
|
+
b Lopen_tail_64_store
|
|
2537
|
+
|
|
2538
|
+
Lopen_tail_16:
|
|
2539
|
+
// Here we handle the last [0,16) bytes that require a padded block
|
|
2540
|
+
cbz x2, Lopen_finalize
|
|
2541
|
+
|
|
2542
|
+
eor v20.16b, v20.16b, v20.16b // Use T0 to load the ciphertext
|
|
2543
|
+
eor v21.16b, v21.16b, v21.16b // Use T1 to generate an AND mask
|
|
2544
|
+
not v22.16b, v20.16b
|
|
2545
|
+
|
|
2546
|
+
add x7, x1, x2
|
|
2547
|
+
mov x6, x2
|
|
2548
|
+
|
|
2549
|
+
Lopen_tail_16_compose:
|
|
2550
|
+
ext v20.16b, v20.16b, v20.16b, #15
|
|
2551
|
+
ldrb w11, [x7, #-1]!
|
|
2552
|
+
mov v20.b[0], w11
|
|
2553
|
+
ext v21.16b, v22.16b, v21.16b, #15
|
|
2554
|
+
subs x2, x2, #1
|
|
2555
|
+
b.gt Lopen_tail_16_compose
|
|
2556
|
+
|
|
2557
|
+
and v20.16b, v20.16b, v21.16b
|
|
2558
|
+
// Hash in the final padded block
|
|
2559
|
+
mov x11, v20.d[0]
|
|
2560
|
+
mov x12, v20.d[1]
|
|
2561
|
+
adds x8, x8, x11
|
|
2562
|
+
adcs x9, x9, x12
|
|
2563
|
+
adc x10, x10, x15
|
|
2564
|
+
mul x11, x8, x16 // [t2:t1:t0] = [acc2:acc1:acc0] * r0
|
|
2565
|
+
umulh x12, x8, x16
|
|
2566
|
+
mul x13, x9, x16
|
|
2567
|
+
umulh x14, x9, x16
|
|
2568
|
+
adds x12, x12, x13
|
|
2569
|
+
mul x13, x10, x16
|
|
2570
|
+
adc x13, x13, x14
|
|
2571
|
+
mul x14, x8, x17 // [t3:t2:t1:t0] = [acc2:acc1:acc0] * [r1:r0]
|
|
2572
|
+
umulh x8, x8, x17
|
|
2573
|
+
adds x12, x12, x14
|
|
2574
|
+
mul x14, x9, x17
|
|
2575
|
+
umulh x9, x9, x17
|
|
2576
|
+
adcs x14, x14, x8
|
|
2577
|
+
mul x10, x10, x17
|
|
2578
|
+
adc x10, x10, x9
|
|
2579
|
+
adds x13, x13, x14
|
|
2580
|
+
adc x14, x10, xzr
|
|
2581
|
+
and x10, x13, #3 // At this point acc2 is 2 bits at most (value of 3)
|
|
2582
|
+
and x8, x13, #-4
|
|
2583
|
+
extr x13, x14, x13, #2
|
|
2584
|
+
adds x8, x8, x11
|
|
2585
|
+
lsr x11, x14, #2
|
|
2586
|
+
adc x9, x14, x11 // No carry out since t0 is 61 bits and t3 is 63 bits
|
|
2587
|
+
adds x8, x8, x13
|
|
2588
|
+
adcs x9, x9, x12
|
|
2589
|
+
adc x10, x10, xzr // At this point acc2 has the value of 4 at most
|
|
2590
|
+
eor v20.16b, v20.16b, v0.16b
|
|
2591
|
+
|
|
2592
|
+
Lopen_tail_16_store:
|
|
2593
|
+
umov w11, v20.b[0]
|
|
2594
|
+
strb w11, [x0], #1
|
|
2595
|
+
ext v20.16b, v20.16b, v20.16b, #1
|
|
2596
|
+
subs x6, x6, #1
|
|
2597
|
+
b.gt Lopen_tail_16_store
|
|
2598
|
+
|
|
2599
|
+
Lopen_finalize:
|
|
2600
|
+
mov x11, v31.d[0]
|
|
2601
|
+
mov x12, v31.d[1]
|
|
2602
|
+
adds x8, x8, x11
|
|
2603
|
+
adcs x9, x9, x12
|
|
2604
|
+
adc x10, x10, x15
|
|
2605
|
+
mul x11, x8, x16 // [t2:t1:t0] = [acc2:acc1:acc0] * r0
|
|
2606
|
+
umulh x12, x8, x16
|
|
2607
|
+
mul x13, x9, x16
|
|
2608
|
+
umulh x14, x9, x16
|
|
2609
|
+
adds x12, x12, x13
|
|
2610
|
+
mul x13, x10, x16
|
|
2611
|
+
adc x13, x13, x14
|
|
2612
|
+
mul x14, x8, x17 // [t3:t2:t1:t0] = [acc2:acc1:acc0] * [r1:r0]
|
|
2613
|
+
umulh x8, x8, x17
|
|
2614
|
+
adds x12, x12, x14
|
|
2615
|
+
mul x14, x9, x17
|
|
2616
|
+
umulh x9, x9, x17
|
|
2617
|
+
adcs x14, x14, x8
|
|
2618
|
+
mul x10, x10, x17
|
|
2619
|
+
adc x10, x10, x9
|
|
2620
|
+
adds x13, x13, x14
|
|
2621
|
+
adc x14, x10, xzr
|
|
2622
|
+
and x10, x13, #3 // At this point acc2 is 2 bits at most (value of 3)
|
|
2623
|
+
and x8, x13, #-4
|
|
2624
|
+
extr x13, x14, x13, #2
|
|
2625
|
+
adds x8, x8, x11
|
|
2626
|
+
lsr x11, x14, #2
|
|
2627
|
+
adc x9, x14, x11 // No carry out since t0 is 61 bits and t3 is 63 bits
|
|
2628
|
+
adds x8, x8, x13
|
|
2629
|
+
adcs x9, x9, x12
|
|
2630
|
+
adc x10, x10, xzr // At this point acc2 has the value of 4 at most
|
|
2631
|
+
// Final reduction step
|
|
2632
|
+
sub x12, xzr, x15
|
|
2633
|
+
orr x13, xzr, #3
|
|
2634
|
+
subs x11, x8, #-5
|
|
2635
|
+
sbcs x12, x9, x12
|
|
2636
|
+
sbcs x13, x10, x13
|
|
2637
|
+
csel x8, x11, x8, cs
|
|
2638
|
+
csel x9, x12, x9, cs
|
|
2639
|
+
csel x10, x13, x10, cs
|
|
2640
|
+
mov x11, v27.d[0]
|
|
2641
|
+
mov x12, v27.d[1]
|
|
2642
|
+
adds x8, x8, x11
|
|
2643
|
+
adcs x9, x9, x12
|
|
2644
|
+
adc x10, x10, x15
|
|
2645
|
+
|
|
2646
|
+
stp x8, x9, [x5]
|
|
2647
|
+
|
|
2648
|
+
ldp d8, d9, [sp, #16]
|
|
2649
|
+
ldp d10, d11, [sp, #32]
|
|
2650
|
+
ldp d12, d13, [sp, #48]
|
|
2651
|
+
ldp d14, d15, [sp, #64]
|
|
2652
|
+
.cfi_restore b15
|
|
2653
|
+
.cfi_restore b14
|
|
2654
|
+
.cfi_restore b13
|
|
2655
|
+
.cfi_restore b12
|
|
2656
|
+
.cfi_restore b11
|
|
2657
|
+
.cfi_restore b10
|
|
2658
|
+
.cfi_restore b9
|
|
2659
|
+
.cfi_restore b8
|
|
2660
|
+
ldp x29, x30, [sp], 80
|
|
2661
|
+
.cfi_restore w29
|
|
2662
|
+
.cfi_restore w30
|
|
2663
|
+
.cfi_def_cfa_offset 0
|
|
2664
|
+
AARCH64_VALIDATE_LINK_REGISTER
|
|
2665
|
+
ret
|
|
2666
|
+
|
|
2667
|
+
Lopen_128:
|
|
2668
|
+
// On some architectures preparing 5 blocks for small buffers is wasteful
|
|
2669
|
+
eor v25.16b, v25.16b, v25.16b
|
|
2670
|
+
mov x11, #1
|
|
2671
|
+
mov v25.s[0], w11
|
|
2672
|
+
mov v0.16b, v24.16b
|
|
2673
|
+
mov v1.16b, v24.16b
|
|
2674
|
+
mov v2.16b, v24.16b
|
|
2675
|
+
mov v5.16b, v28.16b
|
|
2676
|
+
mov v6.16b, v28.16b
|
|
2677
|
+
mov v7.16b, v28.16b
|
|
2678
|
+
mov v10.16b, v29.16b
|
|
2679
|
+
mov v11.16b, v29.16b
|
|
2680
|
+
mov v12.16b, v29.16b
|
|
2681
|
+
mov v17.16b, v30.16b
|
|
2682
|
+
add v15.4s, v17.4s, v25.4s
|
|
2683
|
+
add v16.4s, v15.4s, v25.4s
|
|
2684
|
+
|
|
2685
|
+
mov x6, #10
|
|
2686
|
+
|
|
2687
|
+
Lopen_128_rounds:
|
|
2688
|
+
add v0.4s, v0.4s, v5.4s
|
|
2689
|
+
add v1.4s, v1.4s, v6.4s
|
|
2690
|
+
add v2.4s, v2.4s, v7.4s
|
|
2691
|
+
eor v15.16b, v15.16b, v0.16b
|
|
2692
|
+
eor v16.16b, v16.16b, v1.16b
|
|
2693
|
+
eor v17.16b, v17.16b, v2.16b
|
|
2694
|
+
rev32 v15.8h, v15.8h
|
|
2695
|
+
rev32 v16.8h, v16.8h
|
|
2696
|
+
rev32 v17.8h, v17.8h
|
|
2697
|
+
|
|
2698
|
+
add v10.4s, v10.4s, v15.4s
|
|
2699
|
+
add v11.4s, v11.4s, v16.4s
|
|
2700
|
+
add v12.4s, v12.4s, v17.4s
|
|
2701
|
+
eor v5.16b, v5.16b, v10.16b
|
|
2702
|
+
eor v6.16b, v6.16b, v11.16b
|
|
2703
|
+
eor v7.16b, v7.16b, v12.16b
|
|
2704
|
+
ushr v20.4s, v5.4s, #20
|
|
2705
|
+
sli v20.4s, v5.4s, #12
|
|
2706
|
+
ushr v5.4s, v6.4s, #20
|
|
2707
|
+
sli v5.4s, v6.4s, #12
|
|
2708
|
+
ushr v6.4s, v7.4s, #20
|
|
2709
|
+
sli v6.4s, v7.4s, #12
|
|
2710
|
+
|
|
2711
|
+
add v0.4s, v0.4s, v20.4s
|
|
2712
|
+
add v1.4s, v1.4s, v5.4s
|
|
2713
|
+
add v2.4s, v2.4s, v6.4s
|
|
2714
|
+
eor v15.16b, v15.16b, v0.16b
|
|
2715
|
+
eor v16.16b, v16.16b, v1.16b
|
|
2716
|
+
eor v17.16b, v17.16b, v2.16b
|
|
2717
|
+
tbl v15.16b, {v15.16b}, v26.16b
|
|
2718
|
+
tbl v16.16b, {v16.16b}, v26.16b
|
|
2719
|
+
tbl v17.16b, {v17.16b}, v26.16b
|
|
2720
|
+
|
|
2721
|
+
add v10.4s, v10.4s, v15.4s
|
|
2722
|
+
add v11.4s, v11.4s, v16.4s
|
|
2723
|
+
add v12.4s, v12.4s, v17.4s
|
|
2724
|
+
eor v20.16b, v20.16b, v10.16b
|
|
2725
|
+
eor v5.16b, v5.16b, v11.16b
|
|
2726
|
+
eor v6.16b, v6.16b, v12.16b
|
|
2727
|
+
ushr v7.4s, v6.4s, #25
|
|
2728
|
+
sli v7.4s, v6.4s, #7
|
|
2729
|
+
ushr v6.4s, v5.4s, #25
|
|
2730
|
+
sli v6.4s, v5.4s, #7
|
|
2731
|
+
ushr v5.4s, v20.4s, #25
|
|
2732
|
+
sli v5.4s, v20.4s, #7
|
|
2733
|
+
|
|
2734
|
+
ext v5.16b, v5.16b, v5.16b, #4
|
|
2735
|
+
ext v6.16b, v6.16b, v6.16b, #4
|
|
2736
|
+
ext v7.16b, v7.16b, v7.16b, #4
|
|
2737
|
+
|
|
2738
|
+
ext v10.16b, v10.16b, v10.16b, #8
|
|
2739
|
+
ext v11.16b, v11.16b, v11.16b, #8
|
|
2740
|
+
ext v12.16b, v12.16b, v12.16b, #8
|
|
2741
|
+
|
|
2742
|
+
ext v15.16b, v15.16b, v15.16b, #12
|
|
2743
|
+
ext v16.16b, v16.16b, v16.16b, #12
|
|
2744
|
+
ext v17.16b, v17.16b, v17.16b, #12
|
|
2745
|
+
add v0.4s, v0.4s, v5.4s
|
|
2746
|
+
add v1.4s, v1.4s, v6.4s
|
|
2747
|
+
add v2.4s, v2.4s, v7.4s
|
|
2748
|
+
eor v15.16b, v15.16b, v0.16b
|
|
2749
|
+
eor v16.16b, v16.16b, v1.16b
|
|
2750
|
+
eor v17.16b, v17.16b, v2.16b
|
|
2751
|
+
rev32 v15.8h, v15.8h
|
|
2752
|
+
rev32 v16.8h, v16.8h
|
|
2753
|
+
rev32 v17.8h, v17.8h
|
|
2754
|
+
|
|
2755
|
+
add v10.4s, v10.4s, v15.4s
|
|
2756
|
+
add v11.4s, v11.4s, v16.4s
|
|
2757
|
+
add v12.4s, v12.4s, v17.4s
|
|
2758
|
+
eor v5.16b, v5.16b, v10.16b
|
|
2759
|
+
eor v6.16b, v6.16b, v11.16b
|
|
2760
|
+
eor v7.16b, v7.16b, v12.16b
|
|
2761
|
+
ushr v20.4s, v5.4s, #20
|
|
2762
|
+
sli v20.4s, v5.4s, #12
|
|
2763
|
+
ushr v5.4s, v6.4s, #20
|
|
2764
|
+
sli v5.4s, v6.4s, #12
|
|
2765
|
+
ushr v6.4s, v7.4s, #20
|
|
2766
|
+
sli v6.4s, v7.4s, #12
|
|
2767
|
+
|
|
2768
|
+
add v0.4s, v0.4s, v20.4s
|
|
2769
|
+
add v1.4s, v1.4s, v5.4s
|
|
2770
|
+
add v2.4s, v2.4s, v6.4s
|
|
2771
|
+
eor v15.16b, v15.16b, v0.16b
|
|
2772
|
+
eor v16.16b, v16.16b, v1.16b
|
|
2773
|
+
eor v17.16b, v17.16b, v2.16b
|
|
2774
|
+
tbl v15.16b, {v15.16b}, v26.16b
|
|
2775
|
+
tbl v16.16b, {v16.16b}, v26.16b
|
|
2776
|
+
tbl v17.16b, {v17.16b}, v26.16b
|
|
2777
|
+
|
|
2778
|
+
add v10.4s, v10.4s, v15.4s
|
|
2779
|
+
add v11.4s, v11.4s, v16.4s
|
|
2780
|
+
add v12.4s, v12.4s, v17.4s
|
|
2781
|
+
eor v20.16b, v20.16b, v10.16b
|
|
2782
|
+
eor v5.16b, v5.16b, v11.16b
|
|
2783
|
+
eor v6.16b, v6.16b, v12.16b
|
|
2784
|
+
ushr v7.4s, v6.4s, #25
|
|
2785
|
+
sli v7.4s, v6.4s, #7
|
|
2786
|
+
ushr v6.4s, v5.4s, #25
|
|
2787
|
+
sli v6.4s, v5.4s, #7
|
|
2788
|
+
ushr v5.4s, v20.4s, #25
|
|
2789
|
+
sli v5.4s, v20.4s, #7
|
|
2790
|
+
|
|
2791
|
+
ext v5.16b, v5.16b, v5.16b, #12
|
|
2792
|
+
ext v6.16b, v6.16b, v6.16b, #12
|
|
2793
|
+
ext v7.16b, v7.16b, v7.16b, #12
|
|
2794
|
+
|
|
2795
|
+
ext v10.16b, v10.16b, v10.16b, #8
|
|
2796
|
+
ext v11.16b, v11.16b, v11.16b, #8
|
|
2797
|
+
ext v12.16b, v12.16b, v12.16b, #8
|
|
2798
|
+
|
|
2799
|
+
ext v15.16b, v15.16b, v15.16b, #4
|
|
2800
|
+
ext v16.16b, v16.16b, v16.16b, #4
|
|
2801
|
+
ext v17.16b, v17.16b, v17.16b, #4
|
|
2802
|
+
subs x6, x6, #1
|
|
2803
|
+
b.hi Lopen_128_rounds
|
|
2804
|
+
|
|
2805
|
+
add v0.4s, v0.4s, v24.4s
|
|
2806
|
+
add v1.4s, v1.4s, v24.4s
|
|
2807
|
+
add v2.4s, v2.4s, v24.4s
|
|
2808
|
+
|
|
2809
|
+
add v5.4s, v5.4s, v28.4s
|
|
2810
|
+
add v6.4s, v6.4s, v28.4s
|
|
2811
|
+
add v7.4s, v7.4s, v28.4s
|
|
2812
|
+
|
|
2813
|
+
add v10.4s, v10.4s, v29.4s
|
|
2814
|
+
add v11.4s, v11.4s, v29.4s
|
|
2815
|
+
|
|
2816
|
+
add v30.4s, v30.4s, v25.4s
|
|
2817
|
+
add v15.4s, v15.4s, v30.4s
|
|
2818
|
+
add v30.4s, v30.4s, v25.4s
|
|
2819
|
+
add v16.4s, v16.4s, v30.4s
|
|
2820
|
+
|
|
2821
|
+
and v2.16b, v2.16b, v27.16b
|
|
2822
|
+
mov x16, v2.d[0] // Move the R key to GPRs
|
|
2823
|
+
mov x17, v2.d[1]
|
|
2824
|
+
mov v27.16b, v7.16b // Store the S key
|
|
2825
|
+
|
|
2826
|
+
bl Lpoly_hash_ad_internal
|
|
2827
|
+
|
|
2828
|
+
Lopen_128_store:
|
|
2829
|
+
cmp x2, #64
|
|
2830
|
+
b.lt Lopen_128_store_64
|
|
2831
|
+
|
|
2832
|
+
ld1 {v20.16b - v23.16b}, [x1], #64
|
|
2833
|
+
|
|
2834
|
+
mov x11, v20.d[0]
|
|
2835
|
+
mov x12, v20.d[1]
|
|
2836
|
+
adds x8, x8, x11
|
|
2837
|
+
adcs x9, x9, x12
|
|
2838
|
+
adc x10, x10, x15
|
|
2839
|
+
mul x11, x8, x16 // [t2:t1:t0] = [acc2:acc1:acc0] * r0
|
|
2840
|
+
umulh x12, x8, x16
|
|
2841
|
+
mul x13, x9, x16
|
|
2842
|
+
umulh x14, x9, x16
|
|
2843
|
+
adds x12, x12, x13
|
|
2844
|
+
mul x13, x10, x16
|
|
2845
|
+
adc x13, x13, x14
|
|
2846
|
+
mul x14, x8, x17 // [t3:t2:t1:t0] = [acc2:acc1:acc0] * [r1:r0]
|
|
2847
|
+
umulh x8, x8, x17
|
|
2848
|
+
adds x12, x12, x14
|
|
2849
|
+
mul x14, x9, x17
|
|
2850
|
+
umulh x9, x9, x17
|
|
2851
|
+
adcs x14, x14, x8
|
|
2852
|
+
mul x10, x10, x17
|
|
2853
|
+
adc x10, x10, x9
|
|
2854
|
+
adds x13, x13, x14
|
|
2855
|
+
adc x14, x10, xzr
|
|
2856
|
+
and x10, x13, #3 // At this point acc2 is 2 bits at most (value of 3)
|
|
2857
|
+
and x8, x13, #-4
|
|
2858
|
+
extr x13, x14, x13, #2
|
|
2859
|
+
adds x8, x8, x11
|
|
2860
|
+
lsr x11, x14, #2
|
|
2861
|
+
adc x9, x14, x11 // No carry out since t0 is 61 bits and t3 is 63 bits
|
|
2862
|
+
adds x8, x8, x13
|
|
2863
|
+
adcs x9, x9, x12
|
|
2864
|
+
adc x10, x10, xzr // At this point acc2 has the value of 4 at most
|
|
2865
|
+
mov x11, v21.d[0]
|
|
2866
|
+
mov x12, v21.d[1]
|
|
2867
|
+
adds x8, x8, x11
|
|
2868
|
+
adcs x9, x9, x12
|
|
2869
|
+
adc x10, x10, x15
|
|
2870
|
+
mul x11, x8, x16 // [t2:t1:t0] = [acc2:acc1:acc0] * r0
|
|
2871
|
+
umulh x12, x8, x16
|
|
2872
|
+
mul x13, x9, x16
|
|
2873
|
+
umulh x14, x9, x16
|
|
2874
|
+
adds x12, x12, x13
|
|
2875
|
+
mul x13, x10, x16
|
|
2876
|
+
adc x13, x13, x14
|
|
2877
|
+
mul x14, x8, x17 // [t3:t2:t1:t0] = [acc2:acc1:acc0] * [r1:r0]
|
|
2878
|
+
umulh x8, x8, x17
|
|
2879
|
+
adds x12, x12, x14
|
|
2880
|
+
mul x14, x9, x17
|
|
2881
|
+
umulh x9, x9, x17
|
|
2882
|
+
adcs x14, x14, x8
|
|
2883
|
+
mul x10, x10, x17
|
|
2884
|
+
adc x10, x10, x9
|
|
2885
|
+
adds x13, x13, x14
|
|
2886
|
+
adc x14, x10, xzr
|
|
2887
|
+
and x10, x13, #3 // At this point acc2 is 2 bits at most (value of 3)
|
|
2888
|
+
and x8, x13, #-4
|
|
2889
|
+
extr x13, x14, x13, #2
|
|
2890
|
+
adds x8, x8, x11
|
|
2891
|
+
lsr x11, x14, #2
|
|
2892
|
+
adc x9, x14, x11 // No carry out since t0 is 61 bits and t3 is 63 bits
|
|
2893
|
+
adds x8, x8, x13
|
|
2894
|
+
adcs x9, x9, x12
|
|
2895
|
+
adc x10, x10, xzr // At this point acc2 has the value of 4 at most
|
|
2896
|
+
mov x11, v22.d[0]
|
|
2897
|
+
mov x12, v22.d[1]
|
|
2898
|
+
adds x8, x8, x11
|
|
2899
|
+
adcs x9, x9, x12
|
|
2900
|
+
adc x10, x10, x15
|
|
2901
|
+
mul x11, x8, x16 // [t2:t1:t0] = [acc2:acc1:acc0] * r0
|
|
2902
|
+
umulh x12, x8, x16
|
|
2903
|
+
mul x13, x9, x16
|
|
2904
|
+
umulh x14, x9, x16
|
|
2905
|
+
adds x12, x12, x13
|
|
2906
|
+
mul x13, x10, x16
|
|
2907
|
+
adc x13, x13, x14
|
|
2908
|
+
mul x14, x8, x17 // [t3:t2:t1:t0] = [acc2:acc1:acc0] * [r1:r0]
|
|
2909
|
+
umulh x8, x8, x17
|
|
2910
|
+
adds x12, x12, x14
|
|
2911
|
+
mul x14, x9, x17
|
|
2912
|
+
umulh x9, x9, x17
|
|
2913
|
+
adcs x14, x14, x8
|
|
2914
|
+
mul x10, x10, x17
|
|
2915
|
+
adc x10, x10, x9
|
|
2916
|
+
adds x13, x13, x14
|
|
2917
|
+
adc x14, x10, xzr
|
|
2918
|
+
and x10, x13, #3 // At this point acc2 is 2 bits at most (value of 3)
|
|
2919
|
+
and x8, x13, #-4
|
|
2920
|
+
extr x13, x14, x13, #2
|
|
2921
|
+
adds x8, x8, x11
|
|
2922
|
+
lsr x11, x14, #2
|
|
2923
|
+
adc x9, x14, x11 // No carry out since t0 is 61 bits and t3 is 63 bits
|
|
2924
|
+
adds x8, x8, x13
|
|
2925
|
+
adcs x9, x9, x12
|
|
2926
|
+
adc x10, x10, xzr // At this point acc2 has the value of 4 at most
|
|
2927
|
+
mov x11, v23.d[0]
|
|
2928
|
+
mov x12, v23.d[1]
|
|
2929
|
+
adds x8, x8, x11
|
|
2930
|
+
adcs x9, x9, x12
|
|
2931
|
+
adc x10, x10, x15
|
|
2932
|
+
mul x11, x8, x16 // [t2:t1:t0] = [acc2:acc1:acc0] * r0
|
|
2933
|
+
umulh x12, x8, x16
|
|
2934
|
+
mul x13, x9, x16
|
|
2935
|
+
umulh x14, x9, x16
|
|
2936
|
+
adds x12, x12, x13
|
|
2937
|
+
mul x13, x10, x16
|
|
2938
|
+
adc x13, x13, x14
|
|
2939
|
+
mul x14, x8, x17 // [t3:t2:t1:t0] = [acc2:acc1:acc0] * [r1:r0]
|
|
2940
|
+
umulh x8, x8, x17
|
|
2941
|
+
adds x12, x12, x14
|
|
2942
|
+
mul x14, x9, x17
|
|
2943
|
+
umulh x9, x9, x17
|
|
2944
|
+
adcs x14, x14, x8
|
|
2945
|
+
mul x10, x10, x17
|
|
2946
|
+
adc x10, x10, x9
|
|
2947
|
+
adds x13, x13, x14
|
|
2948
|
+
adc x14, x10, xzr
|
|
2949
|
+
and x10, x13, #3 // At this point acc2 is 2 bits at most (value of 3)
|
|
2950
|
+
and x8, x13, #-4
|
|
2951
|
+
extr x13, x14, x13, #2
|
|
2952
|
+
adds x8, x8, x11
|
|
2953
|
+
lsr x11, x14, #2
|
|
2954
|
+
adc x9, x14, x11 // No carry out since t0 is 61 bits and t3 is 63 bits
|
|
2955
|
+
adds x8, x8, x13
|
|
2956
|
+
adcs x9, x9, x12
|
|
2957
|
+
adc x10, x10, xzr // At this point acc2 has the value of 4 at most
|
|
2958
|
+
|
|
2959
|
+
eor v20.16b, v20.16b, v0.16b
|
|
2960
|
+
eor v21.16b, v21.16b, v5.16b
|
|
2961
|
+
eor v22.16b, v22.16b, v10.16b
|
|
2962
|
+
eor v23.16b, v23.16b, v15.16b
|
|
2963
|
+
|
|
2964
|
+
st1 {v20.16b - v23.16b}, [x0], #64
|
|
2965
|
+
|
|
2966
|
+
sub x2, x2, #64
|
|
2967
|
+
|
|
2968
|
+
mov v0.16b, v1.16b
|
|
2969
|
+
mov v5.16b, v6.16b
|
|
2970
|
+
mov v10.16b, v11.16b
|
|
2971
|
+
mov v15.16b, v16.16b
|
|
2972
|
+
|
|
2973
|
+
Lopen_128_store_64:
|
|
2974
|
+
|
|
2975
|
+
lsr x4, x2, #4
|
|
2976
|
+
mov x3, x1
|
|
2977
|
+
|
|
2978
|
+
Lopen_128_hash_64:
|
|
2979
|
+
cbz x4, Lopen_tail_64_store
|
|
2980
|
+
ldp x11, x12, [x3], 16
|
|
2981
|
+
adds x8, x8, x11
|
|
2982
|
+
adcs x9, x9, x12
|
|
2983
|
+
adc x10, x10, x15
|
|
2984
|
+
mul x11, x8, x16 // [t2:t1:t0] = [acc2:acc1:acc0] * r0
|
|
2985
|
+
umulh x12, x8, x16
|
|
2986
|
+
mul x13, x9, x16
|
|
2987
|
+
umulh x14, x9, x16
|
|
2988
|
+
adds x12, x12, x13
|
|
2989
|
+
mul x13, x10, x16
|
|
2990
|
+
adc x13, x13, x14
|
|
2991
|
+
mul x14, x8, x17 // [t3:t2:t1:t0] = [acc2:acc1:acc0] * [r1:r0]
|
|
2992
|
+
umulh x8, x8, x17
|
|
2993
|
+
adds x12, x12, x14
|
|
2994
|
+
mul x14, x9, x17
|
|
2995
|
+
umulh x9, x9, x17
|
|
2996
|
+
adcs x14, x14, x8
|
|
2997
|
+
mul x10, x10, x17
|
|
2998
|
+
adc x10, x10, x9
|
|
2999
|
+
adds x13, x13, x14
|
|
3000
|
+
adc x14, x10, xzr
|
|
3001
|
+
and x10, x13, #3 // At this point acc2 is 2 bits at most (value of 3)
|
|
3002
|
+
and x8, x13, #-4
|
|
3003
|
+
extr x13, x14, x13, #2
|
|
3004
|
+
adds x8, x8, x11
|
|
3005
|
+
lsr x11, x14, #2
|
|
3006
|
+
adc x9, x14, x11 // No carry out since t0 is 61 bits and t3 is 63 bits
|
|
3007
|
+
adds x8, x8, x13
|
|
3008
|
+
adcs x9, x9, x12
|
|
3009
|
+
adc x10, x10, xzr // At this point acc2 has the value of 4 at most
|
|
3010
|
+
sub x4, x4, #1
|
|
3011
|
+
b Lopen_128_hash_64
|
|
3012
|
+
.cfi_endproc
|
|
3013
|
+
|
|
3014
|
+
#endif // !OPENSSL_NO_ASM && defined(OPENSSL_AARCH64) && defined(_WIN32)
|