react-native-quick-crypto 1.0.0-beta.20 → 1.0.0-beta.21
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/QuickCrypto.podspec +70 -7
- package/android/CMakeLists.txt +31 -1
- package/cpp/blake3/HybridBlake3.cpp +118 -0
- package/cpp/blake3/HybridBlake3.hpp +35 -0
- package/cpp/cipher/HybridCipherFactory.hpp +5 -0
- package/cpp/ec/HybridEcKeyPair.cpp +428 -0
- package/cpp/ec/HybridEcKeyPair.hpp +48 -0
- package/cpp/ed25519/HybridEdKeyPair.cpp +78 -4
- package/cpp/ed25519/HybridEdKeyPair.hpp +9 -2
- package/cpp/hash/HybridHash.cpp +37 -3
- package/cpp/hash/HybridHash.hpp +5 -3
- package/cpp/keys/HybridKeyObjectHandle.cpp +243 -0
- package/cpp/keys/HybridKeyObjectHandle.hpp +42 -0
- package/cpp/keys/KeyObjectData.cpp +226 -0
- package/cpp/keys/KeyObjectData.hpp +71 -0
- package/cpp/keys/node.h +5 -0
- package/cpp/rsa/HybridRsaKeyPair.cpp +154 -0
- package/cpp/rsa/HybridRsaKeyPair.hpp +43 -0
- package/cpp/utils/Macros.hpp +68 -0
- package/cpp/utils/Utils.hpp +27 -0
- package/deps/blake3/.cargo/config.toml +2 -0
- package/deps/blake3/.git-blame-ignore-revs +2 -0
- package/deps/blake3/.github/workflows/build_b3sum.py +38 -0
- package/deps/blake3/.github/workflows/ci.yml +491 -0
- package/deps/blake3/.github/workflows/tag.yml +43 -0
- package/deps/blake3/.github/workflows/upload_github_release_asset.py +73 -0
- package/deps/blake3/CONTRIBUTING.md +31 -0
- package/deps/blake3/Cargo.toml +135 -0
- package/deps/blake3/LICENSE_A2 +202 -0
- package/deps/blake3/LICENSE_A2LLVM +219 -0
- package/deps/blake3/LICENSE_CC0 +121 -0
- package/deps/blake3/README.md +229 -0
- package/deps/blake3/b3sum/Cargo.lock +513 -0
- package/deps/blake3/b3sum/Cargo.toml +26 -0
- package/deps/blake3/b3sum/README.md +72 -0
- package/deps/blake3/b3sum/src/main.rs +564 -0
- package/deps/blake3/b3sum/src/unit_tests.rs +235 -0
- package/deps/blake3/b3sum/tests/cli_tests.rs +680 -0
- package/deps/blake3/b3sum/what_does_check_do.md +176 -0
- package/deps/blake3/benches/bench.rs +623 -0
- package/deps/blake3/build.rs +389 -0
- package/deps/blake3/c/CMakeLists.txt +383 -0
- package/deps/blake3/c/CMakePresets.json +73 -0
- package/deps/blake3/c/Makefile.testing +82 -0
- package/deps/blake3/c/README.md +403 -0
- package/deps/blake3/c/blake3-config.cmake.in +14 -0
- package/deps/blake3/c/blake3.c +650 -0
- package/deps/blake3/c/blake3.h +86 -0
- package/deps/blake3/c/blake3_avx2.c +326 -0
- package/deps/blake3/c/blake3_avx2_x86-64_unix.S +1815 -0
- package/deps/blake3/c/blake3_avx2_x86-64_windows_gnu.S +1817 -0
- package/deps/blake3/c/blake3_avx2_x86-64_windows_msvc.asm +1828 -0
- package/deps/blake3/c/blake3_avx512.c +1388 -0
- package/deps/blake3/c/blake3_avx512_x86-64_unix.S +4824 -0
- package/deps/blake3/c/blake3_avx512_x86-64_windows_gnu.S +2615 -0
- package/deps/blake3/c/blake3_avx512_x86-64_windows_msvc.asm +2634 -0
- package/deps/blake3/c/blake3_c_rust_bindings/Cargo.toml +32 -0
- package/deps/blake3/c/blake3_c_rust_bindings/README.md +4 -0
- package/deps/blake3/c/blake3_c_rust_bindings/benches/bench.rs +477 -0
- package/deps/blake3/c/blake3_c_rust_bindings/build.rs +253 -0
- package/deps/blake3/c/blake3_c_rust_bindings/cross_test.sh +31 -0
- package/deps/blake3/c/blake3_c_rust_bindings/src/lib.rs +333 -0
- package/deps/blake3/c/blake3_c_rust_bindings/src/test.rs +696 -0
- package/deps/blake3/c/blake3_dispatch.c +332 -0
- package/deps/blake3/c/blake3_impl.h +333 -0
- package/deps/blake3/c/blake3_neon.c +366 -0
- package/deps/blake3/c/blake3_portable.c +160 -0
- package/deps/blake3/c/blake3_sse2.c +566 -0
- package/deps/blake3/c/blake3_sse2_x86-64_unix.S +2291 -0
- package/deps/blake3/c/blake3_sse2_x86-64_windows_gnu.S +2332 -0
- package/deps/blake3/c/blake3_sse2_x86-64_windows_msvc.asm +2350 -0
- package/deps/blake3/c/blake3_sse41.c +560 -0
- package/deps/blake3/c/blake3_sse41_x86-64_unix.S +2028 -0
- package/deps/blake3/c/blake3_sse41_x86-64_windows_gnu.S +2069 -0
- package/deps/blake3/c/blake3_sse41_x86-64_windows_msvc.asm +2089 -0
- package/deps/blake3/c/blake3_tbb.cpp +37 -0
- package/deps/blake3/c/dependencies/CMakeLists.txt +3 -0
- package/deps/blake3/c/dependencies/tbb/CMakeLists.txt +28 -0
- package/deps/blake3/c/example.c +36 -0
- package/deps/blake3/c/example_tbb.c +57 -0
- package/deps/blake3/c/libblake3.pc.in +12 -0
- package/deps/blake3/c/main.c +166 -0
- package/deps/blake3/c/test.py +97 -0
- package/deps/blake3/media/B3.svg +70 -0
- package/deps/blake3/media/BLAKE3.svg +85 -0
- package/deps/blake3/media/speed.svg +1474 -0
- package/deps/blake3/reference_impl/Cargo.toml +8 -0
- package/deps/blake3/reference_impl/README.md +14 -0
- package/deps/blake3/reference_impl/reference_impl.rs +374 -0
- package/deps/blake3/src/ffi_avx2.rs +65 -0
- package/deps/blake3/src/ffi_avx512.rs +169 -0
- package/deps/blake3/src/ffi_neon.rs +82 -0
- package/deps/blake3/src/ffi_sse2.rs +126 -0
- package/deps/blake3/src/ffi_sse41.rs +126 -0
- package/deps/blake3/src/guts.rs +60 -0
- package/deps/blake3/src/hazmat.rs +704 -0
- package/deps/blake3/src/io.rs +64 -0
- package/deps/blake3/src/join.rs +92 -0
- package/deps/blake3/src/lib.rs +1835 -0
- package/deps/blake3/src/platform.rs +587 -0
- package/deps/blake3/src/portable.rs +198 -0
- package/deps/blake3/src/rust_avx2.rs +474 -0
- package/deps/blake3/src/rust_sse2.rs +775 -0
- package/deps/blake3/src/rust_sse41.rs +766 -0
- package/deps/blake3/src/test.rs +1049 -0
- package/deps/blake3/src/traits.rs +227 -0
- package/deps/blake3/src/wasm32_simd.rs +794 -0
- package/deps/blake3/test_vectors/Cargo.toml +19 -0
- package/deps/blake3/test_vectors/cross_test.sh +25 -0
- package/deps/blake3/test_vectors/src/bin/generate.rs +4 -0
- package/deps/blake3/test_vectors/src/lib.rs +350 -0
- package/deps/blake3/test_vectors/test_vectors.json +217 -0
- package/deps/blake3/tools/compiler_version/Cargo.toml +7 -0
- package/deps/blake3/tools/compiler_version/build.rs +6 -0
- package/deps/blake3/tools/compiler_version/src/main.rs +27 -0
- package/deps/blake3/tools/instruction_set_support/Cargo.toml +6 -0
- package/deps/blake3/tools/instruction_set_support/src/main.rs +10 -0
- package/deps/blake3/tools/release.md +16 -0
- package/deps/ncrypto/ncrypto.cc +4679 -0
- package/deps/ncrypto/ncrypto.h +1625 -0
- package/lib/commonjs/blake3.js +98 -0
- package/lib/commonjs/blake3.js.map +1 -0
- package/lib/commonjs/ec.js +344 -0
- package/lib/commonjs/ec.js.map +1 -0
- package/lib/commonjs/ed.js +143 -0
- package/lib/commonjs/ed.js.map +1 -1
- package/lib/commonjs/expo-plugin/withXCode.js +3 -3
- package/lib/commonjs/hash.js +48 -1
- package/lib/commonjs/hash.js.map +1 -1
- package/lib/commonjs/index.js +54 -4
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/keys/classes.js +111 -52
- package/lib/commonjs/keys/classes.js.map +1 -1
- package/lib/commonjs/keys/generateKeyPair.js +98 -144
- package/lib/commonjs/keys/generateKeyPair.js.map +1 -1
- package/lib/commonjs/keys/index.js +27 -0
- package/lib/commonjs/keys/index.js.map +1 -1
- package/lib/commonjs/keys/utils.js +18 -13
- package/lib/commonjs/keys/utils.js.map +1 -1
- package/lib/commonjs/rsa.js +129 -0
- package/lib/commonjs/rsa.js.map +1 -0
- package/lib/commonjs/specs/blake3.nitro.js +6 -0
- package/lib/commonjs/specs/blake3.nitro.js.map +1 -0
- package/lib/commonjs/specs/ecKeyPair.nitro.js +6 -0
- package/lib/commonjs/specs/ecKeyPair.nitro.js.map +1 -0
- package/lib/commonjs/specs/rsaKeyPair.nitro.js +6 -0
- package/lib/commonjs/specs/rsaKeyPair.nitro.js.map +1 -0
- package/lib/commonjs/subtle.js +365 -0
- package/lib/commonjs/subtle.js.map +1 -0
- package/lib/commonjs/utils/conversion.js +25 -2
- package/lib/commonjs/utils/conversion.js.map +1 -1
- package/lib/commonjs/utils/hashnames.js +2 -1
- package/lib/commonjs/utils/hashnames.js.map +1 -1
- package/lib/commonjs/utils/index.js +11 -0
- package/lib/commonjs/utils/index.js.map +1 -1
- package/lib/commonjs/utils/noble.js +82 -0
- package/lib/commonjs/utils/noble.js.map +1 -0
- package/lib/commonjs/utils/types.js +28 -16
- package/lib/commonjs/utils/types.js.map +1 -1
- package/lib/commonjs/utils/validation.js +74 -1
- package/lib/commonjs/utils/validation.js.map +1 -1
- package/lib/module/blake3.js +90 -0
- package/lib/module/blake3.js.map +1 -0
- package/lib/module/ec.js +336 -0
- package/lib/module/ec.js.map +1 -0
- package/lib/module/ed.js +141 -0
- package/lib/module/ed.js.map +1 -1
- package/lib/module/expo-plugin/withXCode.js +3 -3
- package/lib/module/hash.js +47 -2
- package/lib/module/hash.js.map +1 -1
- package/lib/module/index.js +9 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/keys/classes.js +108 -49
- package/lib/module/keys/classes.js.map +1 -1
- package/lib/module/keys/generateKeyPair.js +91 -143
- package/lib/module/keys/generateKeyPair.js.map +1 -1
- package/lib/module/keys/index.js +9 -6
- package/lib/module/keys/index.js.map +1 -1
- package/lib/module/keys/utils.js +16 -12
- package/lib/module/keys/utils.js.map +1 -1
- package/lib/module/rsa.js +123 -0
- package/lib/module/rsa.js.map +1 -0
- package/lib/module/specs/blake3.nitro.js +4 -0
- package/lib/module/specs/blake3.nitro.js.map +1 -0
- package/lib/module/specs/ecKeyPair.nitro.js +4 -0
- package/lib/module/specs/ecKeyPair.nitro.js.map +1 -0
- package/lib/module/specs/rsaKeyPair.nitro.js +4 -0
- package/lib/module/specs/rsaKeyPair.nitro.js.map +1 -0
- package/lib/module/subtle.js +360 -0
- package/lib/module/subtle.js.map +1 -0
- package/lib/module/utils/conversion.js +7 -2
- package/lib/module/utils/conversion.js.map +1 -1
- package/lib/module/utils/hashnames.js +2 -1
- package/lib/module/utils/hashnames.js.map +1 -1
- package/lib/module/utils/index.js +1 -0
- package/lib/module/utils/index.js.map +1 -1
- package/lib/module/utils/noble.js +76 -0
- package/lib/module/utils/noble.js.map +1 -0
- package/lib/module/utils/types.js +26 -17
- package/lib/module/utils/types.js.map +1 -1
- package/lib/module/utils/validation.js +69 -1
- package/lib/module/utils/validation.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/typescript/blake3.d.ts +33 -0
- package/lib/typescript/blake3.d.ts.map +1 -0
- package/lib/typescript/ec.d.ts +13 -0
- package/lib/typescript/ec.d.ts.map +1 -0
- package/lib/typescript/ed.d.ts +27 -1
- package/lib/typescript/ed.d.ts.map +1 -1
- package/lib/typescript/hash.d.ts +14 -1
- package/lib/typescript/hash.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +45 -1
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/keys/classes.d.ts +49 -8
- package/lib/typescript/keys/classes.d.ts.map +1 -1
- package/lib/typescript/keys/generateKeyPair.d.ts +5 -0
- package/lib/typescript/keys/generateKeyPair.d.ts.map +1 -1
- package/lib/typescript/keys/index.d.ts +5 -2
- package/lib/typescript/keys/index.d.ts.map +1 -1
- package/lib/typescript/keys/utils.d.ts +3 -1
- package/lib/typescript/keys/utils.d.ts.map +1 -1
- package/lib/typescript/rsa.d.ts +10 -0
- package/lib/typescript/rsa.d.ts.map +1 -0
- package/lib/typescript/specs/blake3.nitro.d.ts +15 -0
- package/lib/typescript/specs/blake3.nitro.d.ts.map +1 -0
- package/lib/typescript/specs/ecKeyPair.nitro.d.ts +20 -0
- package/lib/typescript/specs/ecKeyPair.nitro.d.ts.map +1 -0
- package/lib/typescript/specs/edKeyPair.nitro.d.ts +1 -0
- package/lib/typescript/specs/edKeyPair.nitro.d.ts.map +1 -1
- package/lib/typescript/specs/hash.nitro.d.ts +1 -0
- package/lib/typescript/specs/hash.nitro.d.ts.map +1 -1
- package/lib/typescript/specs/keyObjectHandle.nitro.d.ts +0 -1
- package/lib/typescript/specs/keyObjectHandle.nitro.d.ts.map +1 -1
- package/lib/typescript/specs/rsaKeyPair.nitro.d.ts +20 -0
- package/lib/typescript/specs/rsaKeyPair.nitro.d.ts.map +1 -0
- package/lib/typescript/subtle.d.ts +17 -0
- package/lib/typescript/subtle.d.ts.map +1 -0
- package/lib/typescript/utils/cipher.d.ts +1 -1
- package/lib/typescript/utils/conversion.d.ts +1 -0
- package/lib/typescript/utils/conversion.d.ts.map +1 -1
- package/lib/typescript/utils/hashnames.d.ts +3 -1
- package/lib/typescript/utils/hashnames.d.ts.map +1 -1
- package/lib/typescript/utils/index.d.ts +1 -0
- package/lib/typescript/utils/index.d.ts.map +1 -1
- package/lib/typescript/utils/noble.d.ts +19 -0
- package/lib/typescript/utils/noble.d.ts.map +1 -0
- package/lib/typescript/utils/types.d.ts +101 -17
- package/lib/typescript/utils/types.d.ts.map +1 -1
- package/lib/typescript/utils/validation.d.ts +5 -0
- package/lib/typescript/utils/validation.d.ts.map +1 -1
- package/nitrogen/generated/.gitattributes +1 -1
- package/nitrogen/generated/android/QuickCrypto+autolinking.cmake +3 -0
- package/nitrogen/generated/android/QuickCryptoOnLoad.cpp +40 -0
- package/nitrogen/generated/ios/QuickCrypto-Swift-Cxx-Umbrella.hpp +2 -1
- package/nitrogen/generated/ios/QuickCryptoAutolinking.mm +40 -0
- package/nitrogen/generated/shared/c++/CFRGKeyPairType.hpp +11 -13
- package/nitrogen/generated/shared/c++/CipherArgs.hpp +4 -6
- package/nitrogen/generated/shared/c++/HybridBlake3Spec.cpp +28 -0
- package/nitrogen/generated/shared/c++/HybridBlake3Spec.hpp +76 -0
- package/nitrogen/generated/shared/c++/HybridCipherFactorySpec.hpp +1 -1
- package/nitrogen/generated/shared/c++/HybridCipherSpec.hpp +1 -1
- package/nitrogen/generated/shared/c++/HybridEcKeyPairSpec.cpp +29 -0
- package/nitrogen/generated/shared/c++/HybridEcKeyPairSpec.hpp +77 -0
- package/nitrogen/generated/shared/c++/HybridEdKeyPairSpec.cpp +1 -0
- package/nitrogen/generated/shared/c++/HybridEdKeyPairSpec.hpp +3 -2
- package/nitrogen/generated/shared/c++/HybridHashSpec.cpp +1 -0
- package/nitrogen/generated/shared/c++/HybridHashSpec.hpp +2 -1
- package/nitrogen/generated/shared/c++/HybridKeyObjectHandleSpec.cpp +0 -1
- package/nitrogen/generated/shared/c++/HybridKeyObjectHandleSpec.hpp +1 -2
- package/nitrogen/generated/shared/c++/HybridPbkdf2Spec.hpp +1 -1
- package/nitrogen/generated/shared/c++/HybridRandomSpec.hpp +1 -1
- package/nitrogen/generated/shared/c++/HybridRsaKeyPairSpec.cpp +29 -0
- package/nitrogen/generated/shared/c++/HybridRsaKeyPairSpec.hpp +77 -0
- package/nitrogen/generated/shared/c++/JWK.hpp +15 -17
- package/nitrogen/generated/shared/c++/JWKkty.hpp +11 -13
- package/nitrogen/generated/shared/c++/JWKuse.hpp +7 -9
- package/nitrogen/generated/shared/c++/KFormatType.hpp +12 -14
- package/nitrogen/generated/shared/c++/KeyDetail.hpp +4 -6
- package/nitrogen/generated/shared/c++/KeyEncoding.hpp +13 -15
- package/nitrogen/generated/shared/c++/KeyObject.hpp +67 -0
- package/nitrogen/generated/shared/c++/KeyType.hpp +9 -11
- package/nitrogen/generated/shared/c++/KeyUsage.hpp +37 -23
- package/nitrogen/generated/shared/c++/NamedCurve.hpp +9 -11
- package/package.json +14 -11
- package/src/blake3.ts +123 -0
- package/src/ec.ts +432 -0
- package/src/ed.ts +179 -2
- package/src/expo-plugin/withXCode.ts +3 -3
- package/src/hash.ts +68 -2
- package/src/index.ts +8 -0
- package/src/keys/classes.ts +161 -55
- package/src/keys/generateKeyPair.ts +133 -134
- package/src/keys/index.ts +13 -3
- package/src/keys/utils.ts +24 -18
- package/src/rsa.ts +176 -0
- package/src/specs/blake3.nitro.ts +12 -0
- package/src/specs/ecKeyPair.nitro.ts +38 -0
- package/src/specs/edKeyPair.nitro.ts +2 -0
- package/src/specs/hash.nitro.ts +1 -0
- package/src/specs/keyObjectHandle.nitro.ts +0 -1
- package/src/specs/rsaKeyPair.nitro.ts +33 -0
- package/src/subtle.ts +614 -0
- package/src/utils/conversion.ts +7 -1
- package/src/utils/hashnames.ts +4 -2
- package/src/utils/index.ts +1 -0
- package/src/utils/noble.ts +85 -0
- package/src/utils/types.ts +142 -20
- package/src/utils/validation.ts +96 -1
- package/ios/libsodium-stable/.github/workflows/autocloser.yml +0 -12
- package/ios/libsodium-stable/.github/workflows/ci.yml +0 -180
- package/ios/libsodium-stable/.github/workflows/cifuzz.yml +0 -32
- package/ios/libsodium-stable/.github/workflows/codeql-analysis.yml +0 -48
- package/ios/libsodium-stable/.github/workflows/dotnet-core.yml +0 -388
- package/ios/libsodium-stable/AUTHORS +0 -144
- package/ios/libsodium-stable/CITATION.cff +0 -18
- package/ios/libsodium-stable/ChangeLog +0 -677
- package/ios/libsodium-stable/LICENSE +0 -18
- package/ios/libsodium-stable/Makefile.am +0 -23
- package/ios/libsodium-stable/README.markdown +0 -76
- package/ios/libsodium-stable/THANKS +0 -92
- package/ios/libsodium-stable/appveyor.yml +0 -24
- package/ios/libsodium-stable/autogen.sh +0 -117
- package/ios/libsodium-stable/azure-pipelines.yml +0 -122
- package/ios/libsodium-stable/build.zig +0 -281
- package/ios/libsodium-stable/builds/Makefile.am +0 -81
- package/ios/libsodium-stable/builds/msvc/build/buildall.bat +0 -18
- package/ios/libsodium-stable/builds/msvc/build/buildbase.bat +0 -132
- package/ios/libsodium-stable/builds/msvc/properties/ARM64.props +0 -23
- package/ios/libsodium-stable/builds/msvc/properties/Common.props +0 -21
- package/ios/libsodium-stable/builds/msvc/properties/DLL.props +0 -16
- package/ios/libsodium-stable/builds/msvc/properties/Debug.props +0 -29
- package/ios/libsodium-stable/builds/msvc/properties/DebugDEXE.props +0 -21
- package/ios/libsodium-stable/builds/msvc/properties/DebugDLL.props +0 -20
- package/ios/libsodium-stable/builds/msvc/properties/DebugLEXE.props +0 -20
- package/ios/libsodium-stable/builds/msvc/properties/DebugLIB.props +0 -21
- package/ios/libsodium-stable/builds/msvc/properties/DebugLTCG.props +0 -20
- package/ios/libsodium-stable/builds/msvc/properties/DebugSEXE.props +0 -21
- package/ios/libsodium-stable/builds/msvc/properties/EXE.props +0 -17
- package/ios/libsodium-stable/builds/msvc/properties/LIB.props +0 -16
- package/ios/libsodium-stable/builds/msvc/properties/LTCG.props +0 -13
- package/ios/libsodium-stable/builds/msvc/properties/Link.props +0 -21
- package/ios/libsodium-stable/builds/msvc/properties/Messages.props +0 -15
- package/ios/libsodium-stable/builds/msvc/properties/Output.props +0 -30
- package/ios/libsodium-stable/builds/msvc/properties/Release.props +0 -41
- package/ios/libsodium-stable/builds/msvc/properties/ReleaseDEXE.props +0 -20
- package/ios/libsodium-stable/builds/msvc/properties/ReleaseDLL.props +0 -19
- package/ios/libsodium-stable/builds/msvc/properties/ReleaseLEXE.props +0 -20
- package/ios/libsodium-stable/builds/msvc/properties/ReleaseLIB.props +0 -19
- package/ios/libsodium-stable/builds/msvc/properties/ReleaseLTCG.props +0 -19
- package/ios/libsodium-stable/builds/msvc/properties/ReleaseSEXE.props +0 -20
- package/ios/libsodium-stable/builds/msvc/properties/Win32.props +0 -23
- package/ios/libsodium-stable/builds/msvc/properties/x64.props +0 -26
- package/ios/libsodium-stable/builds/msvc/resource.h +0 -14
- package/ios/libsodium-stable/builds/msvc/resource.rc +0 -65
- package/ios/libsodium-stable/builds/msvc/version.h +0 -33
- package/ios/libsodium-stable/builds/msvc/vs2010/libsodium/libsodium.props +0 -48
- package/ios/libsodium-stable/builds/msvc/vs2010/libsodium/libsodium.vcxproj +0 -346
- package/ios/libsodium-stable/builds/msvc/vs2010/libsodium/libsodium.vcxproj.filters +0 -1088
- package/ios/libsodium-stable/builds/msvc/vs2010/libsodium/libsodium.xml +0 -15
- package/ios/libsodium-stable/builds/msvc/vs2010/libsodium.import.props +0 -52
- package/ios/libsodium-stable/builds/msvc/vs2010/libsodium.import.xml +0 -17
- package/ios/libsodium-stable/builds/msvc/vs2010/libsodium.sln +0 -50
- package/ios/libsodium-stable/builds/msvc/vs2012/libsodium/libsodium.props +0 -48
- package/ios/libsodium-stable/builds/msvc/vs2012/libsodium/libsodium.vcxproj +0 -346
- package/ios/libsodium-stable/builds/msvc/vs2012/libsodium/libsodium.vcxproj.filters +0 -1088
- package/ios/libsodium-stable/builds/msvc/vs2012/libsodium/libsodium.xml +0 -15
- package/ios/libsodium-stable/builds/msvc/vs2012/libsodium.import.props +0 -52
- package/ios/libsodium-stable/builds/msvc/vs2012/libsodium.import.xml +0 -17
- package/ios/libsodium-stable/builds/msvc/vs2012/libsodium.sln +0 -50
- package/ios/libsodium-stable/builds/msvc/vs2013/libsodium/libsodium.props +0 -48
- package/ios/libsodium-stable/builds/msvc/vs2013/libsodium/libsodium.vcxproj +0 -346
- package/ios/libsodium-stable/builds/msvc/vs2013/libsodium/libsodium.vcxproj.filters +0 -1088
- package/ios/libsodium-stable/builds/msvc/vs2013/libsodium/libsodium.xml +0 -15
- package/ios/libsodium-stable/builds/msvc/vs2013/libsodium.import.props +0 -52
- package/ios/libsodium-stable/builds/msvc/vs2013/libsodium.import.xml +0 -17
- package/ios/libsodium-stable/builds/msvc/vs2013/libsodium.sln +0 -52
- package/ios/libsodium-stable/builds/msvc/vs2015/libsodium/libsodium.props +0 -48
- package/ios/libsodium-stable/builds/msvc/vs2015/libsodium/libsodium.vcxproj +0 -346
- package/ios/libsodium-stable/builds/msvc/vs2015/libsodium/libsodium.vcxproj.filters +0 -1088
- package/ios/libsodium-stable/builds/msvc/vs2015/libsodium/libsodium.xml +0 -15
- package/ios/libsodium-stable/builds/msvc/vs2015/libsodium.import.props +0 -52
- package/ios/libsodium-stable/builds/msvc/vs2015/libsodium.import.xml +0 -17
- package/ios/libsodium-stable/builds/msvc/vs2015/libsodium.sln +0 -52
- package/ios/libsodium-stable/builds/msvc/vs2017/libsodium/libsodium.props +0 -48
- package/ios/libsodium-stable/builds/msvc/vs2017/libsodium/libsodium.vcxproj +0 -346
- package/ios/libsodium-stable/builds/msvc/vs2017/libsodium/libsodium.vcxproj.filters +0 -1088
- package/ios/libsodium-stable/builds/msvc/vs2017/libsodium/libsodium.xml +0 -15
- package/ios/libsodium-stable/builds/msvc/vs2017/libsodium.import.props +0 -52
- package/ios/libsodium-stable/builds/msvc/vs2017/libsodium.import.xml +0 -17
- package/ios/libsodium-stable/builds/msvc/vs2017/libsodium.sln +0 -52
- package/ios/libsodium-stable/builds/msvc/vs2019/libsodium/libsodium.props +0 -48
- package/ios/libsodium-stable/builds/msvc/vs2019/libsodium/libsodium.vcxproj +0 -370
- package/ios/libsodium-stable/builds/msvc/vs2019/libsodium/libsodium.vcxproj.filters +0 -1088
- package/ios/libsodium-stable/builds/msvc/vs2019/libsodium/libsodium.xml +0 -15
- package/ios/libsodium-stable/builds/msvc/vs2019/libsodium.import.props +0 -52
- package/ios/libsodium-stable/builds/msvc/vs2019/libsodium.import.xml +0 -17
- package/ios/libsodium-stable/builds/msvc/vs2019/libsodium.sln +0 -52
- package/ios/libsodium-stable/builds/msvc/vs2022/libsodium/libsodium.props +0 -48
- package/ios/libsodium-stable/builds/msvc/vs2022/libsodium/libsodium.vcxproj +0 -370
- package/ios/libsodium-stable/builds/msvc/vs2022/libsodium/libsodium.vcxproj.filters +0 -1088
- package/ios/libsodium-stable/builds/msvc/vs2022/libsodium/libsodium.xml +0 -15
- package/ios/libsodium-stable/builds/msvc/vs2022/libsodium.import.props +0 -52
- package/ios/libsodium-stable/builds/msvc/vs2022/libsodium.import.xml +0 -17
- package/ios/libsodium-stable/builds/msvc/vs2022/libsodium.sln +0 -70
- package/ios/libsodium-stable/ci/appveyor/libsodium.sln +0 -40
- package/ios/libsodium-stable/ci/appveyor/libsodium.vcxproj +0 -594
- package/ios/libsodium-stable/ci/appveyor/libsodium.vcxproj.filters +0 -813
- package/ios/libsodium-stable/ci/appveyor/msvc-scripts/process.bat +0 -5
- package/ios/libsodium-stable/ci/appveyor/msvc-scripts/rep.vbs +0 -12
- package/ios/libsodium-stable/ci/appveyor/msvc-scripts/sodium.props +0 -29
- package/ios/libsodium-stable/configure.ac +0 -1004
- package/ios/libsodium-stable/contrib/Findsodium.cmake +0 -297
- package/ios/libsodium-stable/contrib/Makefile.am +0 -3
- package/ios/libsodium-stable/dist-build/Makefile.am +0 -14
- package/ios/libsodium-stable/dist-build/android-aar.sh +0 -194
- package/ios/libsodium-stable/dist-build/android-armv7-a.sh +0 -5
- package/ios/libsodium-stable/dist-build/android-armv8-a.sh +0 -5
- package/ios/libsodium-stable/dist-build/android-build.sh +0 -95
- package/ios/libsodium-stable/dist-build/android-x86.sh +0 -5
- package/ios/libsodium-stable/dist-build/android-x86_64.sh +0 -5
- package/ios/libsodium-stable/dist-build/apple-xcframework.sh +0 -628
- package/ios/libsodium-stable/dist-build/emscripten-symbols.def +0 -651
- package/ios/libsodium-stable/dist-build/emscripten.sh +0 -206
- package/ios/libsodium-stable/dist-build/generate-emscripten-symbols.sh +0 -59
- package/ios/libsodium-stable/dist-build/macos.sh +0 -26
- package/ios/libsodium-stable/dist-build/msys2-win32.sh +0 -18
- package/ios/libsodium-stable/dist-build/msys2-win64.sh +0 -18
- package/ios/libsodium-stable/dist-build/wasm32-wasi.sh +0 -45
- package/ios/libsodium-stable/lgtm.yml +0 -6
- package/ios/libsodium-stable/libsodium-uninstalled.pc.in +0 -7
- package/ios/libsodium-stable/libsodium.pc.in +0 -12
- package/ios/libsodium-stable/logo.png +0 -0
- package/ios/libsodium-stable/m4/ax_add_fortify_source.m4 +0 -119
- package/ios/libsodium-stable/m4/ax_check_catchable_abrt.m4 +0 -57
- package/ios/libsodium-stable/m4/ax_check_catchable_segv.m4 +0 -47
- package/ios/libsodium-stable/m4/ax_check_compile_flag.m4 +0 -55
- package/ios/libsodium-stable/m4/ax_check_define.m4 +0 -73
- package/ios/libsodium-stable/m4/ax_check_gnu_make.m4 +0 -95
- package/ios/libsodium-stable/m4/ax_check_link_flag.m4 +0 -75
- package/ios/libsodium-stable/m4/ax_pthread.m4 +0 -522
- package/ios/libsodium-stable/m4/ax_tls.m4 +0 -71
- package/ios/libsodium-stable/m4/ax_valgrind_check.m4 +0 -239
- package/ios/libsodium-stable/m4/ld-output-def.m4 +0 -29
- package/ios/libsodium-stable/packaging/dotnet-core/libsodium.pkgproj +0 -49
- package/ios/libsodium-stable/packaging/dotnet-core/test.cs +0 -43
- package/ios/libsodium-stable/packaging/nuget/package.bat +0 -13
- package/ios/libsodium-stable/packaging/nuget/package.config +0 -4
- package/ios/libsodium-stable/packaging/nuget/package.gsl +0 -260
- package/ios/libsodium-stable/regen-msvc/libsodium.vcxproj +0 -326
- package/ios/libsodium-stable/regen-msvc/libsodium.vcxproj.filters +0 -23
- package/ios/libsodium-stable/regen-msvc/libsodium.vcxproj.filters.tpl +0 -35
- package/ios/libsodium-stable/regen-msvc/libsodium.vcxproj.tpl +0 -37
- package/ios/libsodium-stable/regen-msvc/regen-msvc.py +0 -240
- package/ios/libsodium-stable/regen-msvc/tl_libsodium.vcxproj.filters.tpl +0 -23
- package/ios/libsodium-stable/regen-msvc/tl_libsodium.vcxproj.tpl +0 -332
- package/ios/libsodium-stable/src/Makefile.am +0 -3
- package/ios/libsodium-stable/src/libsodium/Makefile.am +0 -314
- package/ios/libsodium-stable/src/libsodium/crypto_aead/aegis128l/aead_aegis128l.c +0 -159
- package/ios/libsodium-stable/src/libsodium/crypto_aead/aegis128l/aegis128l_aesni.c +0 -70
- package/ios/libsodium-stable/src/libsodium/crypto_aead/aegis128l/aegis128l_aesni.h +0 -8
- package/ios/libsodium-stable/src/libsodium/crypto_aead/aegis128l/aegis128l_armcrypto.c +0 -72
- package/ios/libsodium-stable/src/libsodium/crypto_aead/aegis128l/aegis128l_armcrypto.h +0 -8
- package/ios/libsodium-stable/src/libsodium/crypto_aead/aegis128l/aegis128l_common.h +0 -248
- package/ios/libsodium-stable/src/libsodium/crypto_aead/aegis128l/aegis128l_soft.c +0 -59
- package/ios/libsodium-stable/src/libsodium/crypto_aead/aegis128l/aegis128l_soft.h +0 -8
- package/ios/libsodium-stable/src/libsodium/crypto_aead/aegis128l/implementations.h +0 -17
- package/ios/libsodium-stable/src/libsodium/crypto_aead/aegis256/aead_aegis256.c +0 -158
- package/ios/libsodium-stable/src/libsodium/crypto_aead/aegis256/aegis256_aesni.c +0 -65
- package/ios/libsodium-stable/src/libsodium/crypto_aead/aegis256/aegis256_aesni.h +0 -8
- package/ios/libsodium-stable/src/libsodium/crypto_aead/aegis256/aegis256_armcrypto.c +0 -70
- package/ios/libsodium-stable/src/libsodium/crypto_aead/aegis256/aegis256_armcrypto.h +0 -8
- package/ios/libsodium-stable/src/libsodium/crypto_aead/aegis256/aegis256_common.h +0 -231
- package/ios/libsodium-stable/src/libsodium/crypto_aead/aegis256/aegis256_soft.c +0 -54
- package/ios/libsodium-stable/src/libsodium/crypto_aead/aegis256/aegis256_soft.h +0 -8
- package/ios/libsodium-stable/src/libsodium/crypto_aead/aegis256/implementations.h +0 -17
- package/ios/libsodium-stable/src/libsodium/crypto_aead/aes256gcm/aead_aes256gcm.c +0 -157
- package/ios/libsodium-stable/src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c +0 -1015
- package/ios/libsodium-stable/src/libsodium/crypto_aead/aes256gcm/armcrypto/aead_aes256gcm_armcrypto.c +0 -1033
- package/ios/libsodium-stable/src/libsodium/crypto_aead/chacha20poly1305/aead_chacha20poly1305.c +0 -400
- package/ios/libsodium-stable/src/libsodium/crypto_aead/xchacha20poly1305/aead_xchacha20poly1305.c +0 -262
- package/ios/libsodium-stable/src/libsodium/crypto_auth/crypto_auth.c +0 -41
- package/ios/libsodium-stable/src/libsodium/crypto_auth/hmacsha256/auth_hmacsha256.c +0 -118
- package/ios/libsodium-stable/src/libsodium/crypto_auth/hmacsha512/auth_hmacsha512.c +0 -118
- package/ios/libsodium-stable/src/libsodium/crypto_auth/hmacsha512256/auth_hmacsha512256.c +0 -93
- package/ios/libsodium-stable/src/libsodium/crypto_box/crypto_box.c +0 -114
- package/ios/libsodium-stable/src/libsodium/crypto_box/crypto_box_easy.c +0 -115
- package/ios/libsodium-stable/src/libsodium/crypto_box/crypto_box_seal.c +0 -68
- package/ios/libsodium-stable/src/libsodium/crypto_box/curve25519xchacha20poly1305/box_curve25519xchacha20poly1305.c +0 -204
- package/ios/libsodium-stable/src/libsodium/crypto_box/curve25519xchacha20poly1305/box_seal_curve25519xchacha20poly1305.c +0 -79
- package/ios/libsodium-stable/src/libsodium/crypto_box/curve25519xsalsa20poly1305/box_curve25519xsalsa20poly1305.c +0 -156
- package/ios/libsodium-stable/src/libsodium/crypto_core/ed25519/core_ed25519.c +0 -225
- package/ios/libsodium-stable/src/libsodium/crypto_core/ed25519/core_ristretto255.c +0 -156
- package/ios/libsodium-stable/src/libsodium/crypto_core/ed25519/ref10/ed25519_ref10.c +0 -2873
- package/ios/libsodium-stable/src/libsodium/crypto_core/ed25519/ref10/fe_25_5/base.h +0 -1344
- package/ios/libsodium-stable/src/libsodium/crypto_core/ed25519/ref10/fe_25_5/base2.h +0 -40
- package/ios/libsodium-stable/src/libsodium/crypto_core/ed25519/ref10/fe_25_5/constants.h +0 -40
- package/ios/libsodium-stable/src/libsodium/crypto_core/ed25519/ref10/fe_25_5/fe.h +0 -220
- package/ios/libsodium-stable/src/libsodium/crypto_core/ed25519/ref10/fe_51/base.h +0 -1344
- package/ios/libsodium-stable/src/libsodium/crypto_core/ed25519/ref10/fe_51/base2.h +0 -40
- package/ios/libsodium-stable/src/libsodium/crypto_core/ed25519/ref10/fe_51/constants.h +0 -41
- package/ios/libsodium-stable/src/libsodium/crypto_core/ed25519/ref10/fe_51/fe.h +0 -116
- package/ios/libsodium-stable/src/libsodium/crypto_core/hchacha20/core_hchacha20.c +0 -93
- package/ios/libsodium-stable/src/libsodium/crypto_core/hsalsa20/core_hsalsa20.c +0 -21
- package/ios/libsodium-stable/src/libsodium/crypto_core/hsalsa20/ref2/core_hsalsa20_ref2.c +0 -95
- package/ios/libsodium-stable/src/libsodium/crypto_core/salsa/ref/core_salsa_ref.c +0 -195
- package/ios/libsodium-stable/src/libsodium/crypto_core/softaes/softaes.c +0 -340
- package/ios/libsodium-stable/src/libsodium/crypto_generichash/blake2b/generichash_blake2.c +0 -55
- package/ios/libsodium-stable/src/libsodium/crypto_generichash/blake2b/ref/blake2.h +0 -106
- package/ios/libsodium-stable/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-avx2.c +0 -52
- package/ios/libsodium-stable/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-avx2.h +0 -142
- package/ios/libsodium-stable/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-ref.c +0 -93
- package/ios/libsodium-stable/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-sse41.c +0 -91
- package/ios/libsodium-stable/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-sse41.h +0 -106
- package/ios/libsodium-stable/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-ssse3.c +0 -95
- package/ios/libsodium-stable/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-ssse3.h +0 -106
- package/ios/libsodium-stable/src/libsodium/crypto_generichash/blake2b/ref/blake2b-load-avx2.h +0 -340
- package/ios/libsodium-stable/src/libsodium/crypto_generichash/blake2b/ref/blake2b-load-sse2.h +0 -164
- package/ios/libsodium-stable/src/libsodium/crypto_generichash/blake2b/ref/blake2b-load-sse41.h +0 -307
- package/ios/libsodium-stable/src/libsodium/crypto_generichash/blake2b/ref/blake2b-ref.c +0 -438
- package/ios/libsodium-stable/src/libsodium/crypto_generichash/blake2b/ref/generichash_blake2b.c +0 -116
- package/ios/libsodium-stable/src/libsodium/crypto_generichash/crypto_generichash.c +0 -91
- package/ios/libsodium-stable/src/libsodium/crypto_hash/crypto_hash.c +0 -20
- package/ios/libsodium-stable/src/libsodium/crypto_hash/sha256/cp/hash_sha256_cp.c +0 -256
- package/ios/libsodium-stable/src/libsodium/crypto_hash/sha256/hash_sha256.c +0 -13
- package/ios/libsodium-stable/src/libsodium/crypto_hash/sha512/cp/hash_sha512_cp.c +0 -284
- package/ios/libsodium-stable/src/libsodium/crypto_hash/sha512/hash_sha512.c +0 -13
- package/ios/libsodium-stable/src/libsodium/crypto_kdf/blake2b/kdf_blake2b.c +0 -52
- package/ios/libsodium-stable/src/libsodium/crypto_kdf/crypto_kdf.c +0 -49
- package/ios/libsodium-stable/src/libsodium/crypto_kdf/hkdf/kdf_hkdf_sha256.c +0 -123
- package/ios/libsodium-stable/src/libsodium/crypto_kdf/hkdf/kdf_hkdf_sha512.c +0 -123
- package/ios/libsodium-stable/src/libsodium/crypto_kx/crypto_kx.c +0 -143
- package/ios/libsodium-stable/src/libsodium/crypto_onetimeauth/crypto_onetimeauth.c +0 -71
- package/ios/libsodium-stable/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna.c +0 -124
- package/ios/libsodium-stable/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna.h +0 -12
- package/ios/libsodium-stable/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna32.h +0 -235
- package/ios/libsodium-stable/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna64.h +0 -221
- package/ios/libsodium-stable/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305.c +0 -90
- package/ios/libsodium-stable/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305.h +0 -21
- package/ios/libsodium-stable/src/libsodium/crypto_onetimeauth/poly1305/sse2/poly1305_sse2.c +0 -957
- package/ios/libsodium-stable/src/libsodium/crypto_onetimeauth/poly1305/sse2/poly1305_sse2.h +0 -12
- package/ios/libsodium-stable/src/libsodium/crypto_pwhash/argon2/argon2-core.c +0 -556
- package/ios/libsodium-stable/src/libsodium/crypto_pwhash/argon2/argon2-core.h +0 -271
- package/ios/libsodium-stable/src/libsodium/crypto_pwhash/argon2/argon2-encoding.c +0 -306
- package/ios/libsodium-stable/src/libsodium/crypto_pwhash/argon2/argon2-encoding.h +0 -34
- package/ios/libsodium-stable/src/libsodium/crypto_pwhash/argon2/argon2-fill-block-avx2.c +0 -243
- package/ios/libsodium-stable/src/libsodium/crypto_pwhash/argon2/argon2-fill-block-avx512f.c +0 -251
- package/ios/libsodium-stable/src/libsodium/crypto_pwhash/argon2/argon2-fill-block-ref.c +0 -234
- package/ios/libsodium-stable/src/libsodium/crypto_pwhash/argon2/argon2-fill-block-ssse3.c +0 -244
- package/ios/libsodium-stable/src/libsodium/crypto_pwhash/argon2/argon2.c +0 -283
- package/ios/libsodium-stable/src/libsodium/crypto_pwhash/argon2/argon2.h +0 -305
- package/ios/libsodium-stable/src/libsodium/crypto_pwhash/argon2/blake2b-long.c +0 -79
- package/ios/libsodium-stable/src/libsodium/crypto_pwhash/argon2/blake2b-long.h +0 -8
- package/ios/libsodium-stable/src/libsodium/crypto_pwhash/argon2/blamka-round-avx2.h +0 -150
- package/ios/libsodium-stable/src/libsodium/crypto_pwhash/argon2/blamka-round-avx512f.h +0 -145
- package/ios/libsodium-stable/src/libsodium/crypto_pwhash/argon2/blamka-round-ref.h +0 -40
- package/ios/libsodium-stable/src/libsodium/crypto_pwhash/argon2/blamka-round-ssse3.h +0 -124
- package/ios/libsodium-stable/src/libsodium/crypto_pwhash/argon2/pwhash_argon2i.c +0 -294
- package/ios/libsodium-stable/src/libsodium/crypto_pwhash/argon2/pwhash_argon2id.c +0 -238
- package/ios/libsodium-stable/src/libsodium/crypto_pwhash/crypto_pwhash.c +0 -212
- package/ios/libsodium-stable/src/libsodium/crypto_pwhash/scryptsalsa208sha256/crypto_scrypt-common.c +0 -268
- package/ios/libsodium-stable/src/libsodium/crypto_pwhash/scryptsalsa208sha256/crypto_scrypt.h +0 -92
- package/ios/libsodium-stable/src/libsodium/crypto_pwhash/scryptsalsa208sha256/nosse/pwhash_scryptsalsa208sha256_nosse.c +0 -318
- package/ios/libsodium-stable/src/libsodium/crypto_pwhash/scryptsalsa208sha256/pbkdf2-sha256.c +0 -96
- package/ios/libsodium-stable/src/libsodium/crypto_pwhash/scryptsalsa208sha256/pbkdf2-sha256.h +0 -45
- package/ios/libsodium-stable/src/libsodium/crypto_pwhash/scryptsalsa208sha256/pwhash_scryptsalsa208sha256.c +0 -301
- package/ios/libsodium-stable/src/libsodium/crypto_pwhash/scryptsalsa208sha256/scrypt_platform.c +0 -112
- package/ios/libsodium-stable/src/libsodium/crypto_pwhash/scryptsalsa208sha256/sse/pwhash_scryptsalsa208sha256_sse.c +0 -406
- package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/crypto_scalarmult.c +0 -33
- package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/curve25519/ref10/x25519_ref10.c +0 -182
- package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/curve25519/ref10/x25519_ref10.h +0 -10
- package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/curve25519/sandy2x/consts.S +0 -25
- package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/curve25519/sandy2x/consts_namespace.h +0 -20
- package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/curve25519/sandy2x/curve25519_sandy2x.c +0 -71
- package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/curve25519/sandy2x/curve25519_sandy2x.h +0 -9
- package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe.h +0 -26
- package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51.h +0 -35
- package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51_invert.c +0 -58
- package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51_mul.S +0 -200
- package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51_namespace.h +0 -16
- package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51_nsquare.S +0 -174
- package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51_pack.S +0 -228
- package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe_frombytes_sandy2x.c +0 -78
- package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/curve25519/sandy2x/ladder.S +0 -1442
- package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/curve25519/sandy2x/ladder.h +0 -18
- package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/curve25519/sandy2x/ladder_namespace.h +0 -8
- package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/curve25519/sandy2x/sandy2x.S +0 -16
- package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/curve25519/scalarmult_curve25519.c +0 -60
- package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/curve25519/scalarmult_curve25519.h +0 -11
- package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/ed25519/ref10/scalarmult_ed25519_ref10.c +0 -121
- package/ios/libsodium-stable/src/libsodium/crypto_scalarmult/ristretto255/ref10/scalarmult_ristretto255_ref10.c +0 -63
- package/ios/libsodium-stable/src/libsodium/crypto_secretbox/crypto_secretbox.c +0 -67
- package/ios/libsodium-stable/src/libsodium/crypto_secretbox/crypto_secretbox_easy.c +0 -145
- package/ios/libsodium-stable/src/libsodium/crypto_secretbox/xchacha20poly1305/secretbox_xchacha20poly1305.c +0 -177
- package/ios/libsodium-stable/src/libsodium/crypto_secretbox/xsalsa20poly1305/secretbox_xsalsa20poly1305.c +0 -89
- package/ios/libsodium-stable/src/libsodium/crypto_secretstream/xchacha20poly1305/secretstream_xchacha20poly1305.c +0 -313
- package/ios/libsodium-stable/src/libsodium/crypto_shorthash/crypto_shorthash.c +0 -34
- package/ios/libsodium-stable/src/libsodium/crypto_shorthash/siphash24/ref/shorthash_siphash24_ref.c +0 -71
- package/ios/libsodium-stable/src/libsodium/crypto_shorthash/siphash24/ref/shorthash_siphash_ref.h +0 -24
- package/ios/libsodium-stable/src/libsodium/crypto_shorthash/siphash24/ref/shorthash_siphashx24_ref.c +0 -77
- package/ios/libsodium-stable/src/libsodium/crypto_shorthash/siphash24/shorthash_siphash24.c +0 -11
- package/ios/libsodium-stable/src/libsodium/crypto_shorthash/siphash24/shorthash_siphashx24.c +0 -11
- package/ios/libsodium-stable/src/libsodium/crypto_sign/crypto_sign.c +0 -115
- package/ios/libsodium-stable/src/libsodium/crypto_sign/ed25519/ref10/keypair.c +0 -84
- package/ios/libsodium-stable/src/libsodium/crypto_sign/ed25519/ref10/obsolete.c +0 -118
- package/ios/libsodium-stable/src/libsodium/crypto_sign/ed25519/ref10/open.c +0 -98
- package/ios/libsodium-stable/src/libsodium/crypto_sign/ed25519/ref10/sign.c +0 -128
- package/ios/libsodium-stable/src/libsodium/crypto_sign/ed25519/ref10/sign_ed25519_ref10.h +0 -18
- package/ios/libsodium-stable/src/libsodium/crypto_sign/ed25519/sign_ed25519.c +0 -97
- package/ios/libsodium-stable/src/libsodium/crypto_stream/chacha20/dolbeau/chacha20_dolbeau-avx2.c +0 -180
- package/ios/libsodium-stable/src/libsodium/crypto_stream/chacha20/dolbeau/chacha20_dolbeau-avx2.h +0 -8
- package/ios/libsodium-stable/src/libsodium/crypto_stream/chacha20/dolbeau/chacha20_dolbeau-ssse3.c +0 -176
- package/ios/libsodium-stable/src/libsodium/crypto_stream/chacha20/dolbeau/chacha20_dolbeau-ssse3.h +0 -8
- package/ios/libsodium-stable/src/libsodium/crypto_stream/chacha20/dolbeau/u0.h +0 -86
- package/ios/libsodium-stable/src/libsodium/crypto_stream/chacha20/dolbeau/u1.h +0 -98
- package/ios/libsodium-stable/src/libsodium/crypto_stream/chacha20/dolbeau/u4.h +0 -177
- package/ios/libsodium-stable/src/libsodium/crypto_stream/chacha20/dolbeau/u8.h +0 -326
- package/ios/libsodium-stable/src/libsodium/crypto_stream/chacha20/ref/chacha20_ref.c +0 -312
- package/ios/libsodium-stable/src/libsodium/crypto_stream/chacha20/ref/chacha20_ref.h +0 -8
- package/ios/libsodium-stable/src/libsodium/crypto_stream/chacha20/stream_chacha20.c +0 -184
- package/ios/libsodium-stable/src/libsodium/crypto_stream/chacha20/stream_chacha20.h +0 -22
- package/ios/libsodium-stable/src/libsodium/crypto_stream/crypto_stream.c +0 -49
- package/ios/libsodium-stable/src/libsodium/crypto_stream/salsa20/ref/salsa20_ref.c +0 -120
- package/ios/libsodium-stable/src/libsodium/crypto_stream/salsa20/ref/salsa20_ref.h +0 -8
- package/ios/libsodium-stable/src/libsodium/crypto_stream/salsa20/stream_salsa20.c +0 -100
- package/ios/libsodium-stable/src/libsodium/crypto_stream/salsa20/stream_salsa20.h +0 -16
- package/ios/libsodium-stable/src/libsodium/crypto_stream/salsa20/xmm6/salsa20_xmm6-asm.S +0 -965
- package/ios/libsodium-stable/src/libsodium/crypto_stream/salsa20/xmm6/salsa20_xmm6.c +0 -31
- package/ios/libsodium-stable/src/libsodium/crypto_stream/salsa20/xmm6/salsa20_xmm6.h +0 -8
- package/ios/libsodium-stable/src/libsodium/crypto_stream/salsa20/xmm6int/salsa20_xmm6int-avx2.c +0 -134
- package/ios/libsodium-stable/src/libsodium/crypto_stream/salsa20/xmm6int/salsa20_xmm6int-avx2.h +0 -8
- package/ios/libsodium-stable/src/libsodium/crypto_stream/salsa20/xmm6int/salsa20_xmm6int-sse2.c +0 -128
- package/ios/libsodium-stable/src/libsodium/crypto_stream/salsa20/xmm6int/salsa20_xmm6int-sse2.h +0 -8
- package/ios/libsodium-stable/src/libsodium/crypto_stream/salsa20/xmm6int/u0.h +0 -195
- package/ios/libsodium-stable/src/libsodium/crypto_stream/salsa20/xmm6int/u1.h +0 -207
- package/ios/libsodium-stable/src/libsodium/crypto_stream/salsa20/xmm6int/u4.h +0 -547
- package/ios/libsodium-stable/src/libsodium/crypto_stream/salsa20/xmm6int/u8.h +0 -477
- package/ios/libsodium-stable/src/libsodium/crypto_stream/salsa2012/ref/stream_salsa2012_ref.c +0 -106
- package/ios/libsodium-stable/src/libsodium/crypto_stream/salsa2012/stream_salsa2012.c +0 -26
- package/ios/libsodium-stable/src/libsodium/crypto_stream/salsa208/ref/stream_salsa208_ref.c +0 -106
- package/ios/libsodium-stable/src/libsodium/crypto_stream/salsa208/stream_salsa208.c +0 -26
- package/ios/libsodium-stable/src/libsodium/crypto_stream/xchacha20/stream_xchacha20.c +0 -69
- package/ios/libsodium-stable/src/libsodium/crypto_stream/xsalsa20/stream_xsalsa20.c +0 -66
- package/ios/libsodium-stable/src/libsodium/crypto_verify/verify.c +0 -103
- package/ios/libsodium-stable/src/libsodium/include/Makefile.am +0 -76
- package/ios/libsodium-stable/src/libsodium/include/sodium/core.h +0 -28
- package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_aead_aegis128l.h +0 -92
- package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_aead_aegis256.h +0 -92
- package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_aead_aes256gcm.h +0 -179
- package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_aead_chacha20poly1305.h +0 -180
- package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_aead_xchacha20poly1305.h +0 -100
- package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_auth.h +0 -46
- package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_auth_hmacsha256.h +0 -70
- package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_auth_hmacsha512.h +0 -68
- package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_auth_hmacsha512256.h +0 -65
- package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_box.h +0 -177
- package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_box_curve25519xchacha20poly1305.h +0 -164
- package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_box_curve25519xsalsa20poly1305.h +0 -112
- package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_core_ed25519.h +0 -100
- package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_core_hchacha20.h +0 -36
- package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_core_hsalsa20.h +0 -36
- package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_core_ristretto255.h +0 -100
- package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_core_salsa20.h +0 -36
- package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_core_salsa2012.h +0 -36
- package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_core_salsa208.h +0 -40
- package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_generichash.h +0 -84
- package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_generichash_blake2b.h +0 -122
- package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_hash.h +0 -40
- package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_hash_sha256.h +0 -60
- package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_hash_sha512.h +0 -60
- package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_kdf.h +0 -53
- package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_kdf_blake2b.h +0 -44
- package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_kdf_hkdf_sha256.h +0 -74
- package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_kdf_hkdf_sha512.h +0 -75
- package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_kx.h +0 -66
- package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_onetimeauth.h +0 -65
- package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_onetimeauth_poly1305.h +0 -72
- package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_pwhash.h +0 -147
- package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_pwhash_argon2i.h +0 -122
- package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_pwhash_argon2id.h +0 -122
- package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_pwhash_scryptsalsa208sha256.h +0 -120
- package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_scalarmult.h +0 -46
- package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_scalarmult_curve25519.h +0 -42
- package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_scalarmult_ed25519.h +0 -51
- package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_scalarmult_ristretto255.h +0 -43
- package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_secretbox.h +0 -93
- package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_secretbox_xchacha20poly1305.h +0 -70
- package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_secretbox_xsalsa20poly1305.h +0 -69
- package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_secretstream_xchacha20poly1305.h +0 -108
- package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_shorthash.h +0 -41
- package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_shorthash_siphash24.h +0 -50
- package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_sign.h +0 -107
- package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_sign_ed25519.h +0 -124
- package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_sign_edwards25519sha512batch.h +0 -55
- package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_stream.h +0 -59
- package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_stream_chacha20.h +0 -106
- package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_stream_salsa20.h +0 -61
- package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_stream_salsa2012.h +0 -53
- package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_stream_salsa208.h +0 -56
- package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_stream_xchacha20.h +0 -61
- package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_stream_xsalsa20.h +0 -61
- package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_verify_16.h +0 -23
- package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_verify_32.h +0 -23
- package/ios/libsodium-stable/src/libsodium/include/sodium/crypto_verify_64.h +0 -23
- package/ios/libsodium-stable/src/libsodium/include/sodium/export.h +0 -57
- package/ios/libsodium-stable/src/libsodium/include/sodium/private/asm_cet.h +0 -11
- package/ios/libsodium-stable/src/libsodium/include/sodium/private/chacha20_ietf_ext.h +0 -16
- package/ios/libsodium-stable/src/libsodium/include/sodium/private/common.h +0 -296
- package/ios/libsodium-stable/src/libsodium/include/sodium/private/ed25519_ref10.h +0 -142
- package/ios/libsodium-stable/src/libsodium/include/sodium/private/ed25519_ref10_fe_25_5.h +0 -1030
- package/ios/libsodium-stable/src/libsodium/include/sodium/private/ed25519_ref10_fe_51.h +0 -508
- package/ios/libsodium-stable/src/libsodium/include/sodium/private/implementations.h +0 -13
- package/ios/libsodium-stable/src/libsodium/include/sodium/private/mutex.h +0 -7
- package/ios/libsodium-stable/src/libsodium/include/sodium/private/softaes.h +0 -56
- package/ios/libsodium-stable/src/libsodium/include/sodium/private/sse2_64_32.h +0 -50
- package/ios/libsodium-stable/src/libsodium/include/sodium/randombytes.h +0 -72
- package/ios/libsodium-stable/src/libsodium/include/sodium/randombytes_internal_random.h +0 -22
- package/ios/libsodium-stable/src/libsodium/include/sodium/randombytes_sysrandom.h +0 -19
- package/ios/libsodium-stable/src/libsodium/include/sodium/runtime.h +0 -55
- package/ios/libsodium-stable/src/libsodium/include/sodium/utils.h +0 -179
- package/ios/libsodium-stable/src/libsodium/include/sodium/version.h.in +0 -33
- package/ios/libsodium-stable/src/libsodium/include/sodium.h +0 -75
- package/ios/libsodium-stable/src/libsodium/randombytes/internal/randombytes_internal_random.c +0 -648
- package/ios/libsodium-stable/src/libsodium/randombytes/randombytes.c +0 -200
- package/ios/libsodium-stable/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c +0 -396
- package/ios/libsodium-stable/src/libsodium/sodium/codecs.c +0 -335
- package/ios/libsodium-stable/src/libsodium/sodium/core.c +0 -216
- package/ios/libsodium-stable/src/libsodium/sodium/runtime.c +0 -391
- package/ios/libsodium-stable/src/libsodium/sodium/utils.c +0 -809
- package/ios/libsodium-stable/src/libsodium/sodium/version.c +0 -30
- package/ios/libsodium-stable/test/Makefile.am +0 -5
- package/ios/libsodium-stable/test/constcheck.sh +0 -22
- package/ios/libsodium-stable/test/default/Makefile.am +0 -525
- package/ios/libsodium-stable/test/default/aead_aegis128l.c +0 -642
- package/ios/libsodium-stable/test/default/aead_aegis128l.exp +0 -1
- package/ios/libsodium-stable/test/default/aead_aegis256.c +0 -723
- package/ios/libsodium-stable/test/default/aead_aegis256.exp +0 -1
- package/ios/libsodium-stable/test/default/aead_aes256gcm.c +0 -3328
- package/ios/libsodium-stable/test/default/aead_aes256gcm.exp +0 -1
- package/ios/libsodium-stable/test/default/aead_aes256gcm2.c +0 -276
- package/ios/libsodium-stable/test/default/aead_aes256gcm2.exp +0 -1
- package/ios/libsodium-stable/test/default/aead_chacha20poly1305.c +0 -372
- package/ios/libsodium-stable/test/default/aead_chacha20poly1305.exp +0 -63
- package/ios/libsodium-stable/test/default/aead_chacha20poly13052.c +0 -1046
- package/ios/libsodium-stable/test/default/aead_chacha20poly13052.exp +0 -1
- package/ios/libsodium-stable/test/default/aead_xchacha20poly1305.c +0 -203
- package/ios/libsodium-stable/test/default/aead_xchacha20poly1305.exp +0 -51
- package/ios/libsodium-stable/test/default/auth.c +0 -141
- package/ios/libsodium-stable/test/default/auth.exp +0 -30
- package/ios/libsodium-stable/test/default/auth2.c +0 -34
- package/ios/libsodium-stable/test/default/auth2.exp +0 -4
- package/ios/libsodium-stable/test/default/auth3.c +0 -36
- package/ios/libsodium-stable/test/default/auth3.exp +0 -1
- package/ios/libsodium-stable/test/default/auth5.c +0 -41
- package/ios/libsodium-stable/test/default/auth5.exp +0 -0
- package/ios/libsodium-stable/test/default/auth6.c +0 -23
- package/ios/libsodium-stable/test/default/auth6.exp +0 -8
- package/ios/libsodium-stable/test/default/auth7.c +0 -41
- package/ios/libsodium-stable/test/default/auth7.exp +0 -0
- package/ios/libsodium-stable/test/default/box.c +0 -112
- package/ios/libsodium-stable/test/default/box.exp +0 -38
- package/ios/libsodium-stable/test/default/box2.c +0 -80
- package/ios/libsodium-stable/test/default/box2.exp +0 -34
- package/ios/libsodium-stable/test/default/box7.c +0 -50
- package/ios/libsodium-stable/test/default/box7.exp +0 -0
- package/ios/libsodium-stable/test/default/box8.c +0 -58
- package/ios/libsodium-stable/test/default/box8.exp +0 -0
- package/ios/libsodium-stable/test/default/box_easy.c +0 -72
- package/ios/libsodium-stable/test/default/box_easy.exp +0 -3
- package/ios/libsodium-stable/test/default/box_easy2.c +0 -149
- package/ios/libsodium-stable/test/default/box_easy2.exp +0 -7
- package/ios/libsodium-stable/test/default/box_seal.c +0 -165
- package/ios/libsodium-stable/test/default/box_seal.exp +0 -8
- package/ios/libsodium-stable/test/default/box_seed.c +0 -30
- package/ios/libsodium-stable/test/default/box_seed.exp +0 -8
- package/ios/libsodium-stable/test/default/chacha20.c +0 -186
- package/ios/libsodium-stable/test/default/chacha20.exp +0 -64
- package/ios/libsodium-stable/test/default/cmptest.h +0 -238
- package/ios/libsodium-stable/test/default/codecs.c +0 -251
- package/ios/libsodium-stable/test/default/codecs.exp +0 -30
- package/ios/libsodium-stable/test/default/core1.c +0 -41
- package/ios/libsodium-stable/test/default/core1.exp +0 -4
- package/ios/libsodium-stable/test/default/core2.c +0 -38
- package/ios/libsodium-stable/test/default/core2.exp +0 -4
- package/ios/libsodium-stable/test/default/core3.c +0 -115
- package/ios/libsodium-stable/test/default/core3.exp +0 -3
- package/ios/libsodium-stable/test/default/core4.c +0 -36
- package/ios/libsodium-stable/test/default/core4.exp +0 -8
- package/ios/libsodium-stable/test/default/core5.c +0 -33
- package/ios/libsodium-stable/test/default/core5.exp +0 -4
- package/ios/libsodium-stable/test/default/core6.c +0 -52
- package/ios/libsodium-stable/test/default/core6.exp +0 -4
- package/ios/libsodium-stable/test/default/core_ed25519.c +0 -545
- package/ios/libsodium-stable/test/default/core_ed25519.exp +0 -55
- package/ios/libsodium-stable/test/default/core_ristretto255.c +0 -271
- package/ios/libsodium-stable/test/default/core_ristretto255.exp +0 -8
- package/ios/libsodium-stable/test/default/ed25519_convert.c +0 -70
- package/ios/libsodium-stable/test/default/ed25519_convert.exp +0 -3
- package/ios/libsodium-stable/test/default/generichash.c +0 -1406
- package/ios/libsodium-stable/test/default/generichash.exp +0 -65
- package/ios/libsodium-stable/test/default/generichash2.c +0 -62
- package/ios/libsodium-stable/test/default/generichash2.exp +0 -64
- package/ios/libsodium-stable/test/default/generichash3.c +0 -176
- package/ios/libsodium-stable/test/default/generichash3.exp +0 -75
- package/ios/libsodium-stable/test/default/hash.c +0 -47
- package/ios/libsodium-stable/test/default/hash.exp +0 -4
- package/ios/libsodium-stable/test/default/hash3.c +0 -20
- package/ios/libsodium-stable/test/default/hash3.exp +0 -1
- package/ios/libsodium-stable/test/default/index.html.tpl +0 -98
- package/ios/libsodium-stable/test/default/kdf.c +0 -71
- package/ios/libsodium-stable/test/default/kdf.exp +0 -77
- package/ios/libsodium-stable/test/default/kdf_hkdf.c +0 -102
- package/ios/libsodium-stable/test/default/kdf_hkdf.exp +0 -205
- package/ios/libsodium-stable/test/default/keygen.c +0 -67
- package/ios/libsodium-stable/test/default/keygen.exp +0 -1
- package/ios/libsodium-stable/test/default/kx.c +0 -149
- package/ios/libsodium-stable/test/default/kx.exp +0 -7
- package/ios/libsodium-stable/test/default/metamorphic.c +0 -187
- package/ios/libsodium-stable/test/default/metamorphic.exp +0 -1
- package/ios/libsodium-stable/test/default/misuse.c +0 -187
- package/ios/libsodium-stable/test/default/misuse.exp +0 -0
- package/ios/libsodium-stable/test/default/onetimeauth.c +0 -63
- package/ios/libsodium-stable/test/default/onetimeauth.exp +0 -4
- package/ios/libsodium-stable/test/default/onetimeauth2.c +0 -33
- package/ios/libsodium-stable/test/default/onetimeauth2.exp +0 -1
- package/ios/libsodium-stable/test/default/onetimeauth7.c +0 -36
- package/ios/libsodium-stable/test/default/onetimeauth7.exp +0 -0
- package/ios/libsodium-stable/test/default/pre.js.inc +0 -22
- package/ios/libsodium-stable/test/default/pwhash_argon2i.c +0 -467
- package/ios/libsodium-stable/test/default/pwhash_argon2i.exp +0 -11
- package/ios/libsodium-stable/test/default/pwhash_argon2id.c +0 -517
- package/ios/libsodium-stable/test/default/pwhash_argon2id.exp +0 -14
- package/ios/libsodium-stable/test/default/pwhash_scrypt.c +0 -393
- package/ios/libsodium-stable/test/default/pwhash_scrypt.exp +0 -37
- package/ios/libsodium-stable/test/default/pwhash_scrypt_ll.c +0 -59
- package/ios/libsodium-stable/test/default/pwhash_scrypt_ll.exp +0 -15
- package/ios/libsodium-stable/test/default/randombytes.c +0 -164
- package/ios/libsodium-stable/test/default/randombytes.exp +0 -2
- package/ios/libsodium-stable/test/default/run.sh +0 -9
- package/ios/libsodium-stable/test/default/scalarmult.c +0 -77
- package/ios/libsodium-stable/test/default/scalarmult.exp +0 -5
- package/ios/libsodium-stable/test/default/scalarmult2.c +0 -22
- package/ios/libsodium-stable/test/default/scalarmult2.exp +0 -1
- package/ios/libsodium-stable/test/default/scalarmult5.c +0 -30
- package/ios/libsodium-stable/test/default/scalarmult5.exp +0 -1
- package/ios/libsodium-stable/test/default/scalarmult6.c +0 -54
- package/ios/libsodium-stable/test/default/scalarmult6.exp +0 -4
- package/ios/libsodium-stable/test/default/scalarmult7.c +0 -34
- package/ios/libsodium-stable/test/default/scalarmult7.exp +0 -1
- package/ios/libsodium-stable/test/default/scalarmult8.c +0 -580
- package/ios/libsodium-stable/test/default/scalarmult8.exp +0 -65
- package/ios/libsodium-stable/test/default/scalarmult_ed25519.c +0 -134
- package/ios/libsodium-stable/test/default/scalarmult_ed25519.exp +0 -1
- package/ios/libsodium-stable/test/default/scalarmult_ristretto255.c +0 -51
- package/ios/libsodium-stable/test/default/scalarmult_ristretto255.exp +0 -18
- package/ios/libsodium-stable/test/default/secretbox.c +0 -84
- package/ios/libsodium-stable/test/default/secretbox.exp +0 -38
- package/ios/libsodium-stable/test/default/secretbox2.c +0 -55
- package/ios/libsodium-stable/test/default/secretbox2.exp +0 -17
- package/ios/libsodium-stable/test/default/secretbox7.c +0 -36
- package/ios/libsodium-stable/test/default/secretbox7.exp +0 -0
- package/ios/libsodium-stable/test/default/secretbox8.c +0 -41
- package/ios/libsodium-stable/test/default/secretbox8.exp +0 -0
- package/ios/libsodium-stable/test/default/secretbox_easy.c +0 -124
- package/ios/libsodium-stable/test/default/secretbox_easy.exp +0 -9
- package/ios/libsodium-stable/test/default/secretbox_easy2.c +0 -72
- package/ios/libsodium-stable/test/default/secretbox_easy2.exp +0 -5
- package/ios/libsodium-stable/test/default/secretstream_xchacha20poly1305.c +0 -329
- package/ios/libsodium-stable/test/default/secretstream_xchacha20poly1305.exp +0 -1
- package/ios/libsodium-stable/test/default/shorthash.c +0 -35
- package/ios/libsodium-stable/test/default/shorthash.exp +0 -64
- package/ios/libsodium-stable/test/default/sign.c +0 -1324
- package/ios/libsodium-stable/test/default/sign.exp +0 -5
- package/ios/libsodium-stable/test/default/siphashx24.c +0 -33
- package/ios/libsodium-stable/test/default/siphashx24.exp +0 -64
- package/ios/libsodium-stable/test/default/sodium_core.c +0 -43
- package/ios/libsodium-stable/test/default/sodium_core.exp +0 -1
- package/ios/libsodium-stable/test/default/sodium_utils.c +0 -224
- package/ios/libsodium-stable/test/default/sodium_utils.exp +0 -25
- package/ios/libsodium-stable/test/default/sodium_utils2.c +0 -120
- package/ios/libsodium-stable/test/default/sodium_utils2.exp +0 -3
- package/ios/libsodium-stable/test/default/sodium_utils3.c +0 -90
- package/ios/libsodium-stable/test/default/sodium_utils3.exp +0 -2
- package/ios/libsodium-stable/test/default/sodium_version.c +0 -18
- package/ios/libsodium-stable/test/default/sodium_version.exp +0 -3
- package/ios/libsodium-stable/test/default/stream.c +0 -84
- package/ios/libsodium-stable/test/default/stream.exp +0 -83
- package/ios/libsodium-stable/test/default/stream2.c +0 -59
- package/ios/libsodium-stable/test/default/stream2.exp +0 -2
- package/ios/libsodium-stable/test/default/stream3.c +0 -32
- package/ios/libsodium-stable/test/default/stream3.exp +0 -4
- package/ios/libsodium-stable/test/default/stream4.c +0 -51
- package/ios/libsodium-stable/test/default/stream4.exp +0 -17
- package/ios/libsodium-stable/test/default/verify1.c +0 -76
- package/ios/libsodium-stable/test/default/verify1.exp +0 -2
- package/ios/libsodium-stable/test/default/wasi-test-wrapper.sh +0 -98
- package/ios/libsodium-stable/test/default/wintest.bat +0 -61
- package/ios/libsodium-stable/test/default/xchacha20.c +0 -428
- package/ios/libsodium-stable/test/default/xchacha20.exp +0 -5
- package/ios/libsodium-stable/test/quirks/quirks.h +0 -34
package/ios/libsodium-stable/src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c
DELETED
|
@@ -1,1015 +0,0 @@
|
|
|
1
|
-
#include <errno.h>
|
|
2
|
-
#include <limits.h>
|
|
3
|
-
#include <stdint.h>
|
|
4
|
-
#include <stdlib.h>
|
|
5
|
-
#include <string.h>
|
|
6
|
-
|
|
7
|
-
#include "core.h"
|
|
8
|
-
#include "crypto_aead_aes256gcm.h"
|
|
9
|
-
#include "crypto_verify_16.h"
|
|
10
|
-
#include "export.h"
|
|
11
|
-
#include "private/common.h"
|
|
12
|
-
#include "private/sse2_64_32.h"
|
|
13
|
-
#include "randombytes.h"
|
|
14
|
-
#include "runtime.h"
|
|
15
|
-
#include "utils.h"
|
|
16
|
-
|
|
17
|
-
#if defined(HAVE_TMMINTRIN_H) && defined(HAVE_WMMINTRIN_H)
|
|
18
|
-
|
|
19
|
-
# ifdef __clang__
|
|
20
|
-
# pragma clang attribute push(__attribute__((target("aes,avx,pclmul"))), apply_to = function)
|
|
21
|
-
# elif defined(__GNUC__)
|
|
22
|
-
# pragma GCC target("aes,avx,pclmul")
|
|
23
|
-
# endif
|
|
24
|
-
|
|
25
|
-
#if !defined(_MSC_VER) || _MSC_VER < 1800
|
|
26
|
-
#define __vectorcall
|
|
27
|
-
#endif
|
|
28
|
-
|
|
29
|
-
#include <tmmintrin.h>
|
|
30
|
-
#include <wmmintrin.h>
|
|
31
|
-
|
|
32
|
-
#define ABYTES crypto_aead_aes256gcm_ABYTES
|
|
33
|
-
#define NPUBBYTES crypto_aead_aes256gcm_NPUBBYTES
|
|
34
|
-
#define KEYBYTES crypto_aead_aes256gcm_KEYBYTES
|
|
35
|
-
|
|
36
|
-
#define PARALLEL_BLOCKS 7
|
|
37
|
-
#undef USE_KARATSUBA_MULTIPLICATION
|
|
38
|
-
|
|
39
|
-
typedef __m128i BlockVec;
|
|
40
|
-
|
|
41
|
-
#define LOAD128(a) _mm_loadu_si128((const BlockVec *) (a))
|
|
42
|
-
#define STORE128(a, b) _mm_storeu_si128((BlockVec *) (a), (b))
|
|
43
|
-
#define AES_ENCRYPT(block_vec, rkey) _mm_aesenc_si128((block_vec), (rkey))
|
|
44
|
-
#define AES_ENCRYPTLAST(block_vec, rkey) _mm_aesenclast_si128((block_vec), (rkey))
|
|
45
|
-
#define AES_KEYGEN(block_vec, rc) _mm_aeskeygenassist_si128((block_vec), (rc))
|
|
46
|
-
#define XOR128(a, b) _mm_xor_si128((a), (b))
|
|
47
|
-
#define AND128(a, b) _mm_and_si128((a), (b))
|
|
48
|
-
#define OR128(a, b) _mm_or_si128((a), (b))
|
|
49
|
-
#define SET64x2(a, b) _mm_set_epi64x((uint64_t) (a), (uint64_t) (b))
|
|
50
|
-
#define ZERO128 _mm_setzero_si128()
|
|
51
|
-
#define ONE128 SET64x2(0, 1)
|
|
52
|
-
#define ADD64x2(a, b) _mm_add_epi64((a), (b))
|
|
53
|
-
#define SUB64x2(a, b) _mm_sub_epi64((a), (b))
|
|
54
|
-
#define SHL64x2(a, b) _mm_slli_epi64((a), (b))
|
|
55
|
-
#define SHR64x2(a, b) _mm_srli_epi64((a), (b))
|
|
56
|
-
#define REV128(x) \
|
|
57
|
-
_mm_shuffle_epi8((x), _mm_set_epi8(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15))
|
|
58
|
-
#define SHUFFLE32x4(x, a, b, c, d) _mm_shuffle_epi32((x), _MM_SHUFFLE((d), (c), (b), (a)))
|
|
59
|
-
#define BYTESHL128(a, b) _mm_slli_si128(a, b)
|
|
60
|
-
#define BYTESHR128(a, b) _mm_srli_si128(a, b)
|
|
61
|
-
#define SHL128(a, b) OR128(SHL64x2((a), (b)), SHR64x2(BYTESHL128((a), 8), 64 - (b)))
|
|
62
|
-
#define CLMULLO128(a, b) _mm_clmulepi64_si128((a), (b), 0x00)
|
|
63
|
-
#define CLMULHI128(a, b) _mm_clmulepi64_si128((a), (b), 0x11)
|
|
64
|
-
#define CLMULLOHI128(a, b) _mm_clmulepi64_si128((a), (b), 0x10)
|
|
65
|
-
#define CLMULHILO128(a, b) _mm_clmulepi64_si128((a), (b), 0x01)
|
|
66
|
-
#define PREFETCH_READ(x) _mm_prefetch((x), _MM_HINT_T1)
|
|
67
|
-
#define PREFETCH_WRITE(x) _mm_prefetch((x), _MM_HINT_T1)
|
|
68
|
-
|
|
69
|
-
#define ROUNDS 14
|
|
70
|
-
|
|
71
|
-
#define PC_COUNT (2 * PARALLEL_BLOCKS)
|
|
72
|
-
|
|
73
|
-
typedef struct I256 {
|
|
74
|
-
BlockVec hi;
|
|
75
|
-
BlockVec lo;
|
|
76
|
-
BlockVec mid;
|
|
77
|
-
} I256;
|
|
78
|
-
|
|
79
|
-
typedef BlockVec Precomp;
|
|
80
|
-
|
|
81
|
-
typedef struct GHash {
|
|
82
|
-
BlockVec acc;
|
|
83
|
-
} GHash;
|
|
84
|
-
|
|
85
|
-
typedef struct State {
|
|
86
|
-
BlockVec rkeys[ROUNDS + 1];
|
|
87
|
-
Precomp hx[PC_COUNT];
|
|
88
|
-
} State;
|
|
89
|
-
|
|
90
|
-
static void __vectorcall expand256(const unsigned char key[KEYBYTES], BlockVec rkeys[1 + ROUNDS])
|
|
91
|
-
{
|
|
92
|
-
BlockVec t1, t2, s;
|
|
93
|
-
size_t i = 0;
|
|
94
|
-
|
|
95
|
-
#define EXPAND_KEY_1(RC) \
|
|
96
|
-
rkeys[i++] = t2; \
|
|
97
|
-
s = AES_KEYGEN(t2, RC); \
|
|
98
|
-
t1 = XOR128(t1, BYTESHL128(t1, 4)); \
|
|
99
|
-
t1 = XOR128(t1, BYTESHL128(t1, 8)); \
|
|
100
|
-
t1 = XOR128(t1, SHUFFLE32x4(s, 3, 3, 3, 3));
|
|
101
|
-
|
|
102
|
-
#define EXPAND_KEY_2(RC) \
|
|
103
|
-
rkeys[i++] = t1; \
|
|
104
|
-
s = AES_KEYGEN(t1, RC); \
|
|
105
|
-
t2 = XOR128(t2, BYTESHL128(t2, 4)); \
|
|
106
|
-
t2 = XOR128(t2, BYTESHL128(t2, 8)); \
|
|
107
|
-
t2 = XOR128(t2, SHUFFLE32x4(s, 2, 2, 2, 2));
|
|
108
|
-
|
|
109
|
-
t1 = LOAD128(&key[0]);
|
|
110
|
-
t2 = LOAD128(&key[16]);
|
|
111
|
-
|
|
112
|
-
rkeys[i++] = t1;
|
|
113
|
-
EXPAND_KEY_1(0x01);
|
|
114
|
-
EXPAND_KEY_2(0x01);
|
|
115
|
-
EXPAND_KEY_1(0x02);
|
|
116
|
-
EXPAND_KEY_2(0x02);
|
|
117
|
-
EXPAND_KEY_1(0x04);
|
|
118
|
-
EXPAND_KEY_2(0x04);
|
|
119
|
-
EXPAND_KEY_1(0x08);
|
|
120
|
-
EXPAND_KEY_2(0x08);
|
|
121
|
-
EXPAND_KEY_1(0x10);
|
|
122
|
-
EXPAND_KEY_2(0x10);
|
|
123
|
-
EXPAND_KEY_1(0x20);
|
|
124
|
-
EXPAND_KEY_2(0x20);
|
|
125
|
-
EXPAND_KEY_1(0x40);
|
|
126
|
-
rkeys[i++] = t1;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
/* Encrypt a single AES block */
|
|
130
|
-
|
|
131
|
-
static inline void
|
|
132
|
-
encrypt(const State *st, unsigned char dst[16], const unsigned char src[16])
|
|
133
|
-
{
|
|
134
|
-
BlockVec t;
|
|
135
|
-
|
|
136
|
-
size_t i;
|
|
137
|
-
|
|
138
|
-
t = XOR128(LOAD128(src), st->rkeys[0]);
|
|
139
|
-
for (i = 1; i < ROUNDS; i++) {
|
|
140
|
-
t = AES_ENCRYPT(t, st->rkeys[i]);
|
|
141
|
-
}
|
|
142
|
-
t = AES_ENCRYPTLAST(t, st->rkeys[ROUNDS]);
|
|
143
|
-
STORE128(dst, t);
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
/* Encrypt and add a single AES block */
|
|
147
|
-
|
|
148
|
-
static inline void __vectorcall encrypt_xor_block(const State *st, unsigned char dst[16],
|
|
149
|
-
const unsigned char src[16],
|
|
150
|
-
const BlockVec counter)
|
|
151
|
-
{
|
|
152
|
-
BlockVec ts;
|
|
153
|
-
size_t i;
|
|
154
|
-
|
|
155
|
-
ts = XOR128(counter, st->rkeys[0]);
|
|
156
|
-
for (i = 1; i < ROUNDS; i++) {
|
|
157
|
-
ts = AES_ENCRYPT(ts, st->rkeys[i]);
|
|
158
|
-
}
|
|
159
|
-
ts = AES_ENCRYPTLAST(ts, st->rkeys[i]);
|
|
160
|
-
ts = XOR128(ts, LOAD128(src));
|
|
161
|
-
STORE128(dst, ts);
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
/* Encrypt and add PARALLEL_BLOCKS AES blocks */
|
|
165
|
-
|
|
166
|
-
static inline void __vectorcall encrypt_xor_wide(const State *st,
|
|
167
|
-
unsigned char dst[16 * PARALLEL_BLOCKS],
|
|
168
|
-
const unsigned char src[16 * PARALLEL_BLOCKS],
|
|
169
|
-
const BlockVec counters[PARALLEL_BLOCKS])
|
|
170
|
-
{
|
|
171
|
-
BlockVec ts[PARALLEL_BLOCKS];
|
|
172
|
-
size_t i, j;
|
|
173
|
-
|
|
174
|
-
for (j = 0; j < PARALLEL_BLOCKS; j++) {
|
|
175
|
-
ts[j] = XOR128(counters[j], st->rkeys[0]);
|
|
176
|
-
}
|
|
177
|
-
for (i = 1; i < ROUNDS; i++) {
|
|
178
|
-
for (j = 0; j < PARALLEL_BLOCKS; j++) {
|
|
179
|
-
ts[j] = AES_ENCRYPT(ts[j], st->rkeys[i]);
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
for (j = 0; j < PARALLEL_BLOCKS; j++) {
|
|
183
|
-
ts[j] = AES_ENCRYPTLAST(ts[j], st->rkeys[i]);
|
|
184
|
-
ts[j] = XOR128(ts[j], LOAD128(&src[16 * j]));
|
|
185
|
-
}
|
|
186
|
-
for (j = 0; j < PARALLEL_BLOCKS; j++) {
|
|
187
|
-
STORE128(&dst[16 * j], ts[j]);
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
/* Square a field element */
|
|
192
|
-
|
|
193
|
-
static inline I256 __vectorcall clsq128(const BlockVec x)
|
|
194
|
-
{
|
|
195
|
-
const BlockVec r_lo = CLMULLO128(x, x);
|
|
196
|
-
const BlockVec r_hi = CLMULHI128(x, x);
|
|
197
|
-
|
|
198
|
-
return (I256) {
|
|
199
|
-
SODIUM_C99(.hi =) r_hi,
|
|
200
|
-
SODIUM_C99(.lo =) r_lo,
|
|
201
|
-
SODIUM_C99(.mid =) ZERO128,
|
|
202
|
-
};
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
/* Multiply two field elements -- Textbook multiplication is faster than Karatsuba on some recent
|
|
206
|
-
* CPUs */
|
|
207
|
-
|
|
208
|
-
static inline I256 __vectorcall clmul128(const BlockVec x, const BlockVec y)
|
|
209
|
-
{
|
|
210
|
-
#ifdef USE_KARATSUBA_MULTIPLICATION
|
|
211
|
-
const BlockVec x_hi = BYTESHR128(x, 8);
|
|
212
|
-
const BlockVec y_hi = BYTESHR128(y, 8);
|
|
213
|
-
const BlockVec r_lo = CLMULLO128(x, y);
|
|
214
|
-
const BlockVec r_hi = CLMULHI128(x, y);
|
|
215
|
-
const BlockVec r_mid = XOR128(CLMULLO128(XOR128(x, x_hi), XOR128(y, y_hi)), XOR128(r_lo, r_hi));
|
|
216
|
-
|
|
217
|
-
return (I256) {
|
|
218
|
-
SODIUM_C99(.hi =) r_hi,
|
|
219
|
-
SODIUM_C99(.lo =) r_lo,
|
|
220
|
-
SODIUM_C99(.mid =) r_mid,
|
|
221
|
-
};
|
|
222
|
-
#else
|
|
223
|
-
const BlockVec r_hi = CLMULHI128(x, y);
|
|
224
|
-
const BlockVec r_lo = CLMULLO128(x, y);
|
|
225
|
-
const BlockVec r_mid = XOR128(CLMULHILO128(x, y), CLMULLOHI128(x, y));
|
|
226
|
-
|
|
227
|
-
return (I256) {
|
|
228
|
-
SODIUM_C99(.hi =) r_hi,
|
|
229
|
-
SODIUM_C99(.lo =) r_lo,
|
|
230
|
-
SODIUM_C99(.mid =) r_mid,
|
|
231
|
-
};
|
|
232
|
-
#endif
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
/* Merge the middle word and reduce a field element */
|
|
236
|
-
|
|
237
|
-
static inline BlockVec __vectorcall gcm_reduce(const I256 x)
|
|
238
|
-
{
|
|
239
|
-
const BlockVec hi = XOR128(x.hi, BYTESHR128(x.mid, 8));
|
|
240
|
-
const BlockVec lo = XOR128(x.lo, BYTESHL128(x.mid, 8));
|
|
241
|
-
|
|
242
|
-
const BlockVec p64 = SET64x2(0, 0xc200000000000000);
|
|
243
|
-
const BlockVec a = CLMULLO128(lo, p64);
|
|
244
|
-
const BlockVec b = XOR128(SHUFFLE32x4(lo, 2, 3, 0, 1), a);
|
|
245
|
-
const BlockVec c = CLMULLO128(b, p64);
|
|
246
|
-
const BlockVec d = XOR128(SHUFFLE32x4(b, 2, 3, 0, 1), c);
|
|
247
|
-
|
|
248
|
-
return XOR128(d, hi);
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
/* Precompute powers of H from `from` to `to` */
|
|
252
|
-
|
|
253
|
-
static inline void __vectorcall precomp(Precomp hx[PC_COUNT], const size_t from, const size_t to)
|
|
254
|
-
{
|
|
255
|
-
const Precomp h = hx[0];
|
|
256
|
-
size_t i;
|
|
257
|
-
|
|
258
|
-
for (i = from & ~1U; i < to; i += 2) {
|
|
259
|
-
hx[i] = gcm_reduce(clmul128(hx[i - 1], h));
|
|
260
|
-
hx[i + 1] = gcm_reduce(clsq128(hx[i / 2]));
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
/* Precompute powers of H given a key and a block count */
|
|
265
|
-
|
|
266
|
-
static void __vectorcall precomp_for_block_count(Precomp hx[PC_COUNT],
|
|
267
|
-
const unsigned char gh_key[16],
|
|
268
|
-
const size_t block_count)
|
|
269
|
-
{
|
|
270
|
-
const BlockVec h0 = REV128(LOAD128(gh_key));
|
|
271
|
-
BlockVec carry = SET64x2(0xc200000000000000, 1);
|
|
272
|
-
BlockVec mask = SUB64x2(ZERO128, SHR64x2(h0, 63));
|
|
273
|
-
BlockVec h0_shifted;
|
|
274
|
-
BlockVec h;
|
|
275
|
-
|
|
276
|
-
mask = SHUFFLE32x4(mask, 3, 3, 3, 3);
|
|
277
|
-
carry = AND128(carry, mask);
|
|
278
|
-
h0_shifted = SHL128(h0, 1);
|
|
279
|
-
h = XOR128(h0_shifted, carry);
|
|
280
|
-
|
|
281
|
-
hx[0] = h;
|
|
282
|
-
hx[1] = gcm_reduce(clsq128(hx[0]));
|
|
283
|
-
|
|
284
|
-
if (block_count >= PC_COUNT) {
|
|
285
|
-
precomp(hx, 2, PC_COUNT);
|
|
286
|
-
} else {
|
|
287
|
-
precomp(hx, 2, block_count);
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
/* Initialize a GHash */
|
|
292
|
-
|
|
293
|
-
static inline void
|
|
294
|
-
gh_init(GHash *sth)
|
|
295
|
-
{
|
|
296
|
-
sth->acc = ZERO128;
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
static inline I256 __vectorcall gh_update0(const GHash *const sth, const unsigned char *const p,
|
|
300
|
-
const Precomp hn)
|
|
301
|
-
{
|
|
302
|
-
const BlockVec m = REV128(LOAD128(p));
|
|
303
|
-
return clmul128(XOR128(sth->acc, m), hn);
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
static inline void __vectorcall gh_update(I256 *const u, const unsigned char *p, const Precomp hn)
|
|
307
|
-
{
|
|
308
|
-
const BlockVec m = REV128(LOAD128(p));
|
|
309
|
-
const I256 t = clmul128(m, hn);
|
|
310
|
-
*u = (I256) { SODIUM_C99(.hi =) XOR128(u->hi, t.hi), SODIUM_C99(.lo =) XOR128(u->lo, t.lo),
|
|
311
|
-
SODIUM_C99(.mid =) XOR128(u->mid, t.mid) };
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
/* Absorb ad_len bytes of associated data. There has to be no partial block. */
|
|
315
|
-
|
|
316
|
-
static inline void
|
|
317
|
-
gh_ad_blocks(const State *st, GHash *sth, const unsigned char *ad, size_t ad_len)
|
|
318
|
-
{
|
|
319
|
-
size_t i;
|
|
320
|
-
|
|
321
|
-
i = (size_t) 0U;
|
|
322
|
-
for (; i + PC_COUNT * 16 <= ad_len; i += PC_COUNT * 16) {
|
|
323
|
-
I256 u = gh_update0(sth, ad + i, st->hx[PC_COUNT - 1 - 0]);
|
|
324
|
-
size_t j;
|
|
325
|
-
|
|
326
|
-
for (j = 1; j < PC_COUNT; j += 1) {
|
|
327
|
-
gh_update(&u, ad + i + j * 16, st->hx[PC_COUNT - 1 - j]);
|
|
328
|
-
}
|
|
329
|
-
sth->acc = gcm_reduce(u);
|
|
330
|
-
}
|
|
331
|
-
for (; i + PC_COUNT * 16 / 2 <= ad_len; i += PC_COUNT * 16 / 2) {
|
|
332
|
-
I256 u = gh_update0(sth, ad + i, st->hx[PC_COUNT / 2 - 1 - 0]);
|
|
333
|
-
size_t j;
|
|
334
|
-
|
|
335
|
-
for (j = 1; j < PC_COUNT / 2; j += 1) {
|
|
336
|
-
gh_update(&u, ad + i + j * 16, st->hx[PC_COUNT / 2 - 1 - j]);
|
|
337
|
-
}
|
|
338
|
-
sth->acc = gcm_reduce(u);
|
|
339
|
-
}
|
|
340
|
-
for (; i + 4 * 16 <= ad_len; i += 4 * 16) {
|
|
341
|
-
size_t j;
|
|
342
|
-
I256 u = gh_update0(sth, ad + i, st->hx[4 - 1 - 0]);
|
|
343
|
-
|
|
344
|
-
for (j = 1; j < 4; j += 1) {
|
|
345
|
-
gh_update(&u, ad + i + j * 16, st->hx[4 - 1 - j]);
|
|
346
|
-
}
|
|
347
|
-
sth->acc = gcm_reduce(u);
|
|
348
|
-
}
|
|
349
|
-
for (; i + 2 * 16 <= ad_len; i += 2 * 16) {
|
|
350
|
-
size_t j;
|
|
351
|
-
I256 u = gh_update0(sth, ad + i, st->hx[2 - 1 - 0]);
|
|
352
|
-
|
|
353
|
-
for (j = 1; j < 2; j += 1) {
|
|
354
|
-
gh_update(&u, ad + i + j * 16, st->hx[2 - 1 - j]);
|
|
355
|
-
}
|
|
356
|
-
sth->acc = gcm_reduce(u);
|
|
357
|
-
}
|
|
358
|
-
if (i < ad_len) {
|
|
359
|
-
I256 u = gh_update0(sth, ad + i, st->hx[0]);
|
|
360
|
-
sth->acc = gcm_reduce(u);
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
/* Increment counters */
|
|
365
|
-
|
|
366
|
-
static inline BlockVec __vectorcall incr_counters(BlockVec rev_counters[], BlockVec counter,
|
|
367
|
-
const size_t n)
|
|
368
|
-
{
|
|
369
|
-
size_t i;
|
|
370
|
-
|
|
371
|
-
const BlockVec one = ONE128;
|
|
372
|
-
for (i = 0; i < n; i++) {
|
|
373
|
-
rev_counters[i] = REV128(counter);
|
|
374
|
-
counter = ADD64x2(counter, one);
|
|
375
|
-
}
|
|
376
|
-
return counter;
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
/* Compute the number of required blocks to encrypt and authenticate `ad_len` of associated data,
|
|
380
|
-
* and `m_len` of encrypted bytes. Return `0` if limits would be exceeded.*/
|
|
381
|
-
|
|
382
|
-
static inline size_t
|
|
383
|
-
required_blocks(const size_t ad_len, const size_t m_len)
|
|
384
|
-
{
|
|
385
|
-
const size_t ad_blocks = (ad_len + 15) / 16;
|
|
386
|
-
const size_t m_blocks = (m_len + 15) / 16;
|
|
387
|
-
|
|
388
|
-
if (ad_len > SIZE_MAX - 2 * PARALLEL_BLOCKS * 16 ||
|
|
389
|
-
m_len > SIZE_MAX - 2 * PARALLEL_BLOCKS * 16 || ad_len < ad_blocks || m_len < m_blocks ||
|
|
390
|
-
m_blocks >= (1ULL << 32) - 2) {
|
|
391
|
-
return 0;
|
|
392
|
-
}
|
|
393
|
-
return ad_blocks + m_blocks + 1;
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
/* Generic AES-GCM encryption. "Generic" as it can handle arbitrary input sizes,
|
|
397
|
-
unlike a length-limited version that would precompute all the required powers of H */
|
|
398
|
-
|
|
399
|
-
static void
|
|
400
|
-
aes_gcm_encrypt_generic(const State *st, GHash *sth, unsigned char mac[ABYTES], unsigned char *dst,
|
|
401
|
-
const unsigned char *src, size_t src_len, const unsigned char *ad,
|
|
402
|
-
size_t ad_len, unsigned char counter_[16])
|
|
403
|
-
{
|
|
404
|
-
CRYPTO_ALIGN(32) I256 u;
|
|
405
|
-
CRYPTO_ALIGN(16) unsigned char last_blocks[2 * 16];
|
|
406
|
-
const BlockVec one = ONE128;
|
|
407
|
-
BlockVec final_block;
|
|
408
|
-
BlockVec rev_counters[PARALLEL_BLOCKS];
|
|
409
|
-
BlockVec counter;
|
|
410
|
-
size_t i;
|
|
411
|
-
size_t j;
|
|
412
|
-
size_t left;
|
|
413
|
-
size_t pi;
|
|
414
|
-
|
|
415
|
-
COMPILER_ASSERT(PC_COUNT % PARALLEL_BLOCKS == 0);
|
|
416
|
-
|
|
417
|
-
/* Associated data */
|
|
418
|
-
|
|
419
|
-
if (ad != NULL && ad_len != 0) {
|
|
420
|
-
gh_ad_blocks(st, sth, ad, ad_len & ~15);
|
|
421
|
-
left = ad_len & 15;
|
|
422
|
-
if (left != 0) {
|
|
423
|
-
unsigned char pad[16];
|
|
424
|
-
|
|
425
|
-
memset(pad, 0, sizeof pad);
|
|
426
|
-
memcpy(pad, ad + ad_len - left, left);
|
|
427
|
-
gh_ad_blocks(st, sth, pad, sizeof pad);
|
|
428
|
-
}
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
/* Encrypted data */
|
|
432
|
-
|
|
433
|
-
counter = REV128(LOAD128(counter_));
|
|
434
|
-
i = 0;
|
|
435
|
-
|
|
436
|
-
/* 2*PARALLEL_BLOCKS aggregation */
|
|
437
|
-
|
|
438
|
-
if (src_len - i >= 2 * PARALLEL_BLOCKS * 16) {
|
|
439
|
-
counter = incr_counters(rev_counters, counter, PARALLEL_BLOCKS);
|
|
440
|
-
encrypt_xor_wide(st, dst + i, src + i, rev_counters);
|
|
441
|
-
i += PARALLEL_BLOCKS * 16;
|
|
442
|
-
|
|
443
|
-
for (; i + 2 * PARALLEL_BLOCKS * 16 <= src_len; i += 2 * PARALLEL_BLOCKS * 16) {
|
|
444
|
-
counter = incr_counters(rev_counters, counter, PARALLEL_BLOCKS);
|
|
445
|
-
encrypt_xor_wide(st, dst + i, src + i, rev_counters);
|
|
446
|
-
|
|
447
|
-
PREFETCH_READ(src + i + PARALLEL_BLOCKS * 16);
|
|
448
|
-
#if PARALLEL_BLOCKS >= 64 / 16
|
|
449
|
-
PREFETCH_READ(src + i + PARALLEL_BLOCKS * 16 + 64);
|
|
450
|
-
#endif
|
|
451
|
-
|
|
452
|
-
pi = i - PARALLEL_BLOCKS * 16;
|
|
453
|
-
u = gh_update0(sth, dst + pi, st->hx[2 * PARALLEL_BLOCKS - 1 - 0]);
|
|
454
|
-
for (j = 1; j < PARALLEL_BLOCKS; j += 1) {
|
|
455
|
-
gh_update(&u, dst + pi + j * 16, st->hx[2 * PARALLEL_BLOCKS - 1 - j]);
|
|
456
|
-
}
|
|
457
|
-
|
|
458
|
-
counter = incr_counters(rev_counters, counter, PARALLEL_BLOCKS);
|
|
459
|
-
encrypt_xor_wide(st, dst + i + PARALLEL_BLOCKS * 16, src + i + PARALLEL_BLOCKS * 16,
|
|
460
|
-
rev_counters);
|
|
461
|
-
|
|
462
|
-
PREFETCH_READ(src + i + 2 * PARALLEL_BLOCKS * 16);
|
|
463
|
-
#if PARALLEL_BLOCKS >= 64 / 16
|
|
464
|
-
PREFETCH_READ(src + i + 2 * PARALLEL_BLOCKS * 16 + 64);
|
|
465
|
-
#endif
|
|
466
|
-
pi = i;
|
|
467
|
-
for (j = 0; j < PARALLEL_BLOCKS; j += 1) {
|
|
468
|
-
gh_update(&u, dst + pi + j * 16, st->hx[PARALLEL_BLOCKS - 1 - j]);
|
|
469
|
-
}
|
|
470
|
-
sth->acc = gcm_reduce(u);
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
pi = i - PARALLEL_BLOCKS * 16;
|
|
474
|
-
u = gh_update0(sth, dst + pi, st->hx[PARALLEL_BLOCKS - 1 - 0]);
|
|
475
|
-
for (j = 1; j < PARALLEL_BLOCKS; j += 1) {
|
|
476
|
-
gh_update(&u, dst + pi + j * 16, st->hx[PARALLEL_BLOCKS - 1 - j]);
|
|
477
|
-
}
|
|
478
|
-
sth->acc = gcm_reduce(u);
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
/* PARALLEL_BLOCKS aggregation */
|
|
482
|
-
|
|
483
|
-
if (src_len - i >= PARALLEL_BLOCKS * 16) {
|
|
484
|
-
counter = incr_counters(rev_counters, counter, PARALLEL_BLOCKS);
|
|
485
|
-
encrypt_xor_wide(st, dst + i, src + i, rev_counters);
|
|
486
|
-
i += PARALLEL_BLOCKS * 16;
|
|
487
|
-
|
|
488
|
-
for (; i + PARALLEL_BLOCKS * 16 <= src_len; i += PARALLEL_BLOCKS * 16) {
|
|
489
|
-
counter = incr_counters(rev_counters, counter, PARALLEL_BLOCKS);
|
|
490
|
-
encrypt_xor_wide(st, dst + i, src + i, rev_counters);
|
|
491
|
-
|
|
492
|
-
pi = i - PARALLEL_BLOCKS * 16;
|
|
493
|
-
u = gh_update0(sth, dst + pi, st->hx[PARALLEL_BLOCKS - 1 - 0]);
|
|
494
|
-
for (j = 1; j < PARALLEL_BLOCKS; j += 1) {
|
|
495
|
-
gh_update(&u, dst + pi + j * 16, st->hx[PARALLEL_BLOCKS - 1 - j]);
|
|
496
|
-
}
|
|
497
|
-
sth->acc = gcm_reduce(u);
|
|
498
|
-
}
|
|
499
|
-
|
|
500
|
-
pi = i - PARALLEL_BLOCKS * 16;
|
|
501
|
-
u = gh_update0(sth, dst + pi, st->hx[PARALLEL_BLOCKS - 1 - 0]);
|
|
502
|
-
for (j = 1; j < PARALLEL_BLOCKS; j += 1) {
|
|
503
|
-
gh_update(&u, dst + pi + j * 16, st->hx[PARALLEL_BLOCKS - 1 - j]);
|
|
504
|
-
}
|
|
505
|
-
sth->acc = gcm_reduce(u);
|
|
506
|
-
}
|
|
507
|
-
|
|
508
|
-
/* 4-blocks aggregation */
|
|
509
|
-
|
|
510
|
-
for (; i + 4 * 16 <= src_len; i += 4 * 16) {
|
|
511
|
-
counter = incr_counters(rev_counters, counter, 4);
|
|
512
|
-
for (j = 0; j < 4; j++) {
|
|
513
|
-
encrypt_xor_block(st, dst + i + j * 16, src + i + j * 16, rev_counters[j]);
|
|
514
|
-
}
|
|
515
|
-
|
|
516
|
-
u = gh_update0(sth, dst + i, st->hx[4 - 1 - 0]);
|
|
517
|
-
for (j = 1; j < 4; j += 1) {
|
|
518
|
-
gh_update(&u, dst + i + j * 16, st->hx[4 - 1 - j]);
|
|
519
|
-
}
|
|
520
|
-
sth->acc = gcm_reduce(u);
|
|
521
|
-
}
|
|
522
|
-
|
|
523
|
-
/* 2-blocks aggregation */
|
|
524
|
-
|
|
525
|
-
for (; i + 2 * 16 <= src_len; i += 2 * 16) {
|
|
526
|
-
counter = incr_counters(rev_counters, counter, 2);
|
|
527
|
-
for (j = 0; j < 2; j++) {
|
|
528
|
-
encrypt_xor_block(st, dst + i + j * 16, src + i + j * 16, rev_counters[j]);
|
|
529
|
-
}
|
|
530
|
-
|
|
531
|
-
u = gh_update0(sth, dst + i, st->hx[2 - 1 - 0]);
|
|
532
|
-
for (j = 1; j < 2; j += 1) {
|
|
533
|
-
gh_update(&u, dst + i + j * 16, st->hx[2 - 1 - j]);
|
|
534
|
-
}
|
|
535
|
-
sth->acc = gcm_reduce(u);
|
|
536
|
-
}
|
|
537
|
-
|
|
538
|
-
/* Remaining *partial* blocks; if we have 16 bytes left, we want to keep the
|
|
539
|
-
full block authenticated along with the final block, hence < and not <= */
|
|
540
|
-
|
|
541
|
-
for (; i + 16 < src_len; i += 16) {
|
|
542
|
-
encrypt_xor_block(st, dst + i, src + i, REV128(counter));
|
|
543
|
-
u = gh_update0(sth, dst + i, st->hx[1 - 1 - 0]);
|
|
544
|
-
sth->acc = gcm_reduce(u);
|
|
545
|
-
counter = ADD64x2(counter, one);
|
|
546
|
-
}
|
|
547
|
-
|
|
548
|
-
/* Authenticate both the last block of the message and the final block */
|
|
549
|
-
|
|
550
|
-
final_block = REV128(SET64x2(ad_len * 8, src_len * 8));
|
|
551
|
-
STORE32_BE(counter_ + NPUBBYTES, 1);
|
|
552
|
-
encrypt(st, mac, counter_);
|
|
553
|
-
left = src_len - i;
|
|
554
|
-
if (left != 0) {
|
|
555
|
-
for (j = 0; j < left; j++) {
|
|
556
|
-
last_blocks[j] = src[i + j];
|
|
557
|
-
}
|
|
558
|
-
STORE128(last_blocks + 16, final_block);
|
|
559
|
-
encrypt_xor_block(st, last_blocks, last_blocks, REV128(counter));
|
|
560
|
-
for (; j < 16; j++) {
|
|
561
|
-
last_blocks[j] = 0;
|
|
562
|
-
}
|
|
563
|
-
for (j = 0; j < left; j++) {
|
|
564
|
-
dst[i + j] = last_blocks[j];
|
|
565
|
-
}
|
|
566
|
-
gh_ad_blocks(st, sth, last_blocks, 32);
|
|
567
|
-
} else {
|
|
568
|
-
STORE128(last_blocks, final_block);
|
|
569
|
-
gh_ad_blocks(st, sth, last_blocks, 16);
|
|
570
|
-
}
|
|
571
|
-
STORE128(mac, XOR128(LOAD128(mac), REV128(sth->acc)));
|
|
572
|
-
}
|
|
573
|
-
|
|
574
|
-
/* Generic AES-GCM decryption. "Generic" as it can handle arbitrary input sizes,
|
|
575
|
-
unlike a length-limited version that would precompute all the required powers of H */
|
|
576
|
-
|
|
577
|
-
static void
|
|
578
|
-
aes_gcm_decrypt_generic(const State *st, GHash *sth, unsigned char mac[ABYTES], unsigned char *dst,
|
|
579
|
-
const unsigned char *src, size_t src_len, const unsigned char *ad,
|
|
580
|
-
size_t ad_len, unsigned char counter_[16])
|
|
581
|
-
{
|
|
582
|
-
CRYPTO_ALIGN(32) I256 u;
|
|
583
|
-
CRYPTO_ALIGN(16) unsigned char last_blocks[2 * 16];
|
|
584
|
-
const BlockVec one = ONE128;
|
|
585
|
-
BlockVec final_block;
|
|
586
|
-
BlockVec rev_counters[PARALLEL_BLOCKS];
|
|
587
|
-
BlockVec counter;
|
|
588
|
-
size_t i;
|
|
589
|
-
size_t j;
|
|
590
|
-
size_t left;
|
|
591
|
-
|
|
592
|
-
COMPILER_ASSERT(PC_COUNT % PARALLEL_BLOCKS == 0);
|
|
593
|
-
|
|
594
|
-
/* Associated data */
|
|
595
|
-
|
|
596
|
-
if (ad != NULL && ad_len != 0) {
|
|
597
|
-
gh_ad_blocks(st, sth, ad, ad_len & ~15);
|
|
598
|
-
left = ad_len & 15;
|
|
599
|
-
if (left != 0) {
|
|
600
|
-
unsigned char pad[16];
|
|
601
|
-
|
|
602
|
-
memset(pad, 0, sizeof pad);
|
|
603
|
-
memcpy(pad, ad + ad_len - left, left);
|
|
604
|
-
gh_ad_blocks(st, sth, pad, sizeof pad);
|
|
605
|
-
}
|
|
606
|
-
}
|
|
607
|
-
|
|
608
|
-
/* Encrypted data */
|
|
609
|
-
|
|
610
|
-
counter = REV128(LOAD128(counter_));
|
|
611
|
-
i = 0;
|
|
612
|
-
|
|
613
|
-
/* 2*PARALLEL_BLOCKS aggregation */
|
|
614
|
-
|
|
615
|
-
while (i + 2 * PARALLEL_BLOCKS * 16 <= src_len) {
|
|
616
|
-
counter = incr_counters(rev_counters, counter, PARALLEL_BLOCKS);
|
|
617
|
-
|
|
618
|
-
u = gh_update0(sth, src + i, st->hx[2 * PARALLEL_BLOCKS - 1 - 0]);
|
|
619
|
-
for (j = 1; j < PARALLEL_BLOCKS; j += 1) {
|
|
620
|
-
gh_update(&u, src + i + j * 16, st->hx[2 * PARALLEL_BLOCKS - 1 - j]);
|
|
621
|
-
}
|
|
622
|
-
|
|
623
|
-
encrypt_xor_wide(st, dst + i, src + i, rev_counters);
|
|
624
|
-
|
|
625
|
-
counter = incr_counters(rev_counters, counter, PARALLEL_BLOCKS);
|
|
626
|
-
|
|
627
|
-
i += PARALLEL_BLOCKS * 16;
|
|
628
|
-
for (j = 0; j < PARALLEL_BLOCKS; j += 1) {
|
|
629
|
-
gh_update(&u, src + i + j * 16, st->hx[PARALLEL_BLOCKS - 1 - j]);
|
|
630
|
-
}
|
|
631
|
-
sth->acc = gcm_reduce(u);
|
|
632
|
-
|
|
633
|
-
encrypt_xor_wide(st, dst + i, src + i, rev_counters);
|
|
634
|
-
i += PARALLEL_BLOCKS * 16;
|
|
635
|
-
}
|
|
636
|
-
|
|
637
|
-
/* PARALLEL_BLOCKS aggregation */
|
|
638
|
-
|
|
639
|
-
for (; i + PARALLEL_BLOCKS * 16 <= src_len; i += PARALLEL_BLOCKS * 16) {
|
|
640
|
-
counter = incr_counters(rev_counters, counter, PARALLEL_BLOCKS);
|
|
641
|
-
|
|
642
|
-
u = gh_update0(sth, src + i, st->hx[PARALLEL_BLOCKS - 1 - 0]);
|
|
643
|
-
for (j = 1; j < PARALLEL_BLOCKS; j += 1) {
|
|
644
|
-
gh_update(&u, src + i + j * 16, st->hx[PARALLEL_BLOCKS - 1 - j]);
|
|
645
|
-
}
|
|
646
|
-
sth->acc = gcm_reduce(u);
|
|
647
|
-
|
|
648
|
-
encrypt_xor_wide(st, dst + i, src + i, rev_counters);
|
|
649
|
-
}
|
|
650
|
-
|
|
651
|
-
/* 4-blocks aggregation */
|
|
652
|
-
|
|
653
|
-
for (; i + 4 * 16 <= src_len; i += 4 * 16) {
|
|
654
|
-
counter = incr_counters(rev_counters, counter, 4);
|
|
655
|
-
|
|
656
|
-
u = gh_update0(sth, src + i, st->hx[4 - 1 - 0]);
|
|
657
|
-
for (j = 1; j < 4; j += 1) {
|
|
658
|
-
gh_update(&u, src + i + j * 16, st->hx[4 - 1 - j]);
|
|
659
|
-
}
|
|
660
|
-
sth->acc = gcm_reduce(u);
|
|
661
|
-
|
|
662
|
-
for (j = 0; j < 4; j++) {
|
|
663
|
-
encrypt_xor_block(st, dst + i + j * 16, src + i + j * 16, rev_counters[j]);
|
|
664
|
-
}
|
|
665
|
-
}
|
|
666
|
-
|
|
667
|
-
/* 2-blocks aggregation */
|
|
668
|
-
|
|
669
|
-
for (; i + 2 * 16 <= src_len; i += 2 * 16) {
|
|
670
|
-
counter = incr_counters(rev_counters, counter, 2);
|
|
671
|
-
|
|
672
|
-
u = gh_update0(sth, src + i, st->hx[2 - 1 - 0]);
|
|
673
|
-
for (j = 1; j < 2; j += 1) {
|
|
674
|
-
gh_update(&u, src + i + j * 16, st->hx[2 - 1 - j]);
|
|
675
|
-
}
|
|
676
|
-
sth->acc = gcm_reduce(u);
|
|
677
|
-
|
|
678
|
-
for (j = 0; j < 2; j++) {
|
|
679
|
-
encrypt_xor_block(st, dst + i + j * 16, src + i + j * 16, rev_counters[j]);
|
|
680
|
-
}
|
|
681
|
-
}
|
|
682
|
-
|
|
683
|
-
/* Remaining *partial* blocks; if we have 16 bytes left, we want to keep the
|
|
684
|
-
full block authenticated along with the final block, hence < and not <= */
|
|
685
|
-
|
|
686
|
-
for (; i + 16 < src_len; i += 16) {
|
|
687
|
-
u = gh_update0(sth, src + i, st->hx[1 - 1 - 0]);
|
|
688
|
-
sth->acc = gcm_reduce(u);
|
|
689
|
-
encrypt_xor_block(st, dst + i, src + i, REV128(counter));
|
|
690
|
-
counter = ADD64x2(counter, one);
|
|
691
|
-
}
|
|
692
|
-
|
|
693
|
-
/* Authenticate both the last block of the message and the final block */
|
|
694
|
-
|
|
695
|
-
final_block = REV128(SET64x2(ad_len * 8, src_len * 8));
|
|
696
|
-
STORE32_BE(counter_ + NPUBBYTES, 1);
|
|
697
|
-
encrypt(st, mac, counter_);
|
|
698
|
-
left = src_len - i;
|
|
699
|
-
if (left != 0) {
|
|
700
|
-
for (j = 0; j < left; j++) {
|
|
701
|
-
last_blocks[j] = src[i + j];
|
|
702
|
-
}
|
|
703
|
-
for (; j < 16; j++) {
|
|
704
|
-
last_blocks[j] = 0;
|
|
705
|
-
}
|
|
706
|
-
STORE128(last_blocks + 16, final_block);
|
|
707
|
-
gh_ad_blocks(st, sth, last_blocks, 32);
|
|
708
|
-
encrypt_xor_block(st, last_blocks, last_blocks, REV128(counter));
|
|
709
|
-
for (j = 0; j < left; j++) {
|
|
710
|
-
dst[i + j] = last_blocks[j];
|
|
711
|
-
}
|
|
712
|
-
} else {
|
|
713
|
-
STORE128(last_blocks, final_block);
|
|
714
|
-
gh_ad_blocks(st, sth, last_blocks, 16);
|
|
715
|
-
}
|
|
716
|
-
STORE128(mac, XOR128(LOAD128(mac), REV128(sth->acc)));
|
|
717
|
-
}
|
|
718
|
-
|
|
719
|
-
int
|
|
720
|
-
crypto_aead_aes256gcm_beforenm(crypto_aead_aes256gcm_state *st_, const unsigned char *k)
|
|
721
|
-
{
|
|
722
|
-
State *st = (State *) (void *) st_;
|
|
723
|
-
CRYPTO_ALIGN(16) unsigned char h[16];
|
|
724
|
-
|
|
725
|
-
COMPILER_ASSERT(sizeof *st_ >= sizeof *st);
|
|
726
|
-
|
|
727
|
-
expand256(k, st->rkeys);
|
|
728
|
-
memset(h, 0, sizeof h);
|
|
729
|
-
encrypt(st, h, h);
|
|
730
|
-
|
|
731
|
-
precomp_for_block_count(st->hx, h, PC_COUNT);
|
|
732
|
-
|
|
733
|
-
return 0;
|
|
734
|
-
}
|
|
735
|
-
|
|
736
|
-
int
|
|
737
|
-
crypto_aead_aes256gcm_encrypt_detached_afternm(unsigned char *c, unsigned char *mac,
|
|
738
|
-
unsigned long long *maclen_p, const unsigned char *m,
|
|
739
|
-
unsigned long long m_len_, const unsigned char *ad,
|
|
740
|
-
unsigned long long ad_len_,
|
|
741
|
-
const unsigned char *nsec, const unsigned char *npub,
|
|
742
|
-
const crypto_aead_aes256gcm_state *st_)
|
|
743
|
-
{
|
|
744
|
-
const State *st = (const State *) (const void *) st_;
|
|
745
|
-
GHash sth;
|
|
746
|
-
CRYPTO_ALIGN(16) unsigned char j[16];
|
|
747
|
-
size_t gh_required_blocks;
|
|
748
|
-
const size_t ad_len = (size_t) ad_len_;
|
|
749
|
-
const size_t m_len = (size_t) m_len_;
|
|
750
|
-
|
|
751
|
-
(void) nsec;
|
|
752
|
-
if (maclen_p != NULL) {
|
|
753
|
-
*maclen_p = 0;
|
|
754
|
-
}
|
|
755
|
-
if (ad_len_ > SODIUM_SIZE_MAX || m_len_ > SODIUM_SIZE_MAX) {
|
|
756
|
-
sodium_misuse();
|
|
757
|
-
}
|
|
758
|
-
gh_required_blocks = required_blocks(ad_len, m_len);
|
|
759
|
-
if (gh_required_blocks == 0) {
|
|
760
|
-
memset(mac, 0xd0, ABYTES);
|
|
761
|
-
memset(c, 0, m_len);
|
|
762
|
-
return -1;
|
|
763
|
-
}
|
|
764
|
-
|
|
765
|
-
gh_init(&sth);
|
|
766
|
-
|
|
767
|
-
memcpy(j, npub, NPUBBYTES);
|
|
768
|
-
STORE32_BE(j + NPUBBYTES, 2);
|
|
769
|
-
|
|
770
|
-
aes_gcm_encrypt_generic(st, &sth, mac, c, m, m_len, ad, ad_len, j);
|
|
771
|
-
|
|
772
|
-
if (maclen_p != NULL) {
|
|
773
|
-
*maclen_p = ABYTES;
|
|
774
|
-
}
|
|
775
|
-
return 0;
|
|
776
|
-
}
|
|
777
|
-
|
|
778
|
-
int
|
|
779
|
-
crypto_aead_aes256gcm_encrypt(unsigned char *c, unsigned long long *clen_p, const unsigned char *m,
|
|
780
|
-
unsigned long long m_len, const unsigned char *ad,
|
|
781
|
-
unsigned long long ad_len, const unsigned char *nsec,
|
|
782
|
-
const unsigned char *npub, const unsigned char *k)
|
|
783
|
-
{
|
|
784
|
-
const int ret = crypto_aead_aes256gcm_encrypt_detached(c, c + m_len, NULL, m, m_len, ad, ad_len,
|
|
785
|
-
nsec, npub, k);
|
|
786
|
-
if (clen_p != NULL) {
|
|
787
|
-
if (ret == 0) {
|
|
788
|
-
*clen_p = m_len + crypto_aead_aes256gcm_ABYTES;
|
|
789
|
-
} else {
|
|
790
|
-
*clen_p = 0;
|
|
791
|
-
}
|
|
792
|
-
}
|
|
793
|
-
return ret;
|
|
794
|
-
}
|
|
795
|
-
|
|
796
|
-
int
|
|
797
|
-
crypto_aead_aes256gcm_encrypt_detached(unsigned char *c, unsigned char *mac,
|
|
798
|
-
unsigned long long *maclen_p, const unsigned char *m,
|
|
799
|
-
unsigned long long m_len, const unsigned char *ad,
|
|
800
|
-
unsigned long long ad_len, const unsigned char *nsec,
|
|
801
|
-
const unsigned char *npub, const unsigned char *k)
|
|
802
|
-
{
|
|
803
|
-
CRYPTO_ALIGN(16) crypto_aead_aes256gcm_state st;
|
|
804
|
-
int ret;
|
|
805
|
-
|
|
806
|
-
PREFETCH_WRITE(c);
|
|
807
|
-
PREFETCH_READ(m);
|
|
808
|
-
PREFETCH_READ(ad);
|
|
809
|
-
|
|
810
|
-
crypto_aead_aes256gcm_beforenm(&st, k);
|
|
811
|
-
ret = crypto_aead_aes256gcm_encrypt_detached_afternm(c, mac, maclen_p, m, m_len, ad, ad_len,
|
|
812
|
-
nsec, npub, &st);
|
|
813
|
-
sodium_memzero(&st, sizeof st);
|
|
814
|
-
|
|
815
|
-
return ret;
|
|
816
|
-
}
|
|
817
|
-
|
|
818
|
-
int
|
|
819
|
-
crypto_aead_aes256gcm_encrypt_afternm(unsigned char *c, unsigned long long *clen_p,
|
|
820
|
-
const unsigned char *m, unsigned long long mlen,
|
|
821
|
-
const unsigned char *ad, unsigned long long adlen,
|
|
822
|
-
const unsigned char *nsec, const unsigned char *npub,
|
|
823
|
-
const crypto_aead_aes256gcm_state *st_)
|
|
824
|
-
{
|
|
825
|
-
int ret = crypto_aead_aes256gcm_encrypt_detached_afternm(c, c + mlen, NULL, m, mlen, ad, adlen,
|
|
826
|
-
nsec, npub, st_);
|
|
827
|
-
if (clen_p != NULL) {
|
|
828
|
-
*clen_p = mlen + crypto_aead_aes256gcm_ABYTES;
|
|
829
|
-
}
|
|
830
|
-
return ret;
|
|
831
|
-
}
|
|
832
|
-
|
|
833
|
-
static int
|
|
834
|
-
crypto_aead_aes256gcm_verify_mac(unsigned char *nsec, const unsigned char *c,
|
|
835
|
-
unsigned long long c_len_, const unsigned char *mac,
|
|
836
|
-
const unsigned char *ad, unsigned long long ad_len_,
|
|
837
|
-
const unsigned char *npub, const crypto_aead_aes256gcm_state *st_)
|
|
838
|
-
{
|
|
839
|
-
const State *st = (const State *) (const void *) st_;
|
|
840
|
-
GHash sth;
|
|
841
|
-
BlockVec final_block;
|
|
842
|
-
CRYPTO_ALIGN(16) unsigned char j[16];
|
|
843
|
-
CRYPTO_ALIGN(16) unsigned char computed_mac[16];
|
|
844
|
-
CRYPTO_ALIGN(16) unsigned char last_block[16];
|
|
845
|
-
size_t gh_required_blocks;
|
|
846
|
-
size_t left;
|
|
847
|
-
const size_t ad_len = (size_t) ad_len_;
|
|
848
|
-
const size_t c_len = (size_t) c_len_;
|
|
849
|
-
int ret;
|
|
850
|
-
|
|
851
|
-
(void) nsec;
|
|
852
|
-
if (ad_len_ > SODIUM_SIZE_MAX || c_len_ > SODIUM_SIZE_MAX) {
|
|
853
|
-
sodium_misuse();
|
|
854
|
-
}
|
|
855
|
-
gh_required_blocks = required_blocks(ad_len, c_len);
|
|
856
|
-
if (gh_required_blocks == 0) {
|
|
857
|
-
return -1;
|
|
858
|
-
}
|
|
859
|
-
|
|
860
|
-
gh_init(&sth);
|
|
861
|
-
|
|
862
|
-
memcpy(j, npub, NPUBBYTES);
|
|
863
|
-
STORE32_BE(j + NPUBBYTES, 2);
|
|
864
|
-
|
|
865
|
-
gh_ad_blocks(st, &sth, ad, ad_len & ~15);
|
|
866
|
-
left = ad_len & 15;
|
|
867
|
-
if (left != 0) {
|
|
868
|
-
unsigned char pad[16];
|
|
869
|
-
|
|
870
|
-
memset(pad, 0, sizeof pad);
|
|
871
|
-
memcpy(pad, ad + ad_len - left, left);
|
|
872
|
-
gh_ad_blocks(st, &sth, pad, sizeof pad);
|
|
873
|
-
}
|
|
874
|
-
|
|
875
|
-
gh_ad_blocks(st, &sth, c, c_len & ~15);
|
|
876
|
-
left = c_len & 15;
|
|
877
|
-
if (left != 0) {
|
|
878
|
-
unsigned char pad[16];
|
|
879
|
-
|
|
880
|
-
memset(pad, 0, sizeof pad);
|
|
881
|
-
memcpy(pad, c + c_len - left, left);
|
|
882
|
-
gh_ad_blocks(st, &sth, pad, sizeof pad);
|
|
883
|
-
}
|
|
884
|
-
final_block = REV128(SET64x2(ad_len * 8, c_len * 8));
|
|
885
|
-
STORE32_BE(j + NPUBBYTES, 1);
|
|
886
|
-
encrypt(st, computed_mac, j);
|
|
887
|
-
STORE128(last_block, final_block);
|
|
888
|
-
gh_ad_blocks(st, &sth, last_block, 16);
|
|
889
|
-
STORE128(computed_mac, XOR128(LOAD128(computed_mac), REV128(sth.acc)));
|
|
890
|
-
|
|
891
|
-
ret = crypto_verify_16(mac, computed_mac);
|
|
892
|
-
sodium_memzero(computed_mac, sizeof computed_mac);
|
|
893
|
-
|
|
894
|
-
return ret;
|
|
895
|
-
}
|
|
896
|
-
|
|
897
|
-
int
|
|
898
|
-
crypto_aead_aes256gcm_decrypt_detached_afternm(unsigned char *m, unsigned char *nsec,
|
|
899
|
-
const unsigned char *c, unsigned long long c_len_,
|
|
900
|
-
const unsigned char *mac, const unsigned char *ad,
|
|
901
|
-
unsigned long long ad_len_,
|
|
902
|
-
const unsigned char *npub,
|
|
903
|
-
const crypto_aead_aes256gcm_state *st_)
|
|
904
|
-
{
|
|
905
|
-
const State *st = (const State *) (const void *) st_;
|
|
906
|
-
GHash sth;
|
|
907
|
-
CRYPTO_ALIGN(16) unsigned char j[16];
|
|
908
|
-
unsigned char computed_mac[16];
|
|
909
|
-
size_t gh_required_blocks;
|
|
910
|
-
const size_t ad_len = (size_t) ad_len_;
|
|
911
|
-
const size_t c_len = (size_t) c_len_;
|
|
912
|
-
const size_t m_len = c_len;
|
|
913
|
-
|
|
914
|
-
(void) nsec;
|
|
915
|
-
if (ad_len_ > SODIUM_SIZE_MAX || c_len_ > SODIUM_SIZE_MAX) {
|
|
916
|
-
sodium_misuse();
|
|
917
|
-
}
|
|
918
|
-
if (m == NULL) {
|
|
919
|
-
return crypto_aead_aes256gcm_verify_mac(nsec, c, c_len, mac, ad, ad_len, npub, st_);
|
|
920
|
-
}
|
|
921
|
-
gh_required_blocks = required_blocks(ad_len, m_len);
|
|
922
|
-
if (gh_required_blocks == 0) {
|
|
923
|
-
return -1;
|
|
924
|
-
}
|
|
925
|
-
|
|
926
|
-
gh_init(&sth);
|
|
927
|
-
|
|
928
|
-
memcpy(j, npub, NPUBBYTES);
|
|
929
|
-
STORE32_BE(j + NPUBBYTES, 2);
|
|
930
|
-
|
|
931
|
-
aes_gcm_decrypt_generic(st, &sth, computed_mac, m, c, m_len, ad, ad_len, j);
|
|
932
|
-
|
|
933
|
-
if (crypto_verify_16(mac, computed_mac) != 0) {
|
|
934
|
-
sodium_memzero(computed_mac, sizeof computed_mac);
|
|
935
|
-
memset(m, 0xd0, m_len);
|
|
936
|
-
return -1;
|
|
937
|
-
}
|
|
938
|
-
return 0;
|
|
939
|
-
}
|
|
940
|
-
|
|
941
|
-
int
|
|
942
|
-
crypto_aead_aes256gcm_decrypt_afternm(unsigned char *m, unsigned long long *mlen_p,
|
|
943
|
-
unsigned char *nsec, const unsigned char *c,
|
|
944
|
-
unsigned long long clen, const unsigned char *ad,
|
|
945
|
-
unsigned long long adlen, const unsigned char *npub,
|
|
946
|
-
const crypto_aead_aes256gcm_state *st_)
|
|
947
|
-
{
|
|
948
|
-
unsigned long long mlen = 0ULL;
|
|
949
|
-
int ret = -1;
|
|
950
|
-
|
|
951
|
-
if (clen >= ABYTES) {
|
|
952
|
-
ret = crypto_aead_aes256gcm_decrypt_detached_afternm(
|
|
953
|
-
m, nsec, c, clen - ABYTES, c + clen - ABYTES, ad, adlen, npub, st_);
|
|
954
|
-
}
|
|
955
|
-
if (mlen_p != NULL) {
|
|
956
|
-
if (ret == 0) {
|
|
957
|
-
mlen = clen - ABYTES;
|
|
958
|
-
}
|
|
959
|
-
*mlen_p = mlen;
|
|
960
|
-
}
|
|
961
|
-
return ret;
|
|
962
|
-
}
|
|
963
|
-
|
|
964
|
-
int
|
|
965
|
-
crypto_aead_aes256gcm_decrypt_detached(unsigned char *m, unsigned char *nsec,
|
|
966
|
-
const unsigned char *c, unsigned long long clen,
|
|
967
|
-
const unsigned char *mac, const unsigned char *ad,
|
|
968
|
-
unsigned long long adlen, const unsigned char *npub,
|
|
969
|
-
const unsigned char *k)
|
|
970
|
-
{
|
|
971
|
-
CRYPTO_ALIGN(16) crypto_aead_aes256gcm_state st;
|
|
972
|
-
|
|
973
|
-
PREFETCH_WRITE(m);
|
|
974
|
-
PREFETCH_READ(c);
|
|
975
|
-
PREFETCH_READ(ad);
|
|
976
|
-
|
|
977
|
-
crypto_aead_aes256gcm_beforenm(&st, k);
|
|
978
|
-
|
|
979
|
-
return crypto_aead_aes256gcm_decrypt_detached_afternm(
|
|
980
|
-
m, nsec, c, clen, mac, ad, adlen, npub, (const crypto_aead_aes256gcm_state *) &st);
|
|
981
|
-
}
|
|
982
|
-
|
|
983
|
-
int
|
|
984
|
-
crypto_aead_aes256gcm_decrypt(unsigned char *m, unsigned long long *mlen_p, unsigned char *nsec,
|
|
985
|
-
const unsigned char *c, unsigned long long clen,
|
|
986
|
-
const unsigned char *ad, unsigned long long adlen,
|
|
987
|
-
const unsigned char *npub, const unsigned char *k)
|
|
988
|
-
{
|
|
989
|
-
CRYPTO_ALIGN(16) crypto_aead_aes256gcm_state st;
|
|
990
|
-
int ret;
|
|
991
|
-
|
|
992
|
-
PREFETCH_WRITE(m);
|
|
993
|
-
PREFETCH_READ(c);
|
|
994
|
-
PREFETCH_READ(ad);
|
|
995
|
-
|
|
996
|
-
crypto_aead_aes256gcm_beforenm(&st, k);
|
|
997
|
-
|
|
998
|
-
ret = crypto_aead_aes256gcm_decrypt_afternm(m, mlen_p, nsec, c, clen, ad, adlen, npub,
|
|
999
|
-
(const crypto_aead_aes256gcm_state *) &st);
|
|
1000
|
-
sodium_memzero(&st, sizeof st);
|
|
1001
|
-
|
|
1002
|
-
return ret;
|
|
1003
|
-
}
|
|
1004
|
-
|
|
1005
|
-
int
|
|
1006
|
-
crypto_aead_aes256gcm_is_available(void)
|
|
1007
|
-
{
|
|
1008
|
-
return sodium_runtime_has_pclmul() & sodium_runtime_has_aesni() & sodium_runtime_has_avx();
|
|
1009
|
-
}
|
|
1010
|
-
|
|
1011
|
-
#ifdef __clang__
|
|
1012
|
-
# pragma clang attribute pop
|
|
1013
|
-
#endif
|
|
1014
|
-
|
|
1015
|
-
#endif
|