@annadata/capacitor-mqtt-quic 0.1.5 → 0.1.7
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/AnnadataCapacitorMqttQuic.podspec +36 -0
- package/README.md +121 -12
- package/android/NGTCP2_BUILD_INSTRUCTIONS.md +65 -44
- package/android/build-openssl.sh +1 -1
- package/android/install/nghttp3-android/arm64-v8a/include/nghttp3/nghttp3.h +3295 -0
- package/android/install/nghttp3-android/arm64-v8a/include/nghttp3/version.h +46 -0
- package/android/install/nghttp3-android/arm64-v8a/lib/cmake/nghttp3/nghttp3Config.cmake +3 -0
- package/android/install/nghttp3-android/arm64-v8a/lib/cmake/nghttp3/nghttp3ConfigVersion.cmake +65 -0
- package/android/install/nghttp3-android/arm64-v8a/lib/cmake/nghttp3/nghttp3Targets-release.cmake +29 -0
- package/android/install/nghttp3-android/arm64-v8a/lib/cmake/nghttp3/nghttp3Targets.cmake +114 -0
- package/android/install/nghttp3-android/arm64-v8a/lib/libnghttp3.a +0 -0
- package/android/install/nghttp3-android/arm64-v8a/lib/libnghttp3.so +0 -0
- package/android/install/nghttp3-android/arm64-v8a/lib/pkgconfig/libnghttp3.pc +34 -0
- package/android/install/nghttp3-android/arm64-v8a/share/doc/nghttp3/README.rst +75 -0
- package/android/install/nghttp3-android/armeabi-v7a/include/nghttp3/nghttp3.h +3295 -0
- package/android/install/nghttp3-android/armeabi-v7a/include/nghttp3/version.h +46 -0
- package/android/install/nghttp3-android/armeabi-v7a/lib/cmake/nghttp3/nghttp3Config.cmake +3 -0
- package/android/install/nghttp3-android/armeabi-v7a/lib/cmake/nghttp3/nghttp3ConfigVersion.cmake +65 -0
- package/android/install/nghttp3-android/armeabi-v7a/lib/cmake/nghttp3/nghttp3Targets-release.cmake +29 -0
- package/android/install/nghttp3-android/armeabi-v7a/lib/cmake/nghttp3/nghttp3Targets.cmake +114 -0
- package/android/install/nghttp3-android/armeabi-v7a/lib/libnghttp3.a +0 -0
- package/android/install/nghttp3-android/armeabi-v7a/lib/libnghttp3.so +0 -0
- package/android/install/nghttp3-android/armeabi-v7a/lib/pkgconfig/libnghttp3.pc +34 -0
- package/android/install/nghttp3-android/armeabi-v7a/share/doc/nghttp3/README.rst +75 -0
- package/android/install/nghttp3-android/x86_64/include/nghttp3/nghttp3.h +3295 -0
- package/android/install/nghttp3-android/x86_64/include/nghttp3/version.h +46 -0
- package/android/install/nghttp3-android/x86_64/lib/cmake/nghttp3/nghttp3Config.cmake +3 -0
- package/android/install/nghttp3-android/x86_64/lib/cmake/nghttp3/nghttp3ConfigVersion.cmake +65 -0
- package/android/install/nghttp3-android/x86_64/lib/cmake/nghttp3/nghttp3Targets-release.cmake +29 -0
- package/android/install/nghttp3-android/x86_64/lib/cmake/nghttp3/nghttp3Targets.cmake +114 -0
- package/android/install/nghttp3-android/x86_64/lib/libnghttp3.a +0 -0
- package/android/install/nghttp3-android/x86_64/lib/libnghttp3.so +0 -0
- package/android/install/nghttp3-android/x86_64/lib/pkgconfig/libnghttp3.pc +34 -0
- package/android/install/nghttp3-android/x86_64/share/doc/nghttp3/README.rst +75 -0
- package/android/install/ngtcp2-android/arm64-v8a/include/ngtcp2/ngtcp2.h +6254 -0
- package/android/install/ngtcp2-android/arm64-v8a/include/ngtcp2/ngtcp2_crypto.h +1037 -0
- package/android/install/ngtcp2-android/arm64-v8a/include/ngtcp2/ngtcp2_crypto_wolfssl.h +106 -0
- package/android/install/ngtcp2-android/arm64-v8a/include/ngtcp2/version.h +51 -0
- package/android/install/ngtcp2-android/arm64-v8a/lib/cmake/ngtcp2/ngtcp2Config.cmake +6 -0
- package/android/install/ngtcp2-android/arm64-v8a/lib/cmake/ngtcp2/ngtcp2ConfigVersion.cmake +65 -0
- package/android/install/ngtcp2-android/arm64-v8a/lib/cmake/ngtcp2/ngtcp2Targets-release.cmake +29 -0
- package/android/install/ngtcp2-android/arm64-v8a/lib/cmake/ngtcp2/ngtcp2Targets.cmake +114 -0
- package/android/install/ngtcp2-android/arm64-v8a/lib/libngtcp2.a +0 -0
- package/android/install/ngtcp2-android/arm64-v8a/lib/libngtcp2.so +0 -0
- package/android/install/ngtcp2-android/arm64-v8a/lib/libngtcp2_crypto_wolfssl.a +0 -0
- package/android/install/ngtcp2-android/arm64-v8a/lib/libngtcp2_crypto_wolfssl.so +0 -0
- package/android/install/ngtcp2-android/arm64-v8a/lib/pkgconfig/libngtcp2.pc +33 -0
- package/android/install/ngtcp2-android/arm64-v8a/lib/pkgconfig/libngtcp2_crypto_wolfssl.pc +34 -0
- package/android/install/ngtcp2-android/arm64-v8a/share/doc/ngtcp2/README.rst +385 -0
- package/android/install/ngtcp2-android/armeabi-v7a/include/ngtcp2/ngtcp2.h +6254 -0
- package/android/install/ngtcp2-android/armeabi-v7a/include/ngtcp2/ngtcp2_crypto.h +1037 -0
- package/android/install/ngtcp2-android/armeabi-v7a/include/ngtcp2/ngtcp2_crypto_wolfssl.h +106 -0
- package/android/install/ngtcp2-android/armeabi-v7a/include/ngtcp2/version.h +51 -0
- package/android/install/ngtcp2-android/armeabi-v7a/lib/cmake/ngtcp2/ngtcp2Config.cmake +6 -0
- package/android/install/ngtcp2-android/armeabi-v7a/lib/cmake/ngtcp2/ngtcp2ConfigVersion.cmake +65 -0
- package/android/install/ngtcp2-android/armeabi-v7a/lib/cmake/ngtcp2/ngtcp2Targets-release.cmake +29 -0
- package/android/install/ngtcp2-android/armeabi-v7a/lib/cmake/ngtcp2/ngtcp2Targets.cmake +114 -0
- package/android/install/ngtcp2-android/armeabi-v7a/lib/libngtcp2.a +0 -0
- package/android/install/ngtcp2-android/armeabi-v7a/lib/libngtcp2.so +0 -0
- package/android/install/ngtcp2-android/armeabi-v7a/lib/libngtcp2_crypto_wolfssl.a +0 -0
- package/android/install/ngtcp2-android/armeabi-v7a/lib/libngtcp2_crypto_wolfssl.so +0 -0
- package/android/install/ngtcp2-android/armeabi-v7a/lib/pkgconfig/libngtcp2.pc +33 -0
- package/android/install/ngtcp2-android/armeabi-v7a/lib/pkgconfig/libngtcp2_crypto_wolfssl.pc +34 -0
- package/android/install/ngtcp2-android/armeabi-v7a/share/doc/ngtcp2/README.rst +385 -0
- package/android/install/ngtcp2-android/x86_64/include/ngtcp2/ngtcp2.h +6254 -0
- package/android/install/ngtcp2-android/x86_64/include/ngtcp2/ngtcp2_crypto.h +1037 -0
- package/android/install/ngtcp2-android/x86_64/include/ngtcp2/ngtcp2_crypto_wolfssl.h +106 -0
- package/android/install/ngtcp2-android/x86_64/include/ngtcp2/version.h +51 -0
- package/android/install/ngtcp2-android/x86_64/lib/cmake/ngtcp2/ngtcp2Config.cmake +6 -0
- package/android/install/ngtcp2-android/x86_64/lib/cmake/ngtcp2/ngtcp2ConfigVersion.cmake +65 -0
- package/android/install/ngtcp2-android/x86_64/lib/cmake/ngtcp2/ngtcp2Targets-release.cmake +29 -0
- package/android/install/ngtcp2-android/x86_64/lib/cmake/ngtcp2/ngtcp2Targets.cmake +114 -0
- package/android/install/ngtcp2-android/x86_64/lib/libngtcp2.a +0 -0
- package/android/install/ngtcp2-android/x86_64/lib/libngtcp2.so +0 -0
- package/android/install/ngtcp2-android/x86_64/lib/libngtcp2_crypto_wolfssl.a +0 -0
- package/android/install/ngtcp2-android/x86_64/lib/libngtcp2_crypto_wolfssl.so +0 -0
- package/android/install/ngtcp2-android/x86_64/lib/pkgconfig/libngtcp2.pc +33 -0
- package/android/install/ngtcp2-android/x86_64/lib/pkgconfig/libngtcp2_crypto_wolfssl.pc +34 -0
- package/android/install/ngtcp2-android/x86_64/share/doc/ngtcp2/README.rst +385 -0
- package/android/install/wolfssl-android/arm64-v8a/bin/wolfssl-config +117 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/callbacks.h +93 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/certs_test.h +7073 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/certs_test_sm.h +2913 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/crl.h +58 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/error-ssl.h +280 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/ocsp.h +191 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/aes.h +117 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/asn1.h +315 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/asn1t.h +30 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/bio.h +237 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/bn.h +332 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/buffer.h +57 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/camellia.h +27 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/cmac.h +66 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/cms.h +26 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/compat_types.h +70 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/conf.h +117 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/crypto.h +171 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/des.h +124 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/dh.h +144 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/dsa.h +164 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/ec.h +525 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/ec25519.h +46 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/ec448.h +46 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/ecdh.h +49 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/ecdsa.h +87 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/ed25519.h +49 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/ed448.h +49 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/engine.h +9 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/err.h +84 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/evp.h +1540 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/fips_rand.h +125 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/hmac.h +98 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/kdf.h +45 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/lhash.h +64 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/md4.h +66 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/md5.h +108 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/modes.h +45 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/obj_mac.h +92 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/objects.h +86 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/ocsp.h +108 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/opensslconf.h +8 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/opensslv.h +78 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/ossl_typ.h +32 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/pem.h +301 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/pkcs12.h +57 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/pkcs7.h +110 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/rand.h +38 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/rc4.h +64 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/ripemd.h +58 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/rsa.h +291 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/safestack.h +40 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/sha.h +331 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/sha3.h +158 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/srp.h +33 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/ssl.h +1923 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/ssl23.h +1 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/stack.h +61 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/tls1.h +64 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/txt_db.h +60 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/ui.h +2 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/x509.h +227 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/x509_vfy.h +50 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/x509v3.h +237 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/options.h +273 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/quic.h +310 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/sniffer.h +359 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/sniffer_error.h +151 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/ssl.h +6300 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/test.h +4989 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/version.h +40 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/aes.h +1074 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/arc4.h +69 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/ascon.h +109 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/asn.h +2855 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/asn_public.h +1009 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/blake2-impl.h +155 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/blake2-int.h +174 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/blake2.h +108 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/camellia.h +116 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/chacha.h +133 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/chacha20_poly1305.h +157 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/cmac.h +168 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/coding.h +107 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/compress.h +60 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/cpuid.h +153 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/cryptocb.h +770 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/curve25519.h +225 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/curve448.h +151 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/des3.h +167 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/dh.h +210 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/dilithium.h +1051 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/dsa.h +121 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/ecc.h +1074 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/eccsi.h +176 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/ed25519.h +239 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/ed448.h +214 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/error-crypt.h +368 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/ext_lms.h +62 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/ext_mlkem.h +74 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/ext_xmss.h +53 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/falcon.h +180 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/fe_448.h +122 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/fe_operations.h +189 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/fips_test.h +131 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/ge_448.h +84 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/ge_operations.h +134 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/hash.h +296 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/hmac.h +231 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/hpke.h +145 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/integer.h +449 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/kdf.h +199 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/lms.h +202 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/logging.h +588 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/md2.h +83 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/md4.h +77 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/md5.h +141 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/mem_track.h +968 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/memory.h +545 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/misc.h +214 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/mlkem.h +377 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/mpi_class.h +1021 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/mpi_superclass.h +96 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/oid_sum.h +1907 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/pkcs12.h +79 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/pkcs7.h +578 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/poly1305.h +207 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/pwdbased.h +81 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/random.h +300 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/rc2.h +68 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/ripemd.h +67 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/rsa.h +494 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/sakke.h +228 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/settings.h +4762 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/sha.h +237 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/sha256.h +360 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/sha3.h +274 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/sha512.h +372 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/signature.h +87 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/siphash.h +101 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/sm2.h +27 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/sm3.h +27 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/sm4.h +27 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/sp_int.h +1396 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/sphincs.h +167 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/srp.h +313 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/tfm.h +941 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/types.h +2383 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/visibility.h +97 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/wc_encrypt.h +126 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/wc_lms.h +506 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/wc_mlkem.h +370 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/wc_port.h +1764 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/wc_xmss.h +285 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/wolfevent.h +120 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/wolfmath.h +175 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/xmss.h +203 -0
- package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfio.h +1035 -0
- package/android/install/wolfssl-android/arm64-v8a/lib/libwolfssl.a +0 -0
- package/android/install/wolfssl-android/arm64-v8a/lib/libwolfssl.la +41 -0
- package/android/install/wolfssl-android/arm64-v8a/lib/pkgconfig/wolfssl.pc +11 -0
- package/android/install/wolfssl-android/arm64-v8a/share/doc/wolfssl/QUIC.md +117 -0
- package/android/install/wolfssl-android/arm64-v8a/share/doc/wolfssl/README.txt +8 -0
- package/android/install/wolfssl-android/arm64-v8a/share/doc/wolfssl/example/async_client.c +245 -0
- package/android/install/wolfssl-android/arm64-v8a/share/doc/wolfssl/example/async_server.c +331 -0
- package/android/install/wolfssl-android/arm64-v8a/share/doc/wolfssl/example/client.c +4885 -0
- package/android/install/wolfssl-android/arm64-v8a/share/doc/wolfssl/example/echoclient.c +341 -0
- package/android/install/wolfssl-android/arm64-v8a/share/doc/wolfssl/example/echoserver.c +498 -0
- package/android/install/wolfssl-android/arm64-v8a/share/doc/wolfssl/example/sctp-client-dtls.c +135 -0
- package/android/install/wolfssl-android/arm64-v8a/share/doc/wolfssl/example/sctp-client.c +78 -0
- package/android/install/wolfssl-android/arm64-v8a/share/doc/wolfssl/example/sctp-server-dtls.c +134 -0
- package/android/install/wolfssl-android/arm64-v8a/share/doc/wolfssl/example/sctp-server.c +83 -0
- package/android/install/wolfssl-android/arm64-v8a/share/doc/wolfssl/example/server.c +4124 -0
- package/android/install/wolfssl-android/arm64-v8a/share/doc/wolfssl/example/tls_bench.c +2357 -0
- package/android/install/wolfssl-android/arm64-v8a/share/doc/wolfssl/taoCert.txt +176 -0
- package/android/install/wolfssl-android/armeabi-v7a/bin/wolfssl-config +117 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/callbacks.h +93 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/certs_test.h +7073 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/certs_test_sm.h +2913 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/crl.h +58 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/error-ssl.h +280 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/ocsp.h +191 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/aes.h +117 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/asn1.h +315 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/asn1t.h +30 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/bio.h +237 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/bn.h +332 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/buffer.h +57 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/camellia.h +27 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/cmac.h +66 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/cms.h +26 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/compat_types.h +70 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/conf.h +117 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/crypto.h +171 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/des.h +124 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/dh.h +144 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/dsa.h +164 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/ec.h +525 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/ec25519.h +46 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/ec448.h +46 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/ecdh.h +49 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/ecdsa.h +87 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/ed25519.h +49 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/ed448.h +49 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/engine.h +9 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/err.h +84 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/evp.h +1540 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/fips_rand.h +125 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/hmac.h +98 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/kdf.h +45 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/lhash.h +64 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/md4.h +66 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/md5.h +108 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/modes.h +45 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/obj_mac.h +92 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/objects.h +86 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/ocsp.h +108 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/opensslconf.h +8 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/opensslv.h +78 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/ossl_typ.h +32 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/pem.h +301 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/pkcs12.h +57 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/pkcs7.h +110 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/rand.h +38 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/rc4.h +64 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/ripemd.h +58 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/rsa.h +291 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/safestack.h +40 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/sha.h +331 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/sha3.h +158 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/srp.h +33 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/ssl.h +1923 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/ssl23.h +1 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/stack.h +61 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/tls1.h +64 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/txt_db.h +60 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/ui.h +2 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/x509.h +227 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/x509_vfy.h +50 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/x509v3.h +237 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/options.h +261 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/quic.h +310 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/sniffer.h +359 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/sniffer_error.h +151 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/ssl.h +6300 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/test.h +4989 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/version.h +40 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/aes.h +1074 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/arc4.h +69 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/ascon.h +109 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/asn.h +2855 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/asn_public.h +1009 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/blake2-impl.h +155 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/blake2-int.h +174 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/blake2.h +108 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/camellia.h +116 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/chacha.h +133 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/chacha20_poly1305.h +157 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/cmac.h +168 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/coding.h +107 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/compress.h +60 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/cpuid.h +153 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/cryptocb.h +770 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/curve25519.h +225 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/curve448.h +151 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/des3.h +167 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/dh.h +210 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/dilithium.h +1051 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/dsa.h +121 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/ecc.h +1074 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/eccsi.h +176 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/ed25519.h +239 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/ed448.h +214 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/error-crypt.h +368 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/ext_lms.h +62 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/ext_mlkem.h +74 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/ext_xmss.h +53 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/falcon.h +180 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/fe_448.h +122 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/fe_operations.h +189 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/fips_test.h +131 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/ge_448.h +84 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/ge_operations.h +134 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/hash.h +296 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/hmac.h +231 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/hpke.h +145 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/integer.h +449 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/kdf.h +199 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/lms.h +202 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/logging.h +588 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/md2.h +83 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/md4.h +77 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/md5.h +141 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/mem_track.h +968 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/memory.h +545 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/misc.h +214 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/mlkem.h +377 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/mpi_class.h +1021 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/mpi_superclass.h +96 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/oid_sum.h +1907 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/pkcs12.h +79 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/pkcs7.h +578 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/poly1305.h +207 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/pwdbased.h +81 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/random.h +300 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/rc2.h +68 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/ripemd.h +67 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/rsa.h +494 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/sakke.h +228 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/settings.h +4762 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/sha.h +237 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/sha256.h +360 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/sha3.h +274 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/sha512.h +372 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/signature.h +87 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/siphash.h +101 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/sm2.h +27 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/sm3.h +27 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/sm4.h +27 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/sp_int.h +1396 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/sphincs.h +167 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/srp.h +313 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/tfm.h +941 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/types.h +2383 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/visibility.h +97 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/wc_encrypt.h +126 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/wc_lms.h +506 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/wc_mlkem.h +370 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/wc_port.h +1764 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/wc_xmss.h +285 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/wolfevent.h +120 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/wolfmath.h +175 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/xmss.h +203 -0
- package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfio.h +1035 -0
- package/android/install/wolfssl-android/armeabi-v7a/lib/libwolfssl.a +0 -0
- package/android/install/wolfssl-android/armeabi-v7a/lib/libwolfssl.la +41 -0
- package/android/install/wolfssl-android/armeabi-v7a/lib/pkgconfig/wolfssl.pc +11 -0
- package/android/install/wolfssl-android/armeabi-v7a/share/doc/wolfssl/QUIC.md +117 -0
- package/android/install/wolfssl-android/armeabi-v7a/share/doc/wolfssl/README.txt +8 -0
- package/android/install/wolfssl-android/armeabi-v7a/share/doc/wolfssl/example/async_client.c +245 -0
- package/android/install/wolfssl-android/armeabi-v7a/share/doc/wolfssl/example/async_server.c +331 -0
- package/android/install/wolfssl-android/armeabi-v7a/share/doc/wolfssl/example/client.c +4885 -0
- package/android/install/wolfssl-android/armeabi-v7a/share/doc/wolfssl/example/echoclient.c +341 -0
- package/android/install/wolfssl-android/armeabi-v7a/share/doc/wolfssl/example/echoserver.c +498 -0
- package/android/install/wolfssl-android/armeabi-v7a/share/doc/wolfssl/example/sctp-client-dtls.c +135 -0
- package/android/install/wolfssl-android/armeabi-v7a/share/doc/wolfssl/example/sctp-client.c +78 -0
- package/android/install/wolfssl-android/armeabi-v7a/share/doc/wolfssl/example/sctp-server-dtls.c +134 -0
- package/android/install/wolfssl-android/armeabi-v7a/share/doc/wolfssl/example/sctp-server.c +83 -0
- package/android/install/wolfssl-android/armeabi-v7a/share/doc/wolfssl/example/server.c +4124 -0
- package/android/install/wolfssl-android/armeabi-v7a/share/doc/wolfssl/example/tls_bench.c +2357 -0
- package/android/install/wolfssl-android/armeabi-v7a/share/doc/wolfssl/taoCert.txt +176 -0
- package/android/install/wolfssl-android/x86_64/bin/wolfssl-config +117 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/callbacks.h +93 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/certs_test.h +7073 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/certs_test_sm.h +2913 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/crl.h +58 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/error-ssl.h +280 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/ocsp.h +191 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/aes.h +117 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/asn1.h +315 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/asn1t.h +30 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/bio.h +237 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/bn.h +332 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/buffer.h +57 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/camellia.h +27 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/cmac.h +66 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/cms.h +26 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/compat_types.h +70 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/conf.h +117 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/crypto.h +171 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/des.h +124 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/dh.h +144 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/dsa.h +164 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/ec.h +525 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/ec25519.h +46 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/ec448.h +46 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/ecdh.h +49 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/ecdsa.h +87 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/ed25519.h +49 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/ed448.h +49 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/engine.h +9 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/err.h +84 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/evp.h +1540 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/fips_rand.h +125 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/hmac.h +98 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/kdf.h +45 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/lhash.h +64 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/md4.h +66 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/md5.h +108 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/modes.h +45 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/obj_mac.h +92 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/objects.h +86 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/ocsp.h +108 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/opensslconf.h +8 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/opensslv.h +78 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/ossl_typ.h +32 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/pem.h +301 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/pkcs12.h +57 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/pkcs7.h +110 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/rand.h +38 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/rc4.h +64 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/ripemd.h +58 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/rsa.h +291 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/safestack.h +40 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/sha.h +331 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/sha3.h +158 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/srp.h +33 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/ssl.h +1923 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/ssl23.h +1 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/stack.h +61 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/tls1.h +64 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/txt_db.h +60 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/ui.h +2 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/x509.h +227 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/x509_vfy.h +50 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/x509v3.h +237 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/options.h +273 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/quic.h +310 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/sniffer.h +359 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/sniffer_error.h +151 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/ssl.h +6300 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/test.h +4989 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/version.h +40 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/aes.h +1074 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/arc4.h +69 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/ascon.h +109 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/asn.h +2855 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/asn_public.h +1009 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/blake2-impl.h +155 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/blake2-int.h +174 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/blake2.h +108 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/camellia.h +116 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/chacha.h +133 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/chacha20_poly1305.h +157 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/cmac.h +168 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/coding.h +107 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/compress.h +60 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/cpuid.h +153 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/cryptocb.h +770 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/curve25519.h +225 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/curve448.h +151 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/des3.h +167 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/dh.h +210 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/dilithium.h +1051 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/dsa.h +121 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/ecc.h +1074 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/eccsi.h +176 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/ed25519.h +239 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/ed448.h +214 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/error-crypt.h +368 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/ext_lms.h +62 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/ext_mlkem.h +74 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/ext_xmss.h +53 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/falcon.h +180 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/fe_448.h +122 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/fe_operations.h +189 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/fips_test.h +131 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/ge_448.h +84 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/ge_operations.h +134 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/hash.h +296 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/hmac.h +231 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/hpke.h +145 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/integer.h +449 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/kdf.h +199 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/lms.h +202 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/logging.h +588 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/md2.h +83 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/md4.h +77 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/md5.h +141 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/mem_track.h +968 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/memory.h +545 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/misc.h +214 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/mlkem.h +377 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/mpi_class.h +1021 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/mpi_superclass.h +96 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/oid_sum.h +1907 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/pkcs12.h +79 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/pkcs7.h +578 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/poly1305.h +207 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/pwdbased.h +81 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/random.h +300 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/rc2.h +68 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/ripemd.h +67 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/rsa.h +494 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/sakke.h +228 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/settings.h +4762 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/sha.h +237 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/sha256.h +360 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/sha3.h +274 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/sha512.h +372 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/signature.h +87 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/siphash.h +101 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/sm2.h +27 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/sm3.h +27 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/sm4.h +27 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/sp_int.h +1396 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/sphincs.h +167 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/srp.h +313 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/tfm.h +941 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/types.h +2383 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/visibility.h +97 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/wc_encrypt.h +126 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/wc_lms.h +506 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/wc_mlkem.h +370 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/wc_port.h +1764 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/wc_xmss.h +285 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/wolfevent.h +120 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/wolfmath.h +175 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/xmss.h +203 -0
- package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfio.h +1035 -0
- package/android/install/wolfssl-android/x86_64/lib/libwolfssl.a +0 -0
- package/android/install/wolfssl-android/x86_64/lib/libwolfssl.la +41 -0
- package/android/install/wolfssl-android/x86_64/lib/pkgconfig/wolfssl.pc +11 -0
- package/android/install/wolfssl-android/x86_64/share/doc/wolfssl/QUIC.md +117 -0
- package/android/install/wolfssl-android/x86_64/share/doc/wolfssl/README.txt +8 -0
- package/android/install/wolfssl-android/x86_64/share/doc/wolfssl/example/async_client.c +245 -0
- package/android/install/wolfssl-android/x86_64/share/doc/wolfssl/example/async_server.c +331 -0
- package/android/install/wolfssl-android/x86_64/share/doc/wolfssl/example/client.c +4885 -0
- package/android/install/wolfssl-android/x86_64/share/doc/wolfssl/example/echoclient.c +341 -0
- package/android/install/wolfssl-android/x86_64/share/doc/wolfssl/example/echoserver.c +498 -0
- package/android/install/wolfssl-android/x86_64/share/doc/wolfssl/example/sctp-client-dtls.c +135 -0
- package/android/install/wolfssl-android/x86_64/share/doc/wolfssl/example/sctp-client.c +78 -0
- package/android/install/wolfssl-android/x86_64/share/doc/wolfssl/example/sctp-server-dtls.c +134 -0
- package/android/install/wolfssl-android/x86_64/share/doc/wolfssl/example/sctp-server.c +83 -0
- package/android/install/wolfssl-android/x86_64/share/doc/wolfssl/example/server.c +4124 -0
- package/android/install/wolfssl-android/x86_64/share/doc/wolfssl/example/tls_bench.c +2357 -0
- package/android/install/wolfssl-android/x86_64/share/doc/wolfssl/taoCert.txt +176 -0
- package/android/src/main/cpp/CMakeLists.txt +19 -27
- package/android/src/main/cpp/ngtcp2_jni.cpp +30 -36
- package/android/src/main/kotlin/ai/annadata/mqttquic/MqttQuicPlugin.kt +15 -0
- package/android/src/main/kotlin/ai/annadata/mqttquic/client/MQTTClient.kt +6 -2
- package/build-native.sh +397 -0
- package/deps-versions.sh +25 -0
- package/dist/esm/definitions.d.ts +20 -0
- package/dist/esm/definitions.d.ts.map +1 -1
- package/dist/esm/web.d.ts +26 -3
- package/dist/esm/web.d.ts.map +1 -1
- package/dist/esm/web.js +230 -10
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +11363 -13
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +11364 -14
- package/dist/plugin.js.map +1 -1
- package/docs/ARCHITECTURAL_ANALYSIS.md +710 -0
- package/docs/CAPACITOR_MQTT_QUIC_PRODUCTION_PLUGIN.md +190 -0
- package/docs/CAPACITOR_VERSION_SUPPORT.md +65 -0
- package/docs/IMPLEMENTATION_SUMMARY.md +246 -0
- package/docs/MQTT5_CLIENT_COMPLIANCE.md +48 -0
- package/docs/MQTT5_IMPLEMENTATION_COMPLETE.md +178 -0
- package/docs/MQTT_VERSION_ANALYSIS.md +233 -0
- package/docs/NGTCP2_IMPLEMENTATION_STATUS.md +214 -0
- package/docs/NGTCP2_INTEGRATION_PLAN.md +597 -0
- package/docs/P0_P1_CHANGELOG.md +79 -0
- package/docs/PRODUCTION_PUBLISH_STEPS.md +161 -0
- package/docs/PROJECT_OVERVIEW.md +193 -0
- package/ios/.swiftpm/xcode/xcuserdata/annadata.xcuserdatad/xcschemes/xcschememanagement.plist +1 -1
- package/ios/NGTCP2_BUILD_INSTRUCTIONS.md +12 -0
- package/ios/Sources/MqttQuicPlugin/MqttQuicPlugin.swift +6 -0
- package/ios/Sources/MqttQuicPlugin/QUIC/NGTCP2Bridge.mm +6 -0
- package/ios/build-openssl.sh +1 -1
- package/ios/libs/MqttQuicLibs.xcframework/ios-arm64/libmqttquic_native_device.a +0 -0
- package/ios/libs/MqttQuicLibs.xcframework/ios-arm64_x86_64-simulator/libmqttquic_native_simulator.a +0 -0
- package/ios/libs/libnghttp3.a +0 -0
- package/ios/libs/libngtcp2.a +0 -0
- package/ios/libs/libngtcp2_crypto_wolfssl.a +0 -0
- package/ios/libs/libwolfssl.a +0 -0
- package/ios/libs-simulator/libnghttp3.a +0 -0
- package/ios/libs-simulator/libngtcp2.a +0 -0
- package/ios/libs-simulator/libngtcp2_crypto_wolfssl.a +0 -0
- package/ios/libs-simulator/libwolfssl.a +0 -0
- package/ios/libs-simulator-x86_64/libnghttp3.a +0 -0
- package/ios/libs-simulator-x86_64/libngtcp2.a +0 -0
- package/ios/libs-simulator-x86_64/libngtcp2_crypto_wolfssl.a +0 -0
- package/ios/libs-simulator-x86_64/libwolfssl.a +0 -0
- package/package.json +22 -8
- package/ios/include/ngtcp2/ngtcp2_crypto_quictls.h +0 -147
- package/ios/include/openssl/aes.h +0 -111
- package/ios/include/openssl/asn1.h +0 -1131
- package/ios/include/openssl/asn1_mac.h +0 -10
- package/ios/include/openssl/asn1err.h +0 -140
- package/ios/include/openssl/asn1t.h +0 -946
- package/ios/include/openssl/async.h +0 -96
- package/ios/include/openssl/asyncerr.h +0 -29
- package/ios/include/openssl/bio.h +0 -887
- package/ios/include/openssl/bioerr.h +0 -65
- package/ios/include/openssl/blowfish.h +0 -78
- package/ios/include/openssl/bn.h +0 -584
- package/ios/include/openssl/bnerr.h +0 -47
- package/ios/include/openssl/buffer.h +0 -62
- package/ios/include/openssl/buffererr.h +0 -25
- package/ios/include/openssl/camellia.h +0 -117
- package/ios/include/openssl/cast.h +0 -71
- package/ios/include/openssl/cmac.h +0 -52
- package/ios/include/openssl/cmp.h +0 -597
- package/ios/include/openssl/cmp_util.h +0 -56
- package/ios/include/openssl/cmperr.h +0 -116
- package/ios/include/openssl/cms.h +0 -493
- package/ios/include/openssl/cmserr.h +0 -124
- package/ios/include/openssl/comp.h +0 -59
- package/ios/include/openssl/comperr.h +0 -31
- package/ios/include/openssl/conf.h +0 -214
- package/ios/include/openssl/conf_api.h +0 -46
- package/ios/include/openssl/conferr.h +0 -52
- package/ios/include/openssl/configuration.h +0 -149
- package/ios/include/openssl/conftypes.h +0 -44
- package/ios/include/openssl/core.h +0 -233
- package/ios/include/openssl/core_dispatch.h +0 -960
- package/ios/include/openssl/core_names.h +0 -561
- package/ios/include/openssl/core_object.h +0 -41
- package/ios/include/openssl/crmf.h +0 -227
- package/ios/include/openssl/crmferr.h +0 -50
- package/ios/include/openssl/crypto.h +0 -558
- package/ios/include/openssl/cryptoerr.h +0 -55
- package/ios/include/openssl/cryptoerr_legacy.h +0 -1466
- package/ios/include/openssl/ct.h +0 -573
- package/ios/include/openssl/cterr.h +0 -45
- package/ios/include/openssl/decoder.h +0 -133
- package/ios/include/openssl/decodererr.h +0 -28
- package/ios/include/openssl/des.h +0 -211
- package/ios/include/openssl/dh.h +0 -335
- package/ios/include/openssl/dherr.h +0 -58
- package/ios/include/openssl/dsa.h +0 -280
- package/ios/include/openssl/dsaerr.h +0 -44
- package/ios/include/openssl/dtls1.h +0 -57
- package/ios/include/openssl/e_os2.h +0 -308
- package/ios/include/openssl/ebcdic.h +0 -39
- package/ios/include/openssl/ec.h +0 -1572
- package/ios/include/openssl/ecdh.h +0 -10
- package/ios/include/openssl/ecdsa.h +0 -10
- package/ios/include/openssl/ecerr.h +0 -104
- package/ios/include/openssl/encoder.h +0 -124
- package/ios/include/openssl/encodererr.h +0 -28
- package/ios/include/openssl/engine.h +0 -833
- package/ios/include/openssl/engineerr.h +0 -63
- package/ios/include/openssl/err.h +0 -504
- package/ios/include/openssl/ess.h +0 -128
- package/ios/include/openssl/esserr.h +0 -32
- package/ios/include/openssl/evp.h +0 -2175
- package/ios/include/openssl/evperr.h +0 -134
- package/ios/include/openssl/fips_names.h +0 -77
- package/ios/include/openssl/fipskey.h +0 -36
- package/ios/include/openssl/hmac.h +0 -62
- package/ios/include/openssl/http.h +0 -109
- package/ios/include/openssl/httperr.h +0 -55
- package/ios/include/openssl/idea.h +0 -82
- package/ios/include/openssl/kdf.h +0 -138
- package/ios/include/openssl/kdferr.h +0 -16
- package/ios/include/openssl/lhash.h +0 -331
- package/ios/include/openssl/macros.h +0 -325
- package/ios/include/openssl/md2.h +0 -56
- package/ios/include/openssl/md4.h +0 -63
- package/ios/include/openssl/md5.h +0 -62
- package/ios/include/openssl/mdc2.h +0 -55
- package/ios/include/openssl/modes.h +0 -219
- package/ios/include/openssl/obj_mac.h +0 -5481
- package/ios/include/openssl/objects.h +0 -183
- package/ios/include/openssl/objectserr.h +0 -28
- package/ios/include/openssl/ocsp.h +0 -483
- package/ios/include/openssl/ocsperr.h +0 -53
- package/ios/include/openssl/opensslconf.h +0 -17
- package/ios/include/openssl/opensslv.h +0 -114
- package/ios/include/openssl/ossl_typ.h +0 -16
- package/ios/include/openssl/param_build.h +0 -63
- package/ios/include/openssl/params.h +0 -160
- package/ios/include/openssl/pem.h +0 -541
- package/ios/include/openssl/pem2.h +0 -19
- package/ios/include/openssl/pemerr.h +0 -58
- package/ios/include/openssl/pkcs12.h +0 -353
- package/ios/include/openssl/pkcs12err.h +0 -45
- package/ios/include/openssl/pkcs7.h +0 -430
- package/ios/include/openssl/pkcs7err.h +0 -63
- package/ios/include/openssl/prov_ssl.h +0 -34
- package/ios/include/openssl/proverr.h +0 -149
- package/ios/include/openssl/provider.h +0 -60
- package/ios/include/openssl/quic.h +0 -19
- package/ios/include/openssl/rand.h +0 -125
- package/ios/include/openssl/randerr.h +0 -69
- package/ios/include/openssl/rc2.h +0 -68
- package/ios/include/openssl/rc4.h +0 -47
- package/ios/include/openssl/rc5.h +0 -79
- package/ios/include/openssl/ripemd.h +0 -59
- package/ios/include/openssl/rsa.h +0 -610
- package/ios/include/openssl/rsaerr.h +0 -107
- package/ios/include/openssl/safestack.h +0 -297
- package/ios/include/openssl/seed.h +0 -113
- package/ios/include/openssl/self_test.h +0 -94
- package/ios/include/openssl/sha.h +0 -138
- package/ios/include/openssl/srp.h +0 -285
- package/ios/include/openssl/srtp.h +0 -56
- package/ios/include/openssl/ssl.h +0 -2671
- package/ios/include/openssl/ssl2.h +0 -30
- package/ios/include/openssl/ssl3.h +0 -347
- package/ios/include/openssl/sslerr.h +0 -348
- package/ios/include/openssl/sslerr_legacy.h +0 -468
- package/ios/include/openssl/stack.h +0 -90
- package/ios/include/openssl/store.h +0 -369
- package/ios/include/openssl/storeerr.h +0 -49
- package/ios/include/openssl/symhacks.h +0 -39
- package/ios/include/openssl/tls1.h +0 -1186
- package/ios/include/openssl/trace.h +0 -312
- package/ios/include/openssl/ts.h +0 -505
- package/ios/include/openssl/tserr.h +0 -67
- package/ios/include/openssl/txt_db.h +0 -63
- package/ios/include/openssl/types.h +0 -239
- package/ios/include/openssl/ui.h +0 -407
- package/ios/include/openssl/uierr.h +0 -38
- package/ios/include/openssl/whrlpool.h +0 -62
- package/ios/include/openssl/x509.h +0 -1279
- package/ios/include/openssl/x509_vfy.h +0 -894
- package/ios/include/openssl/x509err.h +0 -69
- package/ios/include/openssl/x509v3.h +0 -1453
- package/ios/include/openssl/x509v3err.h +0 -93
- package/ios/libs/libcrypto.a +0 -0
- package/ios/libs/libngtcp2_crypto_quictls.a +0 -0
- package/ios/libs/libssl.a +0 -0
|
@@ -0,0 +1,1396 @@
|
|
|
1
|
+
/* sp_int.h
|
|
2
|
+
*
|
|
3
|
+
* Copyright (C) 2006-2025 wolfSSL Inc.
|
|
4
|
+
*
|
|
5
|
+
* This file is part of wolfSSL.
|
|
6
|
+
*
|
|
7
|
+
* wolfSSL is free software; you can redistribute it and/or modify
|
|
8
|
+
* it under the terms of the GNU General Public License as published by
|
|
9
|
+
* the Free Software Foundation; either version 3 of the License, or
|
|
10
|
+
* (at your option) any later version.
|
|
11
|
+
*
|
|
12
|
+
* wolfSSL is distributed in the hope that it will be useful,
|
|
13
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15
|
+
* GNU General Public License for more details.
|
|
16
|
+
*
|
|
17
|
+
* You should have received a copy of the GNU General Public License
|
|
18
|
+
* along with this program; if not, write to the Free Software
|
|
19
|
+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
/*
|
|
23
|
+
DESCRIPTION
|
|
24
|
+
This library provides single precision (SP) integer math functions.
|
|
25
|
+
|
|
26
|
+
*/
|
|
27
|
+
#ifndef WOLF_CRYPT_SP_INT_H
|
|
28
|
+
#define WOLF_CRYPT_SP_INT_H
|
|
29
|
+
|
|
30
|
+
#ifndef NO_LIMITS_H
|
|
31
|
+
#include <limits.h>
|
|
32
|
+
#endif
|
|
33
|
+
#include <wolfssl/wolfcrypt/settings.h>
|
|
34
|
+
#include <wolfssl/wolfcrypt/types.h>
|
|
35
|
+
#include <wolfssl/wolfcrypt/hash.h>
|
|
36
|
+
|
|
37
|
+
#ifdef __cplusplus
|
|
38
|
+
extern "C" {
|
|
39
|
+
#endif
|
|
40
|
+
|
|
41
|
+
#if defined(WOLFSSL_SP_ARM_ARCH) && !defined(WOLFSSL_ARM_ARCH)
|
|
42
|
+
#define WOLFSSL_ARM_ARCH WOLFSSL_SP_ARM_ARCH
|
|
43
|
+
#endif
|
|
44
|
+
|
|
45
|
+
#if defined(OPENSSL_EXTRA) && !defined(NO_ASN) && \
|
|
46
|
+
!defined(WOLFSSL_SP_INT_NEGATIVE)
|
|
47
|
+
#define WOLFSSL_SP_INT_NEGATIVE
|
|
48
|
+
#endif
|
|
49
|
+
|
|
50
|
+
/* Find smallest type for smallest bits. */
|
|
51
|
+
#if UCHAR_MAX == 255
|
|
52
|
+
#define SP_UCHAR_BITS 8
|
|
53
|
+
|
|
54
|
+
typedef unsigned char sp_uint8;
|
|
55
|
+
typedef char sp_int8;
|
|
56
|
+
#elif UCHAR_MAX == 127
|
|
57
|
+
#define SP_UCHAR_BITS 7
|
|
58
|
+
|
|
59
|
+
typedef unsigned char sp_uint7;
|
|
60
|
+
typedef char sp_int7;
|
|
61
|
+
#else
|
|
62
|
+
#error "Size of unsigned short not detected"
|
|
63
|
+
#endif
|
|
64
|
+
|
|
65
|
+
#if USHRT_MAX == 65535
|
|
66
|
+
#define SP_USHORT_BITS 16
|
|
67
|
+
|
|
68
|
+
typedef unsigned short sp_uint16;
|
|
69
|
+
typedef short sp_int16;
|
|
70
|
+
#elif USHRT_MAX == 255
|
|
71
|
+
#define SP_USHORT_BITS 8
|
|
72
|
+
|
|
73
|
+
#if USHRT_MAX > UCHAR_MAX
|
|
74
|
+
typedef unsigned short sp_uint8;
|
|
75
|
+
typedef short sp_int8;
|
|
76
|
+
#endif
|
|
77
|
+
#else
|
|
78
|
+
#error "Size of unsigned short not detected"
|
|
79
|
+
#endif
|
|
80
|
+
|
|
81
|
+
#if UINT_MAX == 4294967295UL
|
|
82
|
+
#define SP_UINT_BITS 32
|
|
83
|
+
|
|
84
|
+
typedef unsigned int sp_uint32;
|
|
85
|
+
typedef int sp_int32;
|
|
86
|
+
#elif UINT_MAX == 65535
|
|
87
|
+
#define SP_UINT_BITS 16
|
|
88
|
+
|
|
89
|
+
#if UINT_MAX > USHRT_MAX
|
|
90
|
+
typedef unsigned int sp_uint16;
|
|
91
|
+
typedef int sp_int16;
|
|
92
|
+
#endif
|
|
93
|
+
#elif UINT_MAX == 255
|
|
94
|
+
#define SP_UINT_BITS 8
|
|
95
|
+
|
|
96
|
+
#if UINT_MAX > USHRT_MAX
|
|
97
|
+
typedef unsigned int sp_uint8;
|
|
98
|
+
typedef int sp_int8;
|
|
99
|
+
#endif
|
|
100
|
+
#else
|
|
101
|
+
#error "Size of unsigned int not detected"
|
|
102
|
+
#endif
|
|
103
|
+
|
|
104
|
+
#if defined(__WATCOMC__) && defined(__WATCOM_INT64__)
|
|
105
|
+
/* For older Watcom C compiler force types */
|
|
106
|
+
#define SP_ULLONG_BITS 64
|
|
107
|
+
typedef unsigned __int64 sp_uint64;
|
|
108
|
+
typedef __int64 sp_int64;
|
|
109
|
+
|
|
110
|
+
#else
|
|
111
|
+
|
|
112
|
+
/* 32-bit type */
|
|
113
|
+
#if defined(WOLF_C89) && !defined(NO_64BIT) && \
|
|
114
|
+
ULONG_MAX == 18446744073709551615UL
|
|
115
|
+
#define SP_ULONG_BITS 64
|
|
116
|
+
|
|
117
|
+
typedef unsigned long sp_uint64;
|
|
118
|
+
typedef long sp_int64;
|
|
119
|
+
#elif !defined(WOLF_C89) && !defined(NO_64BIT) && \
|
|
120
|
+
ULONG_MAX == 18446744073709551615ULL && \
|
|
121
|
+
/* sanity check pre-processor supports 64-bit ULL types */ \
|
|
122
|
+
4294967295UL != 18446744073709551615ULL
|
|
123
|
+
#define SP_ULONG_BITS 64
|
|
124
|
+
|
|
125
|
+
typedef unsigned long sp_uint64;
|
|
126
|
+
typedef long sp_int64;
|
|
127
|
+
#elif ULONG_MAX == 4294967295UL
|
|
128
|
+
#define SP_ULONG_BITS 32
|
|
129
|
+
|
|
130
|
+
#if ULONG_MAX > UINT_MAX
|
|
131
|
+
typedef unsigned long sp_uint32;
|
|
132
|
+
typedef long sp_int32;
|
|
133
|
+
#endif
|
|
134
|
+
#elif ULONG_MAX == 65535
|
|
135
|
+
#define SP_ULONG_BITS 16
|
|
136
|
+
|
|
137
|
+
#if ULONG_MAX > UINT_MAX
|
|
138
|
+
typedef unsigned long sp_uint16;
|
|
139
|
+
typedef long sp_int16;
|
|
140
|
+
#endif
|
|
141
|
+
#else
|
|
142
|
+
#error "Size of unsigned long not detected"
|
|
143
|
+
#endif
|
|
144
|
+
|
|
145
|
+
/* 64-bit type */
|
|
146
|
+
#ifdef ULLONG_MAX
|
|
147
|
+
#if defined(WOLF_C89) && ULLONG_MAX == 18446744073709551615UL
|
|
148
|
+
#define SP_ULLONG_BITS 64
|
|
149
|
+
|
|
150
|
+
#if SP_ULLONG_BITS > SP_ULONG_BITS
|
|
151
|
+
typedef unsigned long long sp_uint64;
|
|
152
|
+
typedef long long sp_int64;
|
|
153
|
+
#endif
|
|
154
|
+
#elif !defined(WOLF_C89) && ULLONG_MAX == 18446744073709551615ULL
|
|
155
|
+
#define SP_ULLONG_BITS 64
|
|
156
|
+
|
|
157
|
+
#if SP_ULLONG_BITS > SP_ULONG_BITS
|
|
158
|
+
typedef unsigned long long sp_uint64;
|
|
159
|
+
typedef long long sp_int64;
|
|
160
|
+
#endif
|
|
161
|
+
#elif ULLONG_MAX == 4294967295UL
|
|
162
|
+
#define SP_ULLONG_BITS 32
|
|
163
|
+
|
|
164
|
+
#if SP_ULLONG_BITS > SP_ULONG_BITS
|
|
165
|
+
typedef unsigned long long sp_uint32;
|
|
166
|
+
typedef long long sp_int32;
|
|
167
|
+
#endif
|
|
168
|
+
#elif ULLONG_MAX == 65535
|
|
169
|
+
#define SP_ULLONG_BITS 16
|
|
170
|
+
|
|
171
|
+
#if SP_ULLONG_BITS > SP_ULONG_BITS
|
|
172
|
+
typedef unsigned long long sp_uint16;
|
|
173
|
+
typedef long long sp_int16;
|
|
174
|
+
#endif
|
|
175
|
+
#else
|
|
176
|
+
#error "Size of unsigned long long not detected"
|
|
177
|
+
#endif
|
|
178
|
+
#elif (SP_ULONG_BITS == 32) && !defined(NO_64BIT)
|
|
179
|
+
#define SP_ULLONG_BITS 64
|
|
180
|
+
/* Speculatively use long long as the 64-bit type as we don't have one
|
|
181
|
+
* otherwise. */
|
|
182
|
+
typedef unsigned long long sp_uint64;
|
|
183
|
+
typedef long long sp_int64;
|
|
184
|
+
#else
|
|
185
|
+
#define SP_ULLONG_BITS 0
|
|
186
|
+
#endif
|
|
187
|
+
|
|
188
|
+
#endif /* __WATCOMC__ */
|
|
189
|
+
|
|
190
|
+
#ifdef WOLFSSL_SP_DIV_32
|
|
191
|
+
#define WOLFSSL_SP_DIV_WORD_HALF
|
|
192
|
+
#endif
|
|
193
|
+
|
|
194
|
+
/* Make sure WOLFSSL_SP_ASM build option defined when requested */
|
|
195
|
+
#if !defined(WOLFSSL_SP_ASM) && ( \
|
|
196
|
+
defined(WOLFSSL_SP_X86_64_ASM) || defined(WOLFSSL_SP_ARM32_ASM) || \
|
|
197
|
+
defined(WOLFSSL_SP_ARM64_ASM) || defined(WOLFSSL_SP_ARM_THUMB_ASM) || \
|
|
198
|
+
defined(WOLFSSL_SP_ARM_CORTEX_M_ASM))
|
|
199
|
+
#define WOLFSSL_SP_ASM
|
|
200
|
+
#endif
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
/* Determine the number of bits to use in each word. */
|
|
204
|
+
#ifdef SP_WORD_SIZE
|
|
205
|
+
#elif defined(WOLFSSL_DSP_BUILD)
|
|
206
|
+
#define SP_WORD_SIZE 32
|
|
207
|
+
#elif defined(WOLFSSL_SP_X86_64) && !defined(WOLFSSL_SP_X86_64_ASM) && \
|
|
208
|
+
!defined(HAVE___UINT128_T)
|
|
209
|
+
#define SP_WORD_SIZE 32
|
|
210
|
+
#elif defined(WOLFSSL_SP_X86_64_ASM) || defined(WOLFSSL_SP_X86_64)
|
|
211
|
+
#if SP_ULONG_BITS == 64 || SP_ULLONG_BITS == 64
|
|
212
|
+
#define SP_WORD_SIZE 64
|
|
213
|
+
#ifndef HAVE_INTEL_AVX1
|
|
214
|
+
#define HAVE_INTEL_AVX1
|
|
215
|
+
#endif
|
|
216
|
+
#if !defined(NO_AVX2_SUPPORT) && !defined(HAVE_INTEL_AVX2)
|
|
217
|
+
#define HAVE_INTEL_AVX2
|
|
218
|
+
#endif
|
|
219
|
+
#elif SP_ULONG_BITS == 32
|
|
220
|
+
#define SP_WORD_SIZE 32
|
|
221
|
+
#undef WOLFSSL_SP_ASM
|
|
222
|
+
#elif SP_ULONG_BITS == 16
|
|
223
|
+
#define SP_WORD_SIZE 16
|
|
224
|
+
#undef WOLFSSL_SP_ASM
|
|
225
|
+
#endif
|
|
226
|
+
#elif defined(WOLFSSL_SP_X86)
|
|
227
|
+
#define SP_WORD_SIZE 32
|
|
228
|
+
#elif defined(WOLFSSL_SP_ARM64_ASM) || defined(WOLFSSL_SP_ARM64)
|
|
229
|
+
#define SP_WORD_SIZE 64
|
|
230
|
+
#elif defined(WOLFSSL_SP_ARM32_ASM) || defined(WOLFSSL_SP_ARM32)
|
|
231
|
+
#define SP_WORD_SIZE 32
|
|
232
|
+
#elif defined(WOLFSSL_SP_ARM_THUMB_ASM) || defined(WOLFSSL_SP_ARM_THUMB)
|
|
233
|
+
#define SP_WORD_SIZE 32
|
|
234
|
+
#elif defined(WOLFSSL_SP_PPC)
|
|
235
|
+
#define SP_WORD_SIZE 32
|
|
236
|
+
#elif defined(WOLFSSL_SP_PPC64)
|
|
237
|
+
#define SP_WORD_SIZE 64
|
|
238
|
+
#elif defined(WOLFSSL_SP_MIPS)
|
|
239
|
+
#define SP_WORD_SIZE 32
|
|
240
|
+
#elif defined(WOLFSSL_SP_MIPS64)
|
|
241
|
+
#define SP_WORD_SIZE 64
|
|
242
|
+
#elif defined(WOLFSSL_SP_RISCV32)
|
|
243
|
+
#define SP_WORD_SIZE 32
|
|
244
|
+
#elif defined(WOLFSSL_SP_RISCV64)
|
|
245
|
+
#define SP_WORD_SIZE 64
|
|
246
|
+
#elif defined(WOLFSSL_SP_S390X)
|
|
247
|
+
#define SP_WORD_SIZE 64
|
|
248
|
+
#endif
|
|
249
|
+
|
|
250
|
+
/* If no predefined or assembly required size then use maximum available
|
|
251
|
+
* with compiler.
|
|
252
|
+
*/
|
|
253
|
+
#ifndef SP_WORD_SIZE
|
|
254
|
+
#ifdef NO_64BIT
|
|
255
|
+
#define SP_WORD_SIZE 16
|
|
256
|
+
#elif !defined(HAVE___UINT128_T) || defined(_WIN32)
|
|
257
|
+
#define SP_WORD_SIZE 32
|
|
258
|
+
#else
|
|
259
|
+
#define SP_WORD_SIZE 64
|
|
260
|
+
#endif
|
|
261
|
+
#endif
|
|
262
|
+
|
|
263
|
+
/* Define the types used. */
|
|
264
|
+
#if defined(HAVE___UINT128_T) && !defined(NO_INT128)
|
|
265
|
+
#ifdef __SIZEOF_INT128__
|
|
266
|
+
typedef __uint128_t sp_uint128;
|
|
267
|
+
typedef __int128_t sp_int128;
|
|
268
|
+
#else
|
|
269
|
+
typedef unsigned long sp_uint128 __attribute__ ((mode(TI)));
|
|
270
|
+
typedef long sp_int128 __attribute__ ((mode(TI)));
|
|
271
|
+
#endif
|
|
272
|
+
#ifndef WOLFSSL_UINT128_T_DEFINED
|
|
273
|
+
#ifdef __SIZEOF_INT128__
|
|
274
|
+
typedef __uint128_t uint128_t;
|
|
275
|
+
typedef __int128_t int128_t;
|
|
276
|
+
#else
|
|
277
|
+
typedef unsigned long uint128_t __attribute__ ((mode(TI)));
|
|
278
|
+
typedef long int128_t __attribute__ ((mode(TI)));
|
|
279
|
+
#endif
|
|
280
|
+
#define WOLFSSL_UINT128_T_DEFINED
|
|
281
|
+
#endif
|
|
282
|
+
#endif
|
|
283
|
+
|
|
284
|
+
#if SP_WORD_SIZE == 8
|
|
285
|
+
#define SP_WORD_SIZEOF 1
|
|
286
|
+
|
|
287
|
+
typedef sp_uint8 sp_int_digit;
|
|
288
|
+
typedef sp_int8 sp_int_sdigit;
|
|
289
|
+
typedef sp_uint16 sp_int_word;
|
|
290
|
+
typedef sp_int16 sp_int_sword;
|
|
291
|
+
|
|
292
|
+
#define SP_MASK 0xffU
|
|
293
|
+
#elif SP_WORD_SIZE == 16
|
|
294
|
+
#define SP_WORD_SIZEOF 2
|
|
295
|
+
|
|
296
|
+
typedef sp_uint16 sp_int_digit;
|
|
297
|
+
typedef sp_int16 sp_int_sdigit;
|
|
298
|
+
typedef sp_uint32 sp_int_word;
|
|
299
|
+
typedef sp_int32 sp_int_sword;
|
|
300
|
+
|
|
301
|
+
#define SP_MASK 0xffffU
|
|
302
|
+
#elif SP_WORD_SIZE == 32
|
|
303
|
+
#define SP_WORD_SIZEOF 4
|
|
304
|
+
|
|
305
|
+
typedef sp_uint32 sp_int_digit;
|
|
306
|
+
typedef sp_int32 sp_int_sdigit;
|
|
307
|
+
typedef sp_uint64 sp_int_word;
|
|
308
|
+
typedef sp_int64 sp_int_sword;
|
|
309
|
+
|
|
310
|
+
#define SP_MASK 0xffffffffU
|
|
311
|
+
#elif SP_WORD_SIZE == 64
|
|
312
|
+
#define SP_WORD_SIZEOF 8
|
|
313
|
+
|
|
314
|
+
typedef sp_uint64 sp_int_digit;
|
|
315
|
+
typedef sp_int64 sp_int_sdigit;
|
|
316
|
+
#if (defined(WOLFSSL_SP_MATH) || defined(WOLFSSL_SP_MATH_ALL)) && \
|
|
317
|
+
!defined(_WIN64) && defined(WOLFSSL_UINT128_T_DEFINED)
|
|
318
|
+
typedef sp_uint128 sp_int_word;
|
|
319
|
+
typedef sp_int128 sp_int_sword;
|
|
320
|
+
#endif
|
|
321
|
+
|
|
322
|
+
#define SP_MASK 0xffffffffffffffffUL
|
|
323
|
+
#else
|
|
324
|
+
#error Word size not defined
|
|
325
|
+
#endif
|
|
326
|
+
|
|
327
|
+
/* Define an SP digit. */
|
|
328
|
+
#ifndef WOLFSSL_SP_ASM
|
|
329
|
+
/* SP C code uses n/m bits and therefore needs a signed type. */
|
|
330
|
+
#if SP_WORD_SIZE == 8
|
|
331
|
+
typedef sp_int8 sp_digit;
|
|
332
|
+
#elif SP_WORD_SIZE == 16
|
|
333
|
+
typedef sp_int16 sp_digit;
|
|
334
|
+
#elif SP_WORD_SIZE == 32
|
|
335
|
+
typedef sp_int32 sp_digit;
|
|
336
|
+
#elif SP_WORD_SIZE == 64
|
|
337
|
+
typedef sp_int64 sp_digit;
|
|
338
|
+
#endif
|
|
339
|
+
#else
|
|
340
|
+
/* SP ASM code uses full size and needs an unsigned type. */
|
|
341
|
+
#if SP_WORD_SIZE == 8
|
|
342
|
+
typedef sp_uint8 sp_digit;
|
|
343
|
+
#elif SP_WORD_SIZE == 16
|
|
344
|
+
typedef sp_uint16 sp_digit;
|
|
345
|
+
#elif SP_WORD_SIZE == 32
|
|
346
|
+
typedef sp_uint32 sp_digit;
|
|
347
|
+
#elif SP_WORD_SIZE == 64
|
|
348
|
+
typedef sp_uint64 sp_digit;
|
|
349
|
+
#endif
|
|
350
|
+
#endif
|
|
351
|
+
|
|
352
|
+
/** Number of bits in a half a word. */
|
|
353
|
+
#define SP_HALF_SIZE (SP_WORD_SIZE / 2)
|
|
354
|
+
/** Maximum value that can be held in a half a word. */
|
|
355
|
+
#define SP_HALF_MAX (((sp_digit)1 << SP_HALF_SIZE) - 1)
|
|
356
|
+
/** Maximum value that can be held in a word. */
|
|
357
|
+
#define SP_DIGIT_MAX SP_MASK
|
|
358
|
+
/* Number of bits to shift to divide by word size. */
|
|
359
|
+
#if SP_WORD_SIZE == 8
|
|
360
|
+
#define SP_WORD_SHIFT 3
|
|
361
|
+
#elif SP_WORD_SIZE == 16
|
|
362
|
+
#define SP_WORD_SHIFT 4
|
|
363
|
+
#elif SP_WORD_SIZE == 32
|
|
364
|
+
#define SP_WORD_SHIFT 5
|
|
365
|
+
#elif SP_WORD_SIZE == 64
|
|
366
|
+
#define SP_WORD_SHIFT 6
|
|
367
|
+
#endif
|
|
368
|
+
/* Mask of word size. */
|
|
369
|
+
#define SP_WORD_MASK (SP_WORD_SIZE - 1)
|
|
370
|
+
|
|
371
|
+
/* For debugging only - format string for different digit sizes. */
|
|
372
|
+
#if SP_WORD_SIZE == 64
|
|
373
|
+
#if SP_ULONG_BITS == 64
|
|
374
|
+
#define SP_PRINT_FMT "%016lx"
|
|
375
|
+
#else
|
|
376
|
+
#define SP_PRINT_FMT "%016llx"
|
|
377
|
+
#endif
|
|
378
|
+
#elif SP_WORD_SIZE == 32
|
|
379
|
+
#if SP_UINT_BITS == 32
|
|
380
|
+
#define SP_PRINT_FMT "%08x"
|
|
381
|
+
#else
|
|
382
|
+
#define SP_PRINT_FMT "%08lx"
|
|
383
|
+
#endif
|
|
384
|
+
#elif SP_WORD_SIZE == 16
|
|
385
|
+
#define SP_PRINT_FMT "%04x"
|
|
386
|
+
#elif SP_WORD_SIZE == 8
|
|
387
|
+
#define SP_PRINT_FMT "%02x"
|
|
388
|
+
#endif
|
|
389
|
+
|
|
390
|
+
|
|
391
|
+
#if defined(WOLFSSL_HAVE_SP_ECC) && defined(WOLFSSL_SP_NONBLOCK)
|
|
392
|
+
/* Non-blocking ECC operation context. */
|
|
393
|
+
typedef struct sp_ecc_ctx {
|
|
394
|
+
#ifdef WOLFSSL_SP_521
|
|
395
|
+
XALIGNED(4) byte data[66*80]; /* stack data */
|
|
396
|
+
#elif defined(WOLFSSL_SP_384)
|
|
397
|
+
XALIGNED(4) byte data[48*80]; /* stack data */
|
|
398
|
+
#else
|
|
399
|
+
XALIGNED(4) byte data[32*80]; /* stack data */
|
|
400
|
+
#endif
|
|
401
|
+
} sp_ecc_ctx_t;
|
|
402
|
+
#endif
|
|
403
|
+
|
|
404
|
+
#if defined(WOLFSSL_SP_MATH) || defined(WOLFSSL_SP_MATH_ALL)
|
|
405
|
+
#include <wolfssl/wolfcrypt/random.h>
|
|
406
|
+
|
|
407
|
+
#ifndef SP_INT_BITS
|
|
408
|
+
#ifdef SP_INT_DIGITS
|
|
409
|
+
#define SP_INT_BITS (((SP_INT_DIGITS - 1) * SP_WORD_SIZE) / 2)
|
|
410
|
+
#else
|
|
411
|
+
/* Calculate number of bits to have in an sp_int based on features
|
|
412
|
+
* compiled in.
|
|
413
|
+
*/
|
|
414
|
+
#ifdef WOLFSSL_MYSQL_COMPATIBLE
|
|
415
|
+
/* MySQL wants to be able to use 8192-bit numbers. */
|
|
416
|
+
#define SP_INT_BITS 8192
|
|
417
|
+
#elif !defined(WOLFSSL_HAVE_SP_RSA) && !defined(WOLFSSL_HAVE_SP_DH) && \
|
|
418
|
+
!defined(WOLFSSL_HAVE_SP_ECC)
|
|
419
|
+
/* Not using SP - must be SP math all. */
|
|
420
|
+
#if !defined(NO_RSA) || !defined(NO_DH) || !defined(NO_DSA)
|
|
421
|
+
/* Support max size FFHDE parameters compiled in. */
|
|
422
|
+
#if !defined(NO_DH) && defined(HAVE_FFDHE_8192)
|
|
423
|
+
#define SP_INT_BITS 8192
|
|
424
|
+
#elif !defined(NO_DH) && defined(HAVE_FFDHE_6144)
|
|
425
|
+
#define SP_INT_BITS 6144
|
|
426
|
+
#elif !defined(NO_DH) && defined(HAVE_FFDHE_4096)
|
|
427
|
+
#define SP_INT_BITS 4096
|
|
428
|
+
#else
|
|
429
|
+
/* Default to max 3072 for general RSA and DH. */
|
|
430
|
+
#define SP_INT_BITS 3072
|
|
431
|
+
#endif
|
|
432
|
+
#elif defined(WOLFCRYPT_HAVE_SAKKE)
|
|
433
|
+
#define SP_INT_BITS 1024
|
|
434
|
+
#elif defined(HAVE_ECC)
|
|
435
|
+
/* P521 is the largest supported ECC algorithm curve. */
|
|
436
|
+
#define SP_INT_BITS 521
|
|
437
|
+
#elif !defined(NO_PWDBASED) && defined(HAVE_PKCS12)
|
|
438
|
+
/* wc_PKCS12_PBKDF_ex() */
|
|
439
|
+
#define SP_INT_BITS (64 * 8)
|
|
440
|
+
#else
|
|
441
|
+
#define SP_INT_BITS 128
|
|
442
|
+
#endif
|
|
443
|
+
#elif !defined(WOLFSSL_HAVE_SP_RSA) && !defined(WOLFSSL_HAVE_SP_DH)
|
|
444
|
+
/* Not use SP_RSA or DH but are using SP ECC. */
|
|
445
|
+
#if defined(WOLFCRYPT_HAVE_SAKKE)
|
|
446
|
+
#define SP_INT_BITS 1024
|
|
447
|
+
#elif defined(WOLFSSL_SP_521) || defined(WOLFSSL_SP_MATH_ALL)
|
|
448
|
+
/* P521 is the largest supported ECC algorithm curve. */
|
|
449
|
+
#define SP_INT_BITS 521
|
|
450
|
+
#elif defined(WOLFSSL_SP_384)
|
|
451
|
+
/* No generic support - largest curve P384. */
|
|
452
|
+
#define SP_INT_BITS 384
|
|
453
|
+
#else
|
|
454
|
+
/* No generic support - largest curve P256. */
|
|
455
|
+
#define SP_INT_BITS 256
|
|
456
|
+
#endif
|
|
457
|
+
/* SP RSA and DH supported so base on max size of RSA/DH in SP. */
|
|
458
|
+
#elif defined(WOLFSSL_SP_4096)
|
|
459
|
+
#define SP_INT_BITS 4096
|
|
460
|
+
#elif !defined(WOLFSSL_SP_NO_3072) || defined(WOLFSSL_SP_MATH_ALL)
|
|
461
|
+
#define SP_INT_BITS 3072
|
|
462
|
+
#else
|
|
463
|
+
#define SP_INT_BITS 2048
|
|
464
|
+
#endif
|
|
465
|
+
#endif
|
|
466
|
+
#endif
|
|
467
|
+
|
|
468
|
+
#ifndef SP_INT_DIGITS
|
|
469
|
+
/* Calculate number of digits to have in an sp_int based on maximum size of
|
|
470
|
+
* numbers in bits that will be used.
|
|
471
|
+
* Double the size to hold multiplication result.
|
|
472
|
+
* Add one to accommodate extra digit used by sp_mul(), sp_mulmod(),
|
|
473
|
+
* sp_sqr(), sp_sqrmod() and sp_mont_red().
|
|
474
|
+
*/
|
|
475
|
+
#define SP_INT_DIGITS \
|
|
476
|
+
(((SP_INT_BITS + SP_WORD_SIZE - 1) / SP_WORD_SIZE) * 2 + 1)
|
|
477
|
+
#endif
|
|
478
|
+
|
|
479
|
+
#ifndef SP_INT_MAX_BITS
|
|
480
|
+
/* Convert number digits to number of bits. */
|
|
481
|
+
#define SP_INT_MAX_BITS (SP_INT_DIGITS * SP_WORD_SIZE)
|
|
482
|
+
#endif
|
|
483
|
+
|
|
484
|
+
#if SP_WORD_SIZE < 32
|
|
485
|
+
/* Maximum number of digits in a number to mul or sqr. */
|
|
486
|
+
#define SP_MUL_SQR_DIGITS (SP_INT_MAX_BITS / 2 / SP_WORD_SIZE)
|
|
487
|
+
/* Maximum value of partial in mul/sqr. */
|
|
488
|
+
#define SP_MUL_SQR_MAX_PARTIAL \
|
|
489
|
+
(SP_MUL_SQR_DIGITS * ((1 << SP_WORD_SIZE) - 1))
|
|
490
|
+
/* Maximum value in an sp_int_word. */
|
|
491
|
+
#define SP_INT_WORD_MAX ((1 << (SP_WORD_SIZE * 2)) - 1)
|
|
492
|
+
|
|
493
|
+
#if SP_MUL_SQR_MAX_PARTIAL > SP_INT_WORD_MAX
|
|
494
|
+
/* The sum of the partials in the multiplication/square can exceed the
|
|
495
|
+
* size of a word. This will overflow the word and loose data.
|
|
496
|
+
* Use an implementation that handles carry after every add and uses an
|
|
497
|
+
* extra temporary word for overflowing high word.
|
|
498
|
+
*/
|
|
499
|
+
#define SP_WORD_OVERFLOW
|
|
500
|
+
#endif
|
|
501
|
+
#endif
|
|
502
|
+
|
|
503
|
+
|
|
504
|
+
#ifndef NO_FILESYSTEM
|
|
505
|
+
/* Output is formatted to be used with script that checks calculations. */
|
|
506
|
+
|
|
507
|
+
/* Print out a number in big endian. */
|
|
508
|
+
#ifndef WOLFSSL_SP_INT_NEGATIVE
|
|
509
|
+
/* Print out a positive multi-precision number.
|
|
510
|
+
*
|
|
511
|
+
* @param [in] a SP integer to print.
|
|
512
|
+
* @param [in] s String that describes the use of the number.
|
|
513
|
+
*/
|
|
514
|
+
#define sp_print(a, s) \
|
|
515
|
+
do { \
|
|
516
|
+
int ii; \
|
|
517
|
+
fprintf(stderr, "%s=0x0", s); \
|
|
518
|
+
for (ii = (a)->used-1; ii >= 0; ii--) { \
|
|
519
|
+
fprintf(stderr, SP_PRINT_FMT, (a)->dp[ii]); \
|
|
520
|
+
} \
|
|
521
|
+
fprintf(stderr, "\n"); \
|
|
522
|
+
} \
|
|
523
|
+
while (0)
|
|
524
|
+
#else
|
|
525
|
+
/* Print out a multi-precision number.
|
|
526
|
+
*
|
|
527
|
+
* @param [in] a SP integer to print.
|
|
528
|
+
* @param [in] s String that describes the use of the number.
|
|
529
|
+
*/
|
|
530
|
+
#define sp_print(a, s) \
|
|
531
|
+
do { \
|
|
532
|
+
int ii; \
|
|
533
|
+
fprintf(stderr, "%s=0x", s); \
|
|
534
|
+
if ((a)->sign == MP_NEG) { \
|
|
535
|
+
fprintf(stderr, "-"); \
|
|
536
|
+
} \
|
|
537
|
+
fprintf(stderr, "0"); \
|
|
538
|
+
for (ii = (a)->used-1; ii >= 0; ii--) { \
|
|
539
|
+
fprintf(stderr, SP_PRINT_FMT, (a)->dp[ii]); \
|
|
540
|
+
} \
|
|
541
|
+
fprintf(stderr, "\n"); \
|
|
542
|
+
} \
|
|
543
|
+
while (0)
|
|
544
|
+
#endif
|
|
545
|
+
|
|
546
|
+
/* Print out a single multi-precision digit.
|
|
547
|
+
*
|
|
548
|
+
* @param [in] a SP integer digit to print.
|
|
549
|
+
* @param [in] s String that describes the use of the number.
|
|
550
|
+
*/
|
|
551
|
+
#define sp_print_digit(a, s) \
|
|
552
|
+
do { \
|
|
553
|
+
fprintf(stderr, "%s=0x0", s); \
|
|
554
|
+
fprintf(stderr, SP_PRINT_FMT, a); \
|
|
555
|
+
fprintf(stderr, "\n"); \
|
|
556
|
+
} \
|
|
557
|
+
while (0)
|
|
558
|
+
|
|
559
|
+
/* Print out an integer.
|
|
560
|
+
*
|
|
561
|
+
* @param [in] a Number to print.
|
|
562
|
+
* @param [in] s String that describes the use of the number.
|
|
563
|
+
*/
|
|
564
|
+
#define sp_print_int(a, s) \
|
|
565
|
+
do { \
|
|
566
|
+
fprintf(stderr, "%s=0x0%x\n", s, a); \
|
|
567
|
+
} \
|
|
568
|
+
while (0)
|
|
569
|
+
|
|
570
|
+
#else
|
|
571
|
+
|
|
572
|
+
/* No filesystem, no output
|
|
573
|
+
* TODO: Use logging API?
|
|
574
|
+
*/
|
|
575
|
+
#define sp_print(a, s) WC_DO_NOTHING
|
|
576
|
+
#define sp_print_digit(a, s) WC_DO_NOTHING
|
|
577
|
+
#define sp_print_int(a, s) WC_DO_NOTHING
|
|
578
|
+
|
|
579
|
+
#endif /* !NO_FILESYSTEM */
|
|
580
|
+
|
|
581
|
+
/* Returns whether multi-precision number is odd
|
|
582
|
+
*
|
|
583
|
+
* Assumes a is not NULL.
|
|
584
|
+
*
|
|
585
|
+
* @param [in] a SP integer to check.
|
|
586
|
+
* @return 1 when odd.
|
|
587
|
+
* @return 0 when even.
|
|
588
|
+
*/
|
|
589
|
+
#define sp_isodd(a) (((a)->used != 0) && ((a)->dp[0] & 1))
|
|
590
|
+
/* Returns whether multi-precision number is even
|
|
591
|
+
*
|
|
592
|
+
* Assumes a is not NULL.
|
|
593
|
+
*
|
|
594
|
+
* @param [in] a SP integer to check.
|
|
595
|
+
* @return 1 when even.
|
|
596
|
+
* @return 0 when odd.
|
|
597
|
+
*/
|
|
598
|
+
#define sp_iseven(a) (((a)->used != 0) && (((a)->dp[0] & 1) == 0))
|
|
599
|
+
/* Returns whether multi-precision number has the value zero.
|
|
600
|
+
*
|
|
601
|
+
* Assumes a is not NULL.
|
|
602
|
+
*
|
|
603
|
+
* @param [in] a SP integer to check.
|
|
604
|
+
* @return 1 when zero.
|
|
605
|
+
* @return 0 when not zero.
|
|
606
|
+
*/
|
|
607
|
+
#define sp_iszero(a) ((a)->used == 0)
|
|
608
|
+
|
|
609
|
+
#ifndef WOLFSSL_SP_INT_NEGATIVE
|
|
610
|
+
/* Returns whether multi-precision number has the value one.
|
|
611
|
+
*
|
|
612
|
+
* Assumes a is not NULL.
|
|
613
|
+
*
|
|
614
|
+
* @param [in] a SP integer to check.
|
|
615
|
+
* @return 1 when one.
|
|
616
|
+
* @return 0 when not one.
|
|
617
|
+
*/
|
|
618
|
+
#define sp_isone(a) (((a)->used == 1) && ((a)->dp[0] == 1))
|
|
619
|
+
#else
|
|
620
|
+
/* Returns whether multi-precision number has the value of positive one.
|
|
621
|
+
*
|
|
622
|
+
* Assumes a is not NULL.
|
|
623
|
+
*
|
|
624
|
+
* @param [in] a SP integer to check.
|
|
625
|
+
* @return 1 when one.
|
|
626
|
+
* @return 0 when not one.
|
|
627
|
+
*/
|
|
628
|
+
#define sp_isone(a) \
|
|
629
|
+
(((a)->used == 1) && ((a)->dp[0] == 1) && ((a)->sign == MP_ZPOS))
|
|
630
|
+
#endif
|
|
631
|
+
|
|
632
|
+
#ifndef WOLFSSL_SP_INT_NEGATIVE
|
|
633
|
+
/* Returns whether multi-precision number has the value 'd'.
|
|
634
|
+
*
|
|
635
|
+
* Assumes a is not NULL.
|
|
636
|
+
*
|
|
637
|
+
* @param [in] a SP integer to check.
|
|
638
|
+
* @param [in] d SP integer digit.
|
|
639
|
+
* @return 1 when one.
|
|
640
|
+
* @return 0 when not one.
|
|
641
|
+
*/
|
|
642
|
+
#define sp_isword(a, d) \
|
|
643
|
+
((((d) == 0) && sp_iszero(a)) || (((a)->used == 1) && ((a)->dp[0] == (d))))
|
|
644
|
+
#else
|
|
645
|
+
/* Returns whether multi-precision number has the value 'd'.
|
|
646
|
+
*
|
|
647
|
+
* Assumes a is not NULL.
|
|
648
|
+
*
|
|
649
|
+
* @param [in] a SP integer to check.
|
|
650
|
+
* @param [in] d SP integer digit.
|
|
651
|
+
* @return 1 when one.
|
|
652
|
+
* @return 0 when not one.
|
|
653
|
+
*/
|
|
654
|
+
#define sp_isword(a, d) \
|
|
655
|
+
((((d) == 0) && sp_iszero(a)) || \
|
|
656
|
+
(((a)->used == 1) && ((a)->dp[0] == (d)) && ((a)->sign == MP_ZPOS)))
|
|
657
|
+
#endif
|
|
658
|
+
|
|
659
|
+
#ifndef WOLFSSL_SP_INT_NEGATIVE
|
|
660
|
+
/* Calculate the absolute value of the multi-precision number.
|
|
661
|
+
*
|
|
662
|
+
* Negative support not compiled in so just copies.
|
|
663
|
+
*
|
|
664
|
+
* @param [in] a SP integer to calculate absolute value of.
|
|
665
|
+
* @param [out] r SP integer to hold result.
|
|
666
|
+
*
|
|
667
|
+
* @return MP_OKAY on success.
|
|
668
|
+
* @return MP_VAL when a or r is NULL.
|
|
669
|
+
*/
|
|
670
|
+
#define sp_abs(a, b) sp_copy(a, b)
|
|
671
|
+
/* Returns whether multi-precision number is negative.
|
|
672
|
+
*
|
|
673
|
+
* Negative support not compiled in so always returns 0 (false).
|
|
674
|
+
*
|
|
675
|
+
* @param [in] a SP integer to check.
|
|
676
|
+
* @param [in] d SP integer digit.
|
|
677
|
+
* @return 0 indicating not negative always.
|
|
678
|
+
*/
|
|
679
|
+
#define sp_isneg(a) (0)
|
|
680
|
+
/* Sets the multi-precision number negative.
|
|
681
|
+
*
|
|
682
|
+
* Negative support not compiled in, so does nothing. */
|
|
683
|
+
#define sp_setneg(a) WC_DO_NOTHING
|
|
684
|
+
#else
|
|
685
|
+
/* Returns whether multi-precision number is negative.
|
|
686
|
+
*
|
|
687
|
+
* Assumes a is not NULL.
|
|
688
|
+
*
|
|
689
|
+
* @param [in] a SP integer to check.
|
|
690
|
+
* @param [in] d SP integer digit.
|
|
691
|
+
* @return 1 when negative.
|
|
692
|
+
* @return 0 when not negative.
|
|
693
|
+
*/
|
|
694
|
+
#define sp_isneg(a) ((a)->sign == MP_NEG)
|
|
695
|
+
/* Sets the multi-precision number negative. */
|
|
696
|
+
#define sp_setneg(a) ((a)->sign = MP_NEG)
|
|
697
|
+
#endif
|
|
698
|
+
|
|
699
|
+
/* Number of bits used based on used field only. */
|
|
700
|
+
#define sp_bitsused(a) ((a)->used * SP_WORD_SIZE)
|
|
701
|
+
|
|
702
|
+
/* Updates the used count to exclude leading zeros.
|
|
703
|
+
*
|
|
704
|
+
* Assumes a is not NULL.
|
|
705
|
+
*
|
|
706
|
+
* @param [in] a SP integer to update.
|
|
707
|
+
*/
|
|
708
|
+
#define sp_clamp(a) \
|
|
709
|
+
do { \
|
|
710
|
+
int ii; \
|
|
711
|
+
if ((a)->used > 0) { \
|
|
712
|
+
for (ii = (int)(a)->used - 1; ii >= 0; ii--) { \
|
|
713
|
+
if ((a)->dp[ii] != 0) { \
|
|
714
|
+
break; \
|
|
715
|
+
} \
|
|
716
|
+
} \
|
|
717
|
+
(a)->used = (wc_mp_size_t)(ii + 1); \
|
|
718
|
+
} \
|
|
719
|
+
} while (0)
|
|
720
|
+
|
|
721
|
+
/* Check the compiled and linked math implementation are the same.
|
|
722
|
+
* Use the number of bits in a digit as indication of how code was compiled.
|
|
723
|
+
*
|
|
724
|
+
* @return 1 when the number of bits are the same.
|
|
725
|
+
* @return 0 when the number of bits are different.
|
|
726
|
+
*/
|
|
727
|
+
#define CheckFastMathSettings() (SP_WORD_SIZE == CheckRunTimeFastMath())
|
|
728
|
+
|
|
729
|
+
|
|
730
|
+
/**
|
|
731
|
+
* A result of NO.
|
|
732
|
+
* e.g. Is prime? NO.
|
|
733
|
+
*/
|
|
734
|
+
#define MP_NO 0
|
|
735
|
+
/**
|
|
736
|
+
* A result of YES.
|
|
737
|
+
* e.g. Is prime? YES.
|
|
738
|
+
*/
|
|
739
|
+
#define MP_YES 1
|
|
740
|
+
|
|
741
|
+
#ifdef WOLFSSL_SP_INT_NEGATIVE
|
|
742
|
+
/** Number is 0/positive. */
|
|
743
|
+
#define MP_ZPOS 0
|
|
744
|
+
/** Number is negative. */
|
|
745
|
+
#define MP_NEG 1
|
|
746
|
+
#endif
|
|
747
|
+
|
|
748
|
+
/** Radix is base 10 or decimal. */
|
|
749
|
+
#define MP_RADIX_DEC 10
|
|
750
|
+
/** Radix is base 16 or hexadecimal. */
|
|
751
|
+
#define MP_RADIX_HEX 16
|
|
752
|
+
|
|
753
|
+
/** Result of comparison is that the first number is greater than second. */
|
|
754
|
+
#define MP_GT 1
|
|
755
|
+
/** Result of comparison is they are equal. */
|
|
756
|
+
#define MP_EQ 0
|
|
757
|
+
/** Result of comparison is that the first number is less than second. */
|
|
758
|
+
#define MP_LT (-1)
|
|
759
|
+
|
|
760
|
+
/* ERROR VALUES */
|
|
761
|
+
|
|
762
|
+
/* MP_MEM, MP_VAL, MP_WOULDBLOCK, and MP_NOT_INF are defined in error-crypt.h */
|
|
763
|
+
|
|
764
|
+
/** Error value on success. */
|
|
765
|
+
#define MP_OKAY 0
|
|
766
|
+
|
|
767
|
+
#define FP_WOULDBLOCK MP_WOULDBLOCK
|
|
768
|
+
/* Unused error. Defined for backward compatibility. */
|
|
769
|
+
#define MP_RANGE MP_NOT_INF
|
|
770
|
+
#ifdef USE_FAST_MATH
|
|
771
|
+
/* For old FIPS, need FP_MEM defined for old implementation. */
|
|
772
|
+
#define FP_MEM MP_MEM
|
|
773
|
+
#endif
|
|
774
|
+
|
|
775
|
+
/* Number of bits in each word/digit. */
|
|
776
|
+
#define DIGIT_BIT SP_WORD_SIZE
|
|
777
|
+
/* Mask of all used bits in word/digit. */
|
|
778
|
+
#define MP_MASK SP_MASK
|
|
779
|
+
|
|
780
|
+
#ifdef MP_LOW_MEM
|
|
781
|
+
/* Use algorithms that use less memory. */
|
|
782
|
+
#define WOLFSSL_SP_LOW_MEM
|
|
783
|
+
#endif
|
|
784
|
+
|
|
785
|
+
|
|
786
|
+
/* The number of bytes to a sp_int with 'cnt' digits.
|
|
787
|
+
* Must have at least one digit.
|
|
788
|
+
*/
|
|
789
|
+
#define MP_INT_SIZEOF(cnt) \
|
|
790
|
+
(sizeof(sp_int_minimal) + (((cnt) <= 1) ? 0 : ((size_t)((cnt) - 1))) * \
|
|
791
|
+
sizeof(sp_int_digit))
|
|
792
|
+
/* The address of the next sp_int after one with 'cnt' digits. */
|
|
793
|
+
#define MP_INT_NEXT(t, cnt) \
|
|
794
|
+
(sp_int*)(((byte*)(t)) + MP_INT_SIZEOF(cnt))
|
|
795
|
+
|
|
796
|
+
#define MP_INT_SIZEOF_DIGITS(cnt) (MP_INT_SIZEOF(cnt) / sizeof(sp_int_digit))
|
|
797
|
+
|
|
798
|
+
/* Calculate the number of words required to support a number of bits. */
|
|
799
|
+
#define MP_BITS_CNT(bits) \
|
|
800
|
+
((unsigned int)(((((bits) + SP_WORD_SIZE - 1) / SP_WORD_SIZE) * 2 + 1)))
|
|
801
|
+
|
|
802
|
+
#if !defined(WOLFSSL_SP_NO_DYN_STACK) && defined(__STDC_VERSION__) && \
|
|
803
|
+
(__STDC_VERSION__ >= 199901L) && \
|
|
804
|
+
(defined(WOLFSSL_SP_NO_MALLOC) || \
|
|
805
|
+
!(defined(WOLFSSL_SMALL_STACK) || defined(SP_ALLOC)))
|
|
806
|
+
#define WOLFSSL_SP_DYN_STACK
|
|
807
|
+
#endif
|
|
808
|
+
|
|
809
|
+
#ifdef WOLFSSL_SMALL_STACK
|
|
810
|
+
/*
|
|
811
|
+
* Dynamic memory allocation of mp_int.
|
|
812
|
+
*/
|
|
813
|
+
/* Declare a dynamically allocated mp_int. */
|
|
814
|
+
#define DECL_MP_INT_SIZE_DYN(name, bits, max) \
|
|
815
|
+
sp_int* name = NULL
|
|
816
|
+
/* Declare a dynamically allocated mp_int. */
|
|
817
|
+
#define DECL_MP_INT_SIZE(name, bits) \
|
|
818
|
+
sp_int* name = NULL
|
|
819
|
+
/* Allocate an mp_int of minimal size and zero out. */
|
|
820
|
+
#define NEW_MP_INT_SIZE(name, bits, heap, type) \
|
|
821
|
+
do { \
|
|
822
|
+
(name) = (mp_int*)XMALLOC(MP_INT_SIZEOF(MP_BITS_CNT(bits)), heap, type); \
|
|
823
|
+
if ((name) != NULL) { \
|
|
824
|
+
XMEMSET(name, 0, MP_INT_SIZEOF(MP_BITS_CNT(bits))); \
|
|
825
|
+
} \
|
|
826
|
+
} \
|
|
827
|
+
while (0)
|
|
828
|
+
/* Dispose of dynamically allocated mp_int. */
|
|
829
|
+
#define FREE_MP_INT_SIZE(name, heap, type) \
|
|
830
|
+
XFREE(name, heap, type)
|
|
831
|
+
/* Type to cast to when using size marcos. */
|
|
832
|
+
#define MP_INT_SIZE sp_int
|
|
833
|
+
/* Must check mp_int pointer for NULL. */
|
|
834
|
+
#define MP_INT_SIZE_CHECK_NULL
|
|
835
|
+
#else
|
|
836
|
+
/*
|
|
837
|
+
* Static allocation of mp_int.
|
|
838
|
+
*/
|
|
839
|
+
#ifdef WOLFSSL_SP_DYN_STACK
|
|
840
|
+
/* Declare a dynamically allocated mp_int. */
|
|
841
|
+
#define DECL_MP_INT_SIZE_DYN(name, bits, max) \
|
|
842
|
+
sp_int_digit name##d[MP_INT_SIZEOF_DIGITS(MP_BITS_CNT(bits))]; \
|
|
843
|
+
sp_int* (name) = (sp_int*)name##d
|
|
844
|
+
#elif defined(__cplusplus)
|
|
845
|
+
/* C++ doesn't tolerate parentheses around "name" (-Wparentheses) */
|
|
846
|
+
#define DECL_MP_INT_SIZE_DYN(name, bits, max) \
|
|
847
|
+
sp_int_digit name##d[MP_INT_SIZEOF_DIGITS(MP_BITS_CNT(max))]; \
|
|
848
|
+
sp_int* name = (sp_int*)name##d
|
|
849
|
+
#else
|
|
850
|
+
/* Declare a dynamically allocated mp_int. */
|
|
851
|
+
#define DECL_MP_INT_SIZE_DYN(name, bits, max) \
|
|
852
|
+
sp_int_digit name##d[MP_INT_SIZEOF_DIGITS(MP_BITS_CNT(max))]; \
|
|
853
|
+
sp_int* (name) = (sp_int*)name##d
|
|
854
|
+
#endif
|
|
855
|
+
/* Declare a statically allocated mp_int. */
|
|
856
|
+
#define DECL_MP_INT_SIZE(name, bits) \
|
|
857
|
+
sp_int_digit name##d[MP_INT_SIZEOF_DIGITS(MP_BITS_CNT(bits))]; \
|
|
858
|
+
sp_int* (name) = (sp_int*)name##d
|
|
859
|
+
/* Zero out mp_int of minimal size. */
|
|
860
|
+
#define NEW_MP_INT_SIZE(name, bits, heap, type) \
|
|
861
|
+
XMEMSET(name, 0, MP_INT_SIZEOF(MP_BITS_CNT(bits)))
|
|
862
|
+
/* Dispose of static mp_int. */
|
|
863
|
+
#define FREE_MP_INT_SIZE(name, heap, type) WC_DO_NOTHING
|
|
864
|
+
/* Type to force compiler to not complain about size. */
|
|
865
|
+
#define MP_INT_SIZE sp_int_minimal
|
|
866
|
+
#endif
|
|
867
|
+
|
|
868
|
+
/* Initialize an mp_int to a specific size. */
|
|
869
|
+
#define INIT_MP_INT_SIZE(name, bits) \
|
|
870
|
+
mp_init_size(name, MP_BITS_CNT(bits))
|
|
871
|
+
|
|
872
|
+
|
|
873
|
+
#ifdef HAVE_WOLF_BIGINT
|
|
874
|
+
/* Raw big integer as a big-endian byte array.
|
|
875
|
+
*
|
|
876
|
+
* Useful for when using hardware - canonical format.
|
|
877
|
+
*/
|
|
878
|
+
typedef struct WC_BIGINT {
|
|
879
|
+
/* Dynamically allocated buffer that is big-endian byte array. */
|
|
880
|
+
byte* buf;
|
|
881
|
+
/* Length of buffer in bytes. */
|
|
882
|
+
word32 len;
|
|
883
|
+
/* Hint for heap used to allocate buffer. */
|
|
884
|
+
void* heap;
|
|
885
|
+
} WC_BIGINT;
|
|
886
|
+
|
|
887
|
+
/* Ensure WC_BIGINT defined once. */
|
|
888
|
+
#define WOLF_BIGINT_DEFINED
|
|
889
|
+
#endif
|
|
890
|
+
|
|
891
|
+
#if SP_INT_DIGITS < (65536 / SP_WORD_SIZEOF)
|
|
892
|
+
/* Type for number of digits. */
|
|
893
|
+
typedef word16 sp_size_t;
|
|
894
|
+
#else
|
|
895
|
+
/* Type for number of digits. */
|
|
896
|
+
typedef unsigned int sp_size_t;
|
|
897
|
+
#endif
|
|
898
|
+
|
|
899
|
+
/* Type for number of digits. */
|
|
900
|
+
#define wc_mp_size_t sp_size_t
|
|
901
|
+
#ifdef WOLFSSL_SP_INT_NEGATIVE
|
|
902
|
+
typedef sp_uint8 sp_sign_t;
|
|
903
|
+
#define wc_mp_sign_t sp_sign_t
|
|
904
|
+
#endif
|
|
905
|
+
|
|
906
|
+
/**
|
|
907
|
+
* SP integer.
|
|
908
|
+
*
|
|
909
|
+
* dp at end so user can allocate a smaller amount and set size.
|
|
910
|
+
*/
|
|
911
|
+
typedef struct sp_int {
|
|
912
|
+
/** Number of words that contain data. */
|
|
913
|
+
sp_size_t used;
|
|
914
|
+
/** Maximum number of words in data. */
|
|
915
|
+
sp_size_t size;
|
|
916
|
+
#ifdef WOLFSSL_SP_INT_NEGATIVE
|
|
917
|
+
/** Indicates whether number is 0/positive or negative. */
|
|
918
|
+
sp_sign_t sign;
|
|
919
|
+
#endif
|
|
920
|
+
#ifdef HAVE_WOLF_BIGINT
|
|
921
|
+
/** Unsigned binary (big endian) representation of number. */
|
|
922
|
+
struct WC_BIGINT raw;
|
|
923
|
+
#endif
|
|
924
|
+
/** Data of number. */
|
|
925
|
+
XALIGNED(SP_WORD_SIZEOF) sp_int_digit dp[SP_INT_DIGITS];
|
|
926
|
+
} sp_int;
|
|
927
|
+
|
|
928
|
+
typedef struct sp_int_minimal {
|
|
929
|
+
/** Number of words that contain data. */
|
|
930
|
+
sp_size_t used;
|
|
931
|
+
/** Maximum number of words in data. */
|
|
932
|
+
sp_size_t size;
|
|
933
|
+
#ifdef WOLFSSL_SP_INT_NEGATIVE
|
|
934
|
+
/** Indicates whether number is 0/positive or negative. */
|
|
935
|
+
sp_sign_t sign;
|
|
936
|
+
#endif
|
|
937
|
+
#ifdef HAVE_WOLF_BIGINT
|
|
938
|
+
/** Unsigned binary (big endian) representation of number. */
|
|
939
|
+
struct WC_BIGINT raw;
|
|
940
|
+
#endif
|
|
941
|
+
/** First digit of number. */
|
|
942
|
+
XALIGNED(SP_WORD_SIZEOF) sp_int_digit dp[1];
|
|
943
|
+
} sp_int_minimal;
|
|
944
|
+
|
|
945
|
+
/* MP_INT_SIZEOF_DIGITS() requires that sizeof(sp_int) is a multiple of
|
|
946
|
+
* sizeof(sp_int_digit).
|
|
947
|
+
*/
|
|
948
|
+
wc_static_assert(sizeof(struct sp_int) % sizeof(sp_int_digit) == 0);
|
|
949
|
+
wc_static_assert(sizeof(struct sp_int_minimal) % sizeof(sp_int_digit) == 0);
|
|
950
|
+
|
|
951
|
+
/* Multi-precision integer type is SP integer type. */
|
|
952
|
+
typedef sp_int mp_int;
|
|
953
|
+
/* Multi-precision integer digit type is SP integer digit type.
|
|
954
|
+
* Type is unsigned.
|
|
955
|
+
*/
|
|
956
|
+
typedef sp_int_digit mp_digit;
|
|
957
|
+
|
|
958
|
+
|
|
959
|
+
/* Include the maths operations that are not implementation specific. */
|
|
960
|
+
#include <wolfssl/wolfcrypt/wolfmath.h>
|
|
961
|
+
|
|
962
|
+
/*
|
|
963
|
+
* Function prototypes.
|
|
964
|
+
*/
|
|
965
|
+
|
|
966
|
+
#ifdef WOLFSSL_API_PREFIX_MAP
|
|
967
|
+
#define sp_init wc_sp_init
|
|
968
|
+
#define sp_init_size wc_sp_init_size
|
|
969
|
+
#define sp_init_multi wc_sp_init_multi
|
|
970
|
+
#define sp_free wc_sp_free
|
|
971
|
+
#define sp_grow wc_sp_grow
|
|
972
|
+
|
|
973
|
+
#define sp_zero wc_sp_zero
|
|
974
|
+
#define sp_clear wc_sp_clear
|
|
975
|
+
#define sp_forcezero wc_sp_forcezero
|
|
976
|
+
#define sp_init_copy wc_sp_init_copy
|
|
977
|
+
|
|
978
|
+
#define sp_copy wc_sp_copy
|
|
979
|
+
#define sp_exch wc_sp_exch
|
|
980
|
+
#define sp_cond_swap_ct wc_sp_cond_swap_ct
|
|
981
|
+
#define sp_cond_swap_ct_ex wc_sp_cond_swap_ct_ex
|
|
982
|
+
|
|
983
|
+
#ifdef WOLFSSL_SP_INT_NEGATIVE
|
|
984
|
+
#define sp_abs wc_sp_abs
|
|
985
|
+
#endif
|
|
986
|
+
#ifdef WOLFSSL_SP_MATH_ALL
|
|
987
|
+
#define sp_cmp_mag wc_sp_cmp_mag
|
|
988
|
+
#endif
|
|
989
|
+
#define sp_cmp wc_sp_cmp
|
|
990
|
+
#define sp_cmp_ct wc_sp_cmp_ct
|
|
991
|
+
|
|
992
|
+
#define sp_is_bit_set wc_sp_is_bit_set
|
|
993
|
+
#define sp_count_bits wc_sp_count_bits
|
|
994
|
+
#if defined(HAVE_ECC) && defined(HAVE_COMP_KEY)
|
|
995
|
+
#define sp_cnt_lsb wc_sp_cnt_lsb
|
|
996
|
+
#endif
|
|
997
|
+
#define sp_leading_bit wc_sp_leading_bit
|
|
998
|
+
#define sp_set_bit wc_sp_set_bit
|
|
999
|
+
#define sp_2expt wc_sp_2expt
|
|
1000
|
+
|
|
1001
|
+
#define sp_set wc_sp_set
|
|
1002
|
+
#define sp_set_int wc_sp_set_int
|
|
1003
|
+
#define sp_cmp_d wc_sp_cmp_d
|
|
1004
|
+
#define sp_add_d wc_sp_add_d
|
|
1005
|
+
#define sp_sub_d wc_sp_sub_d
|
|
1006
|
+
#define sp_mul_d wc_sp_mul_d
|
|
1007
|
+
#if (defined(WOLFSSL_SP_MATH_ALL) && !defined(WOLFSSL_RSA_VERIFY_ONLY)) || \
|
|
1008
|
+
defined(WOLFSSL_KEY_GEN) || defined(HAVE_COMP_KEY) || \
|
|
1009
|
+
defined(WC_MP_TO_RADIX)
|
|
1010
|
+
#define sp_div_d wc_sp_div_d
|
|
1011
|
+
#endif
|
|
1012
|
+
#if defined(WOLFSSL_SP_MATH_ALL) || (defined(HAVE_ECC) && \
|
|
1013
|
+
defined(HAVE_COMP_KEY)) || defined(OPENSSL_EXTRA)
|
|
1014
|
+
#define sp_mod_d wc_sp_mod_d
|
|
1015
|
+
#endif
|
|
1016
|
+
#if defined(WOLFSSL_SP_MATH_ALL) && defined(HAVE_ECC)
|
|
1017
|
+
#define sp_div_2_mod_ct wc_sp_div_2_mod_ct
|
|
1018
|
+
#define sp_div_2 wc_sp_div_2
|
|
1019
|
+
#endif
|
|
1020
|
+
|
|
1021
|
+
#define sp_add wc_sp_add
|
|
1022
|
+
#define sp_sub wc_sp_sub
|
|
1023
|
+
#if (defined(WOLFSSL_SP_MATH_ALL) && !defined(WOLFSSL_RSA_VERIFY_ONLY)) || \
|
|
1024
|
+
(!defined(WOLFSSL_SP_MATH) && defined(WOLFSSL_CUSTOM_CURVES)) || \
|
|
1025
|
+
defined(WOLFCRYPT_HAVE_ECCSI) || defined(WOLFCRYPT_HAVE_SAKKE)
|
|
1026
|
+
#define sp_addmod wc_sp_addmod
|
|
1027
|
+
#endif
|
|
1028
|
+
#if defined(WOLFSSL_SP_MATH_ALL) && (!defined(WOLFSSL_RSA_VERIFY_ONLY) || \
|
|
1029
|
+
defined(HAVE_ECC))
|
|
1030
|
+
#define sp_submod wc_sp_submod
|
|
1031
|
+
#endif
|
|
1032
|
+
#if defined(WOLFSSL_SP_MATH_ALL) && defined(HAVE_ECC)
|
|
1033
|
+
#define sp_submod_ct wc_sp_submod_ct
|
|
1034
|
+
#define sp_addmod_ct wc_sp_addmod_ct
|
|
1035
|
+
#endif
|
|
1036
|
+
#if defined(WOLFSSL_SP_MATH_ALL) && defined(HAVE_ECC)
|
|
1037
|
+
#define sp_xor_ct wc_sp_xor_ct
|
|
1038
|
+
#endif
|
|
1039
|
+
|
|
1040
|
+
#define sp_lshd wc_sp_lshd
|
|
1041
|
+
#ifdef WOLFSSL_SP_MATH_ALL
|
|
1042
|
+
#define sp_rshd wc_sp_rshd
|
|
1043
|
+
#endif
|
|
1044
|
+
#define sp_rshb wc_sp_rshb
|
|
1045
|
+
|
|
1046
|
+
#if defined(WOLFSSL_SP_MATH_ALL) || !defined(NO_DH) || defined(HAVE_ECC) || \
|
|
1047
|
+
(!defined(NO_RSA) && !defined(WOLFSSL_RSA_VERIFY_ONLY) && \
|
|
1048
|
+
!defined(WOLFSSL_RSA_PUBLIC_ONLY))
|
|
1049
|
+
#define sp_div wc_sp_div
|
|
1050
|
+
#endif
|
|
1051
|
+
#define sp_mod wc_sp_mod
|
|
1052
|
+
|
|
1053
|
+
#define sp_mul wc_sp_mul
|
|
1054
|
+
#define sp_mulmod wc_sp_mulmod
|
|
1055
|
+
|
|
1056
|
+
#define sp_invmod wc_sp_invmod
|
|
1057
|
+
#if defined(WOLFSSL_SP_MATH_ALL) && defined(HAVE_ECC)
|
|
1058
|
+
#define sp_invmod_mont_ct wc_sp_invmod_mont_ct
|
|
1059
|
+
#endif
|
|
1060
|
+
|
|
1061
|
+
#define sp_exptmod_ex wc_sp_exptmod_ex
|
|
1062
|
+
#define sp_exptmod wc_sp_exptmod
|
|
1063
|
+
#if defined(WOLFSSL_SP_MATH_ALL) || defined(WOLFSSL_HAVE_SP_DH)
|
|
1064
|
+
#define sp_exptmod_nct wc_sp_exptmod_nct
|
|
1065
|
+
#endif
|
|
1066
|
+
|
|
1067
|
+
#if defined(WOLFSSL_SP_MATH_ALL) || defined(OPENSSL_ALL)
|
|
1068
|
+
#define sp_div_2d wc_sp_div_2d
|
|
1069
|
+
#define sp_mul_2d wc_sp_mul_2d
|
|
1070
|
+
#endif
|
|
1071
|
+
#if defined(WOLFSSL_SP_MATH_ALL) || defined(HAVE_ECC) || defined(OPENSSL_ALL)
|
|
1072
|
+
#define sp_mod_2d wc_sp_mod_2d
|
|
1073
|
+
#endif
|
|
1074
|
+
|
|
1075
|
+
#define sp_sqr wc_sp_sqr
|
|
1076
|
+
#define sp_sqrmod wc_sp_sqrmod
|
|
1077
|
+
|
|
1078
|
+
#define sp_mont_red_ex wc_sp_mont_red_ex
|
|
1079
|
+
#define sp_mont_setup wc_sp_mont_setup
|
|
1080
|
+
#define sp_mont_norm wc_sp_mont_norm
|
|
1081
|
+
|
|
1082
|
+
#define sp_unsigned_bin_size wc_sp_unsigned_bin_size
|
|
1083
|
+
#define sp_read_unsigned_bin wc_sp_read_unsigned_bin
|
|
1084
|
+
#define sp_to_unsigned_bin wc_sp_to_unsigned_bin
|
|
1085
|
+
#define sp_to_unsigned_bin_len wc_sp_to_unsigned_bin_len
|
|
1086
|
+
#define sp_to_unsigned_bin_len_ct wc_sp_to_unsigned_bin_len_ct
|
|
1087
|
+
#ifdef WOLFSSL_SP_MATH_ALL
|
|
1088
|
+
#define sp_to_unsigned_bin_at_pos wc_sp_to_unsigned_bin_at_pos
|
|
1089
|
+
#endif
|
|
1090
|
+
|
|
1091
|
+
#define sp_read_radix wc_sp_read_radix
|
|
1092
|
+
#define sp_tohex wc_sp_tohex
|
|
1093
|
+
#define sp_todecimal wc_sp_todecimal
|
|
1094
|
+
#if defined(WOLFSSL_SP_MATH_ALL) || defined(WC_MP_TO_RADIX)
|
|
1095
|
+
#define sp_toradix wc_sp_toradix
|
|
1096
|
+
#define sp_radix_size wc_sp_radix_size
|
|
1097
|
+
#endif
|
|
1098
|
+
|
|
1099
|
+
#define sp_rand_prime wc_sp_rand_prime
|
|
1100
|
+
#define sp_prime_is_prime wc_sp_prime_is_prime
|
|
1101
|
+
#define sp_prime_is_prime_ex wc_sp_prime_is_prime_ex
|
|
1102
|
+
#if !defined(NO_RSA) || defined(WOLFSSL_KEY_GEN)
|
|
1103
|
+
#define sp_gcd wc_sp_gcd
|
|
1104
|
+
#endif
|
|
1105
|
+
#if !defined(NO_RSA) && defined(WOLFSSL_KEY_GEN) && \
|
|
1106
|
+
(!defined(WC_RSA_BLINDING) || defined(HAVE_FIPS) || defined(HAVE_SELFTEST))
|
|
1107
|
+
#define sp_lcm wc_sp_lcm
|
|
1108
|
+
#endif
|
|
1109
|
+
|
|
1110
|
+
#define CheckRunTimeFastMath wc_CheckRunTimeFastMath
|
|
1111
|
+
|
|
1112
|
+
#endif /* WOLFSSL_API_PREFIX_MAP */
|
|
1113
|
+
|
|
1114
|
+
MP_API int sp_init(sp_int* a);
|
|
1115
|
+
MP_API int sp_init_size(sp_int* a, unsigned int size);
|
|
1116
|
+
MP_API int sp_init_multi(sp_int* n1, sp_int* n2, sp_int* n3, sp_int* n4,
|
|
1117
|
+
sp_int* n5, sp_int* n6);
|
|
1118
|
+
MP_API void sp_free(sp_int* a);
|
|
1119
|
+
MP_API int sp_grow(sp_int* a, int l);
|
|
1120
|
+
|
|
1121
|
+
MP_API void sp_zero(sp_int* a);
|
|
1122
|
+
MP_API void sp_clear(sp_int* a);
|
|
1123
|
+
MP_API void sp_forcezero(sp_int* a);
|
|
1124
|
+
MP_API int sp_init_copy (sp_int* r, const sp_int* a);
|
|
1125
|
+
|
|
1126
|
+
MP_API int sp_copy(const sp_int* a, sp_int* r);
|
|
1127
|
+
MP_API int sp_exch(sp_int* a, sp_int* b);
|
|
1128
|
+
MP_API int sp_cond_swap_ct(sp_int* a, sp_int* b, int cnt, int swap);
|
|
1129
|
+
MP_API int sp_cond_swap_ct_ex(sp_int* a, sp_int* b, int cnt, int swap,
|
|
1130
|
+
sp_int* t);
|
|
1131
|
+
|
|
1132
|
+
#ifdef WOLFSSL_SP_INT_NEGATIVE
|
|
1133
|
+
MP_API int sp_abs(const sp_int* a, sp_int* r);
|
|
1134
|
+
#endif
|
|
1135
|
+
#ifdef WOLFSSL_SP_MATH_ALL
|
|
1136
|
+
MP_API int sp_cmp_mag(const sp_int* a, const sp_int* b);
|
|
1137
|
+
#endif
|
|
1138
|
+
MP_API int sp_cmp(const sp_int* a, const sp_int* b);
|
|
1139
|
+
MP_API int sp_cmp_ct(const sp_int* a, const sp_int* b, unsigned int n);
|
|
1140
|
+
|
|
1141
|
+
MP_API int sp_is_bit_set(const sp_int* a, unsigned int b);
|
|
1142
|
+
MP_API int sp_count_bits(const sp_int* a);
|
|
1143
|
+
#if defined(HAVE_ECC) && defined(HAVE_COMP_KEY)
|
|
1144
|
+
MP_API int sp_cnt_lsb(const sp_int* a);
|
|
1145
|
+
#endif
|
|
1146
|
+
MP_API int sp_leading_bit(const sp_int* a);
|
|
1147
|
+
MP_API int sp_set_bit(sp_int* a, int i);
|
|
1148
|
+
MP_API int sp_2expt(sp_int* a, int e);
|
|
1149
|
+
|
|
1150
|
+
MP_API int sp_set(sp_int* a, sp_int_digit d);
|
|
1151
|
+
MP_API int sp_set_int(sp_int* a, unsigned long n);
|
|
1152
|
+
MP_API int sp_cmp_d(const sp_int* a, sp_int_digit d);
|
|
1153
|
+
MP_API int sp_add_d(const sp_int* a, sp_int_digit d, sp_int* r);
|
|
1154
|
+
MP_API int sp_sub_d(const sp_int* a, sp_int_digit d, sp_int* r);
|
|
1155
|
+
MP_API int sp_mul_d(const sp_int* a, sp_int_digit d, sp_int* r);
|
|
1156
|
+
#if (defined(WOLFSSL_SP_MATH_ALL) && !defined(WOLFSSL_RSA_VERIFY_ONLY)) || \
|
|
1157
|
+
defined(WOLFSSL_KEY_GEN) || defined(HAVE_COMP_KEY) || \
|
|
1158
|
+
defined(WC_MP_TO_RADIX)
|
|
1159
|
+
MP_API int sp_div_d(const sp_int* a, sp_int_digit d, sp_int* r,
|
|
1160
|
+
sp_int_digit* rem);
|
|
1161
|
+
#endif
|
|
1162
|
+
#if defined(WOLFSSL_SP_MATH_ALL) || (defined(HAVE_ECC) && \
|
|
1163
|
+
defined(HAVE_COMP_KEY)) || defined(OPENSSL_EXTRA)
|
|
1164
|
+
MP_API int sp_mod_d(const sp_int* a, sp_int_digit d, sp_int_digit* r);
|
|
1165
|
+
#endif
|
|
1166
|
+
#if defined(WOLFSSL_SP_MATH_ALL) && defined(HAVE_ECC)
|
|
1167
|
+
MP_API int sp_div_2_mod_ct(const sp_int* a, const sp_int* m, sp_int* r);
|
|
1168
|
+
MP_API int sp_div_2(const sp_int* a, sp_int* r);
|
|
1169
|
+
#endif
|
|
1170
|
+
|
|
1171
|
+
MP_API int sp_add(const sp_int* a, const sp_int* b, sp_int* r);
|
|
1172
|
+
MP_API int sp_sub(const sp_int* a, const sp_int* b, sp_int* r);
|
|
1173
|
+
#if (defined(WOLFSSL_SP_MATH_ALL) && !defined(WOLFSSL_RSA_VERIFY_ONLY)) || \
|
|
1174
|
+
(!defined(WOLFSSL_SP_MATH) && defined(WOLFSSL_CUSTOM_CURVES)) || \
|
|
1175
|
+
defined(WOLFCRYPT_HAVE_ECCSI) || defined(WOLFCRYPT_HAVE_SAKKE)
|
|
1176
|
+
MP_API int sp_addmod(const sp_int* a, const sp_int* b, const sp_int* m,
|
|
1177
|
+
sp_int* r);
|
|
1178
|
+
#endif
|
|
1179
|
+
#if defined(WOLFSSL_SP_MATH_ALL) && (!defined(WOLFSSL_RSA_VERIFY_ONLY) || \
|
|
1180
|
+
defined(HAVE_ECC))
|
|
1181
|
+
MP_API int sp_submod(const sp_int* a, const sp_int* b, const sp_int* m,
|
|
1182
|
+
sp_int* r);
|
|
1183
|
+
#endif
|
|
1184
|
+
#if defined(WOLFSSL_SP_MATH_ALL) && defined(HAVE_ECC)
|
|
1185
|
+
MP_API int sp_submod_ct(const sp_int* a, const sp_int* b, const sp_int* m,
|
|
1186
|
+
sp_int* r);
|
|
1187
|
+
MP_API int sp_addmod_ct(const sp_int* a, const sp_int* b, const sp_int* m,
|
|
1188
|
+
sp_int* r);
|
|
1189
|
+
#endif
|
|
1190
|
+
#if defined(WOLFSSL_SP_MATH_ALL) && defined(HAVE_ECC)
|
|
1191
|
+
MP_API void sp_xor_ct(const sp_int* a, const sp_int* b, int len, sp_int* r);
|
|
1192
|
+
#endif
|
|
1193
|
+
|
|
1194
|
+
MP_API int sp_lshd(sp_int* a, int s);
|
|
1195
|
+
#ifdef WOLFSSL_SP_MATH_ALL
|
|
1196
|
+
MP_API void sp_rshd(sp_int* a, int c);
|
|
1197
|
+
#endif
|
|
1198
|
+
MP_API int sp_rshb(const sp_int* a, int n, sp_int* r);
|
|
1199
|
+
|
|
1200
|
+
#if defined(WOLFSSL_SP_MATH_ALL) || !defined(NO_DH) || defined(HAVE_ECC) || \
|
|
1201
|
+
(!defined(NO_RSA) && !defined(WOLFSSL_RSA_VERIFY_ONLY) && \
|
|
1202
|
+
!defined(WOLFSSL_RSA_PUBLIC_ONLY))
|
|
1203
|
+
MP_API int sp_div(const sp_int* a, const sp_int* d, sp_int* r, sp_int* rem);
|
|
1204
|
+
#endif
|
|
1205
|
+
MP_API int sp_mod(const sp_int* a, const sp_int* m, sp_int* r);
|
|
1206
|
+
|
|
1207
|
+
MP_API int sp_mul(const sp_int* a, const sp_int* b, sp_int* r);
|
|
1208
|
+
MP_API int sp_mulmod(const sp_int* a, const sp_int* b, const sp_int* m,
|
|
1209
|
+
sp_int* r);
|
|
1210
|
+
|
|
1211
|
+
MP_API int sp_invmod(const sp_int* a, const sp_int* m, sp_int* r);
|
|
1212
|
+
#if defined(WOLFSSL_SP_MATH_ALL) && defined(HAVE_ECC)
|
|
1213
|
+
MP_API int sp_invmod_mont_ct(const sp_int* a, const sp_int* m, sp_int* r,
|
|
1214
|
+
sp_int_digit mp);
|
|
1215
|
+
#endif
|
|
1216
|
+
|
|
1217
|
+
MP_API int sp_exptmod_ex(const sp_int* b, const sp_int* e, int digits,
|
|
1218
|
+
const sp_int* m, sp_int* r);
|
|
1219
|
+
MP_API int sp_exptmod(const sp_int* b, const sp_int* e, const sp_int* m,
|
|
1220
|
+
sp_int* r);
|
|
1221
|
+
#if defined(WOLFSSL_SP_MATH_ALL) || defined(WOLFSSL_HAVE_SP_DH)
|
|
1222
|
+
MP_API int sp_exptmod_nct(const sp_int* b, const sp_int* e, const sp_int* m,
|
|
1223
|
+
sp_int* r);
|
|
1224
|
+
#endif
|
|
1225
|
+
|
|
1226
|
+
#if defined(WOLFSSL_SP_MATH_ALL) || defined(OPENSSL_ALL)
|
|
1227
|
+
MP_API int sp_div_2d(const sp_int* a, int e, sp_int* r, sp_int* rem);
|
|
1228
|
+
MP_API int sp_mul_2d(const sp_int* a, int e, sp_int* r);
|
|
1229
|
+
#endif
|
|
1230
|
+
#if defined(WOLFSSL_SP_MATH_ALL) || defined(HAVE_ECC) || defined(OPENSSL_ALL)
|
|
1231
|
+
MP_API int sp_mod_2d(const sp_int* a, int e, sp_int* r);
|
|
1232
|
+
#endif
|
|
1233
|
+
|
|
1234
|
+
MP_API int sp_sqr(const sp_int* a, sp_int* r);
|
|
1235
|
+
MP_API int sp_sqrmod(const sp_int* a, const sp_int* m, sp_int* r);
|
|
1236
|
+
|
|
1237
|
+
MP_API int sp_mont_red_ex(sp_int* a, const sp_int* m, sp_int_digit mp, int ct);
|
|
1238
|
+
#define sp_mont_red(a, m, mp) sp_mont_red_ex(a, m, mp, 0)
|
|
1239
|
+
MP_API int sp_mont_setup(const sp_int* m, sp_int_digit* rho);
|
|
1240
|
+
MP_API int sp_mont_norm(sp_int* norm, const sp_int* m);
|
|
1241
|
+
|
|
1242
|
+
MP_API int sp_unsigned_bin_size(const sp_int* a);
|
|
1243
|
+
MP_API int sp_read_unsigned_bin(sp_int* a, const byte* in, word32 inSz);
|
|
1244
|
+
MP_API int sp_to_unsigned_bin(const sp_int* a, byte* out);
|
|
1245
|
+
MP_API int sp_to_unsigned_bin_len(const sp_int* a, byte* out, int outSz);
|
|
1246
|
+
MP_API int sp_to_unsigned_bin_len_ct(const sp_int* a, byte* out, int outSz);
|
|
1247
|
+
#ifdef WOLFSSL_SP_MATH_ALL
|
|
1248
|
+
MP_API int sp_to_unsigned_bin_at_pos(int o, const sp_int* a,
|
|
1249
|
+
unsigned char* out);
|
|
1250
|
+
#endif
|
|
1251
|
+
|
|
1252
|
+
MP_API int sp_read_radix(sp_int* a, const char* in, int radix);
|
|
1253
|
+
MP_API int sp_tohex(const sp_int* a, char* str);
|
|
1254
|
+
MP_API int sp_todecimal(const sp_int* a, char* str);
|
|
1255
|
+
#if defined(WOLFSSL_SP_MATH_ALL) || defined(WC_MP_TO_RADIX)
|
|
1256
|
+
MP_API int sp_toradix(const sp_int* a, char* str, int radix);
|
|
1257
|
+
MP_API int sp_radix_size(const sp_int* a, int radix, int* size);
|
|
1258
|
+
#endif
|
|
1259
|
+
|
|
1260
|
+
MP_API int sp_rand_prime(sp_int* r, int len, WC_RNG* rng, void* heap);
|
|
1261
|
+
MP_API int sp_prime_is_prime(const sp_int* a, int t, int* result);
|
|
1262
|
+
MP_API int sp_prime_is_prime_ex(const sp_int* a, int t, int* result,
|
|
1263
|
+
WC_RNG* rng);
|
|
1264
|
+
#if !defined(NO_RSA) || defined(WOLFSSL_KEY_GEN)
|
|
1265
|
+
MP_API int sp_gcd(const sp_int* a, const sp_int* b, sp_int* r);
|
|
1266
|
+
#endif
|
|
1267
|
+
#if !defined(NO_RSA) && defined(WOLFSSL_KEY_GEN) && \
|
|
1268
|
+
(!defined(WC_RSA_BLINDING) || defined(HAVE_FIPS) || defined(HAVE_SELFTEST))
|
|
1269
|
+
MP_API int sp_lcm(const sp_int* a, const sp_int* b, sp_int* r);
|
|
1270
|
+
#endif
|
|
1271
|
+
|
|
1272
|
+
WOLFSSL_API word32 CheckRunTimeFastMath(void);
|
|
1273
|
+
|
|
1274
|
+
#ifdef WOLFSSL_CHECK_MEM_ZERO
|
|
1275
|
+
WOLFSSL_LOCAL void sp_memzero_add(const char* name, sp_int* sp);
|
|
1276
|
+
WOLFSSL_LOCAL void sp_memzero_check(sp_int* sp);
|
|
1277
|
+
#endif
|
|
1278
|
+
|
|
1279
|
+
|
|
1280
|
+
/* Map mp functions to SP math versions. */
|
|
1281
|
+
/* Different name or signature. */
|
|
1282
|
+
#define mp_mul_2(a, r) sp_mul_2d(a, 1, r)
|
|
1283
|
+
#define mp_div_3(a, r, rem) sp_div_d(a, 3, r, rem)
|
|
1284
|
+
#define mp_rshb(A,x) sp_rshb(A,x,A)
|
|
1285
|
+
#define mp_is_bit_set(a,b) sp_is_bit_set(a,(unsigned int)(b))
|
|
1286
|
+
#define mp_montgomery_reduce(a, m, mp) sp_mont_red_ex(a, m, mp, 0)
|
|
1287
|
+
#define mp_montgomery_reduce_ct(a, m, mp) sp_mont_red_ex(a, m, mp, 1)
|
|
1288
|
+
#define mp_montgomery_setup sp_mont_setup
|
|
1289
|
+
#define mp_montgomery_calc_normalization sp_mont_norm
|
|
1290
|
+
|
|
1291
|
+
/* Macros mappings. */
|
|
1292
|
+
#define mp_isodd sp_isodd
|
|
1293
|
+
#define mp_iseven sp_iseven
|
|
1294
|
+
#define mp_iszero sp_iszero
|
|
1295
|
+
#define mp_isone sp_isone
|
|
1296
|
+
#define mp_isword sp_isword
|
|
1297
|
+
#define mp_abs sp_abs
|
|
1298
|
+
#define mp_isneg sp_isneg
|
|
1299
|
+
#define mp_setneg sp_setneg
|
|
1300
|
+
#define mp_bitsused sp_bitsused
|
|
1301
|
+
#define mp_clamp sp_clamp
|
|
1302
|
+
|
|
1303
|
+
/* One to one mappings. */
|
|
1304
|
+
#define mp_init sp_init
|
|
1305
|
+
#define mp_init_size sp_init_size
|
|
1306
|
+
#define mp_init_multi sp_init_multi
|
|
1307
|
+
#define mp_free sp_free
|
|
1308
|
+
#define mp_grow sp_grow
|
|
1309
|
+
#define mp_zero sp_zero
|
|
1310
|
+
#define mp_clear sp_clear
|
|
1311
|
+
#define mp_forcezero sp_forcezero
|
|
1312
|
+
#define mp_copy sp_copy
|
|
1313
|
+
#define mp_init_copy sp_init_copy
|
|
1314
|
+
#define mp_exch sp_exch
|
|
1315
|
+
#define mp_cond_swap_ct sp_cond_swap_ct
|
|
1316
|
+
#define mp_cond_swap_ct_ex sp_cond_swap_ct_ex
|
|
1317
|
+
#define mp_cmp_mag sp_cmp_mag
|
|
1318
|
+
#define mp_cmp sp_cmp
|
|
1319
|
+
#define mp_cmp_ct sp_cmp_ct
|
|
1320
|
+
#define mp_count_bits sp_count_bits
|
|
1321
|
+
#define mp_cnt_lsb sp_cnt_lsb
|
|
1322
|
+
#define mp_leading_bit sp_leading_bit
|
|
1323
|
+
#define mp_set_bit sp_set_bit
|
|
1324
|
+
#define mp_2expt sp_2expt
|
|
1325
|
+
#define mp_set sp_set
|
|
1326
|
+
#define mp_set_int sp_set_int
|
|
1327
|
+
#define mp_cmp_d sp_cmp_d
|
|
1328
|
+
#define mp_add_d sp_add_d
|
|
1329
|
+
#define mp_sub_d sp_sub_d
|
|
1330
|
+
#define mp_mul_d sp_mul_d
|
|
1331
|
+
#define mp_div_d sp_div_d
|
|
1332
|
+
#define mp_mod_d sp_mod_d
|
|
1333
|
+
#define mp_div_2_mod_ct sp_div_2_mod_ct
|
|
1334
|
+
#define mp_div_2 sp_div_2
|
|
1335
|
+
#define mp_add sp_add
|
|
1336
|
+
#define mp_sub sp_sub
|
|
1337
|
+
|
|
1338
|
+
#define mp_addmod_ct sp_addmod_ct
|
|
1339
|
+
#define mp_submod_ct sp_submod_ct
|
|
1340
|
+
#define mp_xor_ct sp_xor_ct
|
|
1341
|
+
#define mp_lshd sp_lshd
|
|
1342
|
+
#define mp_rshd sp_rshd
|
|
1343
|
+
#define mp_div sp_div
|
|
1344
|
+
#define mp_mul sp_mul
|
|
1345
|
+
#define mp_invmod sp_invmod
|
|
1346
|
+
#define mp_invmod_mont_ct sp_invmod_mont_ct
|
|
1347
|
+
#define mp_exptmod_ex sp_exptmod_ex
|
|
1348
|
+
#define mp_exptmod_nct sp_exptmod_nct
|
|
1349
|
+
#define mp_div_2d sp_div_2d
|
|
1350
|
+
#define mp_mod_2d sp_mod_2d
|
|
1351
|
+
#define mp_mul_2d sp_mul_2d
|
|
1352
|
+
#define mp_sqr sp_sqr
|
|
1353
|
+
|
|
1354
|
+
#define mp_unsigned_bin_size sp_unsigned_bin_size
|
|
1355
|
+
#define mp_read_unsigned_bin sp_read_unsigned_bin
|
|
1356
|
+
#define mp_to_unsigned_bin sp_to_unsigned_bin
|
|
1357
|
+
#define mp_to_unsigned_bin_len sp_to_unsigned_bin_len
|
|
1358
|
+
#define mp_to_unsigned_bin_len_ct sp_to_unsigned_bin_len_ct
|
|
1359
|
+
#define mp_to_unsigned_bin_at_pos sp_to_unsigned_bin_at_pos
|
|
1360
|
+
#define mp_read_radix sp_read_radix
|
|
1361
|
+
#define mp_tohex sp_tohex
|
|
1362
|
+
#define mp_todecimal sp_todecimal
|
|
1363
|
+
#define mp_toradix sp_toradix
|
|
1364
|
+
#define mp_radix_size sp_radix_size
|
|
1365
|
+
|
|
1366
|
+
#define mp_rand_prime sp_rand_prime
|
|
1367
|
+
#define mp_prime_is_prime sp_prime_is_prime
|
|
1368
|
+
#define mp_prime_is_prime_ex sp_prime_is_prime_ex
|
|
1369
|
+
#define mp_gcd sp_gcd
|
|
1370
|
+
#define mp_lcm sp_lcm
|
|
1371
|
+
|
|
1372
|
+
#define mp_memzero_add sp_memzero_add
|
|
1373
|
+
#define mp_memzero_check sp_memzero_check
|
|
1374
|
+
|
|
1375
|
+
/* Allow for Hardware Based Mod Math */
|
|
1376
|
+
/* Avoid redeclaration warnings */
|
|
1377
|
+
#ifndef WOLFSSL_USE_HW_MP
|
|
1378
|
+
#define mp_mod sp_mod
|
|
1379
|
+
#define mp_addmod sp_addmod
|
|
1380
|
+
#define mp_submod sp_submod
|
|
1381
|
+
#define mp_mulmod sp_mulmod
|
|
1382
|
+
#define mp_exptmod sp_exptmod
|
|
1383
|
+
#define mp_sqrmod sp_sqrmod
|
|
1384
|
+
#endif
|
|
1385
|
+
|
|
1386
|
+
#ifdef WOLFSSL_DEBUG_MATH
|
|
1387
|
+
#define mp_dump(d, a, v) sp_print(a, d)
|
|
1388
|
+
#endif
|
|
1389
|
+
|
|
1390
|
+
#endif /* WOLFSSL_SP_MATH || WOLFSSL_SP_MATH_ALL */
|
|
1391
|
+
|
|
1392
|
+
#ifdef __cplusplus
|
|
1393
|
+
} /* extern "C" */
|
|
1394
|
+
#endif
|
|
1395
|
+
|
|
1396
|
+
#endif /* WOLF_CRYPT_SP_H */
|