@annadata/capacitor-mqtt-quic 0.1.6 → 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 +2 -1
- 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/Info.plist +44 -0
- 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 -9
|
@@ -0,0 +1,1051 @@
|
|
|
1
|
+
/* dilithium.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
|
+
\file wolfssl/wolfcrypt/dilithium.h
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
/* Interfaces for Dilithium NIST Level 1 (Dilithium512) and Dilithium NIST Level 5
|
|
27
|
+
* (Dilithium1024). */
|
|
28
|
+
|
|
29
|
+
#ifndef WOLF_CRYPT_DILITHIUM_H
|
|
30
|
+
#define WOLF_CRYPT_DILITHIUM_H
|
|
31
|
+
|
|
32
|
+
#include <wolfssl/wolfcrypt/types.h>
|
|
33
|
+
|
|
34
|
+
#ifdef WOLF_CRYPTO_CB
|
|
35
|
+
#include <wolfssl/wolfcrypt/cryptocb.h>
|
|
36
|
+
#endif
|
|
37
|
+
|
|
38
|
+
#if defined(HAVE_DILITHIUM)
|
|
39
|
+
|
|
40
|
+
#ifdef HAVE_LIBOQS
|
|
41
|
+
#include <oqs/oqs.h>
|
|
42
|
+
#include <wolfssl/wolfcrypt/port/liboqs/liboqs.h>
|
|
43
|
+
#endif
|
|
44
|
+
|
|
45
|
+
#if defined(WOLFSSL_DILITHIUM_NO_MAKE_KEY) && \
|
|
46
|
+
defined(WOLFSSL_DILITHIUM_NO_SIGN) && \
|
|
47
|
+
!defined(WOLFSSL_DILITHIUM_NO_VERIFY) && \
|
|
48
|
+
!defined(WOLFSSL_DILITHIUM_VERIFY_ONLY)
|
|
49
|
+
#define WOLFSSL_DILITHIUM_VERIFY_ONLY
|
|
50
|
+
#endif
|
|
51
|
+
#ifdef WOLFSSL_DILITHIUM_VERIFY_ONLY
|
|
52
|
+
#ifndef WOLFSSL_DILITHIUM_NO_MAKE_KEY
|
|
53
|
+
#define WOLFSSL_DILITHIUM_NO_MAKE_KEY
|
|
54
|
+
#endif
|
|
55
|
+
#ifndef WOLFSSL_DILITHIUM_NO_SIGN
|
|
56
|
+
#define WOLFSSL_DILITHIUM_NO_SIGN
|
|
57
|
+
#endif
|
|
58
|
+
#endif
|
|
59
|
+
|
|
60
|
+
#if !defined(WOLFSSL_DILITHIUM_NO_MAKE_KEY) || \
|
|
61
|
+
!defined(WOLFSSL_DILITHIUM_NO_VERIFY)
|
|
62
|
+
#define WOLFSSL_DILITHIUM_PUBLIC_KEY
|
|
63
|
+
#endif
|
|
64
|
+
#if !defined(WOLFSSL_DILITHIUM_NO_MAKE_KEY) || \
|
|
65
|
+
!defined(WOLFSSL_DILITHIUM_NO_SIGN)
|
|
66
|
+
#define WOLFSSL_DILITHIUM_PRIVATE_KEY
|
|
67
|
+
#endif
|
|
68
|
+
|
|
69
|
+
#if defined(WOLFSSL_DILITHIUM_PUBLIC_KEY) && \
|
|
70
|
+
defined(WOLFSSL_DILITHIUM_PRIVATE_KEY) && \
|
|
71
|
+
!defined(WOLFSSL_DILITHIUM_NO_CHECK_KEY) && \
|
|
72
|
+
!defined(WOLFSSL_DILITHIUM_CHECK_KEY)
|
|
73
|
+
#define WOLFSSL_DILITHIUM_CHECK_KEY
|
|
74
|
+
#endif
|
|
75
|
+
|
|
76
|
+
#ifdef WOLFSSL_WC_DILITHIUM
|
|
77
|
+
#include <wolfssl/wolfcrypt/sha3.h>
|
|
78
|
+
#ifndef WOLFSSL_DILITHIUM_VERIFY_ONLY
|
|
79
|
+
#include <wolfssl/wolfcrypt/random.h>
|
|
80
|
+
#endif
|
|
81
|
+
#endif
|
|
82
|
+
|
|
83
|
+
#if defined(WC_DILITHIUM_CACHE_PRIV_VECTORS) && \
|
|
84
|
+
!defined(WC_DILITHIUM_CACHE_MATRIX_A)
|
|
85
|
+
#define WC_DILITHIUM_CACHE_MATRIX_A
|
|
86
|
+
#endif
|
|
87
|
+
#if defined(WC_DILITHIUM_CACHE_PUB_VECTORS) && \
|
|
88
|
+
!defined(WC_DILITHIUM_CACHE_MATRIX_A)
|
|
89
|
+
#define WC_DILITHIUM_CACHE_MATRIX_A
|
|
90
|
+
#endif
|
|
91
|
+
|
|
92
|
+
#ifdef __cplusplus
|
|
93
|
+
extern "C" {
|
|
94
|
+
#endif
|
|
95
|
+
|
|
96
|
+
/* Macros Definitions */
|
|
97
|
+
|
|
98
|
+
#ifdef WOLFSSL_WC_DILITHIUM
|
|
99
|
+
|
|
100
|
+
#ifndef WOLFSSL_DILITHIUM_ALIGNMENT
|
|
101
|
+
#if defined(__arch64__)
|
|
102
|
+
#define WOLFSSL_DILITHIUM_ALIGNMENT 8
|
|
103
|
+
#elif defined(__arm__)
|
|
104
|
+
#define WOLFSSL_DILITHIUM_ALIGNMENT 4
|
|
105
|
+
#elif !defined(WOLFSSL_AESNI) && defined(WOLFSSL_GENERAL_ALIGNMENT)
|
|
106
|
+
#define WOLFSSL_DILITHIUM_ALIGNMENT WOLFSSL_GENERAL_ALIGNMENT
|
|
107
|
+
#else
|
|
108
|
+
#define WOLFSSL_DILITHIUM_ALIGNMENT 8
|
|
109
|
+
#endif
|
|
110
|
+
#endif /* WOLFSSL_DILITHIUM_ALIGNMENT */
|
|
111
|
+
|
|
112
|
+
#define DILITHIUM_LEVEL2_KEY_SIZE 2560
|
|
113
|
+
#define DILITHIUM_LEVEL2_SIG_SIZE 2420
|
|
114
|
+
#define DILITHIUM_LEVEL2_PUB_KEY_SIZE 1312
|
|
115
|
+
#define DILITHIUM_LEVEL2_PRV_KEY_SIZE \
|
|
116
|
+
(DILITHIUM_LEVEL2_PUB_KEY_SIZE + DILITHIUM_LEVEL2_KEY_SIZE)
|
|
117
|
+
/* Buffer sizes large enough to store exported DER encoded keys */
|
|
118
|
+
#define DILITHIUM_LEVEL2_PUB_KEY_DER_SIZE 1334
|
|
119
|
+
#define DILITHIUM_LEVEL2_PRV_KEY_DER_SIZE 2588
|
|
120
|
+
#define DILITHIUM_LEVEL2_BOTH_KEY_DER_SIZE 3904
|
|
121
|
+
/* PEM size with the header "-----BEGIN PRIVATE KEY-----" and
|
|
122
|
+
* the footer "-----END PRIVATE KEY-----" */
|
|
123
|
+
#define DILITHIUM_LEVEL2_BOTH_KEY_PEM_SIZE 5344
|
|
124
|
+
|
|
125
|
+
#define DILITHIUM_LEVEL3_KEY_SIZE 4032
|
|
126
|
+
#define DILITHIUM_LEVEL3_SIG_SIZE 3309
|
|
127
|
+
#define DILITHIUM_LEVEL3_PUB_KEY_SIZE 1952
|
|
128
|
+
#define DILITHIUM_LEVEL3_PRV_KEY_SIZE \
|
|
129
|
+
(DILITHIUM_LEVEL3_PUB_KEY_SIZE + DILITHIUM_LEVEL3_KEY_SIZE)
|
|
130
|
+
/* Buffer sizes large enough to store exported DER encoded keys */
|
|
131
|
+
#define DILITHIUM_LEVEL3_PUB_KEY_DER_SIZE 1974
|
|
132
|
+
#define DILITHIUM_LEVEL3_PRV_KEY_DER_SIZE 4060
|
|
133
|
+
#define DILITHIUM_LEVEL3_BOTH_KEY_DER_SIZE 6016
|
|
134
|
+
/* PEM size with the header "-----BEGIN PRIVATE KEY-----" and
|
|
135
|
+
* the footer "-----END PRIVATE KEY-----" */
|
|
136
|
+
#define DILITHIUM_LEVEL3_BOTH_KEY_PEM_SIZE 8204
|
|
137
|
+
|
|
138
|
+
#define DILITHIUM_LEVEL5_KEY_SIZE 4896
|
|
139
|
+
#define DILITHIUM_LEVEL5_SIG_SIZE 4627
|
|
140
|
+
#define DILITHIUM_LEVEL5_PUB_KEY_SIZE 2592
|
|
141
|
+
#define DILITHIUM_LEVEL5_PRV_KEY_SIZE \
|
|
142
|
+
(DILITHIUM_LEVEL5_PUB_KEY_SIZE + DILITHIUM_LEVEL5_KEY_SIZE)
|
|
143
|
+
/* Buffer sizes large enough to store exported DER encoded keys */
|
|
144
|
+
#define DILITHIUM_LEVEL5_PUB_KEY_DER_SIZE 2614
|
|
145
|
+
#define DILITHIUM_LEVEL5_PRV_KEY_DER_SIZE 4924
|
|
146
|
+
#define DILITHIUM_LEVEL5_BOTH_KEY_DER_SIZE 7520
|
|
147
|
+
/* PEM size with the header "-----BEGIN ML_DSA_LEVEL5 PRIVATE KEY-----" and
|
|
148
|
+
* the footer "-----END ML_DSA_LEVEL5 PRIVATE KEY-----" */
|
|
149
|
+
#define DILITHIUM_LEVEL5_BOTH_KEY_PEM_SIZE 10267
|
|
150
|
+
|
|
151
|
+
#define ML_DSA_LEVEL2_KEY_SIZE 2560
|
|
152
|
+
#define ML_DSA_LEVEL2_SIG_SIZE 2420
|
|
153
|
+
#define ML_DSA_LEVEL2_PUB_KEY_SIZE 1312
|
|
154
|
+
#define ML_DSA_LEVEL2_PRV_KEY_SIZE \
|
|
155
|
+
(ML_DSA_LEVEL2_PUB_KEY_SIZE + ML_DSA_LEVEL2_KEY_SIZE)
|
|
156
|
+
/* Buffer sizes large enough to store exported DER encoded keys */
|
|
157
|
+
#define ML_DSA_LEVEL2_PUB_KEY_DER_SIZE DILITHIUM_LEVEL2_PUB_KEY_DER_SIZE
|
|
158
|
+
#define ML_DSA_LEVEL2_PRV_KEY_DER_SIZE DILITHIUM_LEVEL2_PRV_KEY_DER_SIZE
|
|
159
|
+
#define ML_DSA_LEVEL2_BOTH_KEY_DER_SIZE DILITHIUM_LEVEL2_BOTH_KEY_DER_SIZE
|
|
160
|
+
/* PEM size with the header "-----BEGIN PRIVATE KEY-----" and
|
|
161
|
+
* the footer "-----END PRIVATE KEY-----" */
|
|
162
|
+
#define ML_DSA_LEVEL2_BOTH_KEY_PEM_SIZE DILITHIUM_LEVEL2_BOTH_KEY_PEM_SIZE
|
|
163
|
+
|
|
164
|
+
#define ML_DSA_LEVEL3_KEY_SIZE 4032
|
|
165
|
+
#define ML_DSA_LEVEL3_SIG_SIZE 3309
|
|
166
|
+
#define ML_DSA_LEVEL3_PUB_KEY_SIZE 1952
|
|
167
|
+
#define ML_DSA_LEVEL3_PRV_KEY_SIZE \
|
|
168
|
+
(ML_DSA_LEVEL3_PUB_KEY_SIZE + ML_DSA_LEVEL3_KEY_SIZE)
|
|
169
|
+
/* Buffer sizes large enough to store exported DER encoded keys */
|
|
170
|
+
#define ML_DSA_LEVEL3_PUB_KEY_DER_SIZE DILITHIUM_LEVEL3_PUB_KEY_DER_SIZE
|
|
171
|
+
#define ML_DSA_LEVEL3_PRV_KEY_DER_SIZE DILITHIUM_LEVEL3_PRV_KEY_DER_SIZE
|
|
172
|
+
#define ML_DSA_LEVEL3_BOTH_KEY_DER_SIZE DILITHIUM_LEVEL3_BOTH_KEY_DER_SIZE
|
|
173
|
+
/* PEM size with the header "-----BEGIN PRIVATE KEY-----" and
|
|
174
|
+
* the footer "-----END PRIVATE KEY-----" */
|
|
175
|
+
#define ML_DSA_LEVEL3_BOTH_KEY_PEM_SIZE DILITHIUM_LEVEL3_BOTH_KEY_PEM_SIZE
|
|
176
|
+
|
|
177
|
+
#define ML_DSA_LEVEL5_KEY_SIZE 4896
|
|
178
|
+
#define ML_DSA_LEVEL5_SIG_SIZE 4627
|
|
179
|
+
#define ML_DSA_LEVEL5_PUB_KEY_SIZE 2592
|
|
180
|
+
#define ML_DSA_LEVEL5_PRV_KEY_SIZE \
|
|
181
|
+
(ML_DSA_LEVEL5_PUB_KEY_SIZE + ML_DSA_LEVEL5_KEY_SIZE)
|
|
182
|
+
/* Buffer sizes large enough to store exported DER encoded keys */
|
|
183
|
+
#define ML_DSA_LEVEL5_PUB_KEY_DER_SIZE DILITHIUM_LEVEL5_PUB_KEY_DER_SIZE
|
|
184
|
+
#define ML_DSA_LEVEL5_PRV_KEY_DER_SIZE DILITHIUM_LEVEL5_PRV_KEY_DER_SIZE
|
|
185
|
+
#define ML_DSA_LEVEL5_BOTH_KEY_DER_SIZE DILITHIUM_LEVEL5_BOTH_KEY_DER_SIZE
|
|
186
|
+
/* PEM size with the header "-----BEGIN ML_DSA_LEVEL5 PRIVATE KEY-----" and
|
|
187
|
+
* the footer "-----END ML_DSA_LEVEL5 PRIVATE KEY-----" */
|
|
188
|
+
#define ML_DSA_LEVEL5_BOTH_KEY_PEM_SIZE DILITHIUM_LEVEL5_BOTH_KEY_PEM_SIZE
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
/* Modulus. */
|
|
193
|
+
#define DILITHIUM_Q 0x7fe001
|
|
194
|
+
/* Number of bits in modulus. */
|
|
195
|
+
#define DILITHIUM_Q_BITS 23
|
|
196
|
+
/* Number of elements in polynomial. */
|
|
197
|
+
#define DILITHIUM_N 256
|
|
198
|
+
#define MLDSA_N 256
|
|
199
|
+
|
|
200
|
+
/* Number of dropped bits. */
|
|
201
|
+
#define DILITHIUM_D 13
|
|
202
|
+
/* Maximum value of dropped bits. */
|
|
203
|
+
#define DILITHIUM_D_MAX (1 << DILITHIUM_D)
|
|
204
|
+
/* Half maximum value. */
|
|
205
|
+
#define DILITHIUM_D_MAX_HALF (1 << (DILITHIUM_D - 1))
|
|
206
|
+
/* Number of undropped bits. */
|
|
207
|
+
#define DILITHIUM_U (DILITHIUM_Q_BITS - DILITHIUM_D)
|
|
208
|
+
|
|
209
|
+
/* Bits in coefficient range of y, GAMMA1, of 2^17 is 17. */
|
|
210
|
+
#define DILITHIUM_GAMMA1_BITS_17 17
|
|
211
|
+
/* Coefficient range of y, GAMMA1, of 2^17. */
|
|
212
|
+
#define DILITHIUM_GAMMA1_17 (1 << 17)
|
|
213
|
+
/* # encoding bits of y is GAMMA1 + 1. */
|
|
214
|
+
#define DILITHIUM_GAMMA1_17_ENC_BITS 18
|
|
215
|
+
/* Coefficient range of y, GAMMA1, of 2^17. */
|
|
216
|
+
/* Bits in coefficient range of y, GAMMA1, of 2^19 is 19. */
|
|
217
|
+
#define DILITHIUM_GAMMA1_BITS_19 19
|
|
218
|
+
/* Coefficient range of y, GAMMA1, of 2^19. */
|
|
219
|
+
#define DILITHIUM_GAMMA1_19 (1 << 19)
|
|
220
|
+
/* # encoding bits of y is GAMMA1 + 1. */
|
|
221
|
+
#define DILITHIUM_GAMMA1_19_ENC_BITS 20
|
|
222
|
+
|
|
223
|
+
/* Low-order rounding range, GAMMA2, is Q divided by 88. */
|
|
224
|
+
#define DILITHIUM_Q_LOW_88 ((DILITHIUM_Q - 1) / 88)
|
|
225
|
+
/* Absolute low-order rounding range, GAMMA2, is Q divided by 88. */
|
|
226
|
+
#define DILITHIUM_Q_LOW_88_2 (((DILITHIUM_Q - 1) / 88) * 2)
|
|
227
|
+
/* # encoding bits of w1 when range is 88. */
|
|
228
|
+
#define DILITHIUM_Q_HI_88_ENC_BITS 6
|
|
229
|
+
/* Low-order rounding range, GAMMA2, is Q divided by 32. */
|
|
230
|
+
#define DILITHIUM_Q_LOW_32 ((DILITHIUM_Q - 1) / 32)
|
|
231
|
+
/* Absolute low-order rounding range, GAMMA2, is Q divided by 32. */
|
|
232
|
+
#define DILITHIUM_Q_LOW_32_2 (((DILITHIUM_Q - 1) / 32) * 2)
|
|
233
|
+
/* # encoding bits of w1 when range is 32. */
|
|
234
|
+
#define DILITHIUM_Q_HI_32_ENC_BITS 4
|
|
235
|
+
|
|
236
|
+
/* Private key range, eta, of 2. */
|
|
237
|
+
#define DILITHIUM_ETA_2 2
|
|
238
|
+
/* Bits needed to encode values in range -2..2 as a positive number. */
|
|
239
|
+
#define DILITHIUM_ETA_2_BITS 3
|
|
240
|
+
/* Extract count of valid values. */
|
|
241
|
+
#define DILITHIUM_ETA_2_MOD 15
|
|
242
|
+
/* Private key range, eta, of 4. */
|
|
243
|
+
#define DILITHIUM_ETA_4 4
|
|
244
|
+
/* Bits needed to encode values in range -4..4 as a positive number. */
|
|
245
|
+
#define DILITHIUM_ETA_4_BITS 4
|
|
246
|
+
/* Extract count of valid values. */
|
|
247
|
+
#define DILITHIUM_ETA_4_MOD 9
|
|
248
|
+
|
|
249
|
+
/* Number of bytes in a polynomial in memory. */
|
|
250
|
+
#define DILITHIUM_POLY_SIZE (DILITHIUM_N * sizeof(sword32))
|
|
251
|
+
|
|
252
|
+
#ifndef WOLFSSL_NO_ML_DSA_44
|
|
253
|
+
|
|
254
|
+
/* Fist dimension of A, k, for ML-DSA-44. */
|
|
255
|
+
#define PARAMS_ML_DSA_44_K 4
|
|
256
|
+
/* Second dimension of A, l, for ML-DSA-44. */
|
|
257
|
+
#define PARAMS_ML_DSA_44_L 4
|
|
258
|
+
/* Private key range, ETA, for ML-DSA-44. */
|
|
259
|
+
#define PARAMS_ML_DSA_44_ETA DILITHIUM_ETA_2
|
|
260
|
+
/* Number of bits in private key for ML-DSA-44. */
|
|
261
|
+
#define PARAMS_ML_DSA_44_ETA_BITS DILITHIUM_ETA_2_BITS
|
|
262
|
+
/* Collision strength of c-tilde, LAMBDA, in bits for ML-DSA-44. */
|
|
263
|
+
#define PARAMS_ML_DSA_44_LAMBDA 128
|
|
264
|
+
/* # +/-1's in polynomial c, TAU, for ML-DSA-44. */
|
|
265
|
+
#define PARAMS_ML_DSA_44_TAU 39
|
|
266
|
+
/* BETA = TAU * ETA for ML-DSA-44. */
|
|
267
|
+
#define PARAMS_ML_DSA_44_BETA \
|
|
268
|
+
(PARAMS_ML_DSA_44_TAU * PARAMS_ML_DSA_44_ETA)
|
|
269
|
+
/* Max # 1's in the hint h, OMEGA, for ML-DSA-44. */
|
|
270
|
+
#define PARAMS_ML_DSA_44_OMEGA 80
|
|
271
|
+
/* Bits in coefficient range of y, GAMMA1, for ML-DSA-44. */
|
|
272
|
+
#define PARAMS_ML_DSA_44_GAMMA1_BITS DILITHIUM_GAMMA1_BITS_17
|
|
273
|
+
/* Ccoefficient range of y, GAMMA1, for ML-DSA-44. */
|
|
274
|
+
#define PARAMS_ML_DSA_44_GAMMA1 (1 << PARAMS_ML_DSA_44_GAMMA1_BITS)
|
|
275
|
+
/* Low-order rounding range, GAMMA2, for ML-DSA-44. */
|
|
276
|
+
#define PARAMS_ML_DSA_44_GAMMA2 DILITHIUM_Q_LOW_88
|
|
277
|
+
/* Bits in high-order rounding range, GAMMA2, for ML-DSA-44. */
|
|
278
|
+
#define PARAMS_ML_DSA_44_GAMMA2_HI_BITS 6
|
|
279
|
+
/* Encoding size of w1 in bytes for ML-DSA-44.
|
|
280
|
+
* K * N / 8 * 6 - 6 bits as max value is 43 in high bits. */
|
|
281
|
+
#define PARAMS_ML_DSA_44_W1_ENC_SZ \
|
|
282
|
+
(PARAMS_ML_DSA_44_K * DILITHIUM_N / 8 * PARAMS_ML_DSA_44_GAMMA2_HI_BITS)
|
|
283
|
+
/* Size of memory used for matrix a in bytes for ML-DSA-44. */
|
|
284
|
+
#define PARAMS_ML_DSA_44_A_SIZE \
|
|
285
|
+
(PARAMS_ML_DSA_44_K * PARAMS_ML_DSA_44_L * DILITHIUM_POLY_SIZE)
|
|
286
|
+
/* Size of memory used for vector s1 in bytes for ML-DSA-44. */
|
|
287
|
+
#define PARAMS_ML_DSA_44_S1_SIZE \
|
|
288
|
+
(PARAMS_ML_DSA_44_L * DILITHIUM_POLY_SIZE)
|
|
289
|
+
/* Encoding size of s1 in bytes for ML-DSA-44. */
|
|
290
|
+
#define PARAMS_ML_DSA_44_S1_ENC_SIZE \
|
|
291
|
+
(PARAMS_ML_DSA_44_S1_SIZE / sizeof(sword32) * PARAMS_ML_DSA_44_ETA_BITS / 8)
|
|
292
|
+
/* Size of memory used for vector s2 in bytes for ML-DSA-44. */
|
|
293
|
+
#define PARAMS_ML_DSA_44_S2_SIZE \
|
|
294
|
+
(PARAMS_ML_DSA_44_K * DILITHIUM_POLY_SIZE)
|
|
295
|
+
/* Encoding size of s2 in bytes for ML-DSA-44. */
|
|
296
|
+
#define PARAMS_ML_DSA_44_S2_ENC_SIZE \
|
|
297
|
+
(PARAMS_ML_DSA_44_S2_SIZE / sizeof(sword32) * PARAMS_ML_DSA_44_ETA_BITS / 8)
|
|
298
|
+
/* Encoding size of z in bytes for ML-DSA-44. */
|
|
299
|
+
#define PARAMS_ML_DSA_44_Z_ENC_SIZE \
|
|
300
|
+
(PARAMS_ML_DSA_44_S1_SIZE / sizeof(sword32) / 8 * \
|
|
301
|
+
(PARAMS_ML_DSA_44_GAMMA1_BITS + 1))
|
|
302
|
+
/* Encoding size of public key in bytes for ML-DSA-44. */
|
|
303
|
+
#define PARAMS_ML_DSA_44_PK_SIZE \
|
|
304
|
+
(DILITHIUM_PUB_SEED_SZ + PARAMS_ML_DSA_44_K * DILITHIUM_N * DILITHIUM_U / 8)
|
|
305
|
+
/* Encoding size of signature in bytes for ML-DSA-44. */
|
|
306
|
+
#define PARAMS_ML_DSA_44_SIG_SIZE \
|
|
307
|
+
((PARAMS_ML_DSA_44_LAMBDA / 4) + \
|
|
308
|
+
PARAMS_ML_DSA_44_L * DILITHIUM_N/8 * (PARAMS_ML_DSA_44_GAMMA1_BITS + 1) + \
|
|
309
|
+
PARAMS_ML_DSA_44_OMEGA + PARAMS_ML_DSA_44_K)
|
|
310
|
+
|
|
311
|
+
#endif /* WOLFSSL_NO_ML_DSA_44 */
|
|
312
|
+
|
|
313
|
+
#ifndef WOLFSSL_NO_ML_DSA_65
|
|
314
|
+
|
|
315
|
+
/* Fist dimension of A, k, for ML-DSA-65. */
|
|
316
|
+
#define PARAMS_ML_DSA_65_K 6
|
|
317
|
+
/* Second dimension of A, l, for ML-DSA-65. */
|
|
318
|
+
#define PARAMS_ML_DSA_65_L 5
|
|
319
|
+
/* Private key range, ETA, for ML-DSA-65. */
|
|
320
|
+
#define PARAMS_ML_DSA_65_ETA DILITHIUM_ETA_4
|
|
321
|
+
/* Number of bits in private key for ML-DSA-65. */
|
|
322
|
+
#define PARAMS_ML_DSA_65_ETA_BITS DILITHIUM_ETA_4_BITS
|
|
323
|
+
/* Collision strength of c-tilde, LAMBDA, in bits for ML-DSA-65. */
|
|
324
|
+
#define PARAMS_ML_DSA_65_LAMBDA 192
|
|
325
|
+
/* # +/-1's in polynomial c, TAU, for ML-DSA-65. */
|
|
326
|
+
#define PARAMS_ML_DSA_65_TAU 49
|
|
327
|
+
/* BETA = TAU * ETA for ML-DSA-65. */
|
|
328
|
+
#define PARAMS_ML_DSA_65_BETA \
|
|
329
|
+
(PARAMS_ML_DSA_65_TAU * PARAMS_ML_DSA_65_ETA)
|
|
330
|
+
/* Max # 1's in the hint h, OMEGA, for ML-DSA-65. */
|
|
331
|
+
#define PARAMS_ML_DSA_65_OMEGA 55
|
|
332
|
+
/* Bits in coefficient range of y, GAMMA1, for ML-DSA-65. */
|
|
333
|
+
#define PARAMS_ML_DSA_65_GAMMA1_BITS DILITHIUM_GAMMA1_BITS_19
|
|
334
|
+
/* Ccoefficient range of y, GAMMA1, for ML-DSA-65. */
|
|
335
|
+
#define PARAMS_ML_DSA_65_GAMMA1 (1 << PARAMS_ML_DSA_65_GAMMA1_BITS)
|
|
336
|
+
/* Low-order rounding range, GAMMA2, for ML-DSA-65. */
|
|
337
|
+
#define PARAMS_ML_DSA_65_GAMMA2 DILITHIUM_Q_LOW_32
|
|
338
|
+
/* Bits in high-order rounding range, GAMMA2, for ML-DSA-65. */
|
|
339
|
+
#define PARAMS_ML_DSA_65_GAMMA2_HI_BITS 4
|
|
340
|
+
/* Encoding size of w1 in bytes for ML-DSA-65.
|
|
341
|
+
* K * N / 8 * 4 - 4 bits as max value is 15 in high bits. */
|
|
342
|
+
#define PARAMS_ML_DSA_65_W1_ENC_SZ \
|
|
343
|
+
(PARAMS_ML_DSA_65_K * DILITHIUM_N / 8 * PARAMS_ML_DSA_65_GAMMA2_HI_BITS)
|
|
344
|
+
/* Size of memory used for matrix a in bytes for ML-DSA-65. */
|
|
345
|
+
#define PARAMS_ML_DSA_65_A_SIZE \
|
|
346
|
+
(PARAMS_ML_DSA_65_K * PARAMS_ML_DSA_65_L * DILITHIUM_POLY_SIZE)
|
|
347
|
+
/* Size of memory used for vector s1 in bytes for ML-DSA-65. */
|
|
348
|
+
#define PARAMS_ML_DSA_65_S1_SIZE \
|
|
349
|
+
(PARAMS_ML_DSA_65_L * DILITHIUM_POLY_SIZE)
|
|
350
|
+
/* Encoding size of s1 in bytes for ML-DSA-65. */
|
|
351
|
+
#define PARAMS_ML_DSA_65_S1_ENC_SIZE \
|
|
352
|
+
(PARAMS_ML_DSA_65_S1_SIZE / sizeof(sword32) * PARAMS_ML_DSA_65_ETA_BITS / 8)
|
|
353
|
+
/* Size of memory used for vector s2 in bytes for ML-DSA-65. */
|
|
354
|
+
#define PARAMS_ML_DSA_65_S2_SIZE \
|
|
355
|
+
(PARAMS_ML_DSA_65_K * DILITHIUM_POLY_SIZE)
|
|
356
|
+
/* Encoding size of s2 in bytes for ML-DSA-65. */
|
|
357
|
+
#define PARAMS_ML_DSA_65_S2_ENC_SIZE \
|
|
358
|
+
(PARAMS_ML_DSA_65_S2_SIZE / sizeof(sword32) * PARAMS_ML_DSA_65_ETA_BITS / 8)
|
|
359
|
+
/* Encoding size of z in bytes for ML-DSA-65. */
|
|
360
|
+
#define PARAMS_ML_DSA_65_Z_ENC_SIZE \
|
|
361
|
+
(PARAMS_ML_DSA_65_S1_SIZE / sizeof(sword32) / 8 * \
|
|
362
|
+
(PARAMS_ML_DSA_65_GAMMA1_BITS + 1))
|
|
363
|
+
/* Encoding size of public key in bytes for ML-DSA-65. */
|
|
364
|
+
#define PARAMS_ML_DSA_65_PK_SIZE \
|
|
365
|
+
(DILITHIUM_PUB_SEED_SZ + PARAMS_ML_DSA_65_K * DILITHIUM_N * DILITHIUM_U / 8)
|
|
366
|
+
/* Encoding size of signature in bytes for ML-DSA-65. */
|
|
367
|
+
#define PARAMS_ML_DSA_65_SIG_SIZE \
|
|
368
|
+
((PARAMS_ML_DSA_65_LAMBDA / 4) + \
|
|
369
|
+
PARAMS_ML_DSA_65_L * DILITHIUM_N/8 * (PARAMS_ML_DSA_65_GAMMA1_BITS + 1) + \
|
|
370
|
+
PARAMS_ML_DSA_65_OMEGA + PARAMS_ML_DSA_65_K)
|
|
371
|
+
|
|
372
|
+
#endif /* WOLFSSL_NO_ML_DSA_65 */
|
|
373
|
+
|
|
374
|
+
#ifndef WOLFSSL_NO_ML_DSA_87
|
|
375
|
+
|
|
376
|
+
/* Fist dimension of A, k, for ML-DSA-87. */
|
|
377
|
+
#define PARAMS_ML_DSA_87_K 8
|
|
378
|
+
/* Second dimension of A, l, for ML-DSA-87. */
|
|
379
|
+
#define PARAMS_ML_DSA_87_L 7
|
|
380
|
+
/* Private key range, ETA, for ML-DSA-87. */
|
|
381
|
+
#define PARAMS_ML_DSA_87_ETA DILITHIUM_ETA_2
|
|
382
|
+
/* Number of bits in private key for ML-DSA-87. */
|
|
383
|
+
#define PARAMS_ML_DSA_87_ETA_BITS DILITHIUM_ETA_2_BITS
|
|
384
|
+
/* Collision strength of c-tilde, LAMBDA, in bits for ML-DSA-87. */
|
|
385
|
+
#define PARAMS_ML_DSA_87_LAMBDA 256
|
|
386
|
+
/* # +/-1's in polynomial c, TAU, for ML-DSA-87. */
|
|
387
|
+
#define PARAMS_ML_DSA_87_TAU 60
|
|
388
|
+
/* BETA = TAU * ETA for ML-DSA-87. */
|
|
389
|
+
#define PARAMS_ML_DSA_87_BETA \
|
|
390
|
+
(PARAMS_ML_DSA_87_TAU * PARAMS_ML_DSA_87_ETA)
|
|
391
|
+
/* Max # 1's in the hint h, OMEGA, for ML-DSA-87. */
|
|
392
|
+
#define PARAMS_ML_DSA_87_OMEGA 75
|
|
393
|
+
/* Bits in coefficient range of y, GAMMA1, for ML-DSA-87. */
|
|
394
|
+
#define PARAMS_ML_DSA_87_GAMMA1_BITS DILITHIUM_GAMMA1_BITS_19
|
|
395
|
+
/* Ccoefficient range of y, GAMMA1, for ML-DSA-87. */
|
|
396
|
+
#define PARAMS_ML_DSA_87_GAMMA1 (1 << PARAMS_ML_DSA_87_GAMMA1_BITS)
|
|
397
|
+
/* Low-order rounding range, GAMMA2, for ML-DSA-87. */
|
|
398
|
+
#define PARAMS_ML_DSA_87_GAMMA2 DILITHIUM_Q_LOW_32
|
|
399
|
+
/* Bits in high-order rounding range, GAMMA2, for ML-DSA-87. */
|
|
400
|
+
#define PARAMS_ML_DSA_87_GAMMA2_HI_BITS 4
|
|
401
|
+
/* Encoding size of w1 in bytes for ML-DSA-87.
|
|
402
|
+
* K * N / 8 * 4 - 4 bits as max value is 15 in high bits. */
|
|
403
|
+
#define PARAMS_ML_DSA_87_W1_ENC_SZ \
|
|
404
|
+
(PARAMS_ML_DSA_87_K * DILITHIUM_N / 8 * PARAMS_ML_DSA_87_GAMMA2_HI_BITS)
|
|
405
|
+
/* Size of memory used for matrix A in bytes for ML-DSA-87. */
|
|
406
|
+
#define PARAMS_ML_DSA_87_A_SIZE \
|
|
407
|
+
(PARAMS_ML_DSA_87_K * PARAMS_ML_DSA_87_L * DILITHIUM_POLY_SIZE)
|
|
408
|
+
#define PARAMS_ML_DSA_87_S_SIZE 4
|
|
409
|
+
/* Size of memory used for vector s1 in bytes for ML-DSA-87. */
|
|
410
|
+
#define PARAMS_ML_DSA_87_S1_SIZE \
|
|
411
|
+
(PARAMS_ML_DSA_87_L * DILITHIUM_POLY_SIZE)
|
|
412
|
+
/* Encoding size of s1 in bytes for ML-DSA-87. */
|
|
413
|
+
#define PARAMS_ML_DSA_87_S1_ENC_SIZE \
|
|
414
|
+
(PARAMS_ML_DSA_87_S1_SIZE / sizeof(sword32) * PARAMS_ML_DSA_87_ETA_BITS / 8)
|
|
415
|
+
/* Size of memory used for vector s2 in bytes for ML-DSA-87. */
|
|
416
|
+
#define PARAMS_ML_DSA_87_S2_SIZE \
|
|
417
|
+
(PARAMS_ML_DSA_87_K * DILITHIUM_POLY_SIZE)
|
|
418
|
+
/* Encoding size of s2 in bytes for ML-DSA-87. */
|
|
419
|
+
#define PARAMS_ML_DSA_87_S2_ENC_SIZE \
|
|
420
|
+
(PARAMS_ML_DSA_87_S2_SIZE / sizeof(sword32) * PARAMS_ML_DSA_87_ETA_BITS / 8)
|
|
421
|
+
/* Encoding size of z in bytes for ML-DSA-87. */
|
|
422
|
+
#define PARAMS_ML_DSA_87_Z_ENC_SIZE \
|
|
423
|
+
(PARAMS_ML_DSA_87_S1_SIZE / sizeof(sword32) / 8 * \
|
|
424
|
+
(PARAMS_ML_DSA_87_GAMMA1_BITS + 1))
|
|
425
|
+
/* Encoding size of public key in bytes for ML-DSA-87. */
|
|
426
|
+
#define PARAMS_ML_DSA_87_PK_SIZE \
|
|
427
|
+
(DILITHIUM_PUB_SEED_SZ + PARAMS_ML_DSA_87_K * DILITHIUM_N * DILITHIUM_U / 8)
|
|
428
|
+
/* Encoding size of signature in bytes for ML-DSA-87. */
|
|
429
|
+
#define PARAMS_ML_DSA_87_SIG_SIZE \
|
|
430
|
+
((PARAMS_ML_DSA_87_LAMBDA / 4) + \
|
|
431
|
+
PARAMS_ML_DSA_87_L * DILITHIUM_N/8 * (PARAMS_ML_DSA_87_GAMMA1_BITS + 1) + \
|
|
432
|
+
PARAMS_ML_DSA_87_OMEGA + PARAMS_ML_DSA_87_K)
|
|
433
|
+
|
|
434
|
+
#endif /* WOLFSSL_NO_ML_DSA_87 */
|
|
435
|
+
|
|
436
|
+
|
|
437
|
+
#ifndef WOLFSSL_NO_ML_DSA_87
|
|
438
|
+
|
|
439
|
+
#define DILITHIUM_MAX_W1_ENC_SZ PARAMS_ML_DSA_87_W1_ENC_SZ
|
|
440
|
+
/* Maximum collision strength of c-tilde in bytes. */
|
|
441
|
+
#define DILITHIUM_MAX_LAMBDA PARAMS_ML_DSA_87_LAMBDA
|
|
442
|
+
|
|
443
|
+
/* Maximum count of elements of a vector with dimension K. */
|
|
444
|
+
#define DILITHIUM_MAX_K_VECTOR_COUNT \
|
|
445
|
+
(PARAMS_ML_DSA_87_K * DILITHIUM_N)
|
|
446
|
+
/* Maximum count of elements of a vector with dimension L. */
|
|
447
|
+
#define DILITHIUM_MAX_L_VECTOR_COUNT \
|
|
448
|
+
(PARAMS_ML_DSA_87_L * DILITHIUM_N)
|
|
449
|
+
/* Maximum count of elements of a matrix with dimension KxL. */
|
|
450
|
+
#define DILITHIUM_MAX_MATRIX_COUNT \
|
|
451
|
+
(PARAMS_ML_DSA_87_K * PARAMS_ML_DSA_87_L * DILITHIUM_N)
|
|
452
|
+
|
|
453
|
+
#elif !defined(WOLFSSL_NO_ML_DSA_65)
|
|
454
|
+
|
|
455
|
+
/* Maximum w1 encoding size in bytes. */
|
|
456
|
+
#define DILITHIUM_MAX_W1_ENC_SZ PARAMS_ML_DSA_65_W1_ENC_SZ
|
|
457
|
+
/* Maximum collision strength of c-tilde in bytes. */
|
|
458
|
+
#define DILITHIUM_MAX_LAMBDA PARAMS_ML_DSA_65_LAMBDA
|
|
459
|
+
|
|
460
|
+
/* Maximum count of elements of a vector with dimension K. */
|
|
461
|
+
#define DILITHIUM_MAX_K_VECTOR_COUNT \
|
|
462
|
+
(PARAMS_ML_DSA_65_K * DILITHIUM_N)
|
|
463
|
+
/* Maximum count of elements of a vector with dimension L. */
|
|
464
|
+
#define DILITHIUM_MAX_L_VECTOR_COUNT \
|
|
465
|
+
(PARAMS_ML_DSA_65_L * DILITHIUM_N)
|
|
466
|
+
/* Maximum count of elements of a matrix with dimension KxL. */
|
|
467
|
+
#define DILITHIUM_MAX_MATRIX_COUNT \
|
|
468
|
+
(PARAMS_ML_DSA_65_K * PARAMS_ML_DSA_65_L * DILITHIUM_N)
|
|
469
|
+
|
|
470
|
+
#else
|
|
471
|
+
|
|
472
|
+
/* Maximum w1 encoding size in bytes. */
|
|
473
|
+
#define DILITHIUM_MAX_W1_ENC_SZ PARAMS_ML_DSA_44_W1_ENC_SZ
|
|
474
|
+
/* Maximum collision strength of c-tilde in bytes. */
|
|
475
|
+
#define DILITHIUM_MAX_LAMBDA PARAMS_ML_DSA_44_LAMBDA
|
|
476
|
+
|
|
477
|
+
/* Maximum count of elements of a vector with dimension K. */
|
|
478
|
+
#define DILITHIUM_MAX_K_VECTOR_COUNT \
|
|
479
|
+
(PARAMS_ML_DSA_44_K * DILITHIUM_N)
|
|
480
|
+
/* Maximum count of elements of a vector with dimension L. */
|
|
481
|
+
#define DILITHIUM_MAX_L_VECTOR_COUNT \
|
|
482
|
+
(PARAMS_ML_DSA_44_L * DILITHIUM_N)
|
|
483
|
+
/* Maximum count of elements of a matrix with dimension KxL. */
|
|
484
|
+
#define DILITHIUM_MAX_MATRIX_COUNT \
|
|
485
|
+
(PARAMS_ML_DSA_44_K * PARAMS_ML_DSA_44_L * DILITHIUM_N)
|
|
486
|
+
|
|
487
|
+
#endif
|
|
488
|
+
|
|
489
|
+
/* Length of K in bytes. */
|
|
490
|
+
#define DILITHIUM_K_SZ 32
|
|
491
|
+
/* Length of TR in bytes. */
|
|
492
|
+
#define DILITHIUM_TR_SZ 64
|
|
493
|
+
/* Length of public key seed in bytes when expanding a. */
|
|
494
|
+
#define DILITHIUM_PUB_SEED_SZ 32
|
|
495
|
+
/* Length of private key seed in bytes when generating a key. */
|
|
496
|
+
#define DILITHIUM_PRIV_SEED_SZ 64
|
|
497
|
+
|
|
498
|
+
/* Length of seed when creating vector c. */
|
|
499
|
+
#define DILITHIUM_SEED_SZ 32
|
|
500
|
+
/* Length of seeds created when making a key. */
|
|
501
|
+
#define DILITHIUM_SEEDS_SZ 128
|
|
502
|
+
|
|
503
|
+
/* Length of MU in bytes. */
|
|
504
|
+
#define DILITHIUM_MU_SZ 64
|
|
505
|
+
/* Length of random in bytes when generating a signature. */
|
|
506
|
+
#define DILITHIUM_RND_SZ 32
|
|
507
|
+
/* Length of private random in bytes when generating a signature. */
|
|
508
|
+
#define DILITHIUM_PRIV_RAND_SEED_SZ 64
|
|
509
|
+
|
|
510
|
+
/* 5 blocks, each block 21 * 8 bytes = 840 bytes.
|
|
511
|
+
* Minimum required is 256 * 3 = 768. */
|
|
512
|
+
#define DILITHIUM_GEN_A_NBLOCKS 5
|
|
513
|
+
/* Number of bytes to generate with Shake128 when generating A. */
|
|
514
|
+
#define DILITHIUM_GEN_A_BYTES \
|
|
515
|
+
(DILITHIUM_GEN_A_NBLOCKS * WC_SHA3_128_COUNT * 8)
|
|
516
|
+
/* Number of bytes to a block of SHAKE-128 when generating A. */
|
|
517
|
+
#define DILITHIUM_GEN_A_BLOCK_BYTES (WC_SHA3_128_COUNT * 8)
|
|
518
|
+
|
|
519
|
+
/* Number of bytes to a block of SHAKE-256 when generating c. */
|
|
520
|
+
#define DILITHIUM_GEN_C_BLOCK_BYTES (WC_SHA3_256_COUNT * 8)
|
|
521
|
+
|
|
522
|
+
|
|
523
|
+
#ifndef WOLFSSL_DILITHIUM_SMALL
|
|
524
|
+
#if defined(LITTLE_ENDIAN_ORDER) && (WOLFSSL_DILITHIUM_ALIGNMENT == 0)
|
|
525
|
+
/* A block SHAKE-128 output plus one for reading 4 bytes at a time. */
|
|
526
|
+
#define DILITHIUM_REJ_NTT_POLY_H_SIZE (DILITHIUM_GEN_A_BYTES + 1)
|
|
527
|
+
#else
|
|
528
|
+
/* A block SHAKE-128 output. */
|
|
529
|
+
#define DILITHIUM_REJ_NTT_POLY_H_SIZE DILITHIUM_GEN_A_BYTES
|
|
530
|
+
#endif /* LITTLE_ENDIAN_ORDER && WOLFSSL_DILITHIUM_ALIGNMENT == 0 */
|
|
531
|
+
#else
|
|
532
|
+
#if defined(LITTLE_ENDIAN_ORDER) && (WOLFSSL_DILITHIUM_ALIGNMENT == 0)
|
|
533
|
+
/* A block SHAKE-128 output plus one for reading 4 bytes at a time. */
|
|
534
|
+
#define DILITHIUM_REJ_NTT_POLY_H_SIZE (DILITHIUM_GEN_A_BLOCK_BYTES + 1)
|
|
535
|
+
#else
|
|
536
|
+
/* A block SHAKE-128 output. */
|
|
537
|
+
#define DILITHIUM_REJ_NTT_POLY_H_SIZE DILITHIUM_GEN_A_BLOCK_BYTES
|
|
538
|
+
#endif /* LITTLE_ENDIAN_ORDER && WOLFSSL_DILITHIUM_ALIGNMENT == 0 */
|
|
539
|
+
#endif
|
|
540
|
+
|
|
541
|
+
#elif defined(HAVE_LIBOQS)
|
|
542
|
+
|
|
543
|
+
#define DILITHIUM_LEVEL2_KEY_SIZE OQS_SIG_ml_dsa_44_ipd_length_secret_key
|
|
544
|
+
#define DILITHIUM_LEVEL2_SIG_SIZE OQS_SIG_ml_dsa_44_ipd_length_signature
|
|
545
|
+
#define DILITHIUM_LEVEL2_PUB_KEY_SIZE OQS_SIG_ml_dsa_44_ipd_length_public_key
|
|
546
|
+
#define DILITHIUM_LEVEL2_PRV_KEY_SIZE \
|
|
547
|
+
(DILITHIUM_LEVEL2_PUB_KEY_SIZE+DILITHIUM_LEVEL2_KEY_SIZE)
|
|
548
|
+
/* Buffer sizes large enough to store exported DER encoded keys */
|
|
549
|
+
#define DILITHIUM_LEVEL2_PUB_KEY_DER_SIZE 1334
|
|
550
|
+
#define DILITHIUM_LEVEL2_PRV_KEY_DER_SIZE 2588
|
|
551
|
+
#define DILITHIUM_LEVEL2_BOTH_KEY_DER_SIZE 3904
|
|
552
|
+
/* PEM size with the header "-----BEGIN PRIVATE KEY-----" and
|
|
553
|
+
* the footer "-----END PRIVATE KEY-----" */
|
|
554
|
+
#define DILITHIUM_LEVEL2_BOTH_KEY_PEM_SIZE 5344
|
|
555
|
+
|
|
556
|
+
#define DILITHIUM_LEVEL3_KEY_SIZE OQS_SIG_ml_dsa_65_ipd_length_secret_key
|
|
557
|
+
#define DILITHIUM_LEVEL3_SIG_SIZE OQS_SIG_ml_dsa_65_ipd_length_signature
|
|
558
|
+
#define DILITHIUM_LEVEL3_PUB_KEY_SIZE OQS_SIG_ml_dsa_65_ipd_length_public_key
|
|
559
|
+
#define DILITHIUM_LEVEL3_PRV_KEY_SIZE \
|
|
560
|
+
(DILITHIUM_LEVEL3_PUB_KEY_SIZE+DILITHIUM_LEVEL3_KEY_SIZE)
|
|
561
|
+
/* Buffer sizes large enough to store exported DER encoded keys */
|
|
562
|
+
#define DILITHIUM_LEVEL3_PUB_KEY_DER_SIZE 1974
|
|
563
|
+
#define DILITHIUM_LEVEL3_PRV_KEY_DER_SIZE 4060
|
|
564
|
+
#define DILITHIUM_LEVEL3_BOTH_KEY_DER_SIZE 6016
|
|
565
|
+
/* PEM size with the header "-----BEGIN PRIVATE KEY-----" and
|
|
566
|
+
* the footer "-----END PRIVATE KEY-----" */
|
|
567
|
+
#define DILITHIUM_LEVEL3_BOTH_KEY_PEM_SIZE 8204
|
|
568
|
+
|
|
569
|
+
#define DILITHIUM_LEVEL5_KEY_SIZE OQS_SIG_ml_dsa_87_ipd_length_secret_key
|
|
570
|
+
#define DILITHIUM_LEVEL5_SIG_SIZE OQS_SIG_ml_dsa_87_ipd_length_signature
|
|
571
|
+
#define DILITHIUM_LEVEL5_PUB_KEY_SIZE OQS_SIG_ml_dsa_87_ipd_length_public_key
|
|
572
|
+
#define DILITHIUM_LEVEL5_PRV_KEY_SIZE \
|
|
573
|
+
(DILITHIUM_LEVEL5_PUB_KEY_SIZE+DILITHIUM_LEVEL5_KEY_SIZE)
|
|
574
|
+
/* Buffer sizes large enough to store exported DER encoded keys */
|
|
575
|
+
#define DILITHIUM_LEVEL5_PUB_KEY_DER_SIZE 2614
|
|
576
|
+
#define DILITHIUM_LEVEL5_PRV_KEY_DER_SIZE 4924
|
|
577
|
+
#define DILITHIUM_LEVEL5_BOTH_KEY_DER_SIZE 7520
|
|
578
|
+
/* PEM size with the header "-----BEGIN ML_DSA_LEVEL5 PRIVATE KEY-----" and
|
|
579
|
+
* the footer "-----END ML_DSA_LEVEL5 PRIVATE KEY-----" */
|
|
580
|
+
#define DILITHIUM_LEVEL5_BOTH_KEY_PEM_SIZE 10267
|
|
581
|
+
|
|
582
|
+
#define ML_DSA_LEVEL2_KEY_SIZE OQS_SIG_ml_dsa_44_ipd_length_secret_key
|
|
583
|
+
#define ML_DSA_LEVEL2_SIG_SIZE OQS_SIG_ml_dsa_44_ipd_length_signature
|
|
584
|
+
#define ML_DSA_LEVEL2_PUB_KEY_SIZE OQS_SIG_ml_dsa_44_ipd_length_public_key
|
|
585
|
+
#define ML_DSA_LEVEL2_PRV_KEY_SIZE \
|
|
586
|
+
(ML_DSA_LEVEL2_PUB_KEY_SIZE+ML_DSA_LEVEL2_KEY_SIZE)
|
|
587
|
+
/* Buffer sizes large enough to store exported DER encoded keys */
|
|
588
|
+
#define ML_DSA_LEVEL2_PUB_KEY_DER_SIZE DILITHIUM_LEVEL2_PUB_KEY_DER_SIZE
|
|
589
|
+
#define ML_DSA_LEVEL2_PRV_KEY_DER_SIZE DILITHIUM_LEVEL2_PRV_KEY_DER_SIZE
|
|
590
|
+
#define ML_DSA_LEVEL2_BOTH_KEY_DER_SIZE DILITHIUM_LEVEL2_BOTH_KEY_DER_SIZE
|
|
591
|
+
/* PEM size with the header "-----BEGIN PRIVATE KEY-----" and
|
|
592
|
+
* the footer "-----END PRIVATE KEY-----" */
|
|
593
|
+
#define ML_DSA_LEVEL2_BOTH_KEY_PEM_SIZE DILITHIUM_LEVEL2_BOTH_KEY_PEM_SIZE
|
|
594
|
+
|
|
595
|
+
#define ML_DSA_LEVEL3_KEY_SIZE OQS_SIG_ml_dsa_65_ipd_length_secret_key
|
|
596
|
+
#define ML_DSA_LEVEL3_SIG_SIZE OQS_SIG_ml_dsa_65_ipd_length_signature
|
|
597
|
+
#define ML_DSA_LEVEL3_PUB_KEY_SIZE OQS_SIG_ml_dsa_65_ipd_length_public_key
|
|
598
|
+
#define ML_DSA_LEVEL3_PRV_KEY_SIZE \
|
|
599
|
+
(ML_DSA_LEVEL3_PUB_KEY_SIZE+ML_DSA_LEVEL3_KEY_SIZE)
|
|
600
|
+
/* Buffer sizes large enough to store exported DER encoded keys */
|
|
601
|
+
#define ML_DSA_LEVEL3_PUB_KEY_DER_SIZE DILITHIUM_LEVEL3_PUB_KEY_DER_SIZE
|
|
602
|
+
#define ML_DSA_LEVEL3_PRV_KEY_DER_SIZE DILITHIUM_LEVEL3_PRV_KEY_DER_SIZE
|
|
603
|
+
#define ML_DSA_LEVEL3_BOTH_KEY_DER_SIZE DILITHIUM_LEVEL3_BOTH_KEY_DER_SIZE
|
|
604
|
+
/* PEM size with the header "-----BEGIN PRIVATE KEY-----" and
|
|
605
|
+
* the footer "-----END PRIVATE KEY-----" */
|
|
606
|
+
#define ML_DSA_LEVEL3_BOTH_KEY_PEM_SIZE DILITHIUM_LEVEL3_BOTH_KEY_PEM_SIZE
|
|
607
|
+
|
|
608
|
+
#define ML_DSA_LEVEL5_KEY_SIZE OQS_SIG_ml_dsa_87_ipd_length_secret_key
|
|
609
|
+
#define ML_DSA_LEVEL5_SIG_SIZE OQS_SIG_ml_dsa_87_ipd_length_signature
|
|
610
|
+
#define ML_DSA_LEVEL5_PUB_KEY_SIZE OQS_SIG_ml_dsa_87_ipd_length_public_key
|
|
611
|
+
#define ML_DSA_LEVEL5_PRV_KEY_SIZE \
|
|
612
|
+
(ML_DSA_LEVEL5_PUB_KEY_SIZE+ML_DSA_LEVEL5_KEY_SIZE)
|
|
613
|
+
/* Buffer sizes large enough to store exported DER encoded keys */
|
|
614
|
+
#define ML_DSA_LEVEL5_PUB_KEY_DER_SIZE DILITHIUM_LEVEL5_PUB_KEY_DER_SIZE
|
|
615
|
+
#define ML_DSA_LEVEL5_PRV_KEY_DER_SIZE DILITHIUM_LEVEL5_PRV_KEY_DER_SIZE
|
|
616
|
+
#define ML_DSA_LEVEL5_BOTH_KEY_DER_SIZE DILITHIUM_LEVEL5_BOTH_KEY_DER_SIZE
|
|
617
|
+
/* PEM size with the header "-----BEGIN ML_DSA_LEVEL5 PRIVATE KEY-----" and
|
|
618
|
+
* the footer "-----END ML_DSA_LEVEL5 PRIVATE KEY-----" */
|
|
619
|
+
#define ML_DSA_LEVEL5_BOTH_KEY_PEM_SIZE DILITHIUM_LEVEL5_BOTH_KEY_PEM_SIZE
|
|
620
|
+
|
|
621
|
+
#endif
|
|
622
|
+
|
|
623
|
+
#define DILITHIUM_MAX_KEY_SIZE DILITHIUM_LEVEL5_KEY_SIZE
|
|
624
|
+
#define DILITHIUM_MAX_SIG_SIZE DILITHIUM_LEVEL5_SIG_SIZE
|
|
625
|
+
#define DILITHIUM_MAX_PUB_KEY_SIZE DILITHIUM_LEVEL5_PUB_KEY_SIZE
|
|
626
|
+
#define DILITHIUM_MAX_PRV_KEY_SIZE DILITHIUM_LEVEL5_PRV_KEY_SIZE
|
|
627
|
+
/* Buffer sizes large enough to store exported DER encoded keys */
|
|
628
|
+
#define DILITHIUM_MAX_PUB_KEY_DER_SIZE DILITHIUM_LEVEL5_PUB_KEY_DER_SIZE
|
|
629
|
+
#define DILITHIUM_MAX_PRV_KEY_DER_SIZE DILITHIUM_LEVEL5_PRV_KEY_DER_SIZE
|
|
630
|
+
#define DILITHIUM_MAX_BOTH_KEY_DER_SIZE DILITHIUM_LEVEL5_BOTH_KEY_DER_SIZE
|
|
631
|
+
/* PEM size with the header "-----BEGIN ML_DSA_LEVEL5 PRIVATE KEY-----" and
|
|
632
|
+
* the footer "-----END ML_DSA_LEVEL5 PRIVATE KEY-----" */
|
|
633
|
+
#define DILITHIUM_MAX_BOTH_KEY_PEM_SIZE DILITHIUM_LEVEL5_BOTH_KEY_PEM_SIZE
|
|
634
|
+
|
|
635
|
+
|
|
636
|
+
#ifdef WOLF_PRIVATE_KEY_ID
|
|
637
|
+
#define DILITHIUM_MAX_ID_LEN 32
|
|
638
|
+
#define DILITHIUM_MAX_LABEL_LEN 32
|
|
639
|
+
#endif
|
|
640
|
+
|
|
641
|
+
/* Structs */
|
|
642
|
+
|
|
643
|
+
#ifdef WOLFSSL_WC_DILITHIUM
|
|
644
|
+
typedef struct wc_dilithium_params {
|
|
645
|
+
byte level;
|
|
646
|
+
byte k;
|
|
647
|
+
byte l;
|
|
648
|
+
byte eta;
|
|
649
|
+
byte eta_bits;
|
|
650
|
+
byte tau;
|
|
651
|
+
byte beta;
|
|
652
|
+
byte omega;
|
|
653
|
+
word16 lambda;
|
|
654
|
+
byte gamma1_bits;
|
|
655
|
+
sword32 gamma2;
|
|
656
|
+
word32 w1EncSz;
|
|
657
|
+
word16 aSz;
|
|
658
|
+
word16 s1Sz;
|
|
659
|
+
word16 s1EncSz;
|
|
660
|
+
word16 s2Sz;
|
|
661
|
+
word16 s2EncSz;
|
|
662
|
+
word16 zEncSz;
|
|
663
|
+
word16 pkSz;
|
|
664
|
+
word16 sigSz;
|
|
665
|
+
} wc_dilithium_params;
|
|
666
|
+
#endif
|
|
667
|
+
|
|
668
|
+
struct dilithium_key {
|
|
669
|
+
byte pubKeySet;
|
|
670
|
+
byte prvKeySet;
|
|
671
|
+
byte level; /* 2,3 or 5 */
|
|
672
|
+
|
|
673
|
+
void* heap; /* heap hint */
|
|
674
|
+
|
|
675
|
+
#ifdef WOLF_CRYPTO_CB
|
|
676
|
+
void* devCtx;
|
|
677
|
+
int devId;
|
|
678
|
+
#endif
|
|
679
|
+
#ifdef WOLF_PRIVATE_KEY_ID
|
|
680
|
+
byte id[DILITHIUM_MAX_ID_LEN];
|
|
681
|
+
int idLen;
|
|
682
|
+
char label[DILITHIUM_MAX_LABEL_LEN];
|
|
683
|
+
int labelLen;
|
|
684
|
+
#endif
|
|
685
|
+
|
|
686
|
+
#ifndef WOLFSSL_DILITHIUM_ASSIGN_KEY
|
|
687
|
+
#ifdef USE_INTEL_SPEEDUP
|
|
688
|
+
byte p[DILITHIUM_MAX_PUB_KEY_SIZE+8];
|
|
689
|
+
byte k[DILITHIUM_MAX_KEY_SIZE+8];
|
|
690
|
+
#else
|
|
691
|
+
byte p[DILITHIUM_MAX_PUB_KEY_SIZE];
|
|
692
|
+
byte k[DILITHIUM_MAX_KEY_SIZE];
|
|
693
|
+
#endif
|
|
694
|
+
#else
|
|
695
|
+
const byte* p;
|
|
696
|
+
const byte* k;
|
|
697
|
+
#endif
|
|
698
|
+
|
|
699
|
+
#ifdef WOLFSSL_WC_DILITHIUM
|
|
700
|
+
const wc_dilithium_params* params;
|
|
701
|
+
wc_Shake shake;
|
|
702
|
+
#ifndef WC_DILITHIUM_FIXED_ARRAY
|
|
703
|
+
#ifdef WC_DILITHIUM_CACHE_MATRIX_A
|
|
704
|
+
sword32* a;
|
|
705
|
+
byte aSet;
|
|
706
|
+
#endif
|
|
707
|
+
#ifdef WC_DILITHIUM_CACHE_PRIV_VECTORS
|
|
708
|
+
sword32* s1;
|
|
709
|
+
sword32* s2;
|
|
710
|
+
sword32* t0;
|
|
711
|
+
byte privVecsSet;
|
|
712
|
+
#endif
|
|
713
|
+
#ifdef WC_DILITHIUM_CACHE_PUB_VECTORS
|
|
714
|
+
sword32* t1;
|
|
715
|
+
byte pubVecSet;
|
|
716
|
+
#endif
|
|
717
|
+
#else
|
|
718
|
+
#ifdef WC_DILITHIUM_CACHE_MATRIX_A
|
|
719
|
+
sword32 a[DILITHIUM_MAX_MATRIX_COUNT];
|
|
720
|
+
byte aSet;
|
|
721
|
+
#endif
|
|
722
|
+
#ifdef WC_DILITHIUM_CACHE_PRIV_VECTORS
|
|
723
|
+
sword32 s1[DILITHIUM_MAX_L_VECTOR_COUNT];
|
|
724
|
+
sword32 s2[DILITHIUM_MAX_K_VECTOR_COUNT];
|
|
725
|
+
sword32 t0[DILITHIUM_MAX_K_VECTOR_COUNT];
|
|
726
|
+
byte privVecsSet;
|
|
727
|
+
#endif
|
|
728
|
+
#ifdef WC_DILITHIUM_CACHE_PUB_VECTORS
|
|
729
|
+
sword32 t1[DILITHIUM_MAX_K_VECTOR_COUNT];
|
|
730
|
+
byte pubVecSet;
|
|
731
|
+
#endif
|
|
732
|
+
#endif
|
|
733
|
+
#if defined(WOLFSSL_DILITHIUM_VERIFY_NO_MALLOC) && \
|
|
734
|
+
defined(WOLFSSL_DILITHIUM_VERIFY_SMALL_MEM)
|
|
735
|
+
sword32 z[DILITHIUM_MAX_L_VECTOR_COUNT];
|
|
736
|
+
sword32 c[DILITHIUM_N];
|
|
737
|
+
sword32 w[DILITHIUM_N];
|
|
738
|
+
sword32 t1[DILITHIUM_N];
|
|
739
|
+
byte w1e[DILITHIUM_MAX_W1_ENC_SZ];
|
|
740
|
+
#ifdef WOLFSSL_DILITHIUM_SMALL_MEM_POLY64
|
|
741
|
+
sword64 t64[DILITHIUM_N];
|
|
742
|
+
#endif
|
|
743
|
+
byte h[DILITHIUM_REJ_NTT_POLY_H_SIZE];
|
|
744
|
+
byte block[DILITHIUM_GEN_C_BLOCK_BYTES];
|
|
745
|
+
#endif /* WOLFSSL_DILITHIUM_VERIFY_NO_MALLOC &&
|
|
746
|
+
* WOLFSSL_DILITHIUM_VERIFY_SMALL_MEM */
|
|
747
|
+
#endif /* WOLFSSL_WC_DILITHIUM */
|
|
748
|
+
};
|
|
749
|
+
|
|
750
|
+
#ifndef WC_DILITHIUMKEY_TYPE_DEFINED
|
|
751
|
+
typedef struct dilithium_key dilithium_key;
|
|
752
|
+
#define WC_DILITHIUMKEY_TYPE_DEFINED
|
|
753
|
+
#endif
|
|
754
|
+
|
|
755
|
+
/* Functions */
|
|
756
|
+
|
|
757
|
+
#ifndef WOLFSSL_DILITHIUM_VERIFY_ONLY
|
|
758
|
+
WOLFSSL_API
|
|
759
|
+
int wc_dilithium_make_key(dilithium_key* key, WC_RNG* rng);
|
|
760
|
+
WOLFSSL_API
|
|
761
|
+
int wc_dilithium_make_key_from_seed(dilithium_key* key, const byte* seed);
|
|
762
|
+
|
|
763
|
+
WOLFSSL_API
|
|
764
|
+
int wc_dilithium_sign_msg(const byte* msg, word32 msgLen, byte* sig,
|
|
765
|
+
word32* sigLen, dilithium_key* key, WC_RNG* rng);
|
|
766
|
+
WOLFSSL_API
|
|
767
|
+
int wc_dilithium_sign_ctx_msg(const byte* ctx, byte ctxLen, const byte* msg,
|
|
768
|
+
word32 msgLen, byte* sig, word32* sigLen, dilithium_key* key, WC_RNG* rng);
|
|
769
|
+
WOLFSSL_API
|
|
770
|
+
int wc_dilithium_sign_ctx_hash(const byte* ctx, byte ctxLen, int hashAlg,
|
|
771
|
+
const byte* hash, word32 hashLen, byte* sig, word32* sigLen,
|
|
772
|
+
dilithium_key* key, WC_RNG* rng);
|
|
773
|
+
WOLFSSL_API
|
|
774
|
+
int wc_dilithium_sign_msg_with_seed(const byte* msg, word32 msgLen, byte* sig,
|
|
775
|
+
word32 *sigLen, dilithium_key* key, const byte* seed);
|
|
776
|
+
WOLFSSL_API
|
|
777
|
+
int wc_dilithium_sign_ctx_msg_with_seed(const byte* ctx, byte ctxLen,
|
|
778
|
+
const byte* msg, word32 msgLen, byte* sig, word32 *sigLen,
|
|
779
|
+
dilithium_key* key, const byte* seed);
|
|
780
|
+
WOLFSSL_API
|
|
781
|
+
int wc_dilithium_sign_ctx_hash_with_seed(const byte* ctx, byte ctxLen,
|
|
782
|
+
int hashAlg, const byte* hash, word32 hashLen, byte* sig, word32 *sigLen,
|
|
783
|
+
dilithium_key* key, const byte* seed);
|
|
784
|
+
#endif
|
|
785
|
+
WOLFSSL_API
|
|
786
|
+
int wc_dilithium_verify_msg(const byte* sig, word32 sigLen, const byte* msg,
|
|
787
|
+
word32 msgLen, int* res, dilithium_key* key);
|
|
788
|
+
WOLFSSL_API
|
|
789
|
+
int wc_dilithium_verify_ctx_msg(const byte* sig, word32 sigLen, const byte* ctx,
|
|
790
|
+
word32 ctxLen, const byte* msg, word32 msgLen, int* res,
|
|
791
|
+
dilithium_key* key);
|
|
792
|
+
WOLFSSL_API
|
|
793
|
+
int wc_dilithium_verify_ctx_hash(const byte* sig, word32 sigLen,
|
|
794
|
+
const byte* ctx, word32 ctxLen, int hashAlg, const byte* hash,
|
|
795
|
+
word32 hashLen, int* res, dilithium_key* key);
|
|
796
|
+
|
|
797
|
+
WOLFSSL_API
|
|
798
|
+
dilithium_key* wc_dilithium_new(void* heap, int devId);
|
|
799
|
+
WOLFSSL_API
|
|
800
|
+
int wc_dilithium_delete(dilithium_key* key, dilithium_key** key_p);
|
|
801
|
+
|
|
802
|
+
WOLFSSL_API
|
|
803
|
+
int wc_dilithium_init(dilithium_key* key);
|
|
804
|
+
|
|
805
|
+
WOLFSSL_API
|
|
806
|
+
int wc_dilithium_init_ex(dilithium_key* key, void* heap, int devId);
|
|
807
|
+
|
|
808
|
+
#ifdef WOLF_PRIVATE_KEY_ID
|
|
809
|
+
WOLFSSL_API
|
|
810
|
+
int wc_dilithium_init_id(dilithium_key* key, const unsigned char* id, int len,
|
|
811
|
+
void* heap, int devId);
|
|
812
|
+
WOLFSSL_API
|
|
813
|
+
int wc_dilithium_init_label(dilithium_key* key, const char* label, void* heap,
|
|
814
|
+
int devId);
|
|
815
|
+
#endif
|
|
816
|
+
|
|
817
|
+
WOLFSSL_API
|
|
818
|
+
int wc_dilithium_set_level(dilithium_key* key, byte level);
|
|
819
|
+
WOLFSSL_API
|
|
820
|
+
int wc_dilithium_get_level(dilithium_key* key, byte* level);
|
|
821
|
+
WOLFSSL_API
|
|
822
|
+
void wc_dilithium_free(dilithium_key* key);
|
|
823
|
+
|
|
824
|
+
#ifdef WOLFSSL_DILITHIUM_PRIVATE_KEY
|
|
825
|
+
WOLFSSL_API
|
|
826
|
+
int wc_dilithium_size(dilithium_key* key);
|
|
827
|
+
#endif
|
|
828
|
+
#if defined(WOLFSSL_DILITHIUM_PRIVATE_KEY) && \
|
|
829
|
+
defined(WOLFSSL_DILITHIUM_PUBLIC_KEY)
|
|
830
|
+
WOLFSSL_API
|
|
831
|
+
int wc_dilithium_priv_size(dilithium_key* key);
|
|
832
|
+
#endif
|
|
833
|
+
#ifdef WOLFSSL_DILITHIUM_PUBLIC_KEY
|
|
834
|
+
WOLFSSL_API
|
|
835
|
+
int wc_dilithium_pub_size(dilithium_key* key);
|
|
836
|
+
#endif
|
|
837
|
+
#if !defined(WOLFSSL_DILITHIUM_NO_SIGN) || !defined(WOLFSSL_DILITHIUM_NO_VERIFY)
|
|
838
|
+
WOLFSSL_API
|
|
839
|
+
int wc_dilithium_sig_size(dilithium_key* key);
|
|
840
|
+
#endif
|
|
841
|
+
|
|
842
|
+
#ifdef WOLFSSL_DILITHIUM_CHECK_KEY
|
|
843
|
+
WOLFSSL_API
|
|
844
|
+
int wc_dilithium_check_key(dilithium_key* key);
|
|
845
|
+
#endif
|
|
846
|
+
|
|
847
|
+
#ifdef WOLFSSL_DILITHIUM_PUBLIC_KEY
|
|
848
|
+
WOLFSSL_API
|
|
849
|
+
int wc_dilithium_import_public(const byte* in, word32 inLen,
|
|
850
|
+
dilithium_key* key);
|
|
851
|
+
#endif
|
|
852
|
+
#ifdef WOLFSSL_DILITHIUM_PRIVATE_KEY
|
|
853
|
+
WOLFSSL_API
|
|
854
|
+
int wc_dilithium_import_private(const byte* priv, word32 privSz,
|
|
855
|
+
dilithium_key* key);
|
|
856
|
+
#define wc_dilithium_import_private_only wc_dilithium_import_private
|
|
857
|
+
WOLFSSL_API
|
|
858
|
+
int wc_dilithium_import_key(const byte* priv, word32 privSz,
|
|
859
|
+
const byte* pub, word32 pubSz, dilithium_key* key);
|
|
860
|
+
#endif
|
|
861
|
+
|
|
862
|
+
#ifdef WOLFSSL_DILITHIUM_PUBLIC_KEY
|
|
863
|
+
WOLFSSL_API
|
|
864
|
+
int wc_dilithium_export_public(dilithium_key* key, byte* out, word32* outLen);
|
|
865
|
+
#endif
|
|
866
|
+
#ifdef WOLFSSL_DILITHIUM_PRIVATE_KEY
|
|
867
|
+
WOLFSSL_API
|
|
868
|
+
int wc_dilithium_export_private(dilithium_key* key, byte* out, word32* outLen);
|
|
869
|
+
#define wc_dilithium_export_private_only wc_dilithium_export_private
|
|
870
|
+
#endif
|
|
871
|
+
#ifdef WOLFSSL_DILITHIUM_PRIVATE_KEY
|
|
872
|
+
WOLFSSL_API
|
|
873
|
+
int wc_dilithium_export_key(dilithium_key* key, byte* priv, word32 *privSz,
|
|
874
|
+
byte* pub, word32 *pubSz);
|
|
875
|
+
#endif
|
|
876
|
+
|
|
877
|
+
#ifndef WOLFSSL_DILITHIUM_NO_ASN1
|
|
878
|
+
WOLFSSL_LOCAL int dilithium_get_oid_sum(dilithium_key* key, int* keyFormat);
|
|
879
|
+
#endif /* WOLFSSL_DILITHIUM_NO_ASN1 */
|
|
880
|
+
|
|
881
|
+
#ifndef WOLFSSL_DILITHIUM_NO_ASN1
|
|
882
|
+
#if defined(WOLFSSL_DILITHIUM_PRIVATE_KEY)
|
|
883
|
+
WOLFSSL_API int wc_Dilithium_PrivateKeyDecode(const byte* input,
|
|
884
|
+
word32* inOutIdx, dilithium_key* key, word32 inSz);
|
|
885
|
+
#endif
|
|
886
|
+
#endif /* WOLFSSL_DILITHIUM_NO_ASN1 */
|
|
887
|
+
#ifdef WOLFSSL_DILITHIUM_PUBLIC_KEY
|
|
888
|
+
WOLFSSL_API int wc_Dilithium_PublicKeyDecode(const byte* input,
|
|
889
|
+
word32* inOutIdx, dilithium_key* key, word32 inSz);
|
|
890
|
+
#endif
|
|
891
|
+
|
|
892
|
+
#ifndef WOLFSSL_DILITHIUM_NO_ASN1
|
|
893
|
+
#ifdef WC_ENABLE_ASYM_KEY_EXPORT
|
|
894
|
+
WOLFSSL_API int wc_Dilithium_PublicKeyToDer(dilithium_key* key, byte* output,
|
|
895
|
+
word32 inLen, int withAlg);
|
|
896
|
+
#endif
|
|
897
|
+
#if defined(WOLFSSL_DILITHIUM_PRIVATE_KEY)
|
|
898
|
+
WOLFSSL_API int wc_Dilithium_KeyToDer(dilithium_key* key, byte* output,
|
|
899
|
+
word32 inLen);
|
|
900
|
+
#endif
|
|
901
|
+
#ifdef WOLFSSL_DILITHIUM_PRIVATE_KEY
|
|
902
|
+
WOLFSSL_API int wc_Dilithium_PrivateKeyToDer(dilithium_key* key, byte* output,
|
|
903
|
+
word32 inLen);
|
|
904
|
+
#endif
|
|
905
|
+
#endif /* WOLFSSL_DILITHIUM_NO_ASN1 */
|
|
906
|
+
|
|
907
|
+
#ifdef USE_INTEL_SPEEDUP
|
|
908
|
+
WOLFSSL_LOCAL void wc_mldsa_poly_red_avx2(sword32* a);
|
|
909
|
+
|
|
910
|
+
WOLFSSL_LOCAL void wc_mldsa_ntt_avx2(sword32* r);
|
|
911
|
+
WOLFSSL_LOCAL void wc_mldsa_ntt_full_avx2(sword32* r);
|
|
912
|
+
WOLFSSL_LOCAL void wc_mldsa_invntt_avx2(sword32* r);
|
|
913
|
+
WOLFSSL_LOCAL void wc_mldsa_invntt_full_avx2(sword32* r);
|
|
914
|
+
|
|
915
|
+
WOLFSSL_LOCAL void wc_mldsa_mul_avx2(sword32* r, const sword32* a,
|
|
916
|
+
const sword32* b);
|
|
917
|
+
WOLFSSL_LOCAL void wc_mldsa_mul_vec_4_avx2(sword32* r, const sword32* a,
|
|
918
|
+
const sword32* b);
|
|
919
|
+
WOLFSSL_LOCAL void wc_mldsa_mul_vec_5_avx2(sword32* r, const sword32* a,
|
|
920
|
+
const sword32* b);
|
|
921
|
+
WOLFSSL_LOCAL void wc_mldsa_mul_vec_7_avx2(sword32* r, const sword32* a,
|
|
922
|
+
const sword32* b);
|
|
923
|
+
WOLFSSL_LOCAL void wc_mldsa_matrix_mul_4x4_avx2(sword32* r, const sword32* m,
|
|
924
|
+
const sword32* v);
|
|
925
|
+
WOLFSSL_LOCAL void wc_mldsa_matrix_mul_6x5_avx2(sword32* r, const sword32* m,
|
|
926
|
+
const sword32* v);
|
|
927
|
+
WOLFSSL_LOCAL void wc_mldsa_matrix_mul_8x7_avx2(sword32* r, const sword32* m,
|
|
928
|
+
const sword32* v);
|
|
929
|
+
|
|
930
|
+
WOLFSSL_LOCAL void wc_mldsa_redistribute_21_rand_avx2(word64* s, byte* r0,
|
|
931
|
+
byte* r1, byte* r2, byte* r3);
|
|
932
|
+
WOLFSSL_LOCAL int wc_mldsa_rej_uniform_n_avx2(sword32* a, word32 len,
|
|
933
|
+
const byte* r, word32 rLen);
|
|
934
|
+
WOLFSSL_LOCAL int wc_mldsa_rej_uniform_avx2(sword32* a, word32 len,
|
|
935
|
+
const byte* r, word32 rLen);
|
|
936
|
+
|
|
937
|
+
WOLFSSL_LOCAL void wc_mldsa_redistribute_17_rand_avx2(word64* s, byte* r0,
|
|
938
|
+
byte* r1, byte* r2, byte* r3);
|
|
939
|
+
WOLFSSL_LOCAL void wc_mldsa_extract_coeffs_eta2_avx2(const byte* z,
|
|
940
|
+
unsigned int zLen, sword32* s, unsigned int* cnt);
|
|
941
|
+
WOLFSSL_LOCAL void wc_mldsa_extract_coeffs_eta4_avx2(const byte* z,
|
|
942
|
+
unsigned int zLen, sword32* s, unsigned int* cnt);
|
|
943
|
+
|
|
944
|
+
WOLFSSL_LOCAL void wc_mldsa_vec_encode_eta_2_avx2(const sword32* s, byte d,
|
|
945
|
+
byte* p);
|
|
946
|
+
WOLFSSL_LOCAL void wc_mldsa_vec_encode_eta_4_avx2(const sword32* t, byte* p);
|
|
947
|
+
WOLFSSL_LOCAL void wc_mldsa_decode_eta_2_avx2(const byte* p, sword32* s);
|
|
948
|
+
WOLFSSL_LOCAL void wc_mldsa_decode_eta_4_avx2(const byte* p, sword32* s);
|
|
949
|
+
|
|
950
|
+
WOLFSSL_LOCAL void wc_mldsa_encode_w1_88_avx2(const sword32* w1, byte* w1e);
|
|
951
|
+
WOLFSSL_LOCAL void wc_mldsa_encode_w1_32_avx2(const sword32* w1, byte* w1e);
|
|
952
|
+
|
|
953
|
+
WOLFSSL_LOCAL void wc_mldsa_vec_encode_t0_t1_avx2(const sword32* t, byte d,
|
|
954
|
+
byte* t0, byte* t1);
|
|
955
|
+
WOLFSSL_LOCAL void wc_mldsa_decode_t0_avx2(const byte* t0, sword32* t);
|
|
956
|
+
WOLFSSL_LOCAL void wc_mldsa_decode_t1_avx2(const byte* t1, sword32* t);
|
|
957
|
+
|
|
958
|
+
WOLFSSL_LOCAL void wc_mldsa_decode_gamma1_17_avx2(const byte* s, sword32* z);
|
|
959
|
+
WOLFSSL_LOCAL void wc_mldsa_decode_gamma1_19_avx2(const byte* s, sword32* z);
|
|
960
|
+
WOLFSSL_LOCAL void wc_mldsa_encode_gamma1_17_avx2(const sword32* z, byte* s);
|
|
961
|
+
WOLFSSL_LOCAL void wc_mldsa_encode_gamma1_19_avx2(const sword32* z, byte* s);
|
|
962
|
+
|
|
963
|
+
WOLFSSL_LOCAL void wc_mldsa_decompose_q88_avx2(const sword32* r, sword32* r0,
|
|
964
|
+
sword32* r1);
|
|
965
|
+
WOLFSSL_LOCAL void wc_mldsa_decompose_q32_avx2(const sword32* r, byte k,
|
|
966
|
+
sword32* r0, sword32* r1);
|
|
967
|
+
|
|
968
|
+
WOLFSSL_LOCAL void wc_mldsa_use_hint_88_avx2(sword32* w1, const byte* h);
|
|
969
|
+
WOLFSSL_LOCAL void wc_mldsa_use_hint_32_avx2(sword32* w1, byte k,
|
|
970
|
+
const byte* h);
|
|
971
|
+
|
|
972
|
+
WOLFSSL_LOCAL int wc_mldsa_vec_check_low_avx2(const sword32* a, byte l,
|
|
973
|
+
sword32 hi);
|
|
974
|
+
|
|
975
|
+
WOLFSSL_LOCAL void wc_mldsa_poly_add_avx2(sword32* r, const sword32* a);
|
|
976
|
+
WOLFSSL_LOCAL void wc_mldsa_poly_sub_avx2(sword32* r, const sword32* a);
|
|
977
|
+
WOLFSSL_LOCAL void wc_mldsa_poly_make_pos_avx2(sword32* a);
|
|
978
|
+
#endif
|
|
979
|
+
|
|
980
|
+
|
|
981
|
+
#define WC_ML_DSA_DRAFT 10
|
|
982
|
+
|
|
983
|
+
#define WC_ML_DSA_44 2
|
|
984
|
+
#define WC_ML_DSA_65 3
|
|
985
|
+
#define WC_ML_DSA_87 5
|
|
986
|
+
#define WC_ML_DSA_44_DRAFT (2 + WC_ML_DSA_DRAFT)
|
|
987
|
+
#define WC_ML_DSA_65_DRAFT (3 + WC_ML_DSA_DRAFT)
|
|
988
|
+
#define WC_ML_DSA_87_DRAFT (5 + WC_ML_DSA_DRAFT)
|
|
989
|
+
|
|
990
|
+
#define DILITHIUM_ML_DSA_44_KEY_SIZE 2560
|
|
991
|
+
#define DILITHIUM_ML_DSA_44_SIG_SIZE 2420
|
|
992
|
+
#define DILITHIUM_ML_DSA_44_PUB_KEY_SIZE 1312
|
|
993
|
+
#define DILITHIUM_ML_DSA_44_PRV_KEY_SIZE \
|
|
994
|
+
(DILITHIUM_ML_DSA_44_PUB_KEY_SIZE + DILITHIUM_ML_DSA_44_KEY_SIZE)
|
|
995
|
+
|
|
996
|
+
#define DILITHIUM_ML_DSA_65_KEY_SIZE 4032
|
|
997
|
+
#define DILITHIUM_ML_DSA_65_SIG_SIZE 3309
|
|
998
|
+
#define DILITHIUM_ML_DSA_65_PUB_KEY_SIZE 1952
|
|
999
|
+
#define DILITHIUM_ML_DSA_65_PRV_KEY_SIZE \
|
|
1000
|
+
(DILITHIUM_ML_DSA_65_PUB_KEY_SIZE + DILITHIUM_ML_DSA_65_KEY_SIZE)
|
|
1001
|
+
|
|
1002
|
+
#define DILITHIUM_ML_DSA_87_KEY_SIZE 4896
|
|
1003
|
+
#define DILITHIUM_ML_DSA_87_SIG_SIZE 4627
|
|
1004
|
+
#define DILITHIUM_ML_DSA_87_PUB_KEY_SIZE 2592
|
|
1005
|
+
#define DILITHIUM_ML_DSA_87_PRV_KEY_SIZE \
|
|
1006
|
+
(DILITHIUM_ML_DSA_87_PUB_KEY_SIZE + DILITHIUM_ML_DSA_87_KEY_SIZE)
|
|
1007
|
+
|
|
1008
|
+
|
|
1009
|
+
#define MlDsaKey dilithium_key
|
|
1010
|
+
|
|
1011
|
+
|
|
1012
|
+
#define wc_MlDsaKey_Init(key, heap, devId) \
|
|
1013
|
+
wc_dilithium_init_ex(key, heap, devId)
|
|
1014
|
+
#define wc_MlDsaKey_SetParams(key, id) \
|
|
1015
|
+
wc_dilithium_set_level(key, id)
|
|
1016
|
+
#define wc_MlDsaKey_GetParams(key, id) \
|
|
1017
|
+
wc_dilithium_get_level(key, id)
|
|
1018
|
+
#define wc_MlDsaKey_MakeKey(key, rng) \
|
|
1019
|
+
wc_dilithium_make_key(key, rng)
|
|
1020
|
+
#define wc_MlDsaKey_ExportPrivRaw(key, out, outLen) \
|
|
1021
|
+
wc_dilithium_export_private_only(key, out, outLen)
|
|
1022
|
+
#define wc_MlDsaKey_ImportPrivRaw(key, in, inLen) \
|
|
1023
|
+
wc_dilithium_import_private_only(in, inLen, key)
|
|
1024
|
+
#define wc_MlDsaKey_Sign(key, sig, sigSz, msg, msgSz, rng) \
|
|
1025
|
+
wc_dilithium_sign_msg(msg, msgSz, sig, sigSz, key, rng)
|
|
1026
|
+
#define wc_MlDsaKey_Free(key) \
|
|
1027
|
+
wc_dilithium_free(key)
|
|
1028
|
+
#define wc_MlDsaKey_ExportPubRaw(key, out, outLen) \
|
|
1029
|
+
wc_dilithium_export_public(key, out, outLen)
|
|
1030
|
+
#define wc_MlDsaKey_ImportPubRaw(key, in, inLen) \
|
|
1031
|
+
wc_dilithium_import_public(in, inLen, key)
|
|
1032
|
+
#define wc_MlDsaKey_Verify(key, sig, sigSz, msg, msgSz, res) \
|
|
1033
|
+
wc_dilithium_verify_msg(sig, sigSz, msg, msgSz, res, key)
|
|
1034
|
+
|
|
1035
|
+
#define wc_MlDsaKey_PublicKeyToDer(key, output, len, withAlg) \
|
|
1036
|
+
wc_Dilithium_PublicKeyToDer(key, output, len, withAlg)
|
|
1037
|
+
|
|
1038
|
+
#define wc_MlDsaKey_PrivateKeyToDer(key, output, len) \
|
|
1039
|
+
wc_Dilithium_PrivateKeyToDer(key, output, len)
|
|
1040
|
+
|
|
1041
|
+
|
|
1042
|
+
WOLFSSL_API int wc_MlDsaKey_GetPrivLen(MlDsaKey* key, int* len);
|
|
1043
|
+
WOLFSSL_API int wc_MlDsaKey_GetPubLen(MlDsaKey* key, int* len);
|
|
1044
|
+
WOLFSSL_API int wc_MlDsaKey_GetSigLen(MlDsaKey* key, int* len);
|
|
1045
|
+
|
|
1046
|
+
#ifdef __cplusplus
|
|
1047
|
+
} /* extern "C" */
|
|
1048
|
+
#endif
|
|
1049
|
+
|
|
1050
|
+
#endif /* HAVE_DILITHIUM */
|
|
1051
|
+
#endif /* WOLF_CRYPT_DILITHIUM_H */
|