From 509e2638cbb8ff1dfb2eefd4fd1e9cc1d31cbfe0 Mon Sep 17 00:00:00 2001 From: rtw1x1 Date: Tue, 3 Feb 2026 11:12:32 +0000 Subject: [PATCH] XChaCha20-Poly1305 via libsodium --- CMakeLists.txt | 2 + README.md | 40 +- src/AudioLib/CMakeLists.txt | 3 +- src/DumpProto/CMakeLists.txt | 10 +- src/DumpProto/dump_proto.cpp | 9 +- src/DumpProto/tea.cpp | 100 - src/DumpProto/tea.h | 17 - src/EffectLib/CMakeLists.txt | 3 +- src/EterBase/CMakeLists.txt | 4 +- src/EterBase/SecureCipher.cpp | 294 + src/EterBase/SecureCipher.h | 102 + src/EterBase/cipher.cpp | 414 - src/EterBase/cipher.h | 61 - src/EterBase/tea.cpp | 150 +- src/EterBase/tea.h | 16 +- src/EterGrnLib/CMakeLists.txt | 3 +- src/EterImageLib/CMakeLists.txt | 3 +- src/EterLib/CMakeLists.txt | 4 +- src/EterLib/NetStream.cpp | 365 +- src/EterLib/NetStream.h | 45 +- src/EterLocale/CMakeLists.txt | 3 +- src/EterPythonLib/CMakeLists.txt | 3 +- src/GameLib/CMakeLists.txt | 3 +- src/PRTerrainLib/CMakeLists.txt | 3 +- src/PackLib/CMakeLists.txt | 4 +- src/PackLib/Pack.cpp | 15 +- src/PackLib/Pack.h | 6 +- src/PackLib/config.h | 17 +- src/PackMaker/CMakeLists.txt | 4 +- src/PackMaker/main.cpp | 29 +- src/ScriptLib/CMakeLists.txt | 3 +- src/ScriptLib/PythonLauncher.cpp | 73 +- src/SpeedTreeLib/CMakeLists.txt | 3 +- src/UserInterface/AccountConnector.cpp | 262 +- src/UserInterface/AccountConnector.h | 21 +- src/UserInterface/CMakeLists.txt | 3 +- src/UserInterface/GuildMarkDownloader.cpp | 98 +- src/UserInterface/GuildMarkDownloader.h | 6 +- src/UserInterface/GuildMarkUploader.cpp | 76 +- src/UserInterface/GuildMarkUploader.h | 6 +- src/UserInterface/Locale.cpp | 11 - src/UserInterface/Locale.h | 2 - src/UserInterface/Locale_inc.h | 2 - src/UserInterface/Packet.h | 132 +- src/UserInterface/PythonNetworkStream.cpp | 9 +- src/UserInterface/PythonNetworkStream.h | 11 +- .../PythonNetworkStreamModule.cpp | 2 +- .../PythonNetworkStreamPhaseGame.cpp | 23 +- .../PythonNetworkStreamPhaseHandShake.cpp | 140 +- .../PythonNetworkStreamPhaseLoading.cpp | 9 +- .../PythonNetworkStreamPhaseLogin.cpp | 77 +- .../PythonNetworkStreamPhaseSelect.cpp | 30 +- src/UserInterface/PythonPackModule.cpp | 37 - src/UserInterface/UserInterface.cpp | 7 + vendor/CMakeLists.txt | 4 +- vendor/cryptopp/3way.cpp | 143 - vendor/cryptopp/3way.h | 63 - vendor/cryptopp/CMakeLists.txt | 1348 --- vendor/cryptopp/Doxyfile | 2429 ----- vendor/cryptopp/Filelist.txt | 650 -- vendor/cryptopp/GNUmakefile | 1795 ---- vendor/cryptopp/GNUmakefile-cross | 1060 -- vendor/cryptopp/History.txt | 544 - vendor/cryptopp/Install.txt | 241 - vendor/cryptopp/License.txt | 83 - vendor/cryptopp/Readme.txt | 436 - vendor/cryptopp/TestData/3desval.dat | 3 - vendor/cryptopp/TestData/3wayval.dat | 5 - vendor/cryptopp/TestData/aria.dat | 45 - vendor/cryptopp/TestData/camellia.dat | 45 - vendor/cryptopp/TestData/cast128v.dat | 11 - vendor/cryptopp/TestData/cast256v.dat | 11 - vendor/cryptopp/TestData/defdmac1.bin | 1 - vendor/cryptopp/TestData/defdmac2.bin | Bin 136 -> 0 bytes vendor/cryptopp/TestData/descert.dat | 171 - vendor/cryptopp/TestData/dh1024.dat | 1 - vendor/cryptopp/TestData/dh2048.dat | 1 - vendor/cryptopp/TestData/dlie1024.dat | 1 - vendor/cryptopp/TestData/dlie2048.dat | 1 - vendor/cryptopp/TestData/dsa1024.dat | 1 - vendor/cryptopp/TestData/dsa1024b.dat | 1 - vendor/cryptopp/TestData/dsa512.dat | 1 - vendor/cryptopp/TestData/ecies_p160.dat | 1 - vendor/cryptopp/TestData/ecies_t163.dat | 1 - vendor/cryptopp/TestData/ed25519.dat | 1 - vendor/cryptopp/TestData/ed25519v0.dat | 1 - vendor/cryptopp/TestData/ed25519v1.dat | 1 - vendor/cryptopp/TestData/elgc1024.dat | 1 - vendor/cryptopp/TestData/esig1023.dat | 1 - vendor/cryptopp/TestData/esig1536.dat | 1 - vendor/cryptopp/TestData/esig2046.dat | 1 - vendor/cryptopp/TestData/fhmqv160.dat | 1 - vendor/cryptopp/TestData/fhmqv256.dat | 1 - vendor/cryptopp/TestData/fhmqv384.dat | 1 - vendor/cryptopp/TestData/fhmqv512.dat | 1 - vendor/cryptopp/TestData/gostval.dat | 23 - vendor/cryptopp/TestData/hmqv160.dat | 1 - vendor/cryptopp/TestData/hmqv256.dat | 1 - vendor/cryptopp/TestData/hmqv384.dat | 1 - vendor/cryptopp/TestData/hmqv512.dat | 1 - vendor/cryptopp/TestData/ideaval.dat | 11 - vendor/cryptopp/TestData/luc1024.dat | 1 - vendor/cryptopp/TestData/luc2048.dat | 1 - vendor/cryptopp/TestData/lucc1024.dat | 1 - vendor/cryptopp/TestData/lucc512.dat | 1 - vendor/cryptopp/TestData/lucd1024.dat | 4 - vendor/cryptopp/TestData/lucd512.dat | 2 - vendor/cryptopp/TestData/lucs1024.dat | 1 - vendor/cryptopp/TestData/lucs512.dat | 1 - vendor/cryptopp/TestData/marsval.dat | 9 - vendor/cryptopp/TestData/mqv1024.dat | 1 - vendor/cryptopp/TestData/mqv2048.dat | 1 - vendor/cryptopp/TestData/nr1024.dat | 1 - vendor/cryptopp/TestData/nr2048.dat | 1 - vendor/cryptopp/TestData/rabi1024.dat | 1 - vendor/cryptopp/TestData/rabi2048.dat | 1 - vendor/cryptopp/TestData/rc2val.dat | 48 - vendor/cryptopp/TestData/rc5val.dat | 5 - vendor/cryptopp/TestData/rc6val.dat | 17 - vendor/cryptopp/TestData/rijndael.dat | 9 - vendor/cryptopp/TestData/rsa1024.dat | 32 - vendor/cryptopp/TestData/rsa2048.dat | 61 - vendor/cryptopp/TestData/rsa2048a.dat | 77 - vendor/cryptopp/TestData/rsa400pb.dat | 10 - vendor/cryptopp/TestData/rsa400pv.dat | 41 - vendor/cryptopp/TestData/rsa512a.dat | 35 - vendor/cryptopp/TestData/rw1024.dat | 1 - vendor/cryptopp/TestData/rw2048.dat | 1 - vendor/cryptopp/TestData/saferval.dat | 16 - vendor/cryptopp/TestData/serpentv.dat | 12 - vendor/cryptopp/TestData/shacal2v.dat | 14 - vendor/cryptopp/TestData/sharkval.dat | 7 - vendor/cryptopp/TestData/skipjack.dat | 1 - vendor/cryptopp/TestData/squareva.dat | 8 - vendor/cryptopp/TestData/twofishv.dat | 9 - vendor/cryptopp/TestData/usage.dat | 81 - vendor/cryptopp/TestData/x25519.dat | 1 - vendor/cryptopp/TestData/x25519v0.dat | 1 - vendor/cryptopp/TestData/x25519v1.dat | 1 - vendor/cryptopp/TestData/xtrdh171.dat | 3 - vendor/cryptopp/TestData/xtrdh342.dat | 5 - vendor/cryptopp/TestPrograms/test_32bit.cpp | 7 - vendor/cryptopp/TestPrograms/test_64bit.cpp | 7 - .../TestPrograms/test_arm_acle_header.cpp | 6 - vendor/cryptopp/TestPrograms/test_arm_aes.cpp | 14 - .../cryptopp/TestPrograms/test_arm_asimd.cpp | 11 - vendor/cryptopp/TestPrograms/test_arm_crc.cpp | 23 - .../cryptopp/TestPrograms/test_arm_neon.cpp | 11 - .../TestPrograms/test_arm_neon_header.cpp | 6 - .../cryptopp/TestPrograms/test_arm_pmull.cpp | 26 - .../cryptopp/TestPrograms/test_arm_sha1.cpp | 13 - .../cryptopp/TestPrograms/test_arm_sha256.cpp | 13 - .../cryptopp/TestPrograms/test_arm_sha3.cpp | 19 - .../cryptopp/TestPrograms/test_arm_sha512.cpp | 17 - vendor/cryptopp/TestPrograms/test_arm_sm3.cpp | 19 - vendor/cryptopp/TestPrograms/test_arm_sm4.cpp | 15 - .../cryptopp/TestPrograms/test_asm_mixed.cpp | 31 - vendor/cryptopp/TestPrograms/test_cxx.cpp | 6 - vendor/cryptopp/TestPrograms/test_cxx11.cpp | 11 - .../TestPrograms/test_cxx11_alignas.cpp | 5 - .../TestPrograms/test_cxx11_alignof.cpp | 6 - .../TestPrograms/test_cxx11_assert.cpp | 10 - .../TestPrograms/test_cxx11_atomic.cpp | 7 - .../cryptopp/TestPrograms/test_cxx11_auto.cpp | 5 - .../TestPrograms/test_cxx11_constexpr.cpp | 10 - .../TestPrograms/test_cxx11_deletefn.cpp | 10 - .../TestPrograms/test_cxx11_enumtype.cpp | 7 - .../TestPrograms/test_cxx11_initializer.cpp | 6 - .../TestPrograms/test_cxx11_lambda.cpp | 10 - .../TestPrograms/test_cxx11_noexcept.cpp | 29 - .../TestPrograms/test_cxx11_nullptr.cpp | 6 - .../TestPrograms/test_cxx11_staticinit.cpp | 11 - .../cryptopp/TestPrograms/test_cxx11_sync.cpp | 7 - .../TestPrograms/test_cxx11_vartemplates.cpp | 9 - vendor/cryptopp/TestPrograms/test_cxx14.cpp | 9 - vendor/cryptopp/TestPrograms/test_cxx17.cpp | 9 - .../TestPrograms/test_cxx17_assert.cpp | 10 - .../TestPrograms/test_cxx17_exceptions.cpp | 11 - .../TestPrograms/test_cxx98_exception.cpp | 12 - vendor/cryptopp/TestPrograms/test_glibc.cpp | 8 - vendor/cryptopp/TestPrograms/test_newlib.cpp | 8 - vendor/cryptopp/TestPrograms/test_ppc_aes.cpp | 26 - .../TestPrograms/test_ppc_altivec.cpp | 13 - .../cryptopp/TestPrograms/test_ppc_power7.cpp | 44 - .../cryptopp/TestPrograms/test_ppc_power8.cpp | 46 - .../cryptopp/TestPrograms/test_ppc_power9.cpp | 33 - vendor/cryptopp/TestPrograms/test_ppc_sha.cpp | 23 - .../cryptopp/TestPrograms/test_ppc_vmull.cpp | 17 - .../cryptopp/TestPrograms/test_pthreads.cpp | 15 - vendor/cryptopp/TestPrograms/test_x86_aes.cpp | 11 - vendor/cryptopp/TestPrograms/test_x86_avx.cpp | 7 - .../cryptopp/TestPrograms/test_x86_avx2.cpp | 9 - .../cryptopp/TestPrograms/test_x86_avx512.cpp | 8 - .../cryptopp/TestPrograms/test_x86_clmul.cpp | 8 - .../cryptopp/TestPrograms/test_x86_cpuid.cpp | 7 - .../cryptopp/TestPrograms/test_x86_rdrand.cpp | 10 - .../cryptopp/TestPrograms/test_x86_rdseed.cpp | 10 - vendor/cryptopp/TestPrograms/test_x86_sha.cpp | 14 - .../cryptopp/TestPrograms/test_x86_sse2.cpp | 7 - .../cryptopp/TestPrograms/test_x86_sse3.cpp | 8 - .../cryptopp/TestPrograms/test_x86_sse41.cpp | 10 - .../cryptopp/TestPrograms/test_x86_sse42.cpp | 7 - .../cryptopp/TestPrograms/test_x86_ssse3.cpp | 8 - .../TestPrograms/test_x86_via_aes.cpp | 39 - .../TestPrograms/test_x86_via_rng.cpp | 38 - .../TestPrograms/test_x86_via_sha.cpp | 39 - vendor/cryptopp/TestVectors/Readme.txt | 89 - vendor/cryptopp/TestVectors/aead.txt | 6 - vendor/cryptopp/TestVectors/aes.txt | 347 - vendor/cryptopp/TestVectors/all.txt | 65 - vendor/cryptopp/TestVectors/aria.txt | 158 - vendor/cryptopp/TestVectors/blake2.txt | 4 - vendor/cryptopp/TestVectors/blake2b.txt | 438 - vendor/cryptopp/TestVectors/blake2s.txt | 223 - vendor/cryptopp/TestVectors/camellia.txt | 8646 --------------- vendor/cryptopp/TestVectors/ccm.txt | 240 - vendor/cryptopp/TestVectors/chacha.txt | 776 -- .../cryptopp/TestVectors/chacha20poly1305.txt | 9439 ----------------- vendor/cryptopp/TestVectors/chacha_tls.txt | 337 - vendor/cryptopp/TestVectors/cham.txt | 471 - vendor/cryptopp/TestVectors/cmac.txt | 38 - vendor/cryptopp/TestVectors/dlies.txt | 542 - vendor/cryptopp/TestVectors/dsa.txt | 397 - vendor/cryptopp/TestVectors/dsa_1363.txt | 553 - vendor/cryptopp/TestVectors/dsa_rfc6979.txt | 663 -- vendor/cryptopp/TestVectors/eax.txt | 75 - vendor/cryptopp/TestVectors/esign.txt | 93 - vendor/cryptopp/TestVectors/gcm.txt | 168 - vendor/cryptopp/TestVectors/hc128.txt | 645 -- vendor/cryptopp/TestVectors/hc256.txt | 2330 ---- vendor/cryptopp/TestVectors/hight.txt | 522 - vendor/cryptopp/TestVectors/hkdf.txt | 173 - vendor/cryptopp/TestVectors/hmac.txt | 281 - vendor/cryptopp/TestVectors/kalyna.txt | 94 - vendor/cryptopp/TestVectors/keccak.txt | 861 -- vendor/cryptopp/TestVectors/lea.txt | 713 -- vendor/cryptopp/TestVectors/lsh.txt | 5 - vendor/cryptopp/TestVectors/lsh256.txt | 1477 --- vendor/cryptopp/TestVectors/lsh512.txt | 1477 --- vendor/cryptopp/TestVectors/lsh512_256.txt | 738 -- vendor/cryptopp/TestVectors/mars.txt | 66 - vendor/cryptopp/TestVectors/nr.txt | 615 -- vendor/cryptopp/TestVectors/panama.txt | 76 - vendor/cryptopp/TestVectors/poly1305_tls.txt | 1687 --- vendor/cryptopp/TestVectors/poly1305aes.txt | 2229 ---- vendor/cryptopp/TestVectors/rabbit.txt | 1980 ---- vendor/cryptopp/TestVectors/rsa_oaep.txt | 1765 --- vendor/cryptopp/TestVectors/rsa_pkcs1_1_5.txt | 89 - vendor/cryptopp/TestVectors/rsa_pss.txt | 2083 ---- vendor/cryptopp/TestVectors/rw.txt | 166 - vendor/cryptopp/TestVectors/salsa.txt | 596 -- vendor/cryptopp/TestVectors/seal.txt | 137 - vendor/cryptopp/TestVectors/seed.txt | 19 - vendor/cryptopp/TestVectors/sha.txt | 59 - .../TestVectors/sha1_160_fips_180.txt | 519 - vendor/cryptopp/TestVectors/sha1_fips_180.txt | 3 - vendor/cryptopp/TestVectors/sha2.txt | 6 - .../TestVectors/sha2_224_fips_180.txt | 519 - .../TestVectors/sha2_256_fips_180.txt | 519 - .../TestVectors/sha2_384_fips_180.txt | 1031 -- .../TestVectors/sha2_512_fips_180.txt | 1031 -- vendor/cryptopp/TestVectors/sha2_fips_180.txt | 6 - vendor/cryptopp/TestVectors/sha3.txt | 6 - .../TestVectors/sha3_224_fips_202.txt | 983 -- .../TestVectors/sha3_256_fips_202.txt | 951 -- .../TestVectors/sha3_384_fips_202.txt | 823 -- .../TestVectors/sha3_512_fips_202.txt | 695 -- vendor/cryptopp/TestVectors/sha3_fips_202.txt | 6 - vendor/cryptopp/TestVectors/shacal2.txt | 5123 --------- vendor/cryptopp/TestVectors/shake.txt | 1206 --- vendor/cryptopp/TestVectors/simeck.txt | 317 - vendor/cryptopp/TestVectors/simon.txt | 885 -- vendor/cryptopp/TestVectors/siphash.txt | 3849 ------- vendor/cryptopp/TestVectors/skipjack.txt | 1046 -- vendor/cryptopp/TestVectors/sm3.txt | 358 - vendor/cryptopp/TestVectors/sm4.txt | 392 - vendor/cryptopp/TestVectors/sosemanuk.txt | 25 - vendor/cryptopp/TestVectors/speck.txt | 885 -- vendor/cryptopp/TestVectors/tea.txt | 711 -- vendor/cryptopp/TestVectors/threefish.txt | 117 - vendor/cryptopp/TestVectors/ttmac.txt | 40 - vendor/cryptopp/TestVectors/vmac.txt | 77 - vendor/cryptopp/TestVectors/wake.txt | 10 - vendor/cryptopp/TestVectors/whrlpool.txt | 39 - vendor/cryptopp/TestVectors/xchacha.txt | 75 - vendor/cryptopp/TestVectors/xts.txt | 8228 -------------- vendor/cryptopp/adhoc.cpp.proto | 42 - vendor/cryptopp/adler32.cpp | 82 - vendor/cryptopp/adler32.h | 33 - vendor/cryptopp/adv_simd.h | 1281 --- vendor/cryptopp/aes.h | 30 - vendor/cryptopp/aes_armv4.S | 1215 --- vendor/cryptopp/aes_armv4.h | 30 - vendor/cryptopp/algebra.cpp | 341 - vendor/cryptopp/algebra.h | 453 - vendor/cryptopp/algparam.cpp | 75 - vendor/cryptopp/algparam.h | 520 - vendor/cryptopp/allocate.cpp | 107 - vendor/cryptopp/allocate.h | 74 - vendor/cryptopp/arc4.cpp | 122 - vendor/cryptopp/arc4.h | 89 - vendor/cryptopp/argnames.h | 99 - vendor/cryptopp/aria.cpp | 343 - vendor/cryptopp/aria.h | 71 - vendor/cryptopp/aria_simd.cpp | 194 - vendor/cryptopp/ariatab.cpp | 166 - vendor/cryptopp/arm_simd.h | 449 - vendor/cryptopp/asn.cpp | 717 -- vendor/cryptopp/asn.h | 965 -- vendor/cryptopp/authenc.cpp | 188 - vendor/cryptopp/authenc.h | 87 - vendor/cryptopp/base32.cpp | 97 - vendor/cryptopp/base32.h | 158 - vendor/cryptopp/base64.cpp | 111 - vendor/cryptopp/base64.h | 158 - vendor/cryptopp/basecode.cpp | 247 - vendor/cryptopp/basecode.h | 146 - vendor/cryptopp/bds10.zip | Bin 6812 -> 0 bytes vendor/cryptopp/bench.h | 105 - vendor/cryptopp/bench1.cpp | 520 - vendor/cryptopp/bench2.cpp | 267 - vendor/cryptopp/bench3.cpp | 480 - vendor/cryptopp/bfinit.cpp | 277 - vendor/cryptopp/blake2.cpp | 797 -- vendor/cryptopp/blake2.h | 444 - vendor/cryptopp/blake2b_simd.cpp | 1276 --- vendor/cryptopp/blake2s_simd.cpp | 1091 -- vendor/cryptopp/blowfish.cpp | 99 - vendor/cryptopp/blowfish.h | 54 - vendor/cryptopp/blumshub.cpp | 64 - vendor/cryptopp/blumshub.h | 70 - vendor/cryptopp/camellia.cpp | 539 - vendor/cryptopp/camellia.h | 49 - vendor/cryptopp/cast.cpp | 292 - vendor/cryptopp/cast.h | 109 - vendor/cryptopp/casts.cpp | 545 - vendor/cryptopp/cbcmac.cpp | 62 - vendor/cryptopp/cbcmac.h | 63 - vendor/cryptopp/ccm.cpp | 139 - vendor/cryptopp/ccm.h | 123 - vendor/cryptopp/chacha.cpp | 568 - vendor/cryptopp/chacha.h | 223 - vendor/cryptopp/chacha_avx.cpp | 422 - vendor/cryptopp/chacha_simd.cpp | 1109 -- vendor/cryptopp/chachapoly.cpp | 211 - vendor/cryptopp/chachapoly.h | 322 - vendor/cryptopp/cham.cpp | 365 - vendor/cryptopp/cham.h | 179 - vendor/cryptopp/cham_simd.cpp | 478 - vendor/cryptopp/channels.cpp | 316 - vendor/cryptopp/channels.h | 142 - vendor/cryptopp/cmac.cpp | 164 - vendor/cryptopp/cmac.h | 76 - vendor/cryptopp/config.h | 33 - vendor/cryptopp/config_align.h | 72 - vendor/cryptopp/config_asm.h | 480 - vendor/cryptopp/config_cpu.h | 211 - vendor/cryptopp/config_cxx.h | 247 - vendor/cryptopp/config_dll.h | 178 - vendor/cryptopp/config_int.h | 253 - vendor/cryptopp/config_misc.h | 194 - vendor/cryptopp/config_ns.h | 76 - vendor/cryptopp/config_os.h | 169 - vendor/cryptopp/config_ver.h | 90 - vendor/cryptopp/cpu.cpp | 1459 --- vendor/cryptopp/cpu.h | 1085 -- vendor/cryptopp/crc.cpp | 367 - vendor/cryptopp/crc.h | 78 - vendor/cryptopp/crc_simd.cpp | 172 - vendor/cryptopp/cryptdll.vcxproj | 334 - vendor/cryptopp/cryptdll.vcxproj.filters | 450 - vendor/cryptopp/cryptest.nmake | 363 - vendor/cryptopp/cryptest.sln | 89 - vendor/cryptopp/cryptest.vcxproj | 381 - vendor/cryptopp/cryptest.vcxproj.filters | 524 - vendor/cryptopp/cryptest.vcxproj.user | 6 - vendor/cryptopp/cryptlib.cpp | 1054 -- vendor/cryptopp/cryptlib.h | 3379 ------ vendor/cryptopp/cryptlib.vcxproj | 585 - vendor/cryptopp/cryptlib.vcxproj.filters | 1107 -- vendor/cryptopp/cryptopp.rc | 104 - vendor/cryptopp/cryptopp.supp | 8 - vendor/cryptopp/darn.cpp | 236 - vendor/cryptopp/darn.h | 95 - vendor/cryptopp/datatest.cpp | 1358 --- vendor/cryptopp/default.cpp | 307 - vendor/cryptopp/default.h | 310 - vendor/cryptopp/des.cpp | 465 - vendor/cryptopp/des.h | 163 - vendor/cryptopp/dessp.cpp | 88 - vendor/cryptopp/dh.cpp | 21 - vendor/cryptopp/dh.h | 275 - vendor/cryptopp/dh2.cpp | 69 - vendor/cryptopp/dh2.h | 70 - vendor/cryptopp/dll.cpp | 169 - vendor/cryptopp/dll.h | 71 - vendor/cryptopp/dlltest.cpp | 212 - vendor/cryptopp/dlltest.vcxproj | 135 - vendor/cryptopp/dlltest.vcxproj.filters | 14 - vendor/cryptopp/dmac.h | 114 - vendor/cryptopp/donna.h | 178 - vendor/cryptopp/donna_32.cpp | 2102 ---- vendor/cryptopp/donna_32.h | 411 - vendor/cryptopp/donna_64.cpp | 1815 ---- vendor/cryptopp/donna_64.h | 457 - vendor/cryptopp/donna_sse.cpp | 1123 -- vendor/cryptopp/donna_sse.h | 86 - vendor/cryptopp/drbg.h | 718 -- vendor/cryptopp/dsa.cpp | 66 - vendor/cryptopp/dsa.h | 53 - vendor/cryptopp/eax.cpp | 59 - vendor/cryptopp/eax.h | 112 - vendor/cryptopp/ec2n.cpp | 320 - vendor/cryptopp/ec2n.h | 136 - vendor/cryptopp/eccrypto.cpp | 840 -- vendor/cryptopp/eccrypto.h | 686 -- vendor/cryptopp/ecp.cpp | 506 - vendor/cryptopp/ecp.h | 167 - vendor/cryptopp/ecpoint.h | 146 - vendor/cryptopp/elgamal.cpp | 22 - vendor/cryptopp/elgamal.h | 308 - vendor/cryptopp/emsa2.cpp | 44 - vendor/cryptopp/emsa2.h | 101 - vendor/cryptopp/eprecomp.cpp | 114 - vendor/cryptopp/eprecomp.h | 162 - vendor/cryptopp/esign.cpp | 233 - vendor/cryptopp/esign.h | 169 - vendor/cryptopp/factory.h | 179 - vendor/cryptopp/fhmqv.h | 408 - vendor/cryptopp/files.cpp | 300 - vendor/cryptopp/files.h | 181 - vendor/cryptopp/filters.cpp | 1270 --- vendor/cryptopp/filters.h | 1529 --- vendor/cryptopp/fips140.cpp | 84 - vendor/cryptopp/fips140.h | 112 - vendor/cryptopp/fipsalgt.cpp | 1293 --- vendor/cryptopp/fipstest.cpp | 652 -- vendor/cryptopp/fltrimpl.h | 87 - vendor/cryptopp/gcm.cpp | 852 -- vendor/cryptopp/gcm.h | 139 - vendor/cryptopp/gcm_simd.cpp | 734 -- vendor/cryptopp/gf256.cpp | 34 - vendor/cryptopp/gf256.h | 72 - vendor/cryptopp/gf2_32.cpp | 99 - vendor/cryptopp/gf2_32.h | 73 - vendor/cryptopp/gf2n.cpp | 1070 -- vendor/cryptopp/gf2n.h | 404 - vendor/cryptopp/gf2n_simd.cpp | 614 -- vendor/cryptopp/gfpcrypt.cpp | 334 - vendor/cryptopp/gfpcrypt.h | 1036 -- vendor/cryptopp/gost.cpp | 123 - vendor/cryptopp/gost.h | 66 - vendor/cryptopp/gzip.cpp | 208 - vendor/cryptopp/gzip.h | 144 - vendor/cryptopp/hashfwd.h | 38 - vendor/cryptopp/hc128.cpp | 279 - vendor/cryptopp/hc128.h | 67 - vendor/cryptopp/hc256.cpp | 158 - vendor/cryptopp/hc256.h | 67 - vendor/cryptopp/hex.cpp | 58 - vendor/cryptopp/hex.h | 50 - vendor/cryptopp/hight.cpp | 271 - vendor/cryptopp/hight.h | 81 - vendor/cryptopp/hkdf.h | 179 - vendor/cryptopp/hmac.cpp | 90 - vendor/cryptopp/hmac.h | 80 - vendor/cryptopp/hmqv.h | 417 - vendor/cryptopp/hrtimer.cpp | 174 - vendor/cryptopp/hrtimer.h | 134 - vendor/cryptopp/ida.cpp | 418 - vendor/cryptopp/ida.h | 182 - vendor/cryptopp/idea.cpp | 191 - vendor/cryptopp/idea.h | 66 - vendor/cryptopp/integer.cpp | 4910 --------- vendor/cryptopp/integer.h | 837 -- vendor/cryptopp/iterhash.cpp | 200 - vendor/cryptopp/iterhash.h | 218 - vendor/cryptopp/kalyna.cpp | 1362 --- vendor/cryptopp/kalyna.h | 218 - vendor/cryptopp/kalynatab.cpp | 1232 --- vendor/cryptopp/keccak.cpp | 67 - vendor/cryptopp/keccak.h | 118 - vendor/cryptopp/keccak_core.cpp | 261 - vendor/cryptopp/keccak_simd.cpp | 2681 ----- vendor/cryptopp/lea.cpp | 899 -- vendor/cryptopp/lea.h | 108 - vendor/cryptopp/lea_simd.cpp | 1072 -- vendor/cryptopp/lsh.h | 262 - vendor/cryptopp/lsh256.cpp | 817 -- vendor/cryptopp/lsh256_avx.cpp | 648 -- vendor/cryptopp/lsh256_sse.cpp | 710 -- vendor/cryptopp/lsh512.cpp | 893 -- vendor/cryptopp/lsh512_avx.cpp | 760 -- vendor/cryptopp/lsh512_sse.cpp | 938 -- vendor/cryptopp/lubyrack.h | 137 - vendor/cryptopp/luc.cpp | 231 - vendor/cryptopp/luc.h | 338 - vendor/cryptopp/mars.cpp | 154 - vendor/cryptopp/mars.h | 60 - vendor/cryptopp/marss.cpp | 140 - vendor/cryptopp/md2.cpp | 120 - vendor/cryptopp/md2.h | 56 - vendor/cryptopp/md4.cpp | 110 - vendor/cryptopp/md4.h | 35 - vendor/cryptopp/md5.cpp | 124 - vendor/cryptopp/md5.h | 35 - vendor/cryptopp/mdc.h | 84 - vendor/cryptopp/mersenne.h | 231 - vendor/cryptopp/misc.cpp | 394 - vendor/cryptopp/misc.h | 2776 ----- vendor/cryptopp/modarith.h | 344 - vendor/cryptopp/modes.cpp | 306 - vendor/cryptopp/modes.h | 609 -- vendor/cryptopp/modexppc.h | 48 - vendor/cryptopp/mqueue.cpp | 175 - vendor/cryptopp/mqueue.h | 145 - vendor/cryptopp/mqv.cpp | 46 - vendor/cryptopp/mqv.h | 268 - vendor/cryptopp/naclite.h | 438 - vendor/cryptopp/nbtheory.cpp | 1141 -- vendor/cryptopp/nbtheory.h | 317 - vendor/cryptopp/neon_simd.cpp | 197 - vendor/cryptopp/nr.h | 11 - vendor/cryptopp/oaep.cpp | 98 - vendor/cryptopp/oaep.h | 54 - vendor/cryptopp/oids.h | 197 - vendor/cryptopp/osrng.cpp | 300 - vendor/cryptopp/osrng.h | 304 - vendor/cryptopp/ossig.h | 128 - vendor/cryptopp/padlkrng.cpp | 105 - vendor/cryptopp/padlkrng.h | 138 - vendor/cryptopp/panama.cpp | 533 - vendor/cryptopp/panama.h | 169 - vendor/cryptopp/pch.cpp | 1 - vendor/cryptopp/pch.h | 31 - vendor/cryptopp/pkcspad.cpp | 160 - vendor/cryptopp/pkcspad.h | 123 - vendor/cryptopp/poly1305.cpp | 403 - vendor/cryptopp/poly1305.h | 241 - vendor/cryptopp/polynomi.cpp | 577 - vendor/cryptopp/polynomi.h | 463 - vendor/cryptopp/ppc_power7.cpp | 93 - vendor/cryptopp/ppc_power8.cpp | 246 - vendor/cryptopp/ppc_power9.cpp | 136 - vendor/cryptopp/ppc_simd.cpp | 96 - vendor/cryptopp/ppc_simd.h | 2764 ----- vendor/cryptopp/pssr.cpp | 163 - vendor/cryptopp/pssr.h | 105 - vendor/cryptopp/pubkey.cpp | 170 - vendor/cryptopp/pubkey.h | 2378 ----- vendor/cryptopp/pwdbased.h | 481 - vendor/cryptopp/queue.cpp | 601 -- vendor/cryptopp/queue.h | 272 - vendor/cryptopp/rabbit.cpp | 259 - vendor/cryptopp/rabbit.h | 112 - vendor/cryptopp/rabin.cpp | 241 - vendor/cryptopp/rabin.h | 135 - vendor/cryptopp/randpool.cpp | 174 - vendor/cryptopp/randpool.h | 104 - vendor/cryptopp/rc2.cpp | 118 - vendor/cryptopp/rc2.h | 90 - vendor/cryptopp/rc5.cpp | 80 - vendor/cryptopp/rc5.h | 59 - vendor/cryptopp/rc6.cpp | 96 - vendor/cryptopp/rc6.h | 60 - vendor/cryptopp/rdrand.asm | 230 - vendor/cryptopp/rdrand.cpp | 327 - vendor/cryptopp/rdrand.h | 145 - vendor/cryptopp/rdseed.asm | 230 - vendor/cryptopp/rdtables.cpp | 166 - vendor/cryptopp/regtest1.cpp | 160 - vendor/cryptopp/regtest2.cpp | 105 - vendor/cryptopp/regtest3.cpp | 156 - vendor/cryptopp/regtest4.cpp | 58 - vendor/cryptopp/resource.h | 15 - vendor/cryptopp/rijndael.cpp | 1334 --- vendor/cryptopp/rijndael.h | 109 - vendor/cryptopp/rijndael_simd.cpp | 734 -- vendor/cryptopp/ripemd.cpp | 803 -- vendor/cryptopp/ripemd.h | 65 - vendor/cryptopp/rng.cpp | 166 - vendor/cryptopp/rng.h | 111 - vendor/cryptopp/rsa.cpp | 330 - vendor/cryptopp/rsa.h | 263 - vendor/cryptopp/rw.cpp | 314 - vendor/cryptopp/rw.h | 146 - vendor/cryptopp/safer.cpp | 157 - vendor/cryptopp/safer.h | 98 - vendor/cryptopp/salsa.cpp | 759 -- vendor/cryptopp/salsa.h | 104 - vendor/cryptopp/scrypt.cpp | 329 - vendor/cryptopp/scrypt.h | 103 - vendor/cryptopp/seal.cpp | 222 - vendor/cryptopp/seal.h | 59 - vendor/cryptopp/secblock.h | 1310 --- vendor/cryptopp/secblockfwd.h | 29 - vendor/cryptopp/seckey.h | 444 - vendor/cryptopp/seed.cpp | 113 - vendor/cryptopp/seed.h | 44 - vendor/cryptopp/serpent.cpp | 125 - vendor/cryptopp/serpent.h | 72 - vendor/cryptopp/serpentp.h | 439 - vendor/cryptopp/sha.cpp | 1414 --- vendor/cryptopp/sha.h | 210 - vendor/cryptopp/sha1_armv4.S | 1410 --- vendor/cryptopp/sha1_armv4.h | 23 - vendor/cryptopp/sha256_armv4.S | 2670 ----- vendor/cryptopp/sha256_armv4.h | 23 - vendor/cryptopp/sha3.cpp | 71 - vendor/cryptopp/sha3.h | 106 - vendor/cryptopp/sha512_armv4.S | 1861 ---- vendor/cryptopp/sha512_armv4.h | 23 - vendor/cryptopp/sha_simd.cpp | 1506 --- vendor/cryptopp/shacal2.cpp | 172 - vendor/cryptopp/shacal2.h | 66 - vendor/cryptopp/shacal2_simd.cpp | 94 - vendor/cryptopp/shake.cpp | 85 - vendor/cryptopp/shake.h | 161 - vendor/cryptopp/shark.cpp | 163 - vendor/cryptopp/shark.h | 77 - vendor/cryptopp/sharkbox.cpp | 4166 -------- vendor/cryptopp/simeck.cpp | 154 - vendor/cryptopp/simeck.h | 162 - vendor/cryptopp/simon.cpp | 505 - vendor/cryptopp/simon.h | 206 - vendor/cryptopp/simon128_simd.cpp | 862 -- vendor/cryptopp/simple.cpp | 13 - vendor/cryptopp/simple.h | 506 - vendor/cryptopp/siphash.h | 313 - vendor/cryptopp/skipjack.cpp | 202 - vendor/cryptopp/skipjack.h | 80 - vendor/cryptopp/sm3.cpp | 255 - vendor/cryptopp/sm3.h | 61 - vendor/cryptopp/sm4.cpp | 212 - vendor/cryptopp/sm4.h | 96 - vendor/cryptopp/sm4_simd.cpp | 323 - vendor/cryptopp/smartptr.h | 257 - vendor/cryptopp/sosemanuk.cpp | 728 -- vendor/cryptopp/sosemanuk.h | 62 - vendor/cryptopp/speck.cpp | 487 - vendor/cryptopp/speck.h | 206 - vendor/cryptopp/speck128_simd.cpp | 754 -- vendor/cryptopp/square.cpp | 187 - vendor/cryptopp/square.h | 63 - vendor/cryptopp/squaretb.cpp | 582 - vendor/cryptopp/sse_simd.cpp | 115 - vendor/cryptopp/stdcpp.h | 101 - vendor/cryptopp/strciphr.cpp | 328 - vendor/cryptopp/strciphr.h | 728 -- vendor/cryptopp/tea.cpp | 165 - vendor/cryptopp/tea.h | 161 - vendor/cryptopp/test.cpp | 1095 -- vendor/cryptopp/tftables.cpp | 323 - vendor/cryptopp/threefish.cpp | 503 - vendor/cryptopp/threefish.h | 201 - vendor/cryptopp/tiger.cpp | 282 - vendor/cryptopp/tiger.h | 61 - vendor/cryptopp/tigertab.cpp | 525 - vendor/cryptopp/trap.h | 163 - vendor/cryptopp/trunhash.h | 63 - vendor/cryptopp/ttmac.cpp | 348 - vendor/cryptopp/ttmac.h | 44 - vendor/cryptopp/tweetnacl.cpp | 924 -- vendor/cryptopp/tweetnacl.h | 281 - vendor/cryptopp/twofish.cpp | 171 - vendor/cryptopp/twofish.h | 64 - vendor/cryptopp/validat0.cpp | 1669 --- vendor/cryptopp/validat1.cpp | 1225 --- vendor/cryptopp/validat10.cpp | 535 - vendor/cryptopp/validat2.cpp | 1270 --- vendor/cryptopp/validat3.cpp | 1341 --- vendor/cryptopp/validat4.cpp | 1813 ---- vendor/cryptopp/validat5.cpp | 2225 ---- vendor/cryptopp/validat6.cpp | 408 - vendor/cryptopp/validat7.cpp | 705 -- vendor/cryptopp/validat8.cpp | 624 -- vendor/cryptopp/validat9.cpp | 704 -- vendor/cryptopp/validate.h | 395 - vendor/cryptopp/vmac.cpp | 894 -- vendor/cryptopp/vmac.h | 91 - vendor/cryptopp/vs2005.zip | Bin 12635 -> 0 bytes vendor/cryptopp/wake.cpp | 111 - vendor/cryptopp/wake.h | 59 - vendor/cryptopp/whrlpool.cpp | 730 -- vendor/cryptopp/whrlpool.h | 42 - vendor/cryptopp/words.h | 225 - vendor/cryptopp/x64dll.asm | 2021 ---- vendor/cryptopp/x64masm.asm | 1565 --- vendor/cryptopp/xed25519.cpp | 900 -- vendor/cryptopp/xed25519.h | 825 -- vendor/cryptopp/xtr.cpp | 120 - vendor/cryptopp/xtr.h | 219 - vendor/cryptopp/xtrcrypt.cpp | 122 - vendor/cryptopp/xtrcrypt.h | 55 - vendor/cryptopp/xts.cpp | 512 - vendor/cryptopp/xts.h | 224 - vendor/cryptopp/zdeflate.cpp | 821 -- vendor/cryptopp/zdeflate.h | 174 - vendor/cryptopp/zinflate.cpp | 662 -- vendor/cryptopp/zinflate.h | 164 - vendor/cryptopp/zlib.cpp | 93 - vendor/cryptopp/zlib.h | 65 - vendor/libsodium/CMakeLists.txt | 90 + vendor/libsodium/src/Makefile.am | 3 + vendor/libsodium/src/Makefile.in | 679 ++ vendor/libsodium/src/libsodium/Makefile.am | 314 + vendor/libsodium/src/libsodium/Makefile.in | 4075 +++++++ .../crypto_aead/aegis128l/aead_aegis128l.c | 159 + .../crypto_aead/aegis128l/aegis128l_aesni.c | 70 + .../crypto_aead/aegis128l/aegis128l_aesni.h | 8 + .../aegis128l/aegis128l_armcrypto.c | 72 + .../aegis128l/aegis128l_armcrypto.h | 8 + .../crypto_aead/aegis128l/aegis128l_common.h | 248 + .../crypto_aead/aegis128l/aegis128l_soft.c | 59 + .../crypto_aead/aegis128l/aegis128l_soft.h | 8 + .../crypto_aead/aegis128l/implementations.h | 17 + .../crypto_aead/aegis256/aead_aegis256.c | 158 + .../crypto_aead/aegis256/aegis256_aesni.c | 65 + .../crypto_aead/aegis256/aegis256_aesni.h | 8 + .../crypto_aead/aegis256/aegis256_armcrypto.c | 70 + .../crypto_aead/aegis256/aegis256_armcrypto.h | 8 + .../crypto_aead/aegis256/aegis256_common.h | 231 + .../crypto_aead/aegis256/aegis256_soft.c | 54 + .../crypto_aead/aegis256/aegis256_soft.h | 8 + .../crypto_aead/aegis256/implementations.h | 17 + .../crypto_aead/aes256gcm/aead_aes256gcm.c | 157 + .../aes256gcm/aesni/aead_aes256gcm_aesni.c | 1015 ++ .../armcrypto/aead_aes256gcm_armcrypto.c | 1032 ++ .../chacha20poly1305/aead_chacha20poly1305.c | 400 + .../aead_xchacha20poly1305.c | 262 + .../src/libsodium/crypto_auth/crypto_auth.c | 41 + .../crypto_auth/hmacsha256/auth_hmacsha256.c | 118 + .../crypto_auth/hmacsha512/auth_hmacsha512.c | 118 + .../hmacsha512256/auth_hmacsha512256.c | 93 + .../src/libsodium/crypto_box/crypto_box.c | 114 + .../libsodium/crypto_box/crypto_box_easy.c | 115 + .../libsodium/crypto_box/crypto_box_seal.c | 68 + .../box_curve25519xchacha20poly1305.c | 204 + .../box_seal_curve25519xchacha20poly1305.c | 79 + .../box_curve25519xsalsa20poly1305.c | 156 + .../crypto_core/ed25519/core_ed25519.c | 225 + .../crypto_core/ed25519/core_ristretto255.c | 156 + .../crypto_core/ed25519/ref10/ed25519_ref10.c | 2858 +++++ .../crypto_core/ed25519/ref10/fe_25_5/base.h | 1344 +++ .../crypto_core/ed25519/ref10/fe_25_5/base2.h | 40 + .../ed25519/ref10/fe_25_5/constants.h | 40 + .../crypto_core/ed25519/ref10/fe_25_5/fe.h | 220 + .../crypto_core/ed25519/ref10/fe_51/base.h | 1344 +++ .../crypto_core/ed25519/ref10/fe_51/base2.h | 40 + .../ed25519/ref10/fe_51/constants.h | 41 + .../crypto_core/ed25519/ref10/fe_51/fe.h | 116 + .../crypto_core/hchacha20/core_hchacha20.c | 93 + .../crypto_core/hsalsa20/core_hsalsa20.c | 21 + .../hsalsa20/ref2/core_hsalsa20_ref2.c | 95 + .../crypto_core/salsa/ref/core_salsa_ref.c | 195 + .../libsodium/crypto_core/softaes/softaes.c | 143 + .../blake2b/generichash_blake2.c | 55 + .../crypto_generichash/blake2b/ref/blake2.h | 106 + .../blake2b/ref/blake2b-compress-avx2.c | 52 + .../blake2b/ref/blake2b-compress-avx2.h | 142 + .../blake2b/ref/blake2b-compress-ref.c | 93 + .../blake2b/ref/blake2b-compress-sse41.c | 91 + .../blake2b/ref/blake2b-compress-sse41.h | 106 + .../blake2b/ref/blake2b-compress-ssse3.c | 95 + .../blake2b/ref/blake2b-compress-ssse3.h | 106 + .../blake2b/ref/blake2b-load-avx2.h | 340 + .../blake2b/ref/blake2b-load-sse2.h | 164 + .../blake2b/ref/blake2b-load-sse41.h | 307 + .../blake2b/ref/blake2b-ref.c | 438 + .../blake2b/ref/generichash_blake2b.c | 116 + .../crypto_generichash/crypto_generichash.c | 91 + .../src/libsodium/crypto_hash/crypto_hash.c | 20 + .../crypto_hash/sha256/cp/hash_sha256_cp.c | 256 + .../crypto_hash/sha256/hash_sha256.c | 13 + .../crypto_hash/sha512/cp/hash_sha512_cp.c | 284 + .../crypto_hash/sha512/hash_sha512.c | 13 + .../crypto_kdf/blake2b/kdf_blake2b.c | 52 + .../src/libsodium/crypto_kdf/crypto_kdf.c | 49 + .../crypto_kdf/hkdf/kdf_hkdf_sha256.c | 123 + .../crypto_kdf/hkdf/kdf_hkdf_sha512.c | 123 + .../src/libsodium/crypto_kx/crypto_kx.c | 143 + .../crypto_onetimeauth/crypto_onetimeauth.c | 71 + .../poly1305/donna/poly1305_donna.c | 124 + .../poly1305/donna/poly1305_donna.h | 12 + .../poly1305/donna/poly1305_donna32.h | 235 + .../poly1305/donna/poly1305_donna64.h | 221 + .../poly1305/onetimeauth_poly1305.c | 90 + .../poly1305/onetimeauth_poly1305.h | 21 + .../poly1305/sse2/poly1305_sse2.c | 955 ++ .../poly1305/sse2/poly1305_sse2.h | 12 + .../crypto_pwhash/argon2/argon2-core.c | 556 + .../crypto_pwhash/argon2/argon2-core.h | 271 + .../crypto_pwhash/argon2/argon2-encoding.c | 306 + .../crypto_pwhash/argon2/argon2-encoding.h | 34 + .../argon2/argon2-fill-block-avx2.c | 243 + .../argon2/argon2-fill-block-avx512f.c | 251 + .../argon2/argon2-fill-block-ref.c | 234 + .../argon2/argon2-fill-block-ssse3.c | 244 + .../libsodium/crypto_pwhash/argon2/argon2.c | 283 + .../libsodium/crypto_pwhash/argon2/argon2.h | 305 + .../crypto_pwhash/argon2/blake2b-long.c | 79 + .../crypto_pwhash/argon2/blake2b-long.h | 8 + .../crypto_pwhash/argon2/blamka-round-avx2.h | 150 + .../argon2/blamka-round-avx512f.h | 145 + .../crypto_pwhash/argon2/blamka-round-ref.h | 40 + .../crypto_pwhash/argon2/blamka-round-ssse3.h | 124 + .../crypto_pwhash/argon2/pwhash_argon2i.c | 294 + .../crypto_pwhash/argon2/pwhash_argon2id.c | 238 + .../libsodium/crypto_pwhash/crypto_pwhash.c | 212 + .../crypto_scrypt-common.c | 268 + .../scryptsalsa208sha256/crypto_scrypt.h | 92 + .../nosse/pwhash_scryptsalsa208sha256_nosse.c | 318 + .../scryptsalsa208sha256/pbkdf2-sha256.c | 96 + .../scryptsalsa208sha256/pbkdf2-sha256.h | 45 + .../pwhash_scryptsalsa208sha256.c | 301 + .../scryptsalsa208sha256/scrypt_platform.c | 112 + .../sse/pwhash_scryptsalsa208sha256_sse.c | 406 + .../crypto_scalarmult/crypto_scalarmult.c | 33 + .../curve25519/ref10/x25519_ref10.c | 182 + .../curve25519/ref10/x25519_ref10.h | 10 + .../curve25519/sandy2x/consts.S | 25 + .../curve25519/sandy2x/consts_namespace.h | 20 + .../curve25519/sandy2x/curve25519_sandy2x.c | 71 + .../curve25519/sandy2x/curve25519_sandy2x.h | 9 + .../crypto_scalarmult/curve25519/sandy2x/fe.h | 26 + .../curve25519/sandy2x/fe51.h | 35 + .../curve25519/sandy2x/fe51_invert.c | 58 + .../curve25519/sandy2x/fe51_mul.S | 200 + .../curve25519/sandy2x/fe51_namespace.h | 16 + .../curve25519/sandy2x/fe51_nsquare.S | 174 + .../curve25519/sandy2x/fe51_pack.S | 228 + .../curve25519/sandy2x/fe_frombytes_sandy2x.c | 78 + .../curve25519/sandy2x/ladder.S | 1442 +++ .../curve25519/sandy2x/ladder.h | 18 + .../curve25519/sandy2x/ladder_namespace.h | 8 + .../curve25519/sandy2x/sandy2x.S | 16 + .../curve25519/scalarmult_curve25519.c | 60 + .../curve25519/scalarmult_curve25519.h | 11 + .../ed25519/ref10/scalarmult_ed25519_ref10.c | 121 + .../ref10/scalarmult_ristretto255_ref10.c | 63 + .../crypto_secretbox/crypto_secretbox.c | 67 + .../crypto_secretbox/crypto_secretbox_easy.c | 145 + .../secretbox_xchacha20poly1305.c | 177 + .../secretbox_xsalsa20poly1305.c | 89 + .../secretstream_xchacha20poly1305.c | 313 + .../crypto_shorthash/crypto_shorthash.c | 34 + .../siphash24/ref/shorthash_siphash24_ref.c | 71 + .../siphash24/ref/shorthash_siphash_ref.h | 24 + .../siphash24/ref/shorthash_siphashx24_ref.c | 77 + .../siphash24/shorthash_siphash24.c | 11 + .../siphash24/shorthash_siphashx24.c | 11 + .../src/libsodium/crypto_sign/crypto_sign.c | 115 + .../crypto_sign/ed25519/ref10/keypair.c | 84 + .../crypto_sign/ed25519/ref10/obsolete.c | 118 + .../crypto_sign/ed25519/ref10/open.c | 98 + .../crypto_sign/ed25519/ref10/sign.c | 128 + .../ed25519/ref10/sign_ed25519_ref10.h | 18 + .../crypto_sign/ed25519/sign_ed25519.c | 97 + .../chacha20/dolbeau/chacha20_dolbeau-avx2.c | 180 + .../chacha20/dolbeau/chacha20_dolbeau-avx2.h | 8 + .../chacha20/dolbeau/chacha20_dolbeau-ssse3.c | 176 + .../chacha20/dolbeau/chacha20_dolbeau-ssse3.h | 8 + .../crypto_stream/chacha20/dolbeau/u0.h | 86 + .../crypto_stream/chacha20/dolbeau/u1.h | 98 + .../crypto_stream/chacha20/dolbeau/u4.h | 177 + .../crypto_stream/chacha20/dolbeau/u8.h | 326 + .../crypto_stream/chacha20/ref/chacha20_ref.c | 312 + .../crypto_stream/chacha20/ref/chacha20_ref.h | 8 + .../crypto_stream/chacha20/stream_chacha20.c | 184 + .../crypto_stream/chacha20/stream_chacha20.h | 22 + .../libsodium/crypto_stream/crypto_stream.c | 49 + .../crypto_stream/salsa20/ref/salsa20_ref.c | 120 + .../crypto_stream/salsa20/ref/salsa20_ref.h | 8 + .../crypto_stream/salsa20/stream_salsa20.c | 100 + .../crypto_stream/salsa20/stream_salsa20.h | 16 + .../salsa20/xmm6/salsa20_xmm6-asm.S | 965 ++ .../crypto_stream/salsa20/xmm6/salsa20_xmm6.c | 31 + .../crypto_stream/salsa20/xmm6/salsa20_xmm6.h | 8 + .../salsa20/xmm6int/salsa20_xmm6int-avx2.c | 134 + .../salsa20/xmm6int/salsa20_xmm6int-avx2.h | 8 + .../salsa20/xmm6int/salsa20_xmm6int-sse2.c | 128 + .../salsa20/xmm6int/salsa20_xmm6int-sse2.h | 8 + .../crypto_stream/salsa20/xmm6int/u0.h | 195 + .../crypto_stream/salsa20/xmm6int/u1.h | 207 + .../crypto_stream/salsa20/xmm6int/u4.h | 547 + .../crypto_stream/salsa20/xmm6int/u8.h | 477 + .../salsa2012/ref/stream_salsa2012_ref.c | 106 + .../salsa2012/stream_salsa2012.c | 26 + .../salsa208/ref/stream_salsa208_ref.c | 106 + .../crypto_stream/salsa208/stream_salsa208.c | 26 + .../xchacha20/stream_xchacha20.c | 69 + .../crypto_stream/xsalsa20/stream_xsalsa20.c | 66 + .../src/libsodium/crypto_verify/verify.c | 95 + .../src/libsodium/include/Makefile.am | 76 + .../src/libsodium/include/Makefile.in | 723 ++ .../libsodium/src/libsodium/include/sodium.h | 75 + .../src/libsodium/include/sodium/core.h | 28 + .../include/sodium/crypto_aead_aegis128l.h | 92 + .../include/sodium/crypto_aead_aegis256.h | 92 + .../include/sodium/crypto_aead_aes256gcm.h | 179 + .../sodium/crypto_aead_chacha20poly1305.h | 180 + .../sodium/crypto_aead_xchacha20poly1305.h | 100 + .../libsodium/include/sodium/crypto_auth.h | 46 + .../include/sodium/crypto_auth_hmacsha256.h | 70 + .../include/sodium/crypto_auth_hmacsha512.h | 68 + .../sodium/crypto_auth_hmacsha512256.h | 65 + .../src/libsodium/include/sodium/crypto_box.h | 177 + .../crypto_box_curve25519xchacha20poly1305.h | 164 + .../crypto_box_curve25519xsalsa20poly1305.h | 112 + .../include/sodium/crypto_core_ed25519.h | 100 + .../include/sodium/crypto_core_hchacha20.h | 36 + .../include/sodium/crypto_core_hsalsa20.h | 36 + .../include/sodium/crypto_core_ristretto255.h | 100 + .../include/sodium/crypto_core_salsa20.h | 36 + .../include/sodium/crypto_core_salsa2012.h | 36 + .../include/sodium/crypto_core_salsa208.h | 40 + .../include/sodium/crypto_generichash.h | 84 + .../sodium/crypto_generichash_blake2b.h | 122 + .../libsodium/include/sodium/crypto_hash.h | 40 + .../include/sodium/crypto_hash_sha256.h | 60 + .../include/sodium/crypto_hash_sha512.h | 60 + .../src/libsodium/include/sodium/crypto_kdf.h | 53 + .../include/sodium/crypto_kdf_blake2b.h | 44 + .../include/sodium/crypto_kdf_hkdf_sha256.h | 74 + .../include/sodium/crypto_kdf_hkdf_sha512.h | 75 + .../src/libsodium/include/sodium/crypto_kx.h | 66 + .../include/sodium/crypto_onetimeauth.h | 65 + .../sodium/crypto_onetimeauth_poly1305.h | 72 + .../libsodium/include/sodium/crypto_pwhash.h | 147 + .../include/sodium/crypto_pwhash_argon2i.h | 122 + .../include/sodium/crypto_pwhash_argon2id.h | 122 + .../crypto_pwhash_scryptsalsa208sha256.h | 120 + .../include/sodium/crypto_scalarmult.h | 46 + .../sodium/crypto_scalarmult_curve25519.h | 42 + .../sodium/crypto_scalarmult_ed25519.h | 51 + .../sodium/crypto_scalarmult_ristretto255.h | 43 + .../include/sodium/crypto_secretbox.h | 93 + .../crypto_secretbox_xchacha20poly1305.h | 70 + .../crypto_secretbox_xsalsa20poly1305.h | 69 + .../crypto_secretstream_xchacha20poly1305.h | 108 + .../include/sodium/crypto_shorthash.h | 41 + .../sodium/crypto_shorthash_siphash24.h | 50 + .../libsodium/include/sodium/crypto_sign.h | 107 + .../include/sodium/crypto_sign_ed25519.h | 124 + .../crypto_sign_edwards25519sha512batch.h | 55 + .../libsodium/include/sodium/crypto_stream.h | 59 + .../include/sodium/crypto_stream_chacha20.h | 106 + .../include/sodium/crypto_stream_salsa20.h | 61 + .../include/sodium/crypto_stream_salsa2012.h | 53 + .../include/sodium/crypto_stream_salsa208.h | 56 + .../include/sodium/crypto_stream_xchacha20.h | 61 + .../include/sodium/crypto_stream_xsalsa20.h | 61 + .../include/sodium/crypto_verify_16.h | 23 + .../include/sodium/crypto_verify_32.h | 23 + .../include/sodium/crypto_verify_64.h | 23 + .../src/libsodium/include/sodium/export.h | 57 + .../include/sodium/private/asm_cet.h | 11 + .../sodium/private/chacha20_ietf_ext.h | 16 + .../libsodium/include/sodium/private/common.h | 285 + .../include/sodium/private/ed25519_ref10.h | 142 + .../sodium/private/ed25519_ref10_fe_25_5.h | 1030 ++ .../sodium/private/ed25519_ref10_fe_51.h | 508 + .../include/sodium/private/implementations.h | 13 + .../libsodium/include/sodium/private/mutex.h | 7 + .../include/sodium/private/softaes.h | 56 + .../include/sodium/private/sse2_64_32.h | 50 + .../libsodium/include/sodium/randombytes.h | 72 + .../sodium/randombytes_internal_random.h | 22 + .../include/sodium/randombytes_sysrandom.h | 19 + .../src/libsodium/include/sodium/runtime.h | 55 + .../src/libsodium/include/sodium/utils.h | 179 + .../src/libsodium/include/sodium/version.h | 33 + .../src/libsodium/include/sodium/version.h.in | 33 + .../internal/randombytes_internal_random.c | 645 ++ .../src/libsodium/randombytes/randombytes.c | 199 + .../sysrandom/randombytes_sysrandom.c | 396 + .../libsodium/src/libsodium/sodium/codecs.c | 335 + vendor/libsodium/src/libsodium/sodium/core.c | 216 + .../libsodium/src/libsodium/sodium/runtime.c | 391 + vendor/libsodium/src/libsodium/sodium/utils.c | 809 ++ .../libsodium/src/libsodium/sodium/version.c | 30 + 981 files changed, 49784 insertions(+), 255732 deletions(-) delete mode 100644 src/DumpProto/tea.cpp delete mode 100644 src/DumpProto/tea.h create mode 100644 src/EterBase/SecureCipher.cpp create mode 100644 src/EterBase/SecureCipher.h delete mode 100644 src/EterBase/cipher.cpp delete mode 100644 src/EterBase/cipher.h delete mode 100644 vendor/cryptopp/3way.cpp delete mode 100644 vendor/cryptopp/3way.h delete mode 100644 vendor/cryptopp/CMakeLists.txt delete mode 100644 vendor/cryptopp/Doxyfile delete mode 100644 vendor/cryptopp/Filelist.txt delete mode 100644 vendor/cryptopp/GNUmakefile delete mode 100644 vendor/cryptopp/GNUmakefile-cross delete mode 100644 vendor/cryptopp/History.txt delete mode 100644 vendor/cryptopp/Install.txt delete mode 100644 vendor/cryptopp/License.txt delete mode 100644 vendor/cryptopp/Readme.txt delete mode 100644 vendor/cryptopp/TestData/3desval.dat delete mode 100644 vendor/cryptopp/TestData/3wayval.dat delete mode 100644 vendor/cryptopp/TestData/aria.dat delete mode 100644 vendor/cryptopp/TestData/camellia.dat delete mode 100644 vendor/cryptopp/TestData/cast128v.dat delete mode 100644 vendor/cryptopp/TestData/cast256v.dat delete mode 100644 vendor/cryptopp/TestData/defdmac1.bin delete mode 100644 vendor/cryptopp/TestData/defdmac2.bin delete mode 100644 vendor/cryptopp/TestData/descert.dat delete mode 100644 vendor/cryptopp/TestData/dh1024.dat delete mode 100644 vendor/cryptopp/TestData/dh2048.dat delete mode 100644 vendor/cryptopp/TestData/dlie1024.dat delete mode 100644 vendor/cryptopp/TestData/dlie2048.dat delete mode 100644 vendor/cryptopp/TestData/dsa1024.dat delete mode 100644 vendor/cryptopp/TestData/dsa1024b.dat delete mode 100644 vendor/cryptopp/TestData/dsa512.dat delete mode 100644 vendor/cryptopp/TestData/ecies_p160.dat delete mode 100644 vendor/cryptopp/TestData/ecies_t163.dat delete mode 100644 vendor/cryptopp/TestData/ed25519.dat delete mode 100644 vendor/cryptopp/TestData/ed25519v0.dat delete mode 100644 vendor/cryptopp/TestData/ed25519v1.dat delete mode 100644 vendor/cryptopp/TestData/elgc1024.dat delete mode 100644 vendor/cryptopp/TestData/esig1023.dat delete mode 100644 vendor/cryptopp/TestData/esig1536.dat delete mode 100644 vendor/cryptopp/TestData/esig2046.dat delete mode 100644 vendor/cryptopp/TestData/fhmqv160.dat delete mode 100644 vendor/cryptopp/TestData/fhmqv256.dat delete mode 100644 vendor/cryptopp/TestData/fhmqv384.dat delete mode 100644 vendor/cryptopp/TestData/fhmqv512.dat delete mode 100644 vendor/cryptopp/TestData/gostval.dat delete mode 100644 vendor/cryptopp/TestData/hmqv160.dat delete mode 100644 vendor/cryptopp/TestData/hmqv256.dat delete mode 100644 vendor/cryptopp/TestData/hmqv384.dat delete mode 100644 vendor/cryptopp/TestData/hmqv512.dat delete mode 100644 vendor/cryptopp/TestData/ideaval.dat delete mode 100644 vendor/cryptopp/TestData/luc1024.dat delete mode 100644 vendor/cryptopp/TestData/luc2048.dat delete mode 100644 vendor/cryptopp/TestData/lucc1024.dat delete mode 100644 vendor/cryptopp/TestData/lucc512.dat delete mode 100644 vendor/cryptopp/TestData/lucd1024.dat delete mode 100644 vendor/cryptopp/TestData/lucd512.dat delete mode 100644 vendor/cryptopp/TestData/lucs1024.dat delete mode 100644 vendor/cryptopp/TestData/lucs512.dat delete mode 100644 vendor/cryptopp/TestData/marsval.dat delete mode 100644 vendor/cryptopp/TestData/mqv1024.dat delete mode 100644 vendor/cryptopp/TestData/mqv2048.dat delete mode 100644 vendor/cryptopp/TestData/nr1024.dat delete mode 100644 vendor/cryptopp/TestData/nr2048.dat delete mode 100644 vendor/cryptopp/TestData/rabi1024.dat delete mode 100644 vendor/cryptopp/TestData/rabi2048.dat delete mode 100644 vendor/cryptopp/TestData/rc2val.dat delete mode 100644 vendor/cryptopp/TestData/rc5val.dat delete mode 100644 vendor/cryptopp/TestData/rc6val.dat delete mode 100644 vendor/cryptopp/TestData/rijndael.dat delete mode 100644 vendor/cryptopp/TestData/rsa1024.dat delete mode 100644 vendor/cryptopp/TestData/rsa2048.dat delete mode 100644 vendor/cryptopp/TestData/rsa2048a.dat delete mode 100644 vendor/cryptopp/TestData/rsa400pb.dat delete mode 100644 vendor/cryptopp/TestData/rsa400pv.dat delete mode 100644 vendor/cryptopp/TestData/rsa512a.dat delete mode 100644 vendor/cryptopp/TestData/rw1024.dat delete mode 100644 vendor/cryptopp/TestData/rw2048.dat delete mode 100644 vendor/cryptopp/TestData/saferval.dat delete mode 100644 vendor/cryptopp/TestData/serpentv.dat delete mode 100644 vendor/cryptopp/TestData/shacal2v.dat delete mode 100644 vendor/cryptopp/TestData/sharkval.dat delete mode 100644 vendor/cryptopp/TestData/skipjack.dat delete mode 100644 vendor/cryptopp/TestData/squareva.dat delete mode 100644 vendor/cryptopp/TestData/twofishv.dat delete mode 100644 vendor/cryptopp/TestData/usage.dat delete mode 100644 vendor/cryptopp/TestData/x25519.dat delete mode 100644 vendor/cryptopp/TestData/x25519v0.dat delete mode 100644 vendor/cryptopp/TestData/x25519v1.dat delete mode 100644 vendor/cryptopp/TestData/xtrdh171.dat delete mode 100644 vendor/cryptopp/TestData/xtrdh342.dat delete mode 100644 vendor/cryptopp/TestPrograms/test_32bit.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_64bit.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_arm_acle_header.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_arm_aes.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_arm_asimd.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_arm_crc.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_arm_neon.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_arm_neon_header.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_arm_pmull.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_arm_sha1.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_arm_sha256.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_arm_sha3.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_arm_sha512.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_arm_sm3.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_arm_sm4.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_asm_mixed.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_cxx.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_cxx11.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_cxx11_alignas.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_cxx11_alignof.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_cxx11_assert.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_cxx11_atomic.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_cxx11_auto.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_cxx11_constexpr.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_cxx11_deletefn.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_cxx11_enumtype.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_cxx11_initializer.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_cxx11_lambda.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_cxx11_noexcept.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_cxx11_nullptr.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_cxx11_staticinit.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_cxx11_sync.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_cxx11_vartemplates.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_cxx14.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_cxx17.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_cxx17_assert.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_cxx17_exceptions.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_cxx98_exception.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_glibc.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_newlib.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_ppc_aes.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_ppc_altivec.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_ppc_power7.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_ppc_power8.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_ppc_power9.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_ppc_sha.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_ppc_vmull.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_pthreads.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_x86_aes.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_x86_avx.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_x86_avx2.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_x86_avx512.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_x86_clmul.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_x86_cpuid.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_x86_rdrand.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_x86_rdseed.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_x86_sha.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_x86_sse2.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_x86_sse3.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_x86_sse41.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_x86_sse42.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_x86_ssse3.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_x86_via_aes.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_x86_via_rng.cpp delete mode 100644 vendor/cryptopp/TestPrograms/test_x86_via_sha.cpp delete mode 100644 vendor/cryptopp/TestVectors/Readme.txt delete mode 100644 vendor/cryptopp/TestVectors/aead.txt delete mode 100644 vendor/cryptopp/TestVectors/aes.txt delete mode 100644 vendor/cryptopp/TestVectors/all.txt delete mode 100644 vendor/cryptopp/TestVectors/aria.txt delete mode 100644 vendor/cryptopp/TestVectors/blake2.txt delete mode 100644 vendor/cryptopp/TestVectors/blake2b.txt delete mode 100644 vendor/cryptopp/TestVectors/blake2s.txt delete mode 100644 vendor/cryptopp/TestVectors/camellia.txt delete mode 100644 vendor/cryptopp/TestVectors/ccm.txt delete mode 100644 vendor/cryptopp/TestVectors/chacha.txt delete mode 100644 vendor/cryptopp/TestVectors/chacha20poly1305.txt delete mode 100644 vendor/cryptopp/TestVectors/chacha_tls.txt delete mode 100644 vendor/cryptopp/TestVectors/cham.txt delete mode 100644 vendor/cryptopp/TestVectors/cmac.txt delete mode 100644 vendor/cryptopp/TestVectors/dlies.txt delete mode 100644 vendor/cryptopp/TestVectors/dsa.txt delete mode 100644 vendor/cryptopp/TestVectors/dsa_1363.txt delete mode 100644 vendor/cryptopp/TestVectors/dsa_rfc6979.txt delete mode 100644 vendor/cryptopp/TestVectors/eax.txt delete mode 100644 vendor/cryptopp/TestVectors/esign.txt delete mode 100644 vendor/cryptopp/TestVectors/gcm.txt delete mode 100644 vendor/cryptopp/TestVectors/hc128.txt delete mode 100644 vendor/cryptopp/TestVectors/hc256.txt delete mode 100644 vendor/cryptopp/TestVectors/hight.txt delete mode 100644 vendor/cryptopp/TestVectors/hkdf.txt delete mode 100644 vendor/cryptopp/TestVectors/hmac.txt delete mode 100644 vendor/cryptopp/TestVectors/kalyna.txt delete mode 100644 vendor/cryptopp/TestVectors/keccak.txt delete mode 100644 vendor/cryptopp/TestVectors/lea.txt delete mode 100644 vendor/cryptopp/TestVectors/lsh.txt delete mode 100644 vendor/cryptopp/TestVectors/lsh256.txt delete mode 100644 vendor/cryptopp/TestVectors/lsh512.txt delete mode 100644 vendor/cryptopp/TestVectors/lsh512_256.txt delete mode 100644 vendor/cryptopp/TestVectors/mars.txt delete mode 100644 vendor/cryptopp/TestVectors/nr.txt delete mode 100644 vendor/cryptopp/TestVectors/panama.txt delete mode 100644 vendor/cryptopp/TestVectors/poly1305_tls.txt delete mode 100644 vendor/cryptopp/TestVectors/poly1305aes.txt delete mode 100644 vendor/cryptopp/TestVectors/rabbit.txt delete mode 100644 vendor/cryptopp/TestVectors/rsa_oaep.txt delete mode 100644 vendor/cryptopp/TestVectors/rsa_pkcs1_1_5.txt delete mode 100644 vendor/cryptopp/TestVectors/rsa_pss.txt delete mode 100644 vendor/cryptopp/TestVectors/rw.txt delete mode 100644 vendor/cryptopp/TestVectors/salsa.txt delete mode 100644 vendor/cryptopp/TestVectors/seal.txt delete mode 100644 vendor/cryptopp/TestVectors/seed.txt delete mode 100644 vendor/cryptopp/TestVectors/sha.txt delete mode 100644 vendor/cryptopp/TestVectors/sha1_160_fips_180.txt delete mode 100644 vendor/cryptopp/TestVectors/sha1_fips_180.txt delete mode 100644 vendor/cryptopp/TestVectors/sha2.txt delete mode 100644 vendor/cryptopp/TestVectors/sha2_224_fips_180.txt delete mode 100644 vendor/cryptopp/TestVectors/sha2_256_fips_180.txt delete mode 100644 vendor/cryptopp/TestVectors/sha2_384_fips_180.txt delete mode 100644 vendor/cryptopp/TestVectors/sha2_512_fips_180.txt delete mode 100644 vendor/cryptopp/TestVectors/sha2_fips_180.txt delete mode 100644 vendor/cryptopp/TestVectors/sha3.txt delete mode 100644 vendor/cryptopp/TestVectors/sha3_224_fips_202.txt delete mode 100644 vendor/cryptopp/TestVectors/sha3_256_fips_202.txt delete mode 100644 vendor/cryptopp/TestVectors/sha3_384_fips_202.txt delete mode 100644 vendor/cryptopp/TestVectors/sha3_512_fips_202.txt delete mode 100644 vendor/cryptopp/TestVectors/sha3_fips_202.txt delete mode 100644 vendor/cryptopp/TestVectors/shacal2.txt delete mode 100644 vendor/cryptopp/TestVectors/shake.txt delete mode 100644 vendor/cryptopp/TestVectors/simeck.txt delete mode 100644 vendor/cryptopp/TestVectors/simon.txt delete mode 100644 vendor/cryptopp/TestVectors/siphash.txt delete mode 100644 vendor/cryptopp/TestVectors/skipjack.txt delete mode 100644 vendor/cryptopp/TestVectors/sm3.txt delete mode 100644 vendor/cryptopp/TestVectors/sm4.txt delete mode 100644 vendor/cryptopp/TestVectors/sosemanuk.txt delete mode 100644 vendor/cryptopp/TestVectors/speck.txt delete mode 100644 vendor/cryptopp/TestVectors/tea.txt delete mode 100644 vendor/cryptopp/TestVectors/threefish.txt delete mode 100644 vendor/cryptopp/TestVectors/ttmac.txt delete mode 100644 vendor/cryptopp/TestVectors/vmac.txt delete mode 100644 vendor/cryptopp/TestVectors/wake.txt delete mode 100644 vendor/cryptopp/TestVectors/whrlpool.txt delete mode 100644 vendor/cryptopp/TestVectors/xchacha.txt delete mode 100644 vendor/cryptopp/TestVectors/xts.txt delete mode 100644 vendor/cryptopp/adhoc.cpp.proto delete mode 100644 vendor/cryptopp/adler32.cpp delete mode 100644 vendor/cryptopp/adler32.h delete mode 100644 vendor/cryptopp/adv_simd.h delete mode 100644 vendor/cryptopp/aes.h delete mode 100644 vendor/cryptopp/aes_armv4.S delete mode 100644 vendor/cryptopp/aes_armv4.h delete mode 100644 vendor/cryptopp/algebra.cpp delete mode 100644 vendor/cryptopp/algebra.h delete mode 100644 vendor/cryptopp/algparam.cpp delete mode 100644 vendor/cryptopp/algparam.h delete mode 100644 vendor/cryptopp/allocate.cpp delete mode 100644 vendor/cryptopp/allocate.h delete mode 100644 vendor/cryptopp/arc4.cpp delete mode 100644 vendor/cryptopp/arc4.h delete mode 100644 vendor/cryptopp/argnames.h delete mode 100644 vendor/cryptopp/aria.cpp delete mode 100644 vendor/cryptopp/aria.h delete mode 100644 vendor/cryptopp/aria_simd.cpp delete mode 100644 vendor/cryptopp/ariatab.cpp delete mode 100644 vendor/cryptopp/arm_simd.h delete mode 100644 vendor/cryptopp/asn.cpp delete mode 100644 vendor/cryptopp/asn.h delete mode 100644 vendor/cryptopp/authenc.cpp delete mode 100644 vendor/cryptopp/authenc.h delete mode 100644 vendor/cryptopp/base32.cpp delete mode 100644 vendor/cryptopp/base32.h delete mode 100644 vendor/cryptopp/base64.cpp delete mode 100644 vendor/cryptopp/base64.h delete mode 100644 vendor/cryptopp/basecode.cpp delete mode 100644 vendor/cryptopp/basecode.h delete mode 100644 vendor/cryptopp/bds10.zip delete mode 100644 vendor/cryptopp/bench.h delete mode 100644 vendor/cryptopp/bench1.cpp delete mode 100644 vendor/cryptopp/bench2.cpp delete mode 100644 vendor/cryptopp/bench3.cpp delete mode 100644 vendor/cryptopp/bfinit.cpp delete mode 100644 vendor/cryptopp/blake2.cpp delete mode 100644 vendor/cryptopp/blake2.h delete mode 100644 vendor/cryptopp/blake2b_simd.cpp delete mode 100644 vendor/cryptopp/blake2s_simd.cpp delete mode 100644 vendor/cryptopp/blowfish.cpp delete mode 100644 vendor/cryptopp/blowfish.h delete mode 100644 vendor/cryptopp/blumshub.cpp delete mode 100644 vendor/cryptopp/blumshub.h delete mode 100644 vendor/cryptopp/camellia.cpp delete mode 100644 vendor/cryptopp/camellia.h delete mode 100644 vendor/cryptopp/cast.cpp delete mode 100644 vendor/cryptopp/cast.h delete mode 100644 vendor/cryptopp/casts.cpp delete mode 100644 vendor/cryptopp/cbcmac.cpp delete mode 100644 vendor/cryptopp/cbcmac.h delete mode 100644 vendor/cryptopp/ccm.cpp delete mode 100644 vendor/cryptopp/ccm.h delete mode 100644 vendor/cryptopp/chacha.cpp delete mode 100644 vendor/cryptopp/chacha.h delete mode 100644 vendor/cryptopp/chacha_avx.cpp delete mode 100644 vendor/cryptopp/chacha_simd.cpp delete mode 100644 vendor/cryptopp/chachapoly.cpp delete mode 100644 vendor/cryptopp/chachapoly.h delete mode 100644 vendor/cryptopp/cham.cpp delete mode 100644 vendor/cryptopp/cham.h delete mode 100644 vendor/cryptopp/cham_simd.cpp delete mode 100644 vendor/cryptopp/channels.cpp delete mode 100644 vendor/cryptopp/channels.h delete mode 100644 vendor/cryptopp/cmac.cpp delete mode 100644 vendor/cryptopp/cmac.h delete mode 100644 vendor/cryptopp/config.h delete mode 100644 vendor/cryptopp/config_align.h delete mode 100644 vendor/cryptopp/config_asm.h delete mode 100644 vendor/cryptopp/config_cpu.h delete mode 100644 vendor/cryptopp/config_cxx.h delete mode 100644 vendor/cryptopp/config_dll.h delete mode 100644 vendor/cryptopp/config_int.h delete mode 100644 vendor/cryptopp/config_misc.h delete mode 100644 vendor/cryptopp/config_ns.h delete mode 100644 vendor/cryptopp/config_os.h delete mode 100644 vendor/cryptopp/config_ver.h delete mode 100644 vendor/cryptopp/cpu.cpp delete mode 100644 vendor/cryptopp/cpu.h delete mode 100644 vendor/cryptopp/crc.cpp delete mode 100644 vendor/cryptopp/crc.h delete mode 100644 vendor/cryptopp/crc_simd.cpp delete mode 100644 vendor/cryptopp/cryptdll.vcxproj delete mode 100644 vendor/cryptopp/cryptdll.vcxproj.filters delete mode 100644 vendor/cryptopp/cryptest.nmake delete mode 100644 vendor/cryptopp/cryptest.sln delete mode 100644 vendor/cryptopp/cryptest.vcxproj delete mode 100644 vendor/cryptopp/cryptest.vcxproj.filters delete mode 100644 vendor/cryptopp/cryptest.vcxproj.user delete mode 100644 vendor/cryptopp/cryptlib.cpp delete mode 100644 vendor/cryptopp/cryptlib.h delete mode 100644 vendor/cryptopp/cryptlib.vcxproj delete mode 100644 vendor/cryptopp/cryptlib.vcxproj.filters delete mode 100644 vendor/cryptopp/cryptopp.rc delete mode 100644 vendor/cryptopp/cryptopp.supp delete mode 100644 vendor/cryptopp/darn.cpp delete mode 100644 vendor/cryptopp/darn.h delete mode 100644 vendor/cryptopp/datatest.cpp delete mode 100644 vendor/cryptopp/default.cpp delete mode 100644 vendor/cryptopp/default.h delete mode 100644 vendor/cryptopp/des.cpp delete mode 100644 vendor/cryptopp/des.h delete mode 100644 vendor/cryptopp/dessp.cpp delete mode 100644 vendor/cryptopp/dh.cpp delete mode 100644 vendor/cryptopp/dh.h delete mode 100644 vendor/cryptopp/dh2.cpp delete mode 100644 vendor/cryptopp/dh2.h delete mode 100644 vendor/cryptopp/dll.cpp delete mode 100644 vendor/cryptopp/dll.h delete mode 100644 vendor/cryptopp/dlltest.cpp delete mode 100644 vendor/cryptopp/dlltest.vcxproj delete mode 100644 vendor/cryptopp/dlltest.vcxproj.filters delete mode 100644 vendor/cryptopp/dmac.h delete mode 100644 vendor/cryptopp/donna.h delete mode 100644 vendor/cryptopp/donna_32.cpp delete mode 100644 vendor/cryptopp/donna_32.h delete mode 100644 vendor/cryptopp/donna_64.cpp delete mode 100644 vendor/cryptopp/donna_64.h delete mode 100644 vendor/cryptopp/donna_sse.cpp delete mode 100644 vendor/cryptopp/donna_sse.h delete mode 100644 vendor/cryptopp/drbg.h delete mode 100644 vendor/cryptopp/dsa.cpp delete mode 100644 vendor/cryptopp/dsa.h delete mode 100644 vendor/cryptopp/eax.cpp delete mode 100644 vendor/cryptopp/eax.h delete mode 100644 vendor/cryptopp/ec2n.cpp delete mode 100644 vendor/cryptopp/ec2n.h delete mode 100644 vendor/cryptopp/eccrypto.cpp delete mode 100644 vendor/cryptopp/eccrypto.h delete mode 100644 vendor/cryptopp/ecp.cpp delete mode 100644 vendor/cryptopp/ecp.h delete mode 100644 vendor/cryptopp/ecpoint.h delete mode 100644 vendor/cryptopp/elgamal.cpp delete mode 100644 vendor/cryptopp/elgamal.h delete mode 100644 vendor/cryptopp/emsa2.cpp delete mode 100644 vendor/cryptopp/emsa2.h delete mode 100644 vendor/cryptopp/eprecomp.cpp delete mode 100644 vendor/cryptopp/eprecomp.h delete mode 100644 vendor/cryptopp/esign.cpp delete mode 100644 vendor/cryptopp/esign.h delete mode 100644 vendor/cryptopp/factory.h delete mode 100644 vendor/cryptopp/fhmqv.h delete mode 100644 vendor/cryptopp/files.cpp delete mode 100644 vendor/cryptopp/files.h delete mode 100644 vendor/cryptopp/filters.cpp delete mode 100644 vendor/cryptopp/filters.h delete mode 100644 vendor/cryptopp/fips140.cpp delete mode 100644 vendor/cryptopp/fips140.h delete mode 100644 vendor/cryptopp/fipsalgt.cpp delete mode 100644 vendor/cryptopp/fipstest.cpp delete mode 100644 vendor/cryptopp/fltrimpl.h delete mode 100644 vendor/cryptopp/gcm.cpp delete mode 100644 vendor/cryptopp/gcm.h delete mode 100644 vendor/cryptopp/gcm_simd.cpp delete mode 100644 vendor/cryptopp/gf256.cpp delete mode 100644 vendor/cryptopp/gf256.h delete mode 100644 vendor/cryptopp/gf2_32.cpp delete mode 100644 vendor/cryptopp/gf2_32.h delete mode 100644 vendor/cryptopp/gf2n.cpp delete mode 100644 vendor/cryptopp/gf2n.h delete mode 100644 vendor/cryptopp/gf2n_simd.cpp delete mode 100644 vendor/cryptopp/gfpcrypt.cpp delete mode 100644 vendor/cryptopp/gfpcrypt.h delete mode 100644 vendor/cryptopp/gost.cpp delete mode 100644 vendor/cryptopp/gost.h delete mode 100644 vendor/cryptopp/gzip.cpp delete mode 100644 vendor/cryptopp/gzip.h delete mode 100644 vendor/cryptopp/hashfwd.h delete mode 100644 vendor/cryptopp/hc128.cpp delete mode 100644 vendor/cryptopp/hc128.h delete mode 100644 vendor/cryptopp/hc256.cpp delete mode 100644 vendor/cryptopp/hc256.h delete mode 100644 vendor/cryptopp/hex.cpp delete mode 100644 vendor/cryptopp/hex.h delete mode 100644 vendor/cryptopp/hight.cpp delete mode 100644 vendor/cryptopp/hight.h delete mode 100644 vendor/cryptopp/hkdf.h delete mode 100644 vendor/cryptopp/hmac.cpp delete mode 100644 vendor/cryptopp/hmac.h delete mode 100644 vendor/cryptopp/hmqv.h delete mode 100644 vendor/cryptopp/hrtimer.cpp delete mode 100644 vendor/cryptopp/hrtimer.h delete mode 100644 vendor/cryptopp/ida.cpp delete mode 100644 vendor/cryptopp/ida.h delete mode 100644 vendor/cryptopp/idea.cpp delete mode 100644 vendor/cryptopp/idea.h delete mode 100644 vendor/cryptopp/integer.cpp delete mode 100644 vendor/cryptopp/integer.h delete mode 100644 vendor/cryptopp/iterhash.cpp delete mode 100644 vendor/cryptopp/iterhash.h delete mode 100644 vendor/cryptopp/kalyna.cpp delete mode 100644 vendor/cryptopp/kalyna.h delete mode 100644 vendor/cryptopp/kalynatab.cpp delete mode 100644 vendor/cryptopp/keccak.cpp delete mode 100644 vendor/cryptopp/keccak.h delete mode 100644 vendor/cryptopp/keccak_core.cpp delete mode 100644 vendor/cryptopp/keccak_simd.cpp delete mode 100644 vendor/cryptopp/lea.cpp delete mode 100644 vendor/cryptopp/lea.h delete mode 100644 vendor/cryptopp/lea_simd.cpp delete mode 100644 vendor/cryptopp/lsh.h delete mode 100644 vendor/cryptopp/lsh256.cpp delete mode 100644 vendor/cryptopp/lsh256_avx.cpp delete mode 100644 vendor/cryptopp/lsh256_sse.cpp delete mode 100644 vendor/cryptopp/lsh512.cpp delete mode 100644 vendor/cryptopp/lsh512_avx.cpp delete mode 100644 vendor/cryptopp/lsh512_sse.cpp delete mode 100644 vendor/cryptopp/lubyrack.h delete mode 100644 vendor/cryptopp/luc.cpp delete mode 100644 vendor/cryptopp/luc.h delete mode 100644 vendor/cryptopp/mars.cpp delete mode 100644 vendor/cryptopp/mars.h delete mode 100644 vendor/cryptopp/marss.cpp delete mode 100644 vendor/cryptopp/md2.cpp delete mode 100644 vendor/cryptopp/md2.h delete mode 100644 vendor/cryptopp/md4.cpp delete mode 100644 vendor/cryptopp/md4.h delete mode 100644 vendor/cryptopp/md5.cpp delete mode 100644 vendor/cryptopp/md5.h delete mode 100644 vendor/cryptopp/mdc.h delete mode 100644 vendor/cryptopp/mersenne.h delete mode 100644 vendor/cryptopp/misc.cpp delete mode 100644 vendor/cryptopp/misc.h delete mode 100644 vendor/cryptopp/modarith.h delete mode 100644 vendor/cryptopp/modes.cpp delete mode 100644 vendor/cryptopp/modes.h delete mode 100644 vendor/cryptopp/modexppc.h delete mode 100644 vendor/cryptopp/mqueue.cpp delete mode 100644 vendor/cryptopp/mqueue.h delete mode 100644 vendor/cryptopp/mqv.cpp delete mode 100644 vendor/cryptopp/mqv.h delete mode 100644 vendor/cryptopp/naclite.h delete mode 100644 vendor/cryptopp/nbtheory.cpp delete mode 100644 vendor/cryptopp/nbtheory.h delete mode 100644 vendor/cryptopp/neon_simd.cpp delete mode 100644 vendor/cryptopp/nr.h delete mode 100644 vendor/cryptopp/oaep.cpp delete mode 100644 vendor/cryptopp/oaep.h delete mode 100644 vendor/cryptopp/oids.h delete mode 100644 vendor/cryptopp/osrng.cpp delete mode 100644 vendor/cryptopp/osrng.h delete mode 100644 vendor/cryptopp/ossig.h delete mode 100644 vendor/cryptopp/padlkrng.cpp delete mode 100644 vendor/cryptopp/padlkrng.h delete mode 100644 vendor/cryptopp/panama.cpp delete mode 100644 vendor/cryptopp/panama.h delete mode 100644 vendor/cryptopp/pch.cpp delete mode 100644 vendor/cryptopp/pch.h delete mode 100644 vendor/cryptopp/pkcspad.cpp delete mode 100644 vendor/cryptopp/pkcspad.h delete mode 100644 vendor/cryptopp/poly1305.cpp delete mode 100644 vendor/cryptopp/poly1305.h delete mode 100644 vendor/cryptopp/polynomi.cpp delete mode 100644 vendor/cryptopp/polynomi.h delete mode 100644 vendor/cryptopp/ppc_power7.cpp delete mode 100644 vendor/cryptopp/ppc_power8.cpp delete mode 100644 vendor/cryptopp/ppc_power9.cpp delete mode 100644 vendor/cryptopp/ppc_simd.cpp delete mode 100644 vendor/cryptopp/ppc_simd.h delete mode 100644 vendor/cryptopp/pssr.cpp delete mode 100644 vendor/cryptopp/pssr.h delete mode 100644 vendor/cryptopp/pubkey.cpp delete mode 100644 vendor/cryptopp/pubkey.h delete mode 100644 vendor/cryptopp/pwdbased.h delete mode 100644 vendor/cryptopp/queue.cpp delete mode 100644 vendor/cryptopp/queue.h delete mode 100644 vendor/cryptopp/rabbit.cpp delete mode 100644 vendor/cryptopp/rabbit.h delete mode 100644 vendor/cryptopp/rabin.cpp delete mode 100644 vendor/cryptopp/rabin.h delete mode 100644 vendor/cryptopp/randpool.cpp delete mode 100644 vendor/cryptopp/randpool.h delete mode 100644 vendor/cryptopp/rc2.cpp delete mode 100644 vendor/cryptopp/rc2.h delete mode 100644 vendor/cryptopp/rc5.cpp delete mode 100644 vendor/cryptopp/rc5.h delete mode 100644 vendor/cryptopp/rc6.cpp delete mode 100644 vendor/cryptopp/rc6.h delete mode 100644 vendor/cryptopp/rdrand.asm delete mode 100644 vendor/cryptopp/rdrand.cpp delete mode 100644 vendor/cryptopp/rdrand.h delete mode 100644 vendor/cryptopp/rdseed.asm delete mode 100644 vendor/cryptopp/rdtables.cpp delete mode 100644 vendor/cryptopp/regtest1.cpp delete mode 100644 vendor/cryptopp/regtest2.cpp delete mode 100644 vendor/cryptopp/regtest3.cpp delete mode 100644 vendor/cryptopp/regtest4.cpp delete mode 100644 vendor/cryptopp/resource.h delete mode 100644 vendor/cryptopp/rijndael.cpp delete mode 100644 vendor/cryptopp/rijndael.h delete mode 100644 vendor/cryptopp/rijndael_simd.cpp delete mode 100644 vendor/cryptopp/ripemd.cpp delete mode 100644 vendor/cryptopp/ripemd.h delete mode 100644 vendor/cryptopp/rng.cpp delete mode 100644 vendor/cryptopp/rng.h delete mode 100644 vendor/cryptopp/rsa.cpp delete mode 100644 vendor/cryptopp/rsa.h delete mode 100644 vendor/cryptopp/rw.cpp delete mode 100644 vendor/cryptopp/rw.h delete mode 100644 vendor/cryptopp/safer.cpp delete mode 100644 vendor/cryptopp/safer.h delete mode 100644 vendor/cryptopp/salsa.cpp delete mode 100644 vendor/cryptopp/salsa.h delete mode 100644 vendor/cryptopp/scrypt.cpp delete mode 100644 vendor/cryptopp/scrypt.h delete mode 100644 vendor/cryptopp/seal.cpp delete mode 100644 vendor/cryptopp/seal.h delete mode 100644 vendor/cryptopp/secblock.h delete mode 100644 vendor/cryptopp/secblockfwd.h delete mode 100644 vendor/cryptopp/seckey.h delete mode 100644 vendor/cryptopp/seed.cpp delete mode 100644 vendor/cryptopp/seed.h delete mode 100644 vendor/cryptopp/serpent.cpp delete mode 100644 vendor/cryptopp/serpent.h delete mode 100644 vendor/cryptopp/serpentp.h delete mode 100644 vendor/cryptopp/sha.cpp delete mode 100644 vendor/cryptopp/sha.h delete mode 100644 vendor/cryptopp/sha1_armv4.S delete mode 100644 vendor/cryptopp/sha1_armv4.h delete mode 100644 vendor/cryptopp/sha256_armv4.S delete mode 100644 vendor/cryptopp/sha256_armv4.h delete mode 100644 vendor/cryptopp/sha3.cpp delete mode 100644 vendor/cryptopp/sha3.h delete mode 100644 vendor/cryptopp/sha512_armv4.S delete mode 100644 vendor/cryptopp/sha512_armv4.h delete mode 100644 vendor/cryptopp/sha_simd.cpp delete mode 100644 vendor/cryptopp/shacal2.cpp delete mode 100644 vendor/cryptopp/shacal2.h delete mode 100644 vendor/cryptopp/shacal2_simd.cpp delete mode 100644 vendor/cryptopp/shake.cpp delete mode 100644 vendor/cryptopp/shake.h delete mode 100644 vendor/cryptopp/shark.cpp delete mode 100644 vendor/cryptopp/shark.h delete mode 100644 vendor/cryptopp/sharkbox.cpp delete mode 100644 vendor/cryptopp/simeck.cpp delete mode 100644 vendor/cryptopp/simeck.h delete mode 100644 vendor/cryptopp/simon.cpp delete mode 100644 vendor/cryptopp/simon.h delete mode 100644 vendor/cryptopp/simon128_simd.cpp delete mode 100644 vendor/cryptopp/simple.cpp delete mode 100644 vendor/cryptopp/simple.h delete mode 100644 vendor/cryptopp/siphash.h delete mode 100644 vendor/cryptopp/skipjack.cpp delete mode 100644 vendor/cryptopp/skipjack.h delete mode 100644 vendor/cryptopp/sm3.cpp delete mode 100644 vendor/cryptopp/sm3.h delete mode 100644 vendor/cryptopp/sm4.cpp delete mode 100644 vendor/cryptopp/sm4.h delete mode 100644 vendor/cryptopp/sm4_simd.cpp delete mode 100644 vendor/cryptopp/smartptr.h delete mode 100644 vendor/cryptopp/sosemanuk.cpp delete mode 100644 vendor/cryptopp/sosemanuk.h delete mode 100644 vendor/cryptopp/speck.cpp delete mode 100644 vendor/cryptopp/speck.h delete mode 100644 vendor/cryptopp/speck128_simd.cpp delete mode 100644 vendor/cryptopp/square.cpp delete mode 100644 vendor/cryptopp/square.h delete mode 100644 vendor/cryptopp/squaretb.cpp delete mode 100644 vendor/cryptopp/sse_simd.cpp delete mode 100644 vendor/cryptopp/stdcpp.h delete mode 100644 vendor/cryptopp/strciphr.cpp delete mode 100644 vendor/cryptopp/strciphr.h delete mode 100644 vendor/cryptopp/tea.cpp delete mode 100644 vendor/cryptopp/tea.h delete mode 100644 vendor/cryptopp/test.cpp delete mode 100644 vendor/cryptopp/tftables.cpp delete mode 100644 vendor/cryptopp/threefish.cpp delete mode 100644 vendor/cryptopp/threefish.h delete mode 100644 vendor/cryptopp/tiger.cpp delete mode 100644 vendor/cryptopp/tiger.h delete mode 100644 vendor/cryptopp/tigertab.cpp delete mode 100644 vendor/cryptopp/trap.h delete mode 100644 vendor/cryptopp/trunhash.h delete mode 100644 vendor/cryptopp/ttmac.cpp delete mode 100644 vendor/cryptopp/ttmac.h delete mode 100644 vendor/cryptopp/tweetnacl.cpp delete mode 100644 vendor/cryptopp/tweetnacl.h delete mode 100644 vendor/cryptopp/twofish.cpp delete mode 100644 vendor/cryptopp/twofish.h delete mode 100644 vendor/cryptopp/validat0.cpp delete mode 100644 vendor/cryptopp/validat1.cpp delete mode 100644 vendor/cryptopp/validat10.cpp delete mode 100644 vendor/cryptopp/validat2.cpp delete mode 100644 vendor/cryptopp/validat3.cpp delete mode 100644 vendor/cryptopp/validat4.cpp delete mode 100644 vendor/cryptopp/validat5.cpp delete mode 100644 vendor/cryptopp/validat6.cpp delete mode 100644 vendor/cryptopp/validat7.cpp delete mode 100644 vendor/cryptopp/validat8.cpp delete mode 100644 vendor/cryptopp/validat9.cpp delete mode 100644 vendor/cryptopp/validate.h delete mode 100644 vendor/cryptopp/vmac.cpp delete mode 100644 vendor/cryptopp/vmac.h delete mode 100644 vendor/cryptopp/vs2005.zip delete mode 100644 vendor/cryptopp/wake.cpp delete mode 100644 vendor/cryptopp/wake.h delete mode 100644 vendor/cryptopp/whrlpool.cpp delete mode 100644 vendor/cryptopp/whrlpool.h delete mode 100644 vendor/cryptopp/words.h delete mode 100644 vendor/cryptopp/x64dll.asm delete mode 100644 vendor/cryptopp/x64masm.asm delete mode 100644 vendor/cryptopp/xed25519.cpp delete mode 100644 vendor/cryptopp/xed25519.h delete mode 100644 vendor/cryptopp/xtr.cpp delete mode 100644 vendor/cryptopp/xtr.h delete mode 100644 vendor/cryptopp/xtrcrypt.cpp delete mode 100644 vendor/cryptopp/xtrcrypt.h delete mode 100644 vendor/cryptopp/xts.cpp delete mode 100644 vendor/cryptopp/xts.h delete mode 100644 vendor/cryptopp/zdeflate.cpp delete mode 100644 vendor/cryptopp/zdeflate.h delete mode 100644 vendor/cryptopp/zinflate.cpp delete mode 100644 vendor/cryptopp/zinflate.h delete mode 100644 vendor/cryptopp/zlib.cpp delete mode 100644 vendor/cryptopp/zlib.h create mode 100644 vendor/libsodium/CMakeLists.txt create mode 100644 vendor/libsodium/src/Makefile.am create mode 100644 vendor/libsodium/src/Makefile.in create mode 100644 vendor/libsodium/src/libsodium/Makefile.am create mode 100644 vendor/libsodium/src/libsodium/Makefile.in create mode 100644 vendor/libsodium/src/libsodium/crypto_aead/aegis128l/aead_aegis128l.c create mode 100644 vendor/libsodium/src/libsodium/crypto_aead/aegis128l/aegis128l_aesni.c create mode 100644 vendor/libsodium/src/libsodium/crypto_aead/aegis128l/aegis128l_aesni.h create mode 100644 vendor/libsodium/src/libsodium/crypto_aead/aegis128l/aegis128l_armcrypto.c create mode 100644 vendor/libsodium/src/libsodium/crypto_aead/aegis128l/aegis128l_armcrypto.h create mode 100644 vendor/libsodium/src/libsodium/crypto_aead/aegis128l/aegis128l_common.h create mode 100644 vendor/libsodium/src/libsodium/crypto_aead/aegis128l/aegis128l_soft.c create mode 100644 vendor/libsodium/src/libsodium/crypto_aead/aegis128l/aegis128l_soft.h create mode 100644 vendor/libsodium/src/libsodium/crypto_aead/aegis128l/implementations.h create mode 100644 vendor/libsodium/src/libsodium/crypto_aead/aegis256/aead_aegis256.c create mode 100644 vendor/libsodium/src/libsodium/crypto_aead/aegis256/aegis256_aesni.c create mode 100644 vendor/libsodium/src/libsodium/crypto_aead/aegis256/aegis256_aesni.h create mode 100644 vendor/libsodium/src/libsodium/crypto_aead/aegis256/aegis256_armcrypto.c create mode 100644 vendor/libsodium/src/libsodium/crypto_aead/aegis256/aegis256_armcrypto.h create mode 100644 vendor/libsodium/src/libsodium/crypto_aead/aegis256/aegis256_common.h create mode 100644 vendor/libsodium/src/libsodium/crypto_aead/aegis256/aegis256_soft.c create mode 100644 vendor/libsodium/src/libsodium/crypto_aead/aegis256/aegis256_soft.h create mode 100644 vendor/libsodium/src/libsodium/crypto_aead/aegis256/implementations.h create mode 100644 vendor/libsodium/src/libsodium/crypto_aead/aes256gcm/aead_aes256gcm.c create mode 100644 vendor/libsodium/src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c create mode 100644 vendor/libsodium/src/libsodium/crypto_aead/aes256gcm/armcrypto/aead_aes256gcm_armcrypto.c create mode 100644 vendor/libsodium/src/libsodium/crypto_aead/chacha20poly1305/aead_chacha20poly1305.c create mode 100644 vendor/libsodium/src/libsodium/crypto_aead/xchacha20poly1305/aead_xchacha20poly1305.c create mode 100644 vendor/libsodium/src/libsodium/crypto_auth/crypto_auth.c create mode 100644 vendor/libsodium/src/libsodium/crypto_auth/hmacsha256/auth_hmacsha256.c create mode 100644 vendor/libsodium/src/libsodium/crypto_auth/hmacsha512/auth_hmacsha512.c create mode 100644 vendor/libsodium/src/libsodium/crypto_auth/hmacsha512256/auth_hmacsha512256.c create mode 100644 vendor/libsodium/src/libsodium/crypto_box/crypto_box.c create mode 100644 vendor/libsodium/src/libsodium/crypto_box/crypto_box_easy.c create mode 100644 vendor/libsodium/src/libsodium/crypto_box/crypto_box_seal.c create mode 100644 vendor/libsodium/src/libsodium/crypto_box/curve25519xchacha20poly1305/box_curve25519xchacha20poly1305.c create mode 100644 vendor/libsodium/src/libsodium/crypto_box/curve25519xchacha20poly1305/box_seal_curve25519xchacha20poly1305.c create mode 100644 vendor/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/box_curve25519xsalsa20poly1305.c create mode 100644 vendor/libsodium/src/libsodium/crypto_core/ed25519/core_ed25519.c create mode 100644 vendor/libsodium/src/libsodium/crypto_core/ed25519/core_ristretto255.c create mode 100644 vendor/libsodium/src/libsodium/crypto_core/ed25519/ref10/ed25519_ref10.c create mode 100644 vendor/libsodium/src/libsodium/crypto_core/ed25519/ref10/fe_25_5/base.h create mode 100644 vendor/libsodium/src/libsodium/crypto_core/ed25519/ref10/fe_25_5/base2.h create mode 100644 vendor/libsodium/src/libsodium/crypto_core/ed25519/ref10/fe_25_5/constants.h create mode 100644 vendor/libsodium/src/libsodium/crypto_core/ed25519/ref10/fe_25_5/fe.h create mode 100644 vendor/libsodium/src/libsodium/crypto_core/ed25519/ref10/fe_51/base.h create mode 100644 vendor/libsodium/src/libsodium/crypto_core/ed25519/ref10/fe_51/base2.h create mode 100644 vendor/libsodium/src/libsodium/crypto_core/ed25519/ref10/fe_51/constants.h create mode 100644 vendor/libsodium/src/libsodium/crypto_core/ed25519/ref10/fe_51/fe.h create mode 100644 vendor/libsodium/src/libsodium/crypto_core/hchacha20/core_hchacha20.c create mode 100644 vendor/libsodium/src/libsodium/crypto_core/hsalsa20/core_hsalsa20.c create mode 100644 vendor/libsodium/src/libsodium/crypto_core/hsalsa20/ref2/core_hsalsa20_ref2.c create mode 100644 vendor/libsodium/src/libsodium/crypto_core/salsa/ref/core_salsa_ref.c create mode 100644 vendor/libsodium/src/libsodium/crypto_core/softaes/softaes.c create mode 100644 vendor/libsodium/src/libsodium/crypto_generichash/blake2b/generichash_blake2.c create mode 100644 vendor/libsodium/src/libsodium/crypto_generichash/blake2b/ref/blake2.h create mode 100644 vendor/libsodium/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-avx2.c create mode 100644 vendor/libsodium/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-avx2.h create mode 100644 vendor/libsodium/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-ref.c create mode 100644 vendor/libsodium/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-sse41.c create mode 100644 vendor/libsodium/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-sse41.h create mode 100644 vendor/libsodium/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-ssse3.c create mode 100644 vendor/libsodium/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-ssse3.h create mode 100644 vendor/libsodium/src/libsodium/crypto_generichash/blake2b/ref/blake2b-load-avx2.h create mode 100644 vendor/libsodium/src/libsodium/crypto_generichash/blake2b/ref/blake2b-load-sse2.h create mode 100644 vendor/libsodium/src/libsodium/crypto_generichash/blake2b/ref/blake2b-load-sse41.h create mode 100644 vendor/libsodium/src/libsodium/crypto_generichash/blake2b/ref/blake2b-ref.c create mode 100644 vendor/libsodium/src/libsodium/crypto_generichash/blake2b/ref/generichash_blake2b.c create mode 100644 vendor/libsodium/src/libsodium/crypto_generichash/crypto_generichash.c create mode 100644 vendor/libsodium/src/libsodium/crypto_hash/crypto_hash.c create mode 100644 vendor/libsodium/src/libsodium/crypto_hash/sha256/cp/hash_sha256_cp.c create mode 100644 vendor/libsodium/src/libsodium/crypto_hash/sha256/hash_sha256.c create mode 100644 vendor/libsodium/src/libsodium/crypto_hash/sha512/cp/hash_sha512_cp.c create mode 100644 vendor/libsodium/src/libsodium/crypto_hash/sha512/hash_sha512.c create mode 100644 vendor/libsodium/src/libsodium/crypto_kdf/blake2b/kdf_blake2b.c create mode 100644 vendor/libsodium/src/libsodium/crypto_kdf/crypto_kdf.c create mode 100644 vendor/libsodium/src/libsodium/crypto_kdf/hkdf/kdf_hkdf_sha256.c create mode 100644 vendor/libsodium/src/libsodium/crypto_kdf/hkdf/kdf_hkdf_sha512.c create mode 100644 vendor/libsodium/src/libsodium/crypto_kx/crypto_kx.c create mode 100644 vendor/libsodium/src/libsodium/crypto_onetimeauth/crypto_onetimeauth.c create mode 100644 vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna.c create mode 100644 vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna.h create mode 100644 vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna32.h create mode 100644 vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna64.h create mode 100644 vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305.c create mode 100644 vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305.h create mode 100644 vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/sse2/poly1305_sse2.c create mode 100644 vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/sse2/poly1305_sse2.h create mode 100644 vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2-core.c create mode 100644 vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2-core.h create mode 100644 vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2-encoding.c create mode 100644 vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2-encoding.h create mode 100644 vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2-fill-block-avx2.c create mode 100644 vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2-fill-block-avx512f.c create mode 100644 vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2-fill-block-ref.c create mode 100644 vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2-fill-block-ssse3.c create mode 100644 vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2.c create mode 100644 vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2.h create mode 100644 vendor/libsodium/src/libsodium/crypto_pwhash/argon2/blake2b-long.c create mode 100644 vendor/libsodium/src/libsodium/crypto_pwhash/argon2/blake2b-long.h create mode 100644 vendor/libsodium/src/libsodium/crypto_pwhash/argon2/blamka-round-avx2.h create mode 100644 vendor/libsodium/src/libsodium/crypto_pwhash/argon2/blamka-round-avx512f.h create mode 100644 vendor/libsodium/src/libsodium/crypto_pwhash/argon2/blamka-round-ref.h create mode 100644 vendor/libsodium/src/libsodium/crypto_pwhash/argon2/blamka-round-ssse3.h create mode 100644 vendor/libsodium/src/libsodium/crypto_pwhash/argon2/pwhash_argon2i.c create mode 100644 vendor/libsodium/src/libsodium/crypto_pwhash/argon2/pwhash_argon2id.c create mode 100644 vendor/libsodium/src/libsodium/crypto_pwhash/crypto_pwhash.c create mode 100644 vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/crypto_scrypt-common.c create mode 100644 vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/crypto_scrypt.h create mode 100644 vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/nosse/pwhash_scryptsalsa208sha256_nosse.c create mode 100644 vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/pbkdf2-sha256.c create mode 100644 vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/pbkdf2-sha256.h create mode 100644 vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/pwhash_scryptsalsa208sha256.c create mode 100644 vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/scrypt_platform.c create mode 100644 vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/sse/pwhash_scryptsalsa208sha256_sse.c create mode 100644 vendor/libsodium/src/libsodium/crypto_scalarmult/crypto_scalarmult.c create mode 100644 vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/x25519_ref10.c create mode 100644 vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/x25519_ref10.h create mode 100644 vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/consts.S create mode 100644 vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/consts_namespace.h create mode 100644 vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/curve25519_sandy2x.c create mode 100644 vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/curve25519_sandy2x.h create mode 100644 vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe.h create mode 100644 vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51.h create mode 100644 vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51_invert.c create mode 100644 vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51_mul.S create mode 100644 vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51_namespace.h create mode 100644 vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51_nsquare.S create mode 100644 vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51_pack.S create mode 100644 vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe_frombytes_sandy2x.c create mode 100644 vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/ladder.S create mode 100644 vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/ladder.h create mode 100644 vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/ladder_namespace.h create mode 100644 vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/sandy2x.S create mode 100644 vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/scalarmult_curve25519.c create mode 100644 vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/scalarmult_curve25519.h create mode 100644 vendor/libsodium/src/libsodium/crypto_scalarmult/ed25519/ref10/scalarmult_ed25519_ref10.c create mode 100644 vendor/libsodium/src/libsodium/crypto_scalarmult/ristretto255/ref10/scalarmult_ristretto255_ref10.c create mode 100644 vendor/libsodium/src/libsodium/crypto_secretbox/crypto_secretbox.c create mode 100644 vendor/libsodium/src/libsodium/crypto_secretbox/crypto_secretbox_easy.c create mode 100644 vendor/libsodium/src/libsodium/crypto_secretbox/xchacha20poly1305/secretbox_xchacha20poly1305.c create mode 100644 vendor/libsodium/src/libsodium/crypto_secretbox/xsalsa20poly1305/secretbox_xsalsa20poly1305.c create mode 100644 vendor/libsodium/src/libsodium/crypto_secretstream/xchacha20poly1305/secretstream_xchacha20poly1305.c create mode 100644 vendor/libsodium/src/libsodium/crypto_shorthash/crypto_shorthash.c create mode 100644 vendor/libsodium/src/libsodium/crypto_shorthash/siphash24/ref/shorthash_siphash24_ref.c create mode 100644 vendor/libsodium/src/libsodium/crypto_shorthash/siphash24/ref/shorthash_siphash_ref.h create mode 100644 vendor/libsodium/src/libsodium/crypto_shorthash/siphash24/ref/shorthash_siphashx24_ref.c create mode 100644 vendor/libsodium/src/libsodium/crypto_shorthash/siphash24/shorthash_siphash24.c create mode 100644 vendor/libsodium/src/libsodium/crypto_shorthash/siphash24/shorthash_siphashx24.c create mode 100644 vendor/libsodium/src/libsodium/crypto_sign/crypto_sign.c create mode 100644 vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/keypair.c create mode 100644 vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/obsolete.c create mode 100644 vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/open.c create mode 100644 vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/sign.c create mode 100644 vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/sign_ed25519_ref10.h create mode 100644 vendor/libsodium/src/libsodium/crypto_sign/ed25519/sign_ed25519.c create mode 100644 vendor/libsodium/src/libsodium/crypto_stream/chacha20/dolbeau/chacha20_dolbeau-avx2.c create mode 100644 vendor/libsodium/src/libsodium/crypto_stream/chacha20/dolbeau/chacha20_dolbeau-avx2.h create mode 100644 vendor/libsodium/src/libsodium/crypto_stream/chacha20/dolbeau/chacha20_dolbeau-ssse3.c create mode 100644 vendor/libsodium/src/libsodium/crypto_stream/chacha20/dolbeau/chacha20_dolbeau-ssse3.h create mode 100644 vendor/libsodium/src/libsodium/crypto_stream/chacha20/dolbeau/u0.h create mode 100644 vendor/libsodium/src/libsodium/crypto_stream/chacha20/dolbeau/u1.h create mode 100644 vendor/libsodium/src/libsodium/crypto_stream/chacha20/dolbeau/u4.h create mode 100644 vendor/libsodium/src/libsodium/crypto_stream/chacha20/dolbeau/u8.h create mode 100644 vendor/libsodium/src/libsodium/crypto_stream/chacha20/ref/chacha20_ref.c create mode 100644 vendor/libsodium/src/libsodium/crypto_stream/chacha20/ref/chacha20_ref.h create mode 100644 vendor/libsodium/src/libsodium/crypto_stream/chacha20/stream_chacha20.c create mode 100644 vendor/libsodium/src/libsodium/crypto_stream/chacha20/stream_chacha20.h create mode 100644 vendor/libsodium/src/libsodium/crypto_stream/crypto_stream.c create mode 100644 vendor/libsodium/src/libsodium/crypto_stream/salsa20/ref/salsa20_ref.c create mode 100644 vendor/libsodium/src/libsodium/crypto_stream/salsa20/ref/salsa20_ref.h create mode 100644 vendor/libsodium/src/libsodium/crypto_stream/salsa20/stream_salsa20.c create mode 100644 vendor/libsodium/src/libsodium/crypto_stream/salsa20/stream_salsa20.h create mode 100644 vendor/libsodium/src/libsodium/crypto_stream/salsa20/xmm6/salsa20_xmm6-asm.S create mode 100644 vendor/libsodium/src/libsodium/crypto_stream/salsa20/xmm6/salsa20_xmm6.c create mode 100644 vendor/libsodium/src/libsodium/crypto_stream/salsa20/xmm6/salsa20_xmm6.h create mode 100644 vendor/libsodium/src/libsodium/crypto_stream/salsa20/xmm6int/salsa20_xmm6int-avx2.c create mode 100644 vendor/libsodium/src/libsodium/crypto_stream/salsa20/xmm6int/salsa20_xmm6int-avx2.h create mode 100644 vendor/libsodium/src/libsodium/crypto_stream/salsa20/xmm6int/salsa20_xmm6int-sse2.c create mode 100644 vendor/libsodium/src/libsodium/crypto_stream/salsa20/xmm6int/salsa20_xmm6int-sse2.h create mode 100644 vendor/libsodium/src/libsodium/crypto_stream/salsa20/xmm6int/u0.h create mode 100644 vendor/libsodium/src/libsodium/crypto_stream/salsa20/xmm6int/u1.h create mode 100644 vendor/libsodium/src/libsodium/crypto_stream/salsa20/xmm6int/u4.h create mode 100644 vendor/libsodium/src/libsodium/crypto_stream/salsa20/xmm6int/u8.h create mode 100644 vendor/libsodium/src/libsodium/crypto_stream/salsa2012/ref/stream_salsa2012_ref.c create mode 100644 vendor/libsodium/src/libsodium/crypto_stream/salsa2012/stream_salsa2012.c create mode 100644 vendor/libsodium/src/libsodium/crypto_stream/salsa208/ref/stream_salsa208_ref.c create mode 100644 vendor/libsodium/src/libsodium/crypto_stream/salsa208/stream_salsa208.c create mode 100644 vendor/libsodium/src/libsodium/crypto_stream/xchacha20/stream_xchacha20.c create mode 100644 vendor/libsodium/src/libsodium/crypto_stream/xsalsa20/stream_xsalsa20.c create mode 100644 vendor/libsodium/src/libsodium/crypto_verify/verify.c create mode 100644 vendor/libsodium/src/libsodium/include/Makefile.am create mode 100644 vendor/libsodium/src/libsodium/include/Makefile.in create mode 100644 vendor/libsodium/src/libsodium/include/sodium.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/core.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/crypto_aead_aegis128l.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/crypto_aead_aegis256.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/crypto_aead_aes256gcm.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/crypto_aead_chacha20poly1305.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/crypto_aead_xchacha20poly1305.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/crypto_auth.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/crypto_auth_hmacsha256.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/crypto_auth_hmacsha512.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/crypto_auth_hmacsha512256.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/crypto_box.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/crypto_box_curve25519xchacha20poly1305.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/crypto_box_curve25519xsalsa20poly1305.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/crypto_core_ed25519.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/crypto_core_hchacha20.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/crypto_core_hsalsa20.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/crypto_core_ristretto255.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/crypto_core_salsa20.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/crypto_core_salsa2012.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/crypto_core_salsa208.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/crypto_generichash.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/crypto_generichash_blake2b.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/crypto_hash.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/crypto_hash_sha256.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/crypto_hash_sha512.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/crypto_kdf.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/crypto_kdf_blake2b.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/crypto_kdf_hkdf_sha256.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/crypto_kdf_hkdf_sha512.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/crypto_kx.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/crypto_onetimeauth.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/crypto_onetimeauth_poly1305.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/crypto_pwhash.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/crypto_pwhash_argon2i.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/crypto_pwhash_argon2id.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/crypto_pwhash_scryptsalsa208sha256.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/crypto_scalarmult.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/crypto_scalarmult_curve25519.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/crypto_scalarmult_ed25519.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/crypto_scalarmult_ristretto255.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/crypto_secretbox.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/crypto_secretbox_xchacha20poly1305.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/crypto_secretbox_xsalsa20poly1305.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/crypto_secretstream_xchacha20poly1305.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/crypto_shorthash.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/crypto_shorthash_siphash24.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/crypto_sign.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/crypto_sign_ed25519.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/crypto_sign_edwards25519sha512batch.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/crypto_stream.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/crypto_stream_chacha20.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/crypto_stream_salsa20.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/crypto_stream_salsa2012.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/crypto_stream_salsa208.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/crypto_stream_xchacha20.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/crypto_stream_xsalsa20.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/crypto_verify_16.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/crypto_verify_32.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/crypto_verify_64.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/export.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/private/asm_cet.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/private/chacha20_ietf_ext.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/private/common.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/private/ed25519_ref10.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/private/ed25519_ref10_fe_25_5.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/private/ed25519_ref10_fe_51.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/private/implementations.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/private/mutex.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/private/softaes.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/private/sse2_64_32.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/randombytes.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/randombytes_internal_random.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/randombytes_sysrandom.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/runtime.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/utils.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/version.h create mode 100644 vendor/libsodium/src/libsodium/include/sodium/version.h.in create mode 100644 vendor/libsodium/src/libsodium/randombytes/internal/randombytes_internal_random.c create mode 100644 vendor/libsodium/src/libsodium/randombytes/randombytes.c create mode 100644 vendor/libsodium/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c create mode 100644 vendor/libsodium/src/libsodium/sodium/codecs.c create mode 100644 vendor/libsodium/src/libsodium/sodium/core.c create mode 100644 vendor/libsodium/src/libsodium/sodium/runtime.c create mode 100644 vendor/libsodium/src/libsodium/sodium/utils.c create mode 100644 vendor/libsodium/src/libsodium/sodium/version.c diff --git a/CMakeLists.txt b/CMakeLists.txt index 4b4c958..188e8d5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,6 +33,7 @@ endif() add_compile_options( $<$:/wd4828> $<$:/wd4996> + $<$:/wd5033> ) # ASan flags @@ -65,6 +66,7 @@ add_compile_definitions("$<$:_DISTRIBUTE>") include_directories("src") include_directories("extern/include") +include_directories("vendor/libsodium/src/libsodium/include") # Add subdirectories for libraries and executables add_subdirectory(vendor) diff --git a/README.md b/README.md index be08bdc..d467e50 100644 --- a/README.md +++ b/README.md @@ -14,5 +14,41 @@ This repository contains the source code necessary to compile the game client ex ## 📋 Changelog -### 🛠Bug Fixes -* **Effect adapting to semi-transparent meshes:** Effect adapting to semi-transparent meshes has been removed as it was causing artifacts when opacity was lower than 1 +### Encryption & Security Overhaul + +The entire legacy encryption system has been replaced with [libsodium](https://doc.libsodium.org/). + +#### Removed Legacy Crypto +* **Crypto++ (cryptopp) vendor library** — Completely removed from the project +* **Panama cipher** (`CFilterEncoder`, `CFilterDecoder`) — Removed from `NetStream` +* **TEA encryption** (`tea.h`, `tea.cpp`) — Removed from both client and server +* **DH2 key exchange** (`cipher.h`, `cipher.cpp`) — Removed from `EterBase` +* **Camellia cipher** — Removed all references +* **`_IMPROVED_PACKET_ENCRYPTION_`** — Entire system removed (XTEA key scheduling, sequence encryption, key agreement) +* **`adwClientKey[4]`** — Removed from all packet structs (`TPacketCGLogin2`, `TPacketCGLogin3`, `TPacketGDAuthLogin`, `TPacketGDLoginByKey`, `TPacketLoginOnSetup`) and all associated code on both client and server +* **`LSS_SECURITY_KEY`** — Dead code removed (`"testtesttesttest"` hardcoded key, `GetSecurityKey()` function) + +#### New Encryption System (libsodium) +* **X25519 key exchange** — `SecureCipher` class handles keypair generation and session key derivation via `crypto_kx_client_session_keys` / `crypto_kx_server_session_keys` +* **XChaCha20-Poly1305 AEAD** — Used for authenticated encryption of handshake tokens (key exchange, session tokens) +* **XChaCha20 stream cipher** — Used for in-place network buffer encryption via `EncryptInPlace()` / `DecryptInPlace()` (zero overhead, nonce-counter based replay prevention) +* **Challenge-response authentication** — HMAC-based (`crypto_auth`) verification during key exchange to prove shared secret derivation +* **New handshake protocol** — `HEADER_GC_KEY_CHALLENGE` / `HEADER_CG_KEY_RESPONSE` / `HEADER_GC_KEY_COMPLETE` packet flow for secure session establishment + +#### Network Encryption Pipeline +* **Client send path** — Data is encrypted at queue time in `CNetworkStream::Send()` (prevents double-encryption on partial TCP sends) +* **Client receive path** — Data is decrypted immediately after `recv()` in `__RecvInternalBuffer()`, before being committed to the buffer +* **Server send path** — Data is encrypted in `DESC::Packet()` via `EncryptInPlace()` after encoding to the output buffer +* **Server receive path** — Newly received bytes are decrypted in `DESC::ProcessInput()` via `DecryptInPlace()` before buffer commit + +#### Login Security Hardening +* **Removed plaintext login path** — `HEADER_CG_LOGIN` (direct password to game server) has been removed. All game server logins now require a login key obtained through the auth server (`HEADER_CG_LOGIN2` / `LoginByKey`) +* **CSPRNG login keys** — `CreateLoginKey()` now uses `randombytes_uniform()` (libsodium) instead of the non-cryptographic Xoshiro128PlusPlus PRNG +* **Single-use login keys** — Keys are consumed (removed from the map) immediately after successful authentication +* **Shorter key expiry** — Expired login keys are cleaned up after 15 seconds (down from 60 seconds). Orphaned keys (descriptor gone, never expired) are also cleaned up +* **Login rate limiting** — Per-IP tracking of failed login attempts. After 5 failures within 60 seconds, the IP is blocked with a `BLOCK` status and disconnected. Counter resets after cooldown or successful login +* **Removed Brazil password bypass** — The `LC_IsBrazil()` block that unconditionally disabled password verification has been removed + +#### Pack File Encryption +* **libsodium-based pack encryption** — `PackLib` now uses XChaCha20-Poly1305 for pack file encryption, replacing the legacy Camellia/XTEA system +* **Secure key derivation** — Pack encryption keys are derived using `crypto_pwhash` (Argon2id) diff --git a/src/AudioLib/CMakeLists.txt b/src/AudioLib/CMakeLists.txt index efc5312..8bc7cd8 100644 --- a/src/AudioLib/CMakeLists.txt +++ b/src/AudioLib/CMakeLists.txt @@ -2,8 +2,7 @@ file(GLOB_RECURSE FILE_SOURCES "*.h" "*.c" "*.cpp") add_library(AudioLib STATIC ${FILE_SOURCES}) -target_link_libraries(AudioLib - cryptopp-static +target_link_libraries(AudioLib mio ) diff --git a/src/DumpProto/CMakeLists.txt b/src/DumpProto/CMakeLists.txt index 19db608..3171f98 100644 --- a/src/DumpProto/CMakeLists.txt +++ b/src/DumpProto/CMakeLists.txt @@ -1,10 +1,18 @@ file(GLOB_RECURSE FILE_SOURCES "*.h" "*.c" "*.cpp") +# Use tea.cpp from EterBase instead of maintaining a local copy +list(APPEND FILE_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/../EterBase/tea.cpp") + add_executable(DumpProto ${FILE_SOURCES}) set_target_properties(DumpProto PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin ) +target_include_directories(DumpProto PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/../EterBase +) + target_link_libraries(DumpProto lzo2 -) \ No newline at end of file + sodium +) diff --git a/src/DumpProto/dump_proto.cpp b/src/DumpProto/dump_proto.cpp index 9c955ba..61a42cd 100644 --- a/src/DumpProto/dump_proto.cpp +++ b/src/DumpProto/dump_proto.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #include "lzo.h" @@ -1152,7 +1153,13 @@ int main(int argc, char ** argv) printf("=== MAIN START ===\n"); fflush(stdout); - + + if (sodium_init() < 0) + { + fprintf(stderr, "sodium_init() failed\n"); + return 1; + } + if (BuildMobTable()) { printf("=== BuildMobTable returned TRUE ===\n"); diff --git a/src/DumpProto/tea.cpp b/src/DumpProto/tea.cpp deleted file mode 100644 index d8c9899..0000000 --- a/src/DumpProto/tea.cpp +++ /dev/null @@ -1,100 +0,0 @@ -/* -* Filename: tea.c -* Description: TEA ¾Ïȣȭ ¸ðµâ -* -* Author: ±èÇÑÁÖ (aka. ºñ¿±, Cronan), ¼Û¿µÁø (aka. myevan, ºøÀÚ·ç) -*/ -#include "tea.h" -#include - -/* -* TEA Encryption Module Instruction -* Edited by ±èÇÑÁÖ aka. ºñ¿±, Cronan -* -* void tea_code(const unsigned long sz, const unsigned long sy, const unsigned long *key, unsigned long *dest) -* void tea_decode(const unsigned long sz, const unsigned long sy, const unsigned long *key, unsigned long *dest) -* 8¹ÙÀÌÆ®¸¦ ¾ÏÈ£/º¹È£È­ ÇÒ¶§ »ç¿ëµÈ´Ù. key ´Â 16 ¹ÙÀÌÆ®¿©¾ß ÇÑ´Ù. -* sz, sy ´Â 8¹ÙÀÌÆ®ÀÇ ¿ª¼øÀ¸·Î ´ëÀÔÇÑ´Ù. -* -* int tea_decrypt(unsigned long *dest, const unsigned long *src, const unsigned long *key, int size); -* int tea_encrypt(unsigned long *dest, const unsigned long *src, const unsigned long *key, int size); -* ÇѲ¨¹ø¿¡ 8 ¹ÙÀÌÆ® ÀÌ»óÀ» ¾ÏÈ£/º¹È£È­ ÇÒ¶§ »ç¿ëÇÑ´Ù. ¸¸¾à size °¡ -* 8ÀÇ ¹è¼ö°¡ ¾Æ´Ï¸é 8ÀÇ ¹è¼ö·Î Å©±â¸¦ "´Ã·Á¼­" ¾Ïȣȭ ÇÑ´Ù. -* -* ex. tea_code(pdwSrc[1], pdwSrc[0], pdwKey, pdwDest); -* tea_decrypt(pdwDest, pdwSrc, pdwKey, nSize); -*/ - -#define TEA_ROUND 32 // 32 ¸¦ ±ÇÀåÇϸç, ³ôÀ» ¼ö·Ï °á°ú°¡ ³­ÇØÇØ Áø´Ù. -#define DELTA 0x9E3779B9 // DELTA °ª ¹Ù²ÙÁö ¸»°Í. - -void tea_code(const unsigned long sz, const unsigned long sy, const unsigned long *key, unsigned long *dest) -{ - register unsigned long y = sy, z = sz, sum = 0; - unsigned long n = TEA_ROUND; - - while (n-- > 0) - { - y += ((z << 4 ^ z >> 5) + z) ^ (sum + key[sum & 3]); - sum += DELTA; - z += ((y << 4 ^ y >> 5) + y) ^ (sum + key[sum >> 11 & 3]); - } - - *(dest++) = y; - *dest = z; -} - -void tea_decode(const unsigned long sz, const unsigned long sy, const unsigned long *key, unsigned long *dest) -{ -#pragma warning(disable:4307) - register unsigned long y = sy, z = sz, sum = DELTA * TEA_ROUND; -#pragma warning(default:4307) - - unsigned long n = TEA_ROUND; - - while (n-- > 0) - { - z -= ((y << 4 ^ y >> 5) + y) ^ (sum + key[sum >> 11 & 3]); - sum -= DELTA; - y -= ((z << 4 ^ z >> 5) + z) ^ (sum + key[sum & 3]); - } - - *(dest++) = y; - *dest = z; -} - -int tea_encrypt(unsigned long *dest, const unsigned long *src, const unsigned long * key, int size) -{ - int i; - int resize; - - if (size % 8 != 0) - { - resize = size + 8 - (size % 8); - memset((char *) src + size, 0, resize - size); - } - else - resize = size; - - for (i = 0; i < resize >> 3; i++, dest += 2, src += 2) - tea_code(*(src + 1), *src, key, dest); - - return (resize); -} - -int tea_decrypt(unsigned long *dest, const unsigned long *src, const unsigned long * key, int size) -{ - int i; - int resize; - - if (size % 8 != 0) - resize = size + 8 - (size % 8); - else - resize = size; - - for (i = 0; i < resize >> 3; i++, dest += 2, src += 2) - tea_decode(*(src + 1), *src, key, dest); - - return (resize); -} - diff --git a/src/DumpProto/tea.h b/src/DumpProto/tea.h deleted file mode 100644 index 3555bc2..0000000 --- a/src/DumpProto/tea.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifdef __cplusplus -extern "C" { -#endif - - /* TEA is a 64-bit symmetric block cipher with a 128-bit key, developed - by David J. Wheeler and Roger M. Needham, and described in their - paper at . - - This implementation is based on their code in - */ - - int tea_encrypt(unsigned long *dest, const unsigned long *src, const unsigned long *key, int size); - int tea_decrypt(unsigned long *dest, const unsigned long *src, const unsigned long *key, int size); - -#ifdef __cplusplus -}; -#endif diff --git a/src/EffectLib/CMakeLists.txt b/src/EffectLib/CMakeLists.txt index 43dd133..e085726 100644 --- a/src/EffectLib/CMakeLists.txt +++ b/src/EffectLib/CMakeLists.txt @@ -2,8 +2,7 @@ add_library(EffectLib STATIC ${FILE_SOURCES}) -target_link_libraries(EffectLib - cryptopp-static +target_link_libraries(EffectLib mio ) diff --git a/src/EterBase/CMakeLists.txt b/src/EterBase/CMakeLists.txt index 5b77398..41b4b04 100644 --- a/src/EterBase/CMakeLists.txt +++ b/src/EterBase/CMakeLists.txt @@ -2,9 +2,9 @@ add_library(EterBase STATIC ${FILE_SOURCES}) -target_link_libraries(EterBase +target_link_libraries(EterBase lzo2 - cryptopp-static + sodium mio ) diff --git a/src/EterBase/SecureCipher.cpp b/src/EterBase/SecureCipher.cpp new file mode 100644 index 0000000..a7c845b --- /dev/null +++ b/src/EterBase/SecureCipher.cpp @@ -0,0 +1,294 @@ +#include "StdAfx.h" +#include "SecureCipher.h" + +// Static initialization flag for libsodium +static bool s_sodiumInitialized = false; + +static bool EnsureSodiumInit() +{ + if (!s_sodiumInitialized) + { + if (sodium_init() < 0) + { + return false; + } + s_sodiumInitialized = true; + } + return true; +} + +SecureCipher::SecureCipher() +{ + sodium_memzero(m_pk, sizeof(m_pk)); + sodium_memzero(m_sk, sizeof(m_sk)); + sodium_memzero(m_tx_key, sizeof(m_tx_key)); + sodium_memzero(m_rx_key, sizeof(m_rx_key)); + sodium_memzero(m_session_token, sizeof(m_session_token)); +} + +SecureCipher::~SecureCipher() +{ + CleanUp(); +} + +bool SecureCipher::Initialize() +{ + if (!EnsureSodiumInit()) + { + return false; + } + + // Generate X25519 keypair + if (crypto_kx_keypair(m_pk, m_sk) != 0) + { + return false; + } + + m_tx_nonce = 0; + m_rx_nonce = 0; + m_initialized = true; + m_activated = false; + + return true; +} + +void SecureCipher::CleanUp() +{ + // Securely erase all sensitive key material + sodium_memzero(m_sk, sizeof(m_sk)); + sodium_memzero(m_tx_key, sizeof(m_tx_key)); + sodium_memzero(m_rx_key, sizeof(m_rx_key)); + sodium_memzero(m_session_token, sizeof(m_session_token)); + + m_initialized = false; + m_activated = false; + m_tx_nonce = 0; + m_rx_nonce = 0; +} + +void SecureCipher::GetPublicKey(uint8_t* out_pk) const +{ + memcpy(out_pk, m_pk, PK_SIZE); +} + +bool SecureCipher::ComputeClientKeys(const uint8_t* server_pk) +{ + if (!m_initialized) + { + return false; + } + + // Client: tx_key is for sending TO server, rx_key is for receiving FROM server + if (crypto_kx_client_session_keys(m_rx_key, m_tx_key, m_pk, m_sk, server_pk) != 0) + { + return false; + } + + return true; +} + +bool SecureCipher::ComputeServerKeys(const uint8_t* client_pk) +{ + if (!m_initialized) + { + return false; + } + + // Server: tx_key is for sending TO client, rx_key is for receiving FROM client + if (crypto_kx_server_session_keys(m_rx_key, m_tx_key, m_pk, m_sk, client_pk) != 0) + { + return false; + } + + return true; +} + +void SecureCipher::GenerateChallenge(uint8_t* out_challenge) +{ + randombytes_buf(out_challenge, CHALLENGE_SIZE); +} + +void SecureCipher::ComputeChallengeResponse(const uint8_t* challenge, uint8_t* out_response) +{ + // HMAC the challenge using our rx_key as the authentication key + // This proves we derived the correct shared secret + crypto_auth(out_response, challenge, CHALLENGE_SIZE, m_rx_key); +} + +bool SecureCipher::VerifyChallengeResponse(const uint8_t* challenge, const uint8_t* response) +{ + // Verify the HMAC - peer should have used their tx_key (our rx_key) to compute it + return crypto_auth_verify(response, challenge, CHALLENGE_SIZE, m_rx_key) == 0; +} + +void SecureCipher::BuildNonce(uint8_t* nonce, uint64_t counter, bool is_tx) +{ + // 24-byte nonce structure: + // [0]: direction flag (0x01 for tx, 0x02 for rx) + // [1-7]: reserved/zero + // [8-15]: 64-bit counter (little-endian) + // [16-23]: reserved/zero + + sodium_memzero(nonce, NONCE_SIZE); + nonce[0] = is_tx ? 0x01 : 0x02; + + // Store counter in little-endian at offset 8 + for (int i = 0; i < 8; ++i) + { + nonce[8 + i] = (uint8_t)(counter >> (i * 8)); + } +} + +size_t SecureCipher::Encrypt(const void* plaintext, size_t plaintext_len, void* ciphertext) +{ + if (!m_activated) + { + return 0; + } + + uint8_t nonce[NONCE_SIZE]; + BuildNonce(nonce, m_tx_nonce, true); + + unsigned long long ciphertext_len = 0; + + if (crypto_aead_xchacha20poly1305_ietf_encrypt( + (uint8_t*)ciphertext, &ciphertext_len, + (const uint8_t*)plaintext, plaintext_len, + nullptr, 0, // No additional data + nullptr, // No secret nonce + nonce, + m_tx_key) != 0) + { + return 0; + } + + ++m_tx_nonce; + return (size_t)ciphertext_len; +} + +size_t SecureCipher::Decrypt(const void* ciphertext, size_t ciphertext_len, void* plaintext) +{ + if (!m_activated) + { + return 0; + } + + if (ciphertext_len < TAG_SIZE) + { + return 0; + } + + uint8_t nonce[NONCE_SIZE]; + BuildNonce(nonce, m_rx_nonce, false); + + unsigned long long plaintext_len = 0; + + if (crypto_aead_xchacha20poly1305_ietf_decrypt( + (uint8_t*)plaintext, &plaintext_len, + nullptr, // No secret nonce output + (const uint8_t*)ciphertext, ciphertext_len, + nullptr, 0, // No additional data + nonce, + m_rx_key) != 0) + { + // Decryption failed - either wrong key, tampered data, or replay attack + return 0; + } + + ++m_rx_nonce; + return (size_t)plaintext_len; +} + +void SecureCipher::EncryptInPlace(void* buffer, size_t len) +{ + if (!m_activated || len == 0) + return; + + uint8_t nonce[NONCE_SIZE]; + BuildNonce(nonce, m_tx_nonce, true); + + crypto_stream_xchacha20_xor_ic( + (uint8_t*)buffer, + (const uint8_t*)buffer, + (unsigned long long)len, + nonce, + 0, + m_tx_key); + + ++m_tx_nonce; +} + +void SecureCipher::DecryptInPlace(void* buffer, size_t len) +{ + if (!m_activated || len == 0) + return; + + uint8_t nonce[NONCE_SIZE]; + BuildNonce(nonce, m_rx_nonce, false); + + crypto_stream_xchacha20_xor_ic( + (uint8_t*)buffer, + (const uint8_t*)buffer, + (unsigned long long)len, + nonce, + 0, + m_rx_key); + + ++m_rx_nonce; +} + +bool SecureCipher::EncryptToken(const uint8_t* plaintext, size_t len, + uint8_t* ciphertext, uint8_t* nonce_out) +{ + if (!m_initialized) + { + return false; + } + + // Generate random nonce for this one-time encryption + randombytes_buf(nonce_out, NONCE_SIZE); + + unsigned long long ciphertext_len = 0; + + if (crypto_aead_xchacha20poly1305_ietf_encrypt( + ciphertext, &ciphertext_len, + plaintext, len, + nullptr, 0, + nullptr, + nonce_out, + m_tx_key) != 0) + { + return false; + } + + return true; +} + +bool SecureCipher::DecryptToken(const uint8_t* ciphertext, size_t len, + const uint8_t* nonce, uint8_t* plaintext) +{ + if (!m_initialized) + { + return false; + } + + unsigned long long plaintext_len = 0; + + if (crypto_aead_xchacha20poly1305_ietf_decrypt( + plaintext, &plaintext_len, + nullptr, + ciphertext, len, + nullptr, 0, + nonce, + m_rx_key) != 0) + { + return false; + } + + return true; +} + +void SecureCipher::SetSessionToken(const uint8_t* token) +{ + memcpy(m_session_token, token, SESSION_TOKEN_SIZE); +} diff --git a/src/EterBase/SecureCipher.h b/src/EterBase/SecureCipher.h new file mode 100644 index 0000000..23af01a --- /dev/null +++ b/src/EterBase/SecureCipher.h @@ -0,0 +1,102 @@ +#pragma once + +#include +#include +#include + +class SecureCipher { +public: + // libsodium constants + static constexpr size_t PK_SIZE = crypto_kx_PUBLICKEYBYTES; // 32 + static constexpr size_t SK_SIZE = crypto_kx_SECRETKEYBYTES; // 32 + static constexpr size_t KEY_SIZE = crypto_kx_SESSIONKEYBYTES; // 32 + static constexpr size_t NONCE_SIZE = crypto_aead_xchacha20poly1305_ietf_NPUBBYTES; // 24 + static constexpr size_t TAG_SIZE = crypto_aead_xchacha20poly1305_ietf_ABYTES; // 16 + static constexpr size_t CHALLENGE_SIZE = 32; + static constexpr size_t SESSION_TOKEN_SIZE = 32; + static constexpr size_t HMAC_SIZE = crypto_auth_BYTES; // 32 + + SecureCipher(); + ~SecureCipher(); + + // Initialization - generates keypair + bool Initialize(); + void CleanUp(); + + // Key exchange + void GetPublicKey(uint8_t* out_pk) const; + + // Client computes session keys from server's public key + bool ComputeClientKeys(const uint8_t* server_pk); + + // Server computes session keys from client's public key + bool ComputeServerKeys(const uint8_t* client_pk); + + // Challenge-response for authentication + void GenerateChallenge(uint8_t* out_challenge); + void ComputeChallengeResponse(const uint8_t* challenge, uint8_t* out_response); + bool VerifyChallengeResponse(const uint8_t* challenge, const uint8_t* response); + + // AEAD encryption - output is len + TAG_SIZE bytes + // Returns actual ciphertext length (plaintext_len + TAG_SIZE) + size_t Encrypt(const void* plaintext, size_t plaintext_len, void* ciphertext); + + // AEAD decryption - input must be ciphertext_len bytes (includes TAG_SIZE) + // Returns actual plaintext length, or 0 on failure + size_t Decrypt(const void* ciphertext, size_t ciphertext_len, void* plaintext); + + // In-place stream encryption for network buffers (XChaCha20, no tag overhead) + // Same length in/out. Nonce counter prevents replay. + void EncryptInPlace(void* buffer, size_t len); + void DecryptInPlace(void* buffer, size_t len); + + // Encrypt a single token with explicit nonce (for KeyComplete packet) + bool EncryptToken(const uint8_t* plaintext, size_t len, + uint8_t* ciphertext, uint8_t* nonce_out); + bool DecryptToken(const uint8_t* ciphertext, size_t len, + const uint8_t* nonce, uint8_t* plaintext); + + // State + bool IsActivated() const { return m_activated; } + void SetActivated(bool value) { m_activated = value; } + bool IsInitialized() const { return m_initialized; } + + // Session token management + void SetSessionToken(const uint8_t* token); + const uint8_t* GetSessionToken() const { return m_session_token; } + + // Get current nonce counters (for debugging/logging) + uint64_t GetTxNonce() const { return m_tx_nonce; } + uint64_t GetRxNonce() const { return m_rx_nonce; } + + // Access keys directly (for special decrypt operations like session token) + const uint8_t* GetRxKey() const { return m_rx_key; } + const uint8_t* GetTxKey() const { return m_tx_key; } + + // Alias for convenience + void ComputeResponse(const uint8_t* challenge, uint8_t* out_response) { + ComputeChallengeResponse(challenge, out_response); + } + +private: + bool m_initialized = false; + bool m_activated = false; + + // X25519 keypair + uint8_t m_pk[PK_SIZE]; + uint8_t m_sk[SK_SIZE]; + + // Session keys derived from key exchange + uint8_t m_tx_key[KEY_SIZE]; // Key for encrypting outgoing packets + uint8_t m_rx_key[KEY_SIZE]; // Key for decrypting incoming packets + + // Nonce counters - prevent replay attacks + uint64_t m_tx_nonce = 0; + uint64_t m_rx_nonce = 0; + + // Server-generated session token + uint8_t m_session_token[SESSION_TOKEN_SIZE]; + + // Build 24-byte nonce from counter + void BuildNonce(uint8_t* nonce, uint64_t counter, bool is_tx); +}; diff --git a/src/EterBase/cipher.cpp b/src/EterBase/cipher.cpp deleted file mode 100644 index 0701783..0000000 --- a/src/EterBase/cipher.cpp +++ /dev/null @@ -1,414 +0,0 @@ -#include "stdafx.h" - -#include "cipher.h" - -#ifdef _IMPROVED_PACKET_ENCRYPTION_ - -//#pragma warning(push) -//#pragma warning(disable: 4100 4127 4189 4231 4512 4706) - -#include -#include -#include - -// Diffie-Hellman key agreement -#include -#include - -// AES winner and candidates -#include -#include -#include -#include -#include -#include -// Other block ciphers -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "Debug.h" - - -using namespace CryptoPP; - -// Block cipher algorithm selector abstract base class. -struct BlockCipherAlgorithm { - enum { - kDefault, // to give more chances to default algorithm - // AES winner and candidates -// kAES, // Rijndael - kRC6, - kMARS, - kTwofish, - kSerpent, - kCAST256, - // Other block ciphers - kIDEA, - k3DES, // DES-EDE2 - kCamellia, - kSEED, - kRC5, - kBlowfish, - kTEA, - //kSKIPJACK, - kSHACAL2, - // End sentinel - kMaxAlgorithms - }; - - BlockCipherAlgorithm() {} - virtual ~BlockCipherAlgorithm() {} - - static BlockCipherAlgorithm* Pick(int hint); - - virtual int GetBlockSize() const = 0; - virtual int GetDefaultKeyLength() const = 0; - virtual int GetIVLength() const = 0; - - virtual SymmetricCipher* CreateEncoder(const CryptoPP::byte* key, size_t keylen, - const CryptoPP::byte* iv) const = 0; - virtual SymmetricCipher* CreateDecoder(const CryptoPP::byte* key, size_t keylen, - const CryptoPP::byte* iv) const = 0; -}; - -// Block cipher (with CTR mode) algorithm selector template class. -template -struct BlockCipherDetail : public BlockCipherAlgorithm { - BlockCipherDetail() {} - virtual ~BlockCipherDetail() {} - - virtual int GetBlockSize() const { return T::BLOCKSIZE; } - virtual int GetDefaultKeyLength() const { return T::DEFAULT_KEYLENGTH; } - virtual int GetIVLength() const { return T::IV_LENGTH; } - - virtual SymmetricCipher* CreateEncoder(const CryptoPP::byte* key, size_t keylen, - const CryptoPP::byte* iv) const - { - return new typename CTR_Mode::Encryption(key, keylen, iv); - } - virtual SymmetricCipher* CreateDecoder(const CryptoPP::byte* key, size_t keylen, - const CryptoPP::byte* iv) const - { - return new typename CTR_Mode::Decryption(key, keylen, iv); - } -}; - -// Key agreement scheme abstract class. -class KeyAgreement { -public: - KeyAgreement() {} - virtual ~KeyAgreement() {} - - virtual size_t Prepare(void* buffer, size_t* length) = 0; - virtual bool Agree(size_t agreed_length, const void* buffer, size_t length) = 0; - - const SecByteBlock& shared() const { return shared_; } - -protected: - SecByteBlock shared_; -}; - -// Crypto++ Unified Diffie-Hellman key agreement scheme implementation. -class DH2KeyAgreement : public KeyAgreement { -public: - DH2KeyAgreement(); - virtual ~DH2KeyAgreement(); - - virtual size_t Prepare(void* buffer, size_t* length); - virtual bool Agree(size_t agreed_length, const void* buffer, size_t length); - -private: - DH dh_; - DH2 dh2_; - SecByteBlock spriv_key_; - SecByteBlock epriv_key_; -}; - -Cipher::Cipher() -: activated_(false), encoder_(NULL), decoder_(NULL), key_agreement_(NULL) { -} - -Cipher::~Cipher() { - if (activated_) { - CleanUp(); - } -} - -void Cipher::CleanUp() { - if (encoder_ != NULL) { - delete encoder_; - encoder_ = NULL; - } - if (decoder_ != NULL) { - delete decoder_; - decoder_ = NULL; - } - if (key_agreement_ != NULL) { - delete key_agreement_; - key_agreement_ = NULL; - } - activated_ = false; -} - -size_t Cipher::Prepare(void* buffer, size_t* length) { - - assert(key_agreement_ == NULL); - key_agreement_ = new DH2KeyAgreement(); - assert(key_agreement_ != NULL); - size_t agreed_length = key_agreement_->Prepare(buffer, length); - if (agreed_length == 0) { - delete key_agreement_; - key_agreement_ = NULL; - } - - return agreed_length; -} - -bool Cipher::Activate(bool polarity, size_t agreed_length, - const void* buffer, size_t length) { - - assert(activated_ == false); - assert(key_agreement_ != NULL); - bool result = false; - if (key_agreement_->Agree(agreed_length, buffer, length)) { - result = SetUp(polarity); - } - delete key_agreement_; - key_agreement_ = NULL; - - return result; -} - -bool Cipher::SetUp(bool polarity) { - assert(key_agreement_ != NULL); - const SecByteBlock& shared = key_agreement_->shared(); - - // Pick a block cipher algorithm - - if (shared.size() < 2) { - return false; - } - - int hint_0 = shared.BytePtr()[*(shared.BytePtr()) % shared.size()]; - int hint_1 = shared.BytePtr()[*(shared.BytePtr() + 1) % shared.size()]; - BlockCipherAlgorithm* detail_0 = BlockCipherAlgorithm::Pick(hint_0); - BlockCipherAlgorithm* detail_1 = BlockCipherAlgorithm::Pick(hint_1); - assert(detail_0 != NULL); - assert(detail_1 != NULL); - std::unique_ptr algorithm_0(detail_0); - std::unique_ptr algorithm_1(detail_1); - - const size_t key_length_0 = algorithm_0->GetDefaultKeyLength(); - const size_t iv_length_0 = algorithm_0->GetBlockSize(); - - if (shared.size() < key_length_0 || shared.size() < iv_length_0) { - return false; - } - - const size_t key_length_1 = algorithm_1->GetDefaultKeyLength(); - const size_t iv_length_1 = algorithm_1->GetBlockSize(); - - if (shared.size() < key_length_1 || shared.size() < iv_length_1) { - return false; - } - - // Pick encryption keys and initial vectors - - SecByteBlock key_0(key_length_0), iv_0(iv_length_0); - SecByteBlock key_1(key_length_1), iv_1(iv_length_1); - - size_t offset; - - key_0.Assign(shared, key_length_0); - offset = key_length_0; - offset = std::min(key_length_0, shared.size() - key_length_1); - key_1.Assign(shared.BytePtr() + offset, key_length_1); - - offset = shared.size() - iv_length_0; - iv_0.Assign(shared.BytePtr() + offset, iv_length_0); - offset = (offset < iv_length_1 ? 0 : offset - iv_length_1); - iv_1.Assign(shared.BytePtr() + offset, iv_length_1); - - // Create encryption/decryption objects - - if (polarity) { - encoder_ = algorithm_1->CreateEncoder(key_1, key_1.size(), iv_1); - decoder_ = algorithm_0->CreateDecoder(key_0, key_0.size(), iv_0); - } else { - encoder_ = algorithm_0->CreateEncoder(key_0, key_0.size(), iv_0); - decoder_ = algorithm_1->CreateDecoder(key_1, key_1.size(), iv_1); - } - - assert(encoder_ != NULL); - assert(decoder_ != NULL); - - return true; -} - -BlockCipherAlgorithm* BlockCipherAlgorithm::Pick(int hint) { - BlockCipherAlgorithm* detail; - int selector = hint % kMaxAlgorithms; - switch (selector) { - //case kAES: - // detail = new BlockCipherDetail(); - break; - case kRC6: - detail = new BlockCipherDetail(); - break; - case kMARS: - detail = new BlockCipherDetail(); - break; - case kTwofish: - detail = new BlockCipherDetail(); - break; - case kSerpent: - detail = new BlockCipherDetail(); - break; - case kCAST256: - detail = new BlockCipherDetail(); - break; - case kIDEA: - detail = new BlockCipherDetail(); - break; - case k3DES: - detail = new BlockCipherDetail(); - break; - case kCamellia: - detail = new BlockCipherDetail(); - break; - case kSEED: - detail = new BlockCipherDetail(); - break; - case kRC5: - detail = new BlockCipherDetail(); - break; - case kBlowfish: - detail = new BlockCipherDetail(); - break; - case kTEA: - detail = new BlockCipherDetail(); - break; -// case kSKIPJACK: -// detail = new BlockCipherDetail(); -// break; - case kSHACAL2: - detail = new BlockCipherDetail(); - break; - case kDefault: - default: - detail = new BlockCipherDetail(); // default algorithm - break; - } - - return detail; -} - -DH2KeyAgreement::DH2KeyAgreement() : dh_(), dh2_(dh_) { -} - -DH2KeyAgreement::~DH2KeyAgreement() { -} - -size_t DH2KeyAgreement::Prepare(void* buffer, size_t* length) { - // RFC 5114, 1024-bit MODP Group with 160-bit Prime Order Subgroup - // http://tools.ietf.org/html/rfc5114#section-2.1 - Integer p("0xB10B8F96A080E01DDE92DE5EAE5D54EC52C99FBCFB06A3C6" - "9A6A9DCA52D23B616073E28675A23D189838EF1E2EE652C0" - "13ECB4AEA906112324975C3CD49B83BFACCBDD7D90C4BD70" - "98488E9C219A73724EFFD6FAE5644738FAA31A4FF55BCCC0" - "A151AF5F0DC8B4BD45BF37DF365C1A65E68CFDA76D4DA708" - "DF1FB2BC2E4A4371"); - - Integer g("0xA4D1CBD5C3FD34126765A442EFB99905F8104DD258AC507F" - "D6406CFF14266D31266FEA1E5C41564B777E690F5504F213" - "160217B4B01B886A5E91547F9E2749F4D7FBD7D3B9A92EE1" - "909D0D2263F80A76A6A24C087A091F531DBF0A0169B6A28A" - "D662A4D18E73AFA32D779D5918D08BC8858F4DCEF97C2A24" - "855E6EEB22B3B2E5"); - - Integer q("0xF518AA8781A8DF278ABA4E7D64B7CB9D49462353"); - - // Schnorr Group primes are of the form p = rq + 1, p and q prime. They - // provide a subgroup order. In the case of 1024-bit MODP Group, the - // security level is 80 bits (based on the 160-bit prime order subgroup). - - // For a compare/contrast of using the maximum security level, see - // dh-unified.zip. Also see http://www.cryptopp.com/wiki/Diffie-Hellman - // and http://www.cryptopp.com/wiki/Security_level . - - AutoSeededRandomPool rnd; - - dh_.AccessGroupParameters().Initialize(p, q, g); - - if(!dh_.GetGroupParameters().ValidateGroup(rnd, 3)) { - // Failed to validate prime and generator - return 0; - } - - size_t count = 0; - - p = dh_.GetGroupParameters().GetModulus(); - q = dh_.GetGroupParameters().GetSubgroupOrder(); - g = dh_.GetGroupParameters().GetGenerator(); - - // http://groups.google.com/group/sci.crypt/browse_thread/thread/7dc7eeb04a09f0ce - Integer v = ModularExponentiation(g, q, p); - - if(v != Integer::One()) { - // Failed to verify order of the subgroup - return 0; - } - - ////////////////////////////////////////////////////////////// - - spriv_key_.New(dh2_.StaticPrivateKeyLength()); - epriv_key_.New(dh2_.EphemeralPrivateKeyLength()); - SecByteBlock spub_key(dh2_.StaticPublicKeyLength()); - SecByteBlock epub_key(dh2_.EphemeralPublicKeyLength()); - - dh2_.GenerateStaticKeyPair(rnd, spriv_key_, spub_key); - dh2_.GenerateEphemeralKeyPair(rnd, epriv_key_, epub_key); - - // Prepare key agreement data - const size_t spub_key_length = spub_key.size(); - const size_t epub_key_length = epub_key.size(); - const size_t data_length = spub_key_length + epub_key_length; - - if (*length < data_length) { - // Not enough data buffer length b-l-a-c-k - return 0; - } - - *length = data_length; - CryptoPP::byte* buf = (CryptoPP::byte*)buffer; - memcpy(buf, spub_key.BytePtr(), spub_key_length); - memcpy(buf + spub_key_length, epub_key.BytePtr(), epub_key_length); - - return dh2_.AgreedValueLength(); -} - -bool DH2KeyAgreement::Agree(size_t agreed_length, const void* buffer, size_t length) { - if (agreed_length != dh2_.AgreedValueLength()) { - // Shared secret size mismatch - return false; - } - const size_t spub_key_length = dh2_.StaticPublicKeyLength(); - if (const size_t epub_key_length = dh2_.EphemeralPublicKeyLength(); length != (spub_key_length + epub_key_length)) { - // Wrong data length - return false; - } - shared_.New(dh2_.AgreedValueLength()); - if (const CryptoPP::byte* buf = (const CryptoPP::byte*)buffer; !dh2_.Agree(shared_, spriv_key_, epriv_key_, buf, buf + spub_key_length)) { - // Failed to reach shared secret - return false; - } - return true; -} - -#endif diff --git a/src/EterBase/cipher.h b/src/EterBase/cipher.h deleted file mode 100644 index a28a176..0000000 --- a/src/EterBase/cipher.h +++ /dev/null @@ -1,61 +0,0 @@ -#ifndef __CIPHER_H__ -#define __CIPHER_H__ - -#ifdef _IMPROVED_PACKET_ENCRYPTION_ - -#pragma warning(push) -#pragma warning(disable: 4100 4127 4189 4231 4512 4706) -#include -#pragma warning(pop) -// Forward declaration -class KeyAgreement; - -// Communication channel encryption handler. -class Cipher { - public: - explicit Cipher(); - ~Cipher(); - - void CleanUp(); - - // Returns agreed value length in CryptoPP::bytes, or zero on failure. - size_t Prepare(void* buffer, size_t* length); - // Try to activate cipher algorithm with agreement data received from peer. - bool Activate(bool polarity, size_t agreed_length, - const void* buffer, size_t length); - - // Encrypts the given block of data. (no padding required) - void Encrypt(void* buffer, size_t length) { - assert(activated_); - if (!activated_) { - return; - } - encoder_->ProcessData((CryptoPP::byte*)buffer, (const CryptoPP::byte*)buffer, length); - } - // Decrypts the given block of data. (no padding required) - void Decrypt(void* buffer, size_t length) { - assert(activated_); - if (!activated_) { - return; - } - decoder_->ProcessData((CryptoPP::byte*)buffer, (const CryptoPP::byte*)buffer, length); - } - - bool activated() const { return activated_; } - - void set_activated(bool value) { activated_ = value; } - - private: - bool SetUp(bool polarity); - - bool activated_; - - CryptoPP::SymmetricCipher* encoder_; - CryptoPP::SymmetricCipher* decoder_; - - KeyAgreement* key_agreement_; -}; - -#endif // _IMPROVED_PACKET_ENCRYPTION_ - -#endif // __CIPHER_H__ diff --git a/src/EterBase/tea.cpp b/src/EterBase/tea.cpp index 6c48c0b..d411d65 100644 --- a/src/EterBase/tea.cpp +++ b/src/EterBase/tea.cpp @@ -1,101 +1,87 @@ /* -* Filename: tea.c -* Description: TEA 암호화 모듈 -* -* Author: 김한주 (aka. 비엽, Cronan), 송ì˜ì§„ (aka. myevan, ë¹—ìžë£¨) -*/ -#include "StdAfx.h" + * Symmetric encryption module using libsodium (XChaCha20) + * API-compatible replacement for legacy TEA encryption + * + * Key expansion: 16-byte input key is hashed to 32 bytes using BLAKE2b + * Nonce: Derived deterministically from the key to ensure encrypt/decrypt consistency + */ #include "tea.h" -#include +#include +#include -/* -* TEA Encryption Module Instruction -* Edited by 김한주 aka. 비엽, Cronan -* -* void tea_code(const unsigned long sz, const unsigned long sy, const unsigned long *key, unsigned long *dest) -* void tea_decode(const unsigned long sz, const unsigned long sy, const unsigned long *key, unsigned long *dest) -* 8ë°”ì´íŠ¸ë¥¼ 암호/복호화 할때 사용ëœë‹¤. key 는 16 ë°”ì´íŠ¸ì—¬ì•¼ 한다. -* sz, sy 는 8ë°”ì´íŠ¸ì˜ ì—­ìˆœìœ¼ë¡œ 대입한다. -* -* int tea_decrypt(unsigned long *dest, const unsigned long *src, const unsigned long *key, int size); -* int tea_encrypt(unsigned long *dest, const unsigned long *src, const unsigned long *key, int size); -* í•œêº¼ë²ˆì— 8 ë°”ì´íЏ ì´ìƒì„ 암호/복호화 할때 사용한다. 만약 size ê°€ -* 8ì˜ ë°°ìˆ˜ê°€ 아니면 8ì˜ ë°°ìˆ˜ë¡œ í¬ê¸°ë¥¼ "늘려서" 암호화 한다. -* -* ex. tea_code(pdwSrc[1], pdwSrc[0], pdwKey, pdwDest); -* tea_decrypt(pdwDest, pdwSrc, pdwKey, nSize); -*/ +// Fixed context string for key derivation +static const char* KEY_CONTEXT = "M2DevPackEncrypt"; -#define TEA_ROUND 32 // 32 를 권장하며, ë†’ì„ ìˆ˜ë¡ ê²°ê³¼ê°€ 난해해 진다. -#define DELTA 0x9E3779B9 // DELTA ê°’ 바꾸지 ë§ê²ƒ. - -void tea_code(const unsigned long sz, const unsigned long sy, const unsigned long *key, unsigned long *dest) +// Derive a 32-byte key and 24-byte nonce from the 16-byte input key +static void DeriveKeyAndNonce(const unsigned long* key, uint8_t* derived_key, uint8_t* nonce) { - unsigned long y = sy, z = sz, sum = 0; - unsigned long n = TEA_ROUND; - - while (n-- > 0) - { - y += ((z << 4 ^ z >> 5) + z) ^ (sum + key[sum & 3]); - sum += DELTA; - z += ((y << 4 ^ y >> 5) + y) ^ (sum + key[sum >> 11 & 3]); - } - - *(dest++) = y; - *dest = z; + // Use BLAKE2b to derive a 32-byte key + crypto_generichash(derived_key, crypto_stream_xchacha20_KEYBYTES, + (const uint8_t*)key, TEA_KEY_LENGTH, + (const uint8_t*)KEY_CONTEXT, strlen(KEY_CONTEXT)); + + // Derive nonce from key (using different context) + uint8_t nonce_seed[crypto_stream_xchacha20_NONCEBYTES + 8]; + crypto_generichash(nonce_seed, sizeof(nonce_seed), + (const uint8_t*)key, TEA_KEY_LENGTH, + (const uint8_t*)"M2DevNonce", 10); + memcpy(nonce, nonce_seed, crypto_stream_xchacha20_NONCEBYTES); } -void tea_decode(const unsigned long sz, const unsigned long sy, const unsigned long *key, unsigned long *dest) +int tea_encrypt(unsigned long *dest, const unsigned long *src, const unsigned long *key, int size) { -#pragma warning(disable:4307) - unsigned long y = sy, z = sz, sum = DELTA * TEA_ROUND; -#pragma warning(default:4307) + int resize; - unsigned long n = TEA_ROUND; - - while (n-- > 0) - { - z -= ((y << 4 ^ y >> 5) + y) ^ (sum + key[sum >> 11 & 3]); - sum -= DELTA; - y -= ((z << 4 ^ z >> 5) + z) ^ (sum + key[sum & 3]); - } - - *(dest++) = y; - *dest = z; -} - -int tea_encrypt(unsigned long *dest, const unsigned long *src, const unsigned long * key, int size) -{ - int i; - int resize; - + // Align to 8 bytes for compatibility with legacy format if (size % 8 != 0) { resize = size + 8 - (size % 8); - memset((char *) src + size, 0, resize - size); + // Zero-pad the source (caller must ensure buffer is large enough) + memset((char*)src + size, 0, resize - size); } else + { resize = size; - - for (i = 0; i < resize >> 3; i++, dest += 2, src += 2) - tea_code(*(src + 1), *src, key, dest); - - return (resize); + } + + // Derive 32-byte key and nonce from 16-byte input + uint8_t derived_key[crypto_stream_xchacha20_KEYBYTES]; + uint8_t nonce[crypto_stream_xchacha20_NONCEBYTES]; + DeriveKeyAndNonce(key, derived_key, nonce); + + // XOR encrypt using XChaCha20 stream + crypto_stream_xchacha20_xor((uint8_t*)dest, (const uint8_t*)src, resize, nonce, derived_key); + + // Securely clear derived key + sodium_memzero(derived_key, sizeof(derived_key)); + + return resize; } -int tea_decrypt(unsigned long *dest, const unsigned long *src, const unsigned long * key, int size) +int tea_decrypt(unsigned long *dest, const unsigned long *src, const unsigned long *key, int size) { - int i; - int resize; - - if (size % 8 != 0) - resize = size + 8 - (size % 8); - else - resize = size; - - for (i = 0; i < resize >> 3; i++, dest += 2, src += 2) - tea_decode(*(src + 1), *src, key, dest); - - return (resize); -} + int resize; + // Align to 8 bytes for compatibility with legacy format + if (size % 8 != 0) + { + resize = size + 8 - (size % 8); + } + else + { + resize = size; + } + + // Derive 32-byte key and nonce from 16-byte input + uint8_t derived_key[crypto_stream_xchacha20_KEYBYTES]; + uint8_t nonce[crypto_stream_xchacha20_NONCEBYTES]; + DeriveKeyAndNonce(key, derived_key, nonce); + + // XOR decrypt using XChaCha20 stream (same as encrypt for stream cipher) + crypto_stream_xchacha20_xor((uint8_t*)dest, (const uint8_t*)src, resize, nonce, derived_key); + + // Securely clear derived key + sodium_memzero(derived_key, sizeof(derived_key)); + + return resize; +} diff --git a/src/EterBase/tea.h b/src/EterBase/tea.h index c93f503..e437432 100644 --- a/src/EterBase/tea.h +++ b/src/EterBase/tea.h @@ -1,18 +1,16 @@ +#pragma once + #ifdef __cplusplus extern "C" { #endif - /* TEA is a 64-bit symmetric block cipher with a 128-bit key, developed - by David J. Wheeler and Roger M. Needham, and described in their - paper at . +// Symmetric encryption API using libsodium (XChaCha20) +// Key is 16 bytes (128-bit), internally expanded to 32 bytes - This implementation is based on their code in - */ +#define TEA_KEY_LENGTH 16 - #define TEA_KEY_LENGTH 16 - - int tea_encrypt(unsigned long *dest, const unsigned long *src, const unsigned long *key, int size); - int tea_decrypt(unsigned long *dest, const unsigned long *src, const unsigned long *key, int size); +int tea_encrypt(unsigned long *dest, const unsigned long *src, const unsigned long *key, int size); +int tea_decrypt(unsigned long *dest, const unsigned long *src, const unsigned long *key, int size); #ifdef __cplusplus }; diff --git a/src/EterGrnLib/CMakeLists.txt b/src/EterGrnLib/CMakeLists.txt index 0dd3c7b..4840d1c 100644 --- a/src/EterGrnLib/CMakeLists.txt +++ b/src/EterGrnLib/CMakeLists.txt @@ -2,8 +2,7 @@ add_library(EterGrnLib STATIC ${FILE_SOURCES}) -target_link_libraries(EterGrnLib - cryptopp-static +target_link_libraries(EterGrnLib mio ) diff --git a/src/EterImageLib/CMakeLists.txt b/src/EterImageLib/CMakeLists.txt index 791fa9b..eecd886 100644 --- a/src/EterImageLib/CMakeLists.txt +++ b/src/EterImageLib/CMakeLists.txt @@ -2,8 +2,7 @@ add_library(EterImageLib STATIC ${FILE_SOURCES}) -target_link_libraries(EterImageLib - cryptopp-static +target_link_libraries(EterImageLib mio ) diff --git a/src/EterLib/CMakeLists.txt b/src/EterLib/CMakeLists.txt index cac00b3..ab4b7d9 100644 --- a/src/EterLib/CMakeLists.txt +++ b/src/EterLib/CMakeLists.txt @@ -2,8 +2,8 @@ add_library(EterLib STATIC ${FILE_SOURCES}) -target_link_libraries(EterLib - cryptopp-static +target_link_libraries(EterLib + sodium mio ) diff --git a/src/EterLib/NetStream.cpp b/src/EterLib/NetStream.cpp index 27cdf84..09be7f2 100644 --- a/src/EterLib/NetStream.cpp +++ b/src/EterLib/NetStream.cpp @@ -1,58 +1,28 @@ #include "StdAfx.h" #include "NetStream.h" -//#include "eterCrypt.h" #include #include -#ifndef _IMPROVED_PACKET_ENCRYPTION_ -#include "EterBase/tea.h" -#endif - #ifdef _DEBUG #define _PACKETDUMP #endif -#ifndef _IMPROVED_PACKET_ENCRYPTION_ -void CNetworkStream::SetSecurityMode(bool isSecurityMode, const char* c_szTeaKey) -{ - m_isSecurityMode = isSecurityMode; - memcpy(m_szEncryptKey, c_szTeaKey, TEA_KEY_LENGTH); - memcpy(m_szDecryptKey, c_szTeaKey, TEA_KEY_LENGTH); -} - -void CNetworkStream::SetSecurityMode(bool isSecurityMode, const char* c_szTeaEncryptKey, const char* c_szTeaDecryptKey) -{ - m_isSecurityMode = isSecurityMode; - memcpy(m_szEncryptKey, c_szTeaEncryptKey, TEA_KEY_LENGTH); - memcpy(m_szDecryptKey, c_szTeaDecryptKey, TEA_KEY_LENGTH); -} -#endif // _IMPROVED_PACKET_ENCRYPTION_ - bool CNetworkStream::IsSecurityMode() { -#ifdef _IMPROVED_PACKET_ENCRYPTION_ - return m_cipher.activated(); -#else - return m_isSecurityMode; -#endif + return m_secureCipher.IsActivated(); } void CNetworkStream::SetRecvBufferSize(int recvBufSize) { if (m_recvBuf) { - if (m_recvBufSize>recvBufSize) + if (m_recvBufSize > recvBufSize) return; delete [] m_recvBuf; - - if (m_recvTEABuf) - delete [] m_recvTEABuf; } m_recvBufSize = recvBufSize; - m_recvBuf = new char[m_recvBufSize]; - m_recvTEABufSize = ((m_recvBufSize>>3)+1)<<3; - m_recvTEABuf = new char[m_recvTEABufSize]; + m_recvBuf = new char[m_recvBufSize]; } void CNetworkStream::SetSendBufferSize(int sendBufSize) @@ -63,142 +33,50 @@ void CNetworkStream::SetSendBufferSize(int sendBufSize) return; delete [] m_sendBuf; - - if (m_sendTEABuf) - delete [] m_sendTEABuf; } m_sendBufSize = sendBufSize; m_sendBuf = new char[m_sendBufSize]; - m_sendTEABufSize = ((m_sendBufSize>>3)+1)<<3; - m_sendTEABuf = new char[m_sendTEABufSize]; } bool CNetworkStream::__RecvInternalBuffer() { - if (m_recvBufOutputPos>0) + if (m_recvBufOutputPos > 0) { int recvBufDataSize = m_recvBufInputPos - m_recvBufOutputPos; - if (recvBufDataSize>0) + if (recvBufDataSize > 0) { memmove(m_recvBuf, m_recvBuf + m_recvBufOutputPos, recvBufDataSize); } - + m_recvBufInputPos -= m_recvBufOutputPos; m_recvBufOutputPos = 0; } -#ifdef _IMPROVED_PACKET_ENCRYPTION_ int restSize = m_recvBufSize - m_recvBufInputPos; - if (restSize>0) - { - int recvSize = recv(m_sock, m_recvBuf + m_recvBufInputPos, m_recvBufSize - m_recvBufInputPos, 0); - //Tracenf("RECV %d %d(%d, %d)", recvSize, restSize, m_recvTEABufSize - m_recvTEABufInputPos, m_recvBufSize - m_recvBufInputPos); + if (restSize > 0) + { + int recvSize = recv(m_sock, m_recvBuf + m_recvBufInputPos, restSize, 0); if (recvSize < 0) { int error = WSAGetLastError(); - if (error != WSAEWOULDBLOCK) - { return false; - } } else if (recvSize == 0) { return false; } - - if (IsSecurityMode()) { - m_cipher.Decrypt(m_recvBuf + m_recvBufInputPos, recvSize); - } - - m_recvBufInputPos += recvSize; - } -#else - if (IsSecurityMode()) - { - int restSize = std::min(m_recvTEABufSize - m_recvTEABufInputPos, m_recvBufSize - m_recvBufInputPos); - - if (restSize > 0) + else { - int recvSize = recv(m_sock, m_recvTEABuf + m_recvTEABufInputPos, restSize, 0); - //Tracenf("RECV %d %d(%d, %d)", recvSize, restSize, m_recvTEABufSize - m_recvTEABufInputPos, m_recvBufSize - m_recvBufInputPos); - - if (recvSize < 0) + if (m_secureCipher.IsActivated()) { - int error = WSAGetLastError(); - - if (error != WSAEWOULDBLOCK) - { - return false; - } + m_secureCipher.DecryptInPlace(m_recvBuf + m_recvBufInputPos, recvSize); } - else if (recvSize == 0) - { - return false; - } - - m_recvTEABufInputPos += recvSize; - - int decodeSize = m_recvTEABufInputPos; - - if (decodeSize >= 8) - { - decodeSize >>= 3; - decodeSize <<= 3; - - /*int decodeDstSize = tea_decrypt((DWORD *) (m_recvBuf + m_recvBufInputPos), - (DWORD *) m_recvTEABuf, - (const DWORD *) m_szDecryptKey, - decodeSize); - */ - int decodeDstSize = tea_decrypt((DWORD *) (m_recvBuf + m_recvBufInputPos), - (DWORD *) m_recvTEABuf, - (const DWORD *) m_szDecryptKey, - decodeSize); - - m_recvBufInputPos += decodeDstSize; - - if (m_recvTEABufInputPos>decodeSize) - memmove(m_recvTEABuf, m_recvTEABuf+decodeSize, m_recvTEABufInputPos-decodeSize); - - m_recvTEABufInputPos -= decodeSize; - - - //Tracenf("!!!!!! decrypt decodeSrcSize %d -> decodeDstSize %d (recvOutputPos %d, recvInputPos %d, teaInputPos %d)", - // decodeSize, decodeDstSize, m_recvBufOutputPos, m_recvBufInputPos, m_recvTEABufInputPos); - } - } - } - else - { - int restSize = m_recvBufSize - m_recvBufInputPos; - if (restSize>0) - { - int recvSize = recv(m_sock, m_recvBuf + m_recvBufInputPos, m_recvBufSize - m_recvBufInputPos, 0); - //Tracenf("RECV %d %d(%d, %d)", recvSize, restSize, m_recvTEABufSize - m_recvTEABufInputPos, m_recvBufSize - m_recvBufInputPos); - - if (recvSize < 0) - { - int error = WSAGetLastError(); - - if (error != WSAEWOULDBLOCK) - { - return false; - } - } - else if (recvSize == 0) - { - return false; - } - m_recvBufInputPos += recvSize; } } -#endif // _IMPROVED_PACKET_ENCRYPTION_ - - //Tracef("recvSize: %d input pos %d output pos %d\n", recvSize, m_recvBufInputPos, m_recvBufOutputPos); return true; } @@ -206,82 +84,34 @@ bool CNetworkStream::__RecvInternalBuffer() bool CNetworkStream::__SendInternalBuffer() { -#ifdef _IMPROVED_PACKET_ENCRYPTION_ - int dataSize=__GetSendBufferSize(); - if (dataSize<=0) + int dataSize = __GetSendBufferSize(); + if (dataSize <= 0) return true; - if (IsSecurityMode()) { - m_cipher.Encrypt(m_sendBuf + m_sendBufOutputPos, dataSize); - } - - int sendSize = send(m_sock, m_sendBuf+m_sendBufOutputPos, dataSize, 0); + int sendSize = send(m_sock, m_sendBuf + m_sendBufOutputPos, dataSize, 0); if (sendSize < 0) return false; - m_sendBufOutputPos+=sendSize; - + m_sendBufOutputPos += sendSize; __PopSendBuffer(); -#else - if (IsSecurityMode()) - { - int encodeSize=__GetSendBufferSize(); - if (encodeSize<=0) - return true; - - m_sendTEABufInputPos += tea_encrypt((DWORD *) (m_sendTEABuf + m_sendTEABufInputPos), - (DWORD *) (m_sendBuf + m_sendBufOutputPos), - (const DWORD *) m_szEncryptKey, - encodeSize); - m_sendBufOutputPos += encodeSize; - - if (m_sendTEABufInputPos>0) - { - int sendSize = send(m_sock, m_sendTEABuf, m_sendTEABufInputPos, 0); - if (sendSize < 0) - return false; - - if (m_sendTEABufInputPos>sendSize) - memmove(m_sendTEABuf, m_sendTEABuf+sendSize, m_sendTEABufInputPos-sendSize); - - m_sendTEABufInputPos-=sendSize; - } - - __PopSendBuffer(); - } - else - { - int dataSize=__GetSendBufferSize(); - if (dataSize<=0) - return true; - - int sendSize = send(m_sock, m_sendBuf+m_sendBufOutputPos, dataSize, 0); - if (sendSize < 0) - return false; - - m_sendBufOutputPos+=sendSize; - - __PopSendBuffer(); - } -#endif // _IMPROVED_PACKET_ENCRYPTION_ return true; } void CNetworkStream::__PopSendBuffer() { - if (m_sendBufOutputPos<=0) + if (m_sendBufOutputPos <= 0) return; - + int sendBufDataSize = m_sendBufInputPos - m_sendBufOutputPos; - if (sendBufDataSize>0) + if (sendBufDataSize > 0) { - memmove(m_sendBuf, m_sendBuf+m_sendBufOutputPos, sendBufDataSize); + memmove(m_sendBuf, m_sendBuf + m_sendBufOutputPos, sendBufDataSize); } m_sendBufInputPos = sendBufDataSize; - m_sendBufOutputPos = 0; + m_sendBufOutputPos = 0; } #pragma warning(push) @@ -304,7 +134,7 @@ void CNetworkStream::Process() delay.tv_sec = 0; delay.tv_usec = 0; - + if (select(0, &fdsRecv, &fdsSend, NULL, &delay) == SOCKET_ERROR) return; @@ -362,8 +192,6 @@ void CNetworkStream::Disconnect() if (m_sock == INVALID_SOCKET) return; - //OnDisconnect(); - Clear(); } @@ -372,30 +200,18 @@ void CNetworkStream::Clear() if (m_sock == INVALID_SOCKET) return; -#ifdef _IMPROVED_PACKET_ENCRYPTION_ - m_cipher.CleanUp(); -#endif + m_secureCipher.CleanUp(); closesocket(m_sock); m_sock = INVALID_SOCKET; -#ifndef _IMPROVED_PACKET_ENCRYPTION_ - memset(m_szEncryptKey, 0, sizeof(m_szEncryptKey)); - memset(m_szDecryptKey, 0, sizeof(m_szDecryptKey)); - - m_isSecurityMode = false; -#endif - m_isOnline = false; m_connectLimitTime = 0; - m_recvTEABufInputPos = 0; - m_sendTEABufInputPos = 0; - - m_recvBufInputPos = 0; + m_recvBufInputPos = 0; m_recvBufOutputPos = 0; - - m_sendBufInputPos = 0; + + m_sendBufInputPos = 0; m_sendBufOutputPos = 0; m_SequenceGenerator.seed(SEQUENCE_SEED); @@ -406,10 +222,10 @@ bool CNetworkStream::Connect(const CNetworkAddress& c_rkNetAddr, int limitSec) Clear(); m_addr = c_rkNetAddr; - + m_sock = socket(AF_INET, SOCK_STREAM, 0); - if (m_sock == INVALID_SOCKET) + if (m_sock == INVALID_SOCKET) { Clear(); OnConnectFailure(); @@ -440,7 +256,7 @@ bool CNetworkStream::Connect(const CNetworkAddress& c_rkNetAddr, int limitSec) } m_connectLimitTime = time(NULL) + limitSec; - return true; + return true; } bool CNetworkStream::Connect(DWORD dwAddr, int port, int limitSec) @@ -469,7 +285,7 @@ bool CNetworkStream::Connect(const char* c_szAddr, int port, int /*limitSec*/) void CNetworkStream::ClearRecvBuffer() { - m_recvBufOutputPos = m_recvBufInputPos = 0; + m_recvBufOutputPos = m_recvBufInputPos = 0; } int CNetworkStream::GetRecvBufferSize() @@ -508,7 +324,6 @@ const char * GetSendHeaderName(BYTE header) sprintf(buf,"%d",i); stringList[i] = buf; } - stringList[1] = "HEADER_CG_LOGIN"; stringList[2] = "HEADER_CG_ATTACK"; stringList[3] = "HEADER_CG_CHAT"; stringList[4] = "HEADER_CG_PLAYER_CREATE"; @@ -575,9 +390,7 @@ const char * GetSendHeaderName(BYTE header) stringList[112] = "HEADER_CG_GUILD_SYMBOL_UPLOAD"; stringList[113] = "HEADER_CG_GUILD_SYMBOL_CRC"; stringList[114] = "HEADER_CG_SCRIPT_SELECT_ITEM"; -#ifdef _IMPROVED_PACKET_ENCRYPTION_ - stringList[0xfb] = "HEADER_CG_KEY_AGREEMENT"; -#endif + stringList[0xf9] = "HEADER_CG_KEY_RESPONSE"; stringList[0xfc] = "HEADER_CG_TIME_SYNC"; stringList[0xfd] = "HEADER_CG_CLIENT_VERSION"; stringList[0xfe] = "HEADER_CG_PONG"; @@ -642,9 +455,9 @@ const char * GetRecvHeaderName(BYTE header) stringList[46] = "HEADER_GC_QUEST_CONFIRM"; stringList[61] = "HEADER_GC_MOUNT"; - stringList[62] = "HEADER_GC_OWNERSHIP"; + stringList[62] = "HEADER_GC_OWNERSHIP"; stringList[63] = "HEADER_GC_TARGET"; - stringList[65] = "HEADER_GC_WARP"; + stringList[65] = "HEADER_GC_WARP"; stringList[69] = "HEADER_GC_ADD_FLY_TARGETING"; stringList[70] = "HEADER_GC_CREATE_FLY"; @@ -682,7 +495,7 @@ const char * GetRecvHeaderName(BYTE header) stringList[106] = "HEADER_GC_TIME"; stringList[107] = "HEADER_GC_CHANGE_NAME"; stringList[110] = "HEADER_GC_DUNGEON"; - stringList[111] = "HEADER_GC_WALK_MODE"; + stringList[111] = "HEADER_GC_WALK_MODE"; stringList[112] = "HEADER_GC_CHANGE_SKILL_GROUP"; stringList[113] = "HEADER_GC_MAIN_CHARACTER_NEW"; stringList[114] = "HEADER_GC_USE_POTION"; @@ -709,10 +522,8 @@ const char * GetRecvHeaderName(BYTE header) stringList[135] = "HEADER_GC_DAMAGE_INFO"; stringList[136] = "HEADER_GC_CHAR_ADDITIONAL_INFO"; stringList[150] = "HEADER_GC_AUTH_SUCCESS"; -#ifdef _IMPROVED_PACKET_ENCRYPTION_ - stringList[0xfa] = "HEADER_GC_KEY_AGREEMENT_COMPLETED"; - stringList[0xfb] = "HEADER_GC_KEY_AGREEMENT"; -#endif + stringList[0xf7] = "HEADER_GC_KEY_COMPLETE"; + stringList[0xf8] = "HEADER_GC_KEY_CHALLENGE"; stringList[0xfc] = "HEADER_GC_HANDSHAKE_OK"; stringList[0xfd] = "HEADER_GC_PHASE"; stringList[0xfe] = "HEADER_GC_BINDUDP"; @@ -751,9 +562,9 @@ static std::string dump_hex(const uint8_t* ptr, const std::size_t length) bool CNetworkStream::Recv(int size, char * pDestBuf) { - if (!Peek(size, pDestBuf)) + if (!Peek(size, pDestBuf)) return false; - + #ifdef _PACKETDUMP if (*pDestBuf != 0) { @@ -771,7 +582,7 @@ bool CNetworkStream::Recv(int size, char * pDestBuf) int CNetworkStream::__GetSendBufferSize() { - return m_sendBufInputPos-m_sendBufOutputPos; + return m_sendBufInputPos - m_sendBufOutputPos; } @@ -782,6 +593,12 @@ bool CNetworkStream::Send(int size, const char * pSrcBuf) return false; memcpy(m_sendBuf + m_sendBufInputPos, pSrcBuf, size); + + if (m_secureCipher.IsActivated()) + { + m_secureCipher.EncryptInPlace(m_sendBuf + m_sendBufInputPos, size); + } + m_sendBufInputPos += size; #ifdef _PACKETDUMP @@ -796,23 +613,6 @@ bool CNetworkStream::Send(int size, const char * pSrcBuf) #endif return true; - /* - if (size > 0) - { - if (IsSecurityMode()) - { - m_sendBufInputPos += TEA_Encrypt((DWORD *) (m_sendBuf + m_sendBufInputPos), - (DWORD *) (m_sendBuf + m_sendBufInputPos), - (const DWORD *) gs_szTeaKey, - size); - } - else - { - } - } - - return __SendInternalBuffer(); - */ } bool CNetworkStream::Peek(int len, void* pDestBuf) @@ -885,39 +685,20 @@ void CNetworkStream::OnConnectFailure() Tracen("Failed to connect."); } -//void CNetworkStream::OnCheckinSuccess() -//{ -//} - -//void CNetworkStream::OnCheckinFailure() -//{ -//} - CNetworkStream::CNetworkStream() { m_sock = INVALID_SOCKET; -#ifndef _IMPROVED_PACKET_ENCRYPTION_ - m_isSecurityMode = false; -#endif m_isOnline = false; m_connectLimitTime = 0; - m_recvTEABuf = NULL; - m_recvTEABufSize = 0; - m_recvTEABufInputPos = 0; - - m_recvBuf = NULL; - m_recvBufSize = 0; + m_recvBuf = NULL; + m_recvBufSize = 0; m_recvBufOutputPos = 0; - m_recvBufInputPos = 0; + m_recvBufInputPos = 0; - m_sendTEABuf = NULL; - m_sendTEABuf = 0; - m_sendTEABufInputPos = 0; - - m_sendBuf = NULL; - m_sendBufSize = 0; + m_sendBuf = NULL; + m_sendBufSize = 0; m_sendBufOutputPos = 0; m_sendBufInputPos = 0; @@ -929,57 +710,15 @@ CNetworkStream::~CNetworkStream() { Clear(); - if (m_sendTEABuf) - { - delete [] m_sendTEABuf; - m_sendTEABuf=NULL; - } - - if (m_recvTEABuf) - { - delete [] m_recvTEABuf; - m_recvTEABuf=NULL; - } - if (m_recvBuf) { delete [] m_recvBuf; - m_recvBuf=NULL; + m_recvBuf = NULL; } if (m_sendBuf) { delete [] m_sendBuf; - m_sendBuf=NULL; + m_sendBuf = NULL; } } - -#ifdef _IMPROVED_PACKET_ENCRYPTION_ -size_t CNetworkStream::Prepare(void* buffer, size_t* length) -{ - return m_cipher.Prepare(buffer, length); -} - -bool CNetworkStream::Activate(size_t agreed_length, const void* buffer, size_t length) -{ - return m_cipher.Activate(true, agreed_length, buffer, length); -} - -void CNetworkStream::ActivateCipher() -{ - return m_cipher.set_activated(true); -} - -// If cipher is active and there's unread data in buffer, decrypt it in-place -void CNetworkStream::DecryptAlreadyReceivedData() -{ - if (!IsSecurityMode()) - return; - - const int unreadSize = m_recvBufInputPos - m_recvBufOutputPos; - if (unreadSize <= 0) - return; - - m_cipher.Decrypt(m_recvBuf + m_recvBufOutputPos, unreadSize); -} -#endif // _IMPROVED_PACKET_ENCRYPTION_ diff --git a/src/EterLib/NetStream.h b/src/EterLib/NetStream.h index aba0009..41d3fa3 100644 --- a/src/EterLib/NetStream.h +++ b/src/EterLib/NetStream.h @@ -1,9 +1,6 @@ #pragma once -#ifdef _IMPROVED_PACKET_ENCRYPTION_ -#include "EterBase/cipher.h" -#endif -#include "EterBase/tea.h" +#include "EterBase/SecureCipher.h" #include "NetAddress.h" #include @@ -14,15 +11,11 @@ class CNetworkStream { public: CNetworkStream(); - virtual ~CNetworkStream(); + virtual ~CNetworkStream(); void SetRecvBufferSize(int recvBufSize); void SetSendBufferSize(int sendBufSize); -#ifndef _IMPROVED_PACKET_ENCRYPTION_ - void SetSecurityMode(bool isSecurityMode, const char* c_szTeaKey); - void SetSecurityMode(bool isSecurityMode, const char* c_szTeaEncryptKey, const char* c_szTeaDecryptKey); -#endif bool IsSecurityMode(); int GetRecvBufferSize(); @@ -55,11 +48,11 @@ class CNetworkStream bool SendSequence(); uint8_t GetNextSequence(); - protected: - virtual void OnConnectSuccess(); + protected: + virtual void OnConnectSuccess(); virtual void OnConnectFailure(); virtual void OnRemoteDisconnect(); - virtual void OnDisconnect(); + virtual void OnDisconnect(); virtual bool OnProcess(); bool __SendInternalBuffer(); @@ -69,20 +62,14 @@ class CNetworkStream int __GetSendBufferSize(); -#ifdef _IMPROVED_PACKET_ENCRYPTION_ - size_t Prepare(void* buffer, size_t* length); - bool Activate(size_t agreed_length, const void* buffer, size_t length); - void ActivateCipher(); - void DecryptAlreadyReceivedData(); -#endif + // Secure cipher methods (libsodium) + SecureCipher& GetSecureCipher() { return m_secureCipher; } + bool IsSecureCipherActivated() const { return m_secureCipher.IsActivated(); } + void ActivateSecureCipher() { m_secureCipher.SetActivated(true); } private: time_t m_connectLimitTime; - char* m_recvTEABuf; - int m_recvTEABufInputPos; - int m_recvTEABufSize; - char* m_recvBuf; int m_recvBufSize; int m_recvBufInputPos; @@ -93,20 +80,10 @@ class CNetworkStream int m_sendBufInputPos; int m_sendBufOutputPos; - char* m_sendTEABuf; - int m_sendTEABufSize; - int m_sendTEABufInputPos; - bool m_isOnline; -#ifdef _IMPROVED_PACKET_ENCRYPTION_ - Cipher m_cipher; -#else - // Obsolete encryption stuff here - bool m_isSecurityMode; - char m_szEncryptKey[TEA_KEY_LENGTH]; // Client ì—서 보낼 íŒ¨í‚·ì„ Encrypt 할때 사용하는 Key - char m_szDecryptKey[TEA_KEY_LENGTH]; // Server ì—서 ì „ì†¡ëœ íŒ¨í‚·ì„ Decrypt 할때 사용하는 Key -#endif + // Secure cipher (libsodium/XChaCha20-Poly1305) + SecureCipher m_secureCipher; SOCKET m_sock; diff --git a/src/EterLocale/CMakeLists.txt b/src/EterLocale/CMakeLists.txt index 3791001..1d42d88 100644 --- a/src/EterLocale/CMakeLists.txt +++ b/src/EterLocale/CMakeLists.txt @@ -2,8 +2,7 @@ add_library(EterLocale STATIC ${FILE_SOURCES}) -target_link_libraries(EterLocale - cryptopp-static +target_link_libraries(EterLocale mio ) diff --git a/src/EterPythonLib/CMakeLists.txt b/src/EterPythonLib/CMakeLists.txt index 9494a91..91b68b9 100644 --- a/src/EterPythonLib/CMakeLists.txt +++ b/src/EterPythonLib/CMakeLists.txt @@ -2,8 +2,7 @@ add_library(EterPythonLib STATIC ${FILE_SOURCES}) -target_link_libraries(EterPythonLib - cryptopp-static +target_link_libraries(EterPythonLib mio ) diff --git a/src/GameLib/CMakeLists.txt b/src/GameLib/CMakeLists.txt index e32514d..9ac33f8 100644 --- a/src/GameLib/CMakeLists.txt +++ b/src/GameLib/CMakeLists.txt @@ -2,9 +2,8 @@ add_library(GameLib STATIC ${FILE_SOURCES}) -target_link_libraries(GameLib +target_link_libraries(GameLib lzo2 - cryptopp-static mio ) diff --git a/src/PRTerrainLib/CMakeLists.txt b/src/PRTerrainLib/CMakeLists.txt index 5ec03de..2fbe71f 100644 --- a/src/PRTerrainLib/CMakeLists.txt +++ b/src/PRTerrainLib/CMakeLists.txt @@ -2,8 +2,7 @@ add_library(PRTerrainLib STATIC ${FILE_SOURCES}) -target_link_libraries(PRTerrainLib - cryptopp-static +target_link_libraries(PRTerrainLib mio ) diff --git a/src/PackLib/CMakeLists.txt b/src/PackLib/CMakeLists.txt index b6403fb..9b028e0 100644 --- a/src/PackLib/CMakeLists.txt +++ b/src/PackLib/CMakeLists.txt @@ -2,9 +2,9 @@ add_library(PackLib STATIC ${FILE_SOURCES}) -target_link_libraries(PackLib +target_link_libraries(PackLib libzstd_static - cryptopp-static + sodium mio ) diff --git a/src/PackLib/Pack.cpp b/src/PackLib/Pack.cpp index 307945b..0d24c9c 100644 --- a/src/PackLib/Pack.cpp +++ b/src/PackLib/Pack.cpp @@ -13,11 +13,16 @@ static ZSTD_DCtx* GetThreadLocalZSTDContext() return g_zstdDCtx; } +void CPack::DecryptData(uint8_t* data, size_t len, const uint8_t* nonce) +{ + crypto_stream_xchacha20_xor(data, data, len, nonce, PACK_KEY.data()); +} + bool CPack::Load(const std::string& path) { std::error_code ec; m_file.map(path, ec); - + if (ec) { return false; } @@ -28,7 +33,6 @@ bool CPack::Load(const std::string& path) } memcpy(&m_header, m_file.data(), sizeof(TPackFileHeader)); - m_decryption.SetKeyWithIV(PACK_KEY.data(), PACK_KEY.size(), m_header.iv, CryptoPP::Camellia::BLOCKSIZE); if (file_size < sizeof(TPackFileHeader) + m_header.entry_num * sizeof(TPackFileEntry)) { return false; @@ -39,7 +43,7 @@ bool CPack::Load(const std::string& path) for (size_t i = 0; i < m_header.entry_num; i++) { TPackFileEntry& entry = m_index[i]; memcpy(&entry, m_file.data() + sizeof(TPackFileHeader) + i * sizeof(TPackFileEntry), sizeof(TPackFileEntry)); - m_decryption.ProcessData((CryptoPP::byte*)&entry, (CryptoPP::byte*)&entry, sizeof(TPackFileEntry)); + DecryptData((uint8_t*)&entry, sizeof(TPackFileEntry), m_header.nonce); if (file_size < m_header.data_begin + entry.offset + entry.compressed_size) { return false; @@ -79,8 +83,7 @@ bool CPack::GetFileWithPool(const TPackFileEntry& entry, TPackFile& result, CBuf memcpy(compressed_data.data(), m_file.data() + offset, entry.compressed_size); - m_decryption.Resynchronize(entry.iv, sizeof(entry.iv)); - m_decryption.ProcessData(compressed_data.data(), compressed_data.data(), entry.compressed_size); + DecryptData(compressed_data.data(), entry.compressed_size, entry.nonce); size_t decompressed_size = ZSTD_decompressDCtx(dctx, result.data(), result.size(), compressed_data.data(), compressed_data.size()); @@ -97,4 +100,4 @@ bool CPack::GetFileWithPool(const TPackFileEntry& entry, TPackFile& result, CBuf } return true; -} \ No newline at end of file +} diff --git a/src/PackLib/Pack.h b/src/PackLib/Pack.h index dfb12ac..66ccc7e 100644 --- a/src/PackLib/Pack.h +++ b/src/PackLib/Pack.h @@ -14,14 +14,14 @@ public: bool Load(const std::string& path); const std::vector& GetIndex() const { return m_index; } - + bool GetFile(const TPackFileEntry& entry, TPackFile& result); bool GetFileWithPool(const TPackFileEntry& entry, TPackFile& result, CBufferPool* pPool); private: + void DecryptData(uint8_t* data, size_t len, const uint8_t* nonce); + TPackFileHeader m_header; std::vector m_index; mio::mmap_source m_file; - - CryptoPP::CTR_Mode::Decryption m_decryption; }; diff --git a/src/PackLib/config.h b/src/PackLib/config.h index 26a6e24..e903938 100644 --- a/src/PackLib/config.h +++ b/src/PackLib/config.h @@ -6,13 +6,12 @@ #include #include -#include -#include -#include -#include -#include +#include -constexpr std::array PACK_KEY = { +constexpr size_t PACK_KEY_SIZE = crypto_stream_xchacha20_KEYBYTES; // 32 bytes +constexpr size_t PACK_NONCE_SIZE = crypto_stream_xchacha20_NONCEBYTES; // 24 bytes + +constexpr std::array PACK_KEY = { 0x00,0x11,0x22,0x33, 0x44,0x55,0x66,0x77, 0x88,0x99,0xAA,0xBB, 0xCC,0xDD,0xEE,0xFF, 0x01,0x23,0x45,0x67, 0x89,0xAB,0xCD,0xEF, @@ -24,7 +23,7 @@ struct TPackFileHeader { uint64_t entry_num; uint64_t data_begin; - uint8_t iv[CryptoPP::Camellia::BLOCKSIZE]; + uint8_t nonce[PACK_NONCE_SIZE]; }; struct TPackFileEntry { @@ -33,11 +32,11 @@ struct TPackFileEntry uint64_t file_size; uint64_t compressed_size; uint8_t encryption; - uint8_t iv[CryptoPP::Camellia::BLOCKSIZE]; + uint8_t nonce[PACK_NONCE_SIZE]; }; #pragma pack(pop) class CPack; using TPackFile = std::vector; using TPackFileMapEntry = std::pair, TPackFileEntry>; -using TPackFileMap = std::unordered_map; \ No newline at end of file +using TPackFileMap = std::unordered_map; diff --git a/src/PackMaker/CMakeLists.txt b/src/PackMaker/CMakeLists.txt index 0518d20..2ec40df 100644 --- a/src/PackMaker/CMakeLists.txt +++ b/src/PackMaker/CMakeLists.txt @@ -5,7 +5,7 @@ set_target_properties(PackMaker PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin ) -target_link_libraries(PackMaker +target_link_libraries(PackMaker libzstd_static - cryptopp-static + sodium ) diff --git a/src/PackMaker/main.cpp b/src/PackMaker/main.cpp index 0d9a524..237ffde 100644 --- a/src/PackMaker/main.cpp +++ b/src/PackMaker/main.cpp @@ -5,13 +5,24 @@ #include #include +#include #include "PackLib/config.h" +static void EncryptData(uint8_t* data, size_t len, const uint8_t* nonce) +{ + crypto_stream_xchacha20_xor(data, data, len, nonce, PACK_KEY.data()); +} + int main(int argc, char* argv[]) { std::setlocale(LC_ALL, "en_US.UTF-8"); + if (sodium_init() < 0) { + std::cerr << "Failed to initialize libsodium" << std::endl; + return EXIT_FAILURE; + } + argparse::ArgumentParser program("PackMaker"); program.add_argument("--input") @@ -54,7 +65,7 @@ int main(int argc, char* argv[]) continue; std::filesystem::path relative_path = std::filesystem::relative(entry.path(), input); - + TPackFileEntry& file_entry = entries[relative_path]; memset(&file_entry, 0, sizeof(file_entry)); file_entry.file_size = entry.file_size(); @@ -77,15 +88,11 @@ int main(int argc, char* argv[]) header.entry_num = entries.size(); header.data_begin = sizeof(TPackFileHeader) + sizeof(TPackFileEntry) * entries.size(); - CryptoPP::AutoSeededRandomPool rnd; - rnd.GenerateBlock(header.iv, sizeof(header.iv)); + randombytes_buf(header.nonce, sizeof(header.nonce)); ofs.write((const char*) &header, sizeof(header)); ofs.seekp(header.data_begin, std::ios::beg); - CryptoPP::CTR_Mode::Encryption encryption; - encryption.SetKeyWithIV(PACK_KEY.data(), PACK_KEY.size(), header.iv, CryptoPP::Camellia::BLOCKSIZE); - uint64_t offset = 0; for (auto& [path, entry] : entries) { std::ifstream ifs(input / path, std::ios::binary); @@ -118,9 +125,8 @@ int main(int argc, char* argv[]) if (path.has_extension() && path.extension() == ".py") { entry.encryption = 1; - rnd.GenerateBlock(entry.iv, sizeof(entry.iv)); - encryption.Resynchronize(entry.iv, sizeof(entry.iv)); - encryption.ProcessData((uint8_t*)compressed_buffer.data(), (uint8_t*)compressed_buffer.data(), entry.compressed_size); + randombytes_buf(entry.nonce, sizeof(entry.nonce)); + EncryptData((uint8_t*)compressed_buffer.data(), entry.compressed_size, entry.nonce); } ofs.write(compressed_buffer.data(), entry.compressed_size); @@ -128,11 +134,10 @@ int main(int argc, char* argv[]) } ofs.seekp(sizeof(TPackFileHeader), std::ios::beg); - encryption.Resynchronize(header.iv, sizeof(header.iv)); - + for (auto& [path, entry] : entries) { TPackFileEntry tmp = entry; - encryption.ProcessData((uint8_t*)&tmp, (uint8_t*)&tmp, sizeof(TPackFileEntry)); + EncryptData((uint8_t*)&tmp, sizeof(TPackFileEntry), header.nonce); ofs.write((const char*)&tmp, sizeof(TPackFileEntry)); } diff --git a/src/ScriptLib/CMakeLists.txt b/src/ScriptLib/CMakeLists.txt index 1bd895a..36049b3 100644 --- a/src/ScriptLib/CMakeLists.txt +++ b/src/ScriptLib/CMakeLists.txt @@ -2,8 +2,7 @@ add_library(ScriptLib STATIC ${FILE_SOURCES}) -target_link_libraries(ScriptLib - cryptopp-static +target_link_libraries(ScriptLib mio ) diff --git a/src/ScriptLib/PythonLauncher.cpp b/src/ScriptLib/PythonLauncher.cpp index f7f2831..350378b 100644 --- a/src/ScriptLib/PythonLauncher.cpp +++ b/src/ScriptLib/PythonLauncher.cpp @@ -36,25 +36,40 @@ void Traceback() str.append(g_stTraceBuffer[i]); str.append("\n"); } - + PyObject * exc; PyObject * v; PyObject * tb; - const char * errStr; PyErr_Fetch(&exc, &v, &tb); + PyErr_NormalizeException(&exc, &v, &tb); - if (PyString_Check(v)) + if (exc) { - errStr = PyString_AS_STRING(v); - str.append("Error: "); - str.append(errStr); - - Tracef("%s\n", errStr); + PyObject* excName = PyObject_GetAttrString(exc, "__name__"); + if (excName && PyString_Check(excName)) + { + str.append(PyString_AS_STRING(excName)); + str.append(": "); + } + Py_XDECREF(excName); } - Py_DECREF(exc); - Py_DECREF(v); - Py_DECREF(tb); + + if (v) + { + PyObject* vStr = PyObject_Str(v); + if (vStr && PyString_Check(vStr)) + { + const char* errStr = PyString_AS_STRING(vStr); + str.append(errStr); + Tracef("%s\n", errStr); + } + Py_XDECREF(vStr); + } + + Py_XDECREF(exc); + Py_XDECREF(v); + Py_XDECREF(tb); LogBoxf("Traceback:\n\n%s\n", str.c_str()); } @@ -237,11 +252,41 @@ bool CPythonLauncher::RunFile(const char* c_szFileName) { TPackFile file; CPackManager::Instance().GetFile(c_szFileName, file); - + if (file.empty()) return false; - - return RunMemoryTextFile(c_szFileName, file.size(), file.data()); + + // Convert \r\n to \n and null-terminate + std::string source; + source.reserve(file.size()); + for (size_t i = 0; i < file.size(); ++i) + { + if (file[i] != '\r') + source += (char)file[i]; + } + + // Compile directly with the filename for proper error reporting + PyObject* code = Py_CompileString(source.c_str(), c_szFileName, Py_file_input); + if (!code) + { + Traceback(); + return false; + } + + PyObject* result = PyEval_EvalCode((PyCodeObject*)code, m_poDic, m_poDic); + Py_DECREF(code); + + if (!result) + { + Traceback(); + return false; + } + + Py_DECREF(result); + if (Py_FlushLine()) + PyErr_Clear(); + + return true; } bool CPythonLauncher::RunLine(const char* c_szSrc) diff --git a/src/SpeedTreeLib/CMakeLists.txt b/src/SpeedTreeLib/CMakeLists.txt index d2cfc06..51288e7 100644 --- a/src/SpeedTreeLib/CMakeLists.txt +++ b/src/SpeedTreeLib/CMakeLists.txt @@ -2,8 +2,7 @@ add_library(SpeedTreeLib STATIC ${FILE_SOURCES}) -target_link_libraries(SpeedTreeLib - cryptopp-static +target_link_libraries(SpeedTreeLib mio ) diff --git a/src/UserInterface/AccountConnector.cpp b/src/UserInterface/AccountConnector.cpp index 74061ac..7ec02be 100644 --- a/src/UserInterface/AccountConnector.cpp +++ b/src/UserInterface/AccountConnector.cpp @@ -2,13 +2,6 @@ #include "AccountConnector.h" #include "Packet.h" #include "PythonNetworkStream.h" -#include "EterBase/tea.h" -#include "PackLib/PackManager.h" - -// CHINA_CRYPT_KEY -extern DWORD g_adwEncryptKey[4]; -extern DWORD g_adwDecryptKey[4]; -// END_OF_CHINA_CRYPT_KEY void CAccountConnector::SetHandler(PyObject* poHandler) { @@ -29,14 +22,9 @@ void CAccountConnector::ClearLoginInfo( void ) bool CAccountConnector::Connect(const char * c_szAddr, int iPort, const char * c_szAccountAddr, int iAccountPort) { -#ifndef _IMPROVED_PACKET_ENCRYPTION_ - __BuildClientKey(); -#endif - m_strAddr = c_szAddr; m_iPort = iPort; __OfflineState_Set(); - __BuildClientKey_20050304Myevan(); return CNetworkStream::Connect(c_szAccountAddr, iAccountPort); } @@ -84,21 +72,12 @@ bool CAccountConnector::__HandshakeState_Process() if (!__AnalyzePacket(HEADER_GC_PING, sizeof(TPacketGCPing), &CAccountConnector::__AuthState_RecvPing)) return false; - // TODO : 차후 서버와 ë™ì¼í•˜ê²Œ ê°€ë³€ê¸¸ì´ data serialize & deserialize 작업해야 한다. - if (!__AnalyzeVarSizePacket(HEADER_GC_HYBRIDCRYPT_KEYS, &CAccountConnector::__AuthState_RecvHybridCryptKeys)) + if (!__AnalyzePacket(HEADER_GC_KEY_CHALLENGE, sizeof(TPacketGCKeyChallenge), &CAccountConnector::__AuthState_RecvKeyChallenge)) return false; - if (!__AnalyzeVarSizePacket(HEADER_GC_HYBRIDCRYPT_SDB, &CAccountConnector::__AuthState_RecvHybridCryptSDB)) + if (!__AnalyzePacket(HEADER_GC_KEY_COMPLETE, sizeof(TPacketGCKeyComplete), &CAccountConnector::__AuthState_RecvKeyComplete)) return false; -#ifdef _IMPROVED_PACKET_ENCRYPTION_ - if (!__AnalyzePacket(HEADER_GC_KEY_AGREEMENT, sizeof(TPacketKeyAgreement), &CAccountConnector::__AuthState_RecvKeyAgreement)) - return false; - - if (!__AnalyzePacket(HEADER_GC_KEY_AGREEMENT_COMPLETED, sizeof(TPacketKeyAgreementCompleted), &CAccountConnector::__AuthState_RecvKeyAgreementCompleted)) - return false; -#endif - return true; } @@ -122,22 +101,10 @@ bool CAccountConnector::__AuthState_Process() if (!__AnalyzePacket(HEADER_GC_HANDSHAKE, sizeof(TPacketGCHandshake), &CAccountConnector::__AuthState_RecvHandshake)) return false; - if (!__AnalyzePacket(HEADER_GC_PANAMA_PACK, sizeof(TPacketGCPanamaPack), &CAccountConnector::__AuthState_RecvPanamaPack)) + if (!__AnalyzePacket(HEADER_GC_KEY_CHALLENGE, sizeof(TPacketGCKeyChallenge), &CAccountConnector::__AuthState_RecvKeyChallenge)) return false; -#ifdef _IMPROVED_PACKET_ENCRYPTION_ - if (!__AnalyzePacket(HEADER_GC_KEY_AGREEMENT, sizeof(TPacketKeyAgreement), &CAccountConnector::__AuthState_RecvKeyAgreement)) - return false; - - if (!__AnalyzePacket(HEADER_GC_KEY_AGREEMENT_COMPLETED, sizeof(TPacketKeyAgreementCompleted), &CAccountConnector::__AuthState_RecvKeyAgreementCompleted)) - return false; -#endif - - // TODO : 차후 서버와 ë™ì¼í•˜ê²Œ ê°€ë³€ê¸¸ì´ data serialize & deserialize 작업해야 한다. - if (!__AnalyzeVarSizePacket(HEADER_GC_HYBRIDCRYPT_KEYS, &CAccountConnector::__AuthState_RecvHybridCryptKeys)) - return false; - - if (!__AnalyzeVarSizePacket(HEADER_GC_HYBRIDCRYPT_SDB, &CAccountConnector::__AuthState_RecvHybridCryptSDB)) + if (!__AnalyzePacket(HEADER_GC_KEY_COMPLETE, sizeof(TPacketGCKeyComplete), &CAccountConnector::__AuthState_RecvKeyComplete)) return false; return true; @@ -162,11 +129,6 @@ bool CAccountConnector::__AuthState_RecvPhase() } else if (kPacketPhase.phase == PHASE_AUTH) { -#ifndef _IMPROVED_PACKET_ENCRYPTION_ - const char* key = GetSecurityKey(); - SetSecurityMode(true, key); -#endif - TPacketCGLogin3 LoginPacket; LoginPacket.header = HEADER_CG_LOGIN3; @@ -175,16 +137,12 @@ bool CAccountConnector::__AuthState_RecvPhase() LoginPacket.name[ID_MAX_NUM] = '\0'; LoginPacket.pwd[PASS_MAX_NUM] = '\0'; - // 비밀번호를 ë©”ëª¨ë¦¬ì— ê³„ì† ê°–ê³  있는 문제가 있어서, 사용 즉시 날리는 것으로 변경 ClearLoginInfo(); CPythonNetworkStream& rkNetStream=CPythonNetworkStream::Instance(); rkNetStream.ClearLoginInfo(); m_strPassword = ""; - for (DWORD i = 0; i < 4; ++i) - LoginPacket.adwClientKey[i] = g_adwEncryptKey[i]; - if (!Send(sizeof(LoginPacket), &LoginPacket)) { Tracen(" CAccountConnector::__AuthState_RecvPhase - SendLogin3 Error"); @@ -208,71 +166,93 @@ bool CAccountConnector::__AuthState_RecvHandshake() if (!Recv(sizeof(kPacketHandshake), &kPacketHandshake)) return false; - // HandShake + Tracenf("HANDSHAKE RECV %u %d", kPacketHandshake.dwTime, kPacketHandshake.lDelta); + + ELTimer_SetServerMSec(kPacketHandshake.dwTime+ kPacketHandshake.lDelta); + + kPacketHandshake.dwTime = kPacketHandshake.dwTime + kPacketHandshake.lDelta + kPacketHandshake.lDelta; + kPacketHandshake.lDelta = 0; + + Tracenf("HANDSHAKE SEND %u", kPacketHandshake.dwTime); + + if (!Send(sizeof(kPacketHandshake), &kPacketHandshake)) { - Tracenf("HANDSHAKE RECV %u %d", kPacketHandshake.dwTime, kPacketHandshake.lDelta); - - ELTimer_SetServerMSec(kPacketHandshake.dwTime+ kPacketHandshake.lDelta); - - //DWORD dwBaseServerTime = kPacketHandshake.dwTime+ kPacketHandshake.lDelta; - //DWORD dwBaseClientTime = ELTimer_GetMSec(); - - kPacketHandshake.dwTime = kPacketHandshake.dwTime + kPacketHandshake.lDelta + kPacketHandshake.lDelta; - kPacketHandshake.lDelta = 0; - - Tracenf("HANDSHAKE SEND %u", kPacketHandshake.dwTime); - - if (!Send(sizeof(kPacketHandshake), &kPacketHandshake)) - { - Tracen(" CAccountConnector::__AuthState_RecvHandshake - SendHandshake Error"); - return false; - } + Tracen(" CAccountConnector::__AuthState_RecvHandshake - SendHandshake Error"); + return false; } return true; } -bool CAccountConnector::__AuthState_RecvPanamaPack() +bool CAccountConnector::__AuthState_RecvKeyChallenge() { - TPacketGCPanamaPack kPacket; - - if (!Recv(sizeof(TPacketGCPanamaPack), &kPacket)) + TPacketGCKeyChallenge packet; + if (!Recv(sizeof(packet), &packet)) return false; + Tracen("KEY_CHALLENGE RECV - Starting secure key exchange"); + + SecureCipher& cipher = GetSecureCipher(); + if (!cipher.Initialize()) + { + Tracen("SecureCipher initialization failed"); + Disconnect(); + return false; + } + + if (!cipher.ComputeClientKeys(packet.server_pk)) + { + Tracen("Failed to compute client session keys"); + Disconnect(); + return false; + } + + TPacketCGKeyResponse response; + response.bHeader = HEADER_CG_KEY_RESPONSE; + cipher.GetPublicKey(response.client_pk); + cipher.ComputeResponse(packet.challenge, response.challenge_response); + + if (!Send(sizeof(response), &response)) + { + Tracen("Failed to send key response"); + return false; + } + + Tracen("KEY_RESPONSE SEND - Awaiting key completion"); return true; } -bool CAccountConnector::__AuthState_RecvHybridCryptKeys(int iTotalSize) +bool CAccountConnector::__AuthState_RecvKeyComplete() { - int iFixedHeaderSize = TPacketGCHybridCryptKeys::GetFixedHeaderSize(); - - TPacketGCHybridCryptKeys kPacket(iTotalSize-iFixedHeaderSize); - - if (!Recv(iFixedHeaderSize, &kPacket)) + TPacketGCKeyComplete packet; + if (!Recv(sizeof(packet), &packet)) return false; - if (!Recv(kPacket.iKeyStreamLen, kPacket.m_pStream)) - return false; + Tracen("KEY_COMPLETE RECV - Decrypting session token"); + SecureCipher& cipher = GetSecureCipher(); + + uint8_t session_token[SecureCipher::SESSION_TOKEN_SIZE]; + if (crypto_aead_xchacha20poly1305_ietf_decrypt( + session_token, nullptr, + nullptr, + packet.encrypted_token, sizeof(packet.encrypted_token), + nullptr, 0, + packet.nonce, + cipher.GetRxKey()) != 0) + { + Tracen("Failed to decrypt session token - authentication failed"); + Disconnect(); + return false; + } + + cipher.SetSessionToken(session_token); + cipher.SetActivated(true); + + Tracen("Secure channel established - encryption activated"); return true; } -bool CAccountConnector::__AuthState_RecvHybridCryptSDB(int iTotalSize) -{ - int iFixedHeaderSize = TPacketGCHybridSDB::GetFixedHeaderSize(); - - TPacketGCHybridSDB kPacket(iTotalSize-iFixedHeaderSize); - - if (!Recv(iFixedHeaderSize, &kPacket)) - return false; - - if (!Recv(kPacket.iSDBStreamLen, kPacket.m_pStream)) - return false; - - return true; -} - - bool CAccountConnector::__AuthState_RecvPing() { TPacketGCPing kPacketPing; @@ -309,8 +289,6 @@ bool CAccountConnector::__AuthState_RecvAuthSuccess() } else { - DWORD dwPanamaKey = kAuthSuccessPacket.dwLoginKey ^ g_adwEncryptKey[0] ^ g_adwEncryptKey[1] ^ g_adwEncryptKey[2] ^ g_adwEncryptKey[3]; - CPythonNetworkStream & rkNet = CPythonNetworkStream::Instance(); rkNet.SetLoginKey(kAuthSuccessPacket.dwLoginKey); rkNet.Connect(m_strAddr.c_str(), m_iPort); @@ -331,72 +309,9 @@ bool CAccountConnector::__AuthState_RecvAuthFailure() if (m_poHandler) PyCallClassMemberFunc(m_poHandler, "OnLoginFailure", Py_BuildValue("(s)", packet_failure.szStatus)); -// __OfflineState_Set(); - return true; } -#ifdef _IMPROVED_PACKET_ENCRYPTION_ -bool CAccountConnector::__AuthState_RecvKeyAgreement() -{ - TPacketKeyAgreement packet; - if (!Recv(sizeof(packet), &packet)) - { - return false; - } - - Tracenf("KEY_AGREEMENT RECV %u", packet.wDataLength); - - TPacketKeyAgreement packetToSend; - size_t dataLength = TPacketKeyAgreement::MAX_DATA_LEN; - size_t agreedLength = Prepare(packetToSend.data, &dataLength); - if (agreedLength == 0) - { - // 초기화 실패 - Disconnect(); - return false; - } - assert(dataLength <= TPacketKeyAgreement::MAX_DATA_LEN); - - if (Activate(packet.wAgreedLength, packet.data, packet.wDataLength)) - { - // Key agreement 성공, ì‘답 전송 - packetToSend.bHeader = HEADER_CG_KEY_AGREEMENT; - packetToSend.wAgreedLength = (WORD)agreedLength; - packetToSend.wDataLength = (WORD)dataLength; - - if (!Send(sizeof(packetToSend), &packetToSend)) - { - Tracen(" CAccountConnector::__AuthState_RecvKeyAgreement - SendKeyAgreement Error"); - return false; - } - Tracenf("KEY_AGREEMENT SEND %u", packetToSend.wDataLength); - } - else - { - // 키 í˜‘ìƒ ì‹¤íŒ¨ - Disconnect(); - return false; - } - return true; -} - -bool CAccountConnector::__AuthState_RecvKeyAgreementCompleted() -{ - TPacketKeyAgreementCompleted packet; - if (!Recv(sizeof(packet), &packet)) - { - return false; - } - - Tracenf("KEY_AGREEMENT_COMPLETED RECV"); - - ActivateCipher(); - - return true; -} -#endif // _IMPROVED_PACKET_ENCRYPTION_ - bool CAccountConnector::__AnalyzePacket(UINT uHeader, UINT uPacketSize, bool (CAccountConnector::*pfnDispatchPacket)()) { BYTE bHeader; @@ -412,27 +327,6 @@ bool CAccountConnector::__AnalyzePacket(UINT uHeader, UINT uPacketSize, bool (CA return (this->*pfnDispatchPacket)(); } -bool CAccountConnector::__AnalyzeVarSizePacket(UINT uHeader, bool (CAccountConnector::*pfnDispatchPacket)(int)) -{ - BYTE bHeader; - if (!Peek(sizeof(bHeader), &bHeader)) - return true; - - if (bHeader!=uHeader) - return true; - - TDynamicSizePacketHeader dynamicHeader; - - if (!Peek(sizeof(dynamicHeader), &dynamicHeader)) - return true; - - if (!Peek(dynamicHeader.size)) - return true; - - return (this->*pfnDispatchPacket)(dynamicHeader.size); -} - - void CAccountConnector::__OfflineState_Set() { __Inialize(); @@ -463,7 +357,6 @@ void CAccountConnector::OnConnectSuccess() void CAccountConnector::OnRemoteDisconnect() { - // Matrix Card Number 를 ë³´ë‚´ ë†“ì•˜ëŠ”ë° close ë˜ë©´ í”„ë¡œê·¸ëž¨ì„ ì¢…ë£Œ 한다. if (m_isWaitKey) { if (m_poHandler) @@ -481,17 +374,6 @@ void CAccountConnector::OnDisconnect() __OfflineState_Set(); } -#ifndef _IMPROVED_PACKET_ENCRYPTION_ -void CAccountConnector::__BuildClientKey() -{ - for (DWORD i = 0; i < 4; ++i) - g_adwEncryptKey[i] = random(); - - const BYTE * c_pszKey = (const BYTE *) "JyTxtHljHJlVJHorRM301vf@4fvj10-v"; - tea_encrypt((DWORD *) g_adwDecryptKey, (const DWORD *) g_adwEncryptKey, (const DWORD *) c_pszKey, 16); -} -#endif - void CAccountConnector::__Inialize() { m_eState=STATE_OFFLINE; diff --git a/src/UserInterface/AccountConnector.h b/src/UserInterface/AccountConnector.h index b403a17..54fd1b2 100644 --- a/src/UserInterface/AccountConnector.h +++ b/src/UserInterface/AccountConnector.h @@ -1,4 +1,4 @@ -#pragma +#pragma once #include "EterLib/NetStream.h" #include "EterLib/FuncObject.h" @@ -49,22 +49,10 @@ class CAccountConnector : public CNetworkStream, public CSingleton -#ifndef LSS_SECURITY_KEY -#define LSS_SECURITY_KEY "testtesttesttest" -#endif - -std::string __SECURITY_KEY_STRING__ = LSS_SECURITY_KEY; - char MULTI_LOCALE_PATH_COMMON[256] = "locale/common"; char MULTI_LOCALE_PATH[256] = "locale/en"; char MULTI_LOCALE_NAME[256] = "en"; @@ -100,11 +94,6 @@ int GetSkillPower(unsigned level) return SKILL_POWERS[level]; } -const char* GetSecurityKey() -{ - return __SECURITY_KEY_STRING__.c_str(); -} - const char* GetLocaleName() { return MULTI_LOCALE_NAME; diff --git a/src/UserInterface/Locale.h b/src/UserInterface/Locale.h index 1c653f1..4ba795b 100644 --- a/src/UserInterface/Locale.h +++ b/src/UserInterface/Locale.h @@ -5,8 +5,6 @@ const char* GetLocaleName(); const char* GetLocalePath(); const char* GetLocalePathCommon(); -const char* GetSecurityKey(); - bool IsRTL(); int StringCompareCI( LPCSTR szStringLeft, LPCSTR szStringRight, size_t sizeLength ); void LoadConfig(const char* fileName); diff --git a/src/UserInterface/Locale_inc.h b/src/UserInterface/Locale_inc.h index a97210a..715477a 100644 --- a/src/UserInterface/Locale_inc.h +++ b/src/UserInterface/Locale_inc.h @@ -1,5 +1,3 @@ -#define _IMPROVED_PACKET_ENCRYPTION_ - #define ENABLE_COSTUME_SYSTEM #define ENABLE_ENERGY_SYSTEM #define ENABLE_DRAGON_SOUL_SYSTEM diff --git a/src/UserInterface/Packet.h b/src/UserInterface/Packet.h index f4109b4..6a46605 100644 --- a/src/UserInterface/Packet.h +++ b/src/UserInterface/Packet.h @@ -11,7 +11,6 @@ enum ///////////////////////////////////////////////// // To Server // HEADER_BLANK is the not use(for future use) - HEADER_CG_LOGIN = 1, HEADER_CG_ATTACK = 2, HEADER_CG_CHAT = 3, HEADER_CG_PLAYER_CREATE = 4, // 새로운 플래ì´ì–´ë¥¼ ìƒì„± @@ -131,7 +130,8 @@ enum HEADER_CG_DRAGON_SOUL_REFINE = 205, HEADER_CG_STATE_CHECKER = 206, - HEADER_CG_KEY_AGREEMENT = 0xfb, // _IMPROVED_PACKET_ENCRYPTION_ + HEADER_CG_KEY_RESPONSE = 0xf9, // Secure key exchange response + HEADER_CG_LOGIN_SECURE = 0xf6, // Secure login packet HEADER_CG_TIME_SYNC = 0xfc, HEADER_CG_CLIENT_VERSION = 0xfd, HEADER_CG_CLIENT_VERSION2 = 0xf1, @@ -288,21 +288,15 @@ enum // END_OF_SUPPORT_BGM HEADER_GC_AUTH_SUCCESS = 150, - HEADER_GC_PANAMA_PACK = 151, - - //HYBRID CRYPT - HEADER_GC_HYBRIDCRYPT_KEYS = 152, - HEADER_GC_HYBRIDCRYPT_SDB = 153, // SDB means Supplmentary Data Blocks - //HYBRID CRYPT HEADER_GC_SPECIFIC_EFFECT = 208, - HEADER_GC_DRAGON_SOUL_REFINE = 209, + HEADER_GC_DRAGON_SOUL_REFINE = 209, HEADER_GC_RESPOND_CHANNELSTATUS = 210, HEADER_GC_ITEM_GET = 211, - HEADER_GC_KEY_AGREEMENT_COMPLETED = 0xfa, // _IMPROVED_PACKET_ENCRYPTION_ - HEADER_GC_KEY_AGREEMENT = 0xfb, // _IMPROVED_PACKET_ENCRYPTION_ + HEADER_GC_KEY_CHALLENGE = 0xf8, // Secure key exchange challenge + HEADER_GC_KEY_COMPLETE = 0xf7, // Secure key exchange complete HEADER_GC_HANDSHAKE_OK = 0xfc, // 252 HEADER_GC_PHASE = 0xfd, // 253 HEADER_GC_BINDUDP = 0xfe, // 254 @@ -479,20 +473,12 @@ typedef struct command_checkin char pwd[PASS_MAX_NUM+1]; } TPacketCGCheckin; -typedef struct command_login -{ - uint8_t header; - char name[ID_MAX_NUM + 1]; - char pwd[PASS_MAX_NUM + 1]; -} TPacketCGLogin; - // start - 권한 서버 ì ‘ì†ì„ 위한 패킷들 typedef struct command_login2 { uint8_t header; char name[ID_MAX_NUM + 1]; uint32_t login_key; - uint32_t adwClientKey[4]; } TPacketCGLogin2; typedef struct command_login3 @@ -500,7 +486,6 @@ typedef struct command_login3 uint8_t header; char name[ID_MAX_NUM + 1]; char pwd[PASS_MAX_NUM + 1]; - uint32_t adwClientKey[4]; } TPacketCGLogin3; typedef struct command_direct_enter @@ -2468,70 +2453,6 @@ typedef struct SPacketGCResetOnTime uint8_t header; } TPacketGCResetOnTime; -typedef struct SPacketGCPanamaPack -{ - uint8_t bHeader; - char szPackName[256]; - uint8_t abIV[32]; -} TPacketGCPanamaPack; - -typedef struct SPacketGCHybridCryptKeys -{ -private: - SPacketGCHybridCryptKeys() : m_pStream(NULL) {} - -public: - SPacketGCHybridCryptKeys(int32_t iStreamSize) : iKeyStreamLen(iStreamSize) - { - m_pStream = new uint8_t[iStreamSize]; - } - ~SPacketGCHybridCryptKeys() - { - if( m_pStream ) - { - delete[] m_pStream; - m_pStream = NULL; - } - } - static int32_t GetFixedHeaderSize() - { - return sizeof(uint8_t)+sizeof(uint16_t)+sizeof(int32_t); - } - - uint8_t bHeader; - uint16_t wDynamicPacketSize; - int32_t iKeyStreamLen; - uint8_t* m_pStream; - -} TPacketGCHybridCryptKeys; - - -typedef struct SPacketGCHybridSDB -{ -private: - SPacketGCHybridSDB() : m_pStream(NULL) {} - -public: - SPacketGCHybridSDB(int32_t iStreamSize) : iSDBStreamLen(iStreamSize) - { - m_pStream = new uint8_t[iStreamSize]; - } - ~SPacketGCHybridSDB() - { - delete[] m_pStream; - m_pStream = NULL; - } - static int32_t GetFixedHeaderSize() - { - return sizeof(uint8_t)+sizeof(uint16_t)+sizeof(int32_t); - } - - uint8_t bHeader; - uint16_t wDynamicPacketSize; - int32_t iSDBStreamLen; - uint8_t* m_pStream; - -} TPacketGCHybridSDB; ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Client To Client @@ -2556,22 +2477,43 @@ typedef struct packet_autoban_quiz } TPacketGCAutoBanQuiz; // END_OF_AUTOBAN -#ifdef _IMPROVED_PACKET_ENCRYPTION_ -struct TPacketKeyAgreement +// Secure authentication packets (libsodium/XChaCha20-Poly1305) +#pragma pack(push, 1) + +// Server -> Client: Key exchange challenge +struct TPacketGCKeyChallenge { - static const int32_t MAX_DATA_LEN = 256; - uint8_t bHeader; - uint16_t wAgreedLength; - uint16_t wDataLength; - uint8_t data[MAX_DATA_LEN]; + uint8_t bHeader; // HEADER_GC_KEY_CHALLENGE (0xf8) + uint8_t server_pk[32]; // Server's X25519 public key + uint8_t challenge[32]; // Random challenge bytes }; -struct TPacketKeyAgreementCompleted +// Client -> Server: Key exchange response +struct TPacketCGKeyResponse { - uint8_t bHeader; - uint8_t data[3]; // dummy (not used) + uint8_t bHeader; // HEADER_CG_KEY_RESPONSE (0xf9) + uint8_t client_pk[32]; // Client's X25519 public key + uint8_t challenge_response[32]; // HMAC(challenge, rx_key) }; -#endif // _IMPROVED_PACKET_ENCRYPTION_ + +// Server -> Client: Key exchange complete +struct TPacketGCKeyComplete +{ + uint8_t bHeader; // HEADER_GC_KEY_COMPLETE (0xf7) + uint8_t encrypted_token[32 + 16]; // Session token + Poly1305 tag + uint8_t nonce[24]; // XChaCha20 nonce +}; + +// Client -> Server: Secure login +struct TPacketCGLoginSecure +{ + uint8_t bHeader; // HEADER_CG_LOGIN_SECURE (0xf6) + char name[ID_MAX_NUM + 1]; + char pwd[PASS_MAX_NUM + 1]; + uint8_t session_token[32]; // Session token from KeyComplete +}; + +#pragma pack(pop) typedef struct SPacketGCSpecificEffect { diff --git a/src/UserInterface/PythonNetworkStream.cpp b/src/UserInterface/PythonNetworkStream.cpp index 32b44d7..1a4bc2c 100644 --- a/src/UserInterface/PythonNetworkStream.cpp +++ b/src/UserInterface/PythonNetworkStream.cpp @@ -108,10 +108,9 @@ class CMainPacketHeaderMap : public CNetworkPacketHeaderMap Set(HEADER_GC_BINDUDP, CNetworkPacketHeaderMap::TPacketType(sizeof(TPacketGCBindUDP), STATIC_SIZE_PACKET)); Set(HEADER_GC_OWNERSHIP, CNetworkPacketHeaderMap::TPacketType(sizeof(TPacketGCOwnership), STATIC_SIZE_PACKET)); Set(HEADER_GC_CREATE_FLY, CNetworkPacketHeaderMap::TPacketType(sizeof(TPacketGCCreateFly), STATIC_SIZE_PACKET)); -#ifdef _IMPROVED_PACKET_ENCRYPTION_ - Set(HEADER_GC_KEY_AGREEMENT, CNetworkPacketHeaderMap::TPacketType(sizeof(TPacketKeyAgreement), STATIC_SIZE_PACKET)); - Set(HEADER_GC_KEY_AGREEMENT_COMPLETED, CNetworkPacketHeaderMap::TPacketType(sizeof(TPacketKeyAgreementCompleted), STATIC_SIZE_PACKET)); -#endif + // Secure key exchange (libsodium) + Set(HEADER_GC_KEY_CHALLENGE, CNetworkPacketHeaderMap::TPacketType(sizeof(TPacketGCKeyChallenge), STATIC_SIZE_PACKET)); + Set(HEADER_GC_KEY_COMPLETE, CNetworkPacketHeaderMap::TPacketType(sizeof(TPacketGCKeyComplete), STATIC_SIZE_PACKET)); Set(HEADER_GC_ADD_FLY_TARGETING, CNetworkPacketHeaderMap::TPacketType(sizeof(TPacketGCFlyTargeting), STATIC_SIZE_PACKET)); Set(HEADER_GC_FLY_TARGETING, CNetworkPacketHeaderMap::TPacketType(sizeof(TPacketGCFlyTargeting), STATIC_SIZE_PACKET)); @@ -174,8 +173,6 @@ class CMainPacketHeaderMap : public CNetworkPacketHeaderMap Set(HEADER_GC_DIG_MOTION, CNetworkPacketHeaderMap::TPacketType(sizeof(TPacketGCDigMotion), STATIC_SIZE_PACKET)); Set(HEADER_GC_DAMAGE_INFO, CNetworkPacketHeaderMap::TPacketType(sizeof(TPacketGCDamageInfo), STATIC_SIZE_PACKET)); - Set(HEADER_GC_HYBRIDCRYPT_KEYS, CNetworkPacketHeaderMap::TPacketType(sizeof(TPacketGCHybridCryptKeys), DYNAMIC_SIZE_PACKET)); - Set(HEADER_GC_HYBRIDCRYPT_SDB, CNetworkPacketHeaderMap::TPacketType(sizeof(TPacketGCHybridSDB), DYNAMIC_SIZE_PACKET)); Set(HEADER_GC_SPECIFIC_EFFECT, CNetworkPacketHeaderMap::TPacketType(sizeof(TPacketGCSpecificEffect), STATIC_SIZE_PACKET)); Set(HEADER_GC_DRAGON_SOUL_REFINE, CNetworkPacketHeaderMap::TPacketType(sizeof(TPacketGCDragonSoulRefine), STATIC_SIZE_PACKET)); diff --git a/src/UserInterface/PythonNetworkStream.h b/src/UserInterface/PythonNetworkStream.h index 1e4132f..ceb2b14 100644 --- a/src/UserInterface/PythonNetworkStream.h +++ b/src/UserInterface/PythonNetworkStream.h @@ -270,13 +270,10 @@ class CPythonNetworkStream : public CNetworkStream, public CSingleton - -void CAccountConnector::__BuildClientKey_20050304Myevan() -{ - const BYTE * c_pszKey = GetKey_20050304Myevan(); - memcpy(g_adwEncryptKey, c_pszKey+157, 16); - - for (DWORD i = 0; i < 4; ++i) - g_adwEncryptKey[i] = random(); - - tea_encrypt((DWORD *) g_adwDecryptKey, (const DWORD *) g_adwEncryptKey, (const DWORD *) (c_pszKey+37), 16); -// TEA_Encrypt((DWORD *) g_adwDecryptKey, (const DWORD *) g_adwEncryptKey, (const DWORD *) (c_pszKey+37), 16); -} -// END_OF_CHINA_CRYPT_KEY PyObject * packExist(PyObject * poSelf, PyObject * poArgs) { diff --git a/src/UserInterface/UserInterface.cpp b/src/UserInterface/UserInterface.cpp index 63b0199..05ce7da 100644 --- a/src/UserInterface/UserInterface.cpp +++ b/src/UserInterface/UserInterface.cpp @@ -22,6 +22,7 @@ #include #include +#include extern "C" { extern int _fltused; @@ -290,6 +291,12 @@ static bool Main(HINSTANCE hInstance, LPSTR lpCmdLine) OpenLogFile(false); // false == uses syserr.txt only #endif + if (sodium_init() < 0) + { + LogBox("sodium_init() failed"); + return false; + } + static CLZO lzo; CPackManager packMgr; diff --git a/vendor/CMakeLists.txt b/vendor/CMakeLists.txt index 4348b3e..dabee2f 100644 --- a/vendor/CMakeLists.txt +++ b/vendor/CMakeLists.txt @@ -1,6 +1,6 @@ -add_subdirectory(cryptopp) add_subdirectory(lzo-2.10) add_subdirectory(mio) +add_subdirectory(libsodium) ## zstd is a bit tricky set(ZSTD_BUILD_SHARED OFF CACHE BOOL "BUILD SHARED LIBRARIES" FORCE) @@ -8,8 +8,8 @@ add_subdirectory(zstd-1.5.7/build/cmake zstd) include_directories("zstd/lib") if (WIN32) - set_target_properties(cryptopp-static PROPERTIES FOLDER vendor) set_target_properties(lzo2 PROPERTIES FOLDER vendor) + set_target_properties(sodium PROPERTIES FOLDER vendor) ## zstd stuff set_target_properties(zstd PROPERTIES FOLDER vendor/zstd) diff --git a/vendor/cryptopp/3way.cpp b/vendor/cryptopp/3way.cpp deleted file mode 100644 index 4228e5e..0000000 --- a/vendor/cryptopp/3way.cpp +++ /dev/null @@ -1,143 +0,0 @@ -// 3way.cpp - modified by Wei Dai from Joan Daemen's 3way.c -// The original code and all modifications are in the public domain. - -#include "pch.h" -#include "3way.h" -#include "misc.h" - -NAMESPACE_BEGIN(CryptoPP) - -#if defined(CRYPTOPP_DEBUG) && !defined(CRYPTOPP_DOXYGEN_PROCESSING) -void ThreeWay_TestInstantiations() -{ - ThreeWay::Encryption x1; - ThreeWay::Decryption x2; -} -#endif - -namespace -{ - const word32 START_E = 0x0b0b; // round constant of first encryption round - const word32 START_D = 0xb1b1; // round constant of first decryption round -} - -static inline word32 reverseBits(word32 a) -{ - a = ((a & 0xAAAAAAAA) >> 1) | ((a & 0x55555555) << 1); - a = ((a & 0xCCCCCCCC) >> 2) | ((a & 0x33333333) << 2); - return ((a & 0xF0F0F0F0) >> 4) | ((a & 0x0F0F0F0F) << 4); -} - -#define mu(a0, a1, a2) \ -{ \ - a1 = reverseBits(a1); \ - word32 t = reverseBits(a0); \ - a0 = reverseBits(a2); \ - a2 = t; \ -} - -#define pi_gamma_pi(a0, a1, a2) \ -{ \ - word32 b0, b2; \ - b2 = rotlConstant<1>(a2); \ - b0 = rotlConstant<22>(a0); \ - a0 = rotlConstant<1>(b0 ^ (a1|(~b2))); \ - a2 = rotlConstant<22>(b2 ^ (b0|(~a1))); \ - a1 ^= (b2|(~b0)); \ -} - -// thanks to Paulo Barreto for this optimized theta() -#define theta(a0, a1, a2) \ -{ \ - word32 b0, b1, c; \ - c = a0 ^ a1 ^ a2; \ - c = rotlConstant<16>(c) ^ rotlConstant<8>(c); \ - b0 = (a0 << 24) ^ (a2 >> 8) ^ (a1 << 8) ^ (a0 >> 24); \ - b1 = (a1 << 24) ^ (a0 >> 8) ^ (a2 << 8) ^ (a1 >> 24); \ - a0 ^= c ^ b0; \ - a1 ^= c ^ b1; \ - a2 ^= c ^ (b0 >> 16) ^ (b1 << 16); \ -} - -#define rho(a0, a1, a2) \ -{ \ - theta(a0, a1, a2); \ - pi_gamma_pi(a0, a1, a2); \ -} - -void ThreeWay::Base::UncheckedSetKey(const byte *uk, unsigned int length, const NameValuePairs ¶ms) -{ - AssertValidKeyLength(length); - - m_rounds = GetRoundsAndThrowIfInvalid(params, this); - - for (unsigned int i=0; i<3; i++) - m_k[i] = (word32)uk[4*i+3] | ((word32)uk[4*i+2]<<8) | ((word32)uk[4*i+1]<<16) | ((word32)uk[4*i]<<24); - - if (!IsForwardTransformation()) - { - theta(m_k[0], m_k[1], m_k[2]); - mu(m_k[0], m_k[1], m_k[2]); - m_k[0] = ByteReverse(m_k[0]); - m_k[1] = ByteReverse(m_k[1]); - m_k[2] = ByteReverse(m_k[2]); - } -} - -void ThreeWay::Enc::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const -{ - typedef BlockGetAndPut Block; - - word32 a0, a1, a2; - Block::Get(inBlock)(a0)(a1)(a2); - - word32 rc = START_E; - - for(unsigned i=0; i Block; - - word32 a0, a1, a2; - Block::Get(inBlock)(a0)(a1)(a2); - - word32 rc = START_D; - - mu(a0, a1, a2); - for(unsigned i=0; i, public FixedKeyLength<12>, public VariableRounds<11> -{ - CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "3-Way";} -}; - -/// \brief ThreeWay block cipher -/// \sa 3-Way -class ThreeWay : public ThreeWay_Info, public BlockCipherDocumentation -{ - /// \brief Class specific implementation and overrides used to operate the cipher. - /// \details Implementations and overrides in \p Base apply to both \p ENCRYPTION and \p DECRYPTION directions - class CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl - { - public: - void UncheckedSetKey(const byte *key, unsigned int length, const NameValuePairs ¶ms); - - protected: - unsigned int m_rounds; - FixedSizeSecBlock m_k; - }; - - /// \brief Class specific methods used to operate the cipher in the forward direction. - /// \details Implementations and overrides in \p Enc apply to \p ENCRYPTION. - class CRYPTOPP_NO_VTABLE Enc : public Base - { - public: - void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; - }; - - /// \brief Class specific methods used to operate the cipher in the reverse direction. - /// \details Implementations and overrides in \p Dec apply to \p DECRYPTION. - class CRYPTOPP_NO_VTABLE Dec : public Base - { - public: - void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; - }; - -public: - typedef BlockCipherFinal Encryption; - typedef BlockCipherFinal Decryption; -}; - -typedef ThreeWay::Encryption ThreeWayEncryption; -typedef ThreeWay::Decryption ThreeWayDecryption; - -NAMESPACE_END - -#endif diff --git a/vendor/cryptopp/CMakeLists.txt b/vendor/cryptopp/CMakeLists.txt deleted file mode 100644 index 9569e1e..0000000 --- a/vendor/cryptopp/CMakeLists.txt +++ /dev/null @@ -1,1348 +0,0 @@ -# Please ensure your changes or patch meets minimum requirements. -# The minimum requirements are 2.8.6. It roughly equates to -# Ubuntu 14.05 LTS or Solaris 11.3. Please do not check in something -# for 3.5.0 or higher because it will break LTS operating systems -# and a number of developer boards used for testing. To test your -# changes, please set up a Ubuntu 14.05 LTS system. - -# Should we be setting things like this? We are not a C project -# so nothing should be done with the C compiler. But there is -# no reliable way to tell CMake we are C++. -# Cannot set this... Breaks Linux PowerPC with Clang: -# SET(CMAKE_C_COMPILER ${CMAKE_CXX_COMPILER}) -# # error "The CMAKE_C_COMPILER is set to a C++ compiler" - -if(NOT DEFINED cryptopp_DISPLAY_CMAKE_SUPPORT_WARNING) - set(cryptopp_DISPLAY_CMAKE_SUPPORT_WARNING 1) -endif() -if(cryptopp_DISPLAY_CMAKE_SUPPORT_WARNING) - message( STATUS -"*************************************************************************\n" -"The Crypto++ library does not officially support CMake. CMake support is a\n" -"community effort, and the library works with the folks using CMake to help\n" -"improve it. If you find an issue then please fix it or report it at\n" -"https://github.com/noloader/cryptopp-cmake.\n" -"-- *************************************************************************" -) -endif() - -# Print useful information -message( STATUS "CMake version ${CMAKE_VERSION}" ) -message( STATUS "System ${CMAKE_SYSTEM_NAME}" ) -message( STATUS "Processor ${CMAKE_SYSTEM_PROCESSOR}" ) - -cmake_minimum_required(VERSION 3.10) -if (${CMAKE_VERSION} VERSION_LESS "3.0.0") - project(cryptopp) - set(cryptopp_VERSION_MAJOR 8) - set(cryptopp_VERSION_MINOR 6) - set(cryptopp_VERSION_PATCH 0) -else () - cmake_policy(SET CMP0048 NEW) - project(cryptopp VERSION 8.6.0) - if (NOT ${CMAKE_VERSION} VERSION_LESS "3.1.0") - cmake_policy(SET CMP0054 NEW) - endif () -endif () - -# Need to set SRC_DIR manually after removing the Python library code. -set(SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}) - -# Make RelWithDebInfo the default (it does e.g. add '-O2 -g -DNDEBUG' for GNU) -# If not in multi-configuration environments, no explicit build type or CXX -# flags are set by the user and if we are the root CMakeLists.txt file. -if (NOT CMAKE_CONFIGURATION_TYPES AND - NOT CMAKE_NO_BUILD_TYPE AND - NOT CMAKE_BUILD_TYPE AND - NOT CMAKE_CXX_FLAGS AND - CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) - set(CMAKE_BUILD_TYPE RelWithDebInfo) -endif () - -include(GNUInstallDirs) -include(CheckCXXCompilerFlag) - -# We now carry around test programs. test_cxx.cpp is the default C++ one. -# Also see https://github.com/weidai11/cryptopp/issues/741. -set(TEST_PROG_DIR ${SRC_DIR}/TestPrograms) -set(TEST_CXX_FILE ${TEST_PROG_DIR}/test_cxx.cpp) - -# https://github.com/noloader/cryptopp-cmake/issues/56 -# https://stackoverflow.com/a/40152725 -if (APPLE) - set(USE_INTERMEDIATE_OBJECTS_TARGET OFF) -endif() - -#============================================================================ -# Settable options -#============================================================================ - -option(BUILD_STATIC "Build static library" ON) -option(BUILD_SHARED "Build shared library" OFF) -option(BUILD_TESTING "Build library tests" OFF) -option(BUILD_DOCUMENTATION "Use Doxygen to create the HTML based API documentation" OFF) -option(USE_INTERMEDIATE_OBJECTS_TARGET "Use a common intermediate objects target for the static and shared library targets" OFF) - -if (${CMAKE_VERSION} VERSION_GREATER "3.1") - option(USE_OPENMP "Enable OpenMP to parallelize some of the algorithms. Note that this isn't always faster, see https://www.cryptopp.com/wiki/OpenMP" OFF) -endif() - - -# These are IA-32 options. -option(DISABLE_ASM "Disable ASM" OFF) -option(DISABLE_SSSE3 "Disable SSSE3" OFF) -option(DISABLE_SSE4 "Disable SSE4" OFF) -option(DISABLE_AESNI "Disable AES-NI" OFF) -option(DISABLE_CLMUL "Disable CLMUL" OFF) -option(DISABLE_SHA "Disable SHA" OFF) -option(DISABLE_AVX "Disable AVX" OFF) -option(DISABLE_AVX2 "Disable AVX2" OFF) - -# These are ARM A-32 options -option(DISABLE_ARM_NEON "Disable NEON" OFF) - -# These are Aarch64 options -option(DISABLE_ARM_AES "Disable ASIMD" OFF) -option(DISABLE_ARM_AES "Disable AES" OFF) -option(DISABLE_ARM_PMULL "Disable PMULL" OFF) -option(DISABLE_ARM_SHA "Disable SHA" OFF) - -# These are PowerPC options -option(DISABLE_ALTIVEC "Disable Altivec" OFF) -option(DISABLE_POWER7 "Disable POWER7" OFF) -option(DISABLE_POWER8 "Disable POWER8" OFF) -option(DISABLE_POWER9 "Disable POWER9" OFF) - -set(CRYPTOPP_DATA_DIR "" CACHE PATH "Crypto++ test data directory") - -#============================================================================ -# Compiler options -#============================================================================ - -set(CRYPTOPP_COMPILE_DEFINITIONS) -set(CRYPTOPP_COMPILE_OPTIONS) - -# Stop hiding the damn output... -# set(CMAKE_VERBOSE_MAKEFILE ON) - -# Stop CMake complaining... -if (CMAKE_SYSTEM_NAME STREQUAL "Darwin") - set(MACOSX_RPATH FALSE) -endif() - -# Always 1 ahead in Master. Also see http://groups.google.com/forum/#!topic/cryptopp-users/SFhqLDTQPG4 -set(LIB_VER ${cryptopp_VERSION_MAJOR}${cryptopp_VERSION_MINOR}${cryptopp_VERSION_PATCH}) - -if (CMAKE_CXX_COMPILER_ID STREQUAL "Intel") - list(APPEND CRYPTOPP_COMPILE_OPTIONS -wd68 -wd186 -wd279 -wd327 -wd161 -wd3180) -endif () - -# Also see http://github.com/weidai11/cryptopp/issues/395 -if (DISABLE_ASM) - list(APPEND CRYPTOPP_COMPILE_DEFINITIONS CRYPTOPP_DISABLE_ASM) -endif () -if (DISABLE_SSSE3) - list(APPEND CRYPTOPP_COMPILE_DEFINITIONS CRYPTOPP_DISABLE_SSSE3) -endif () -if (DISABLE_SSE4) - list(APPEND CRYPTOPP_COMPILE_DEFINITIONS CRYPTOPP_DISABLE_SSSE4) -endif () -if (DISABLE_CLMUL) - list(APPEND CRYPTOPP_COMPILE_DEFINITIONS CRYPTOPP_DISABLE_CLMUL) -endif () -if (DISABLE_AESNI) - list(APPEND CRYPTOPP_COMPILE_DEFINITIONS CRYPTOPP_DISABLE_AESNI) -endif () -if (DISABLE_RDRAND) - list(APPEND CRYPTOPP_COMPILE_DEFINITIONS CRYPTOPP_DISABLE_RDRAND) -endif () -if (DISABLE_RDSEED) - list(APPEND CRYPTOPP_COMPILE_DEFINITIONS CRYPTOPP_DISABLE_RDSEED) -endif () -if (DISABLE_AVX) - list(APPEND CRYPTOPP_COMPILE_DEFINITIONS CRYPTOPP_DISABLE_AVX) -endif () -if (DISABLE_AVX2) - list(APPEND CRYPTOPP_COMPILE_DEFINITIONS CRYPTOPP_DISABLE_AVX2) -endif () -if (DISABLE_SHA) - list(APPEND CRYPTOPP_COMPILE_DEFINITIONS CRYPTOPP_DISABLE_SHA) -endif () -if (DISABLE_ARM_NEON) - list(APPEND CRYPTOPP_COMPILE_DEFINITIONS CRYPTOPP_DISABLE_ARM_NEON) -endif () -if (DISABLE_ARM_ASIMD) - list(APPEND CRYPTOPP_COMPILE_DEFINITIONS CRYPTOPP_DISABLE_ARM_ASIMD) -endif () -if (DISABLE_ARM_AES) - list(APPEND CRYPTOPP_COMPILE_DEFINITIONS CRYPTOPP_DISABLE_ARM_AES) -endif () -if (DISABLE_ARM_PMULL) - list(APPEND CRYPTOPP_COMPILE_DEFINITIONS CRYPTOPP_DISABLE_ARM_PMULL) -endif () -if (DISABLE_ARM_SHA) - list(APPEND CRYPTOPP_COMPILE_DEFINITIONS CRYPTOPP_DISABLE_ARM_SHA) -endif () -if (DISABLE_ALTIVEC) - list(APPEND CRYPTOPP_COMPILE_DEFINITIONS CRYPTOPP_DISABLE_ALTIVEC) -endif () -if (DISABLE_POWER7) - list(APPEND CRYPTOPP_COMPILE_DEFINITIONS CRYPTOPP_DISABLE_POWER7) -endif () -if (DISABLE_POWER8) - list(APPEND CRYPTOPP_COMPILE_DEFINITIONS CRYPTOPP_DISABLE_POWER8) -endif () -if (DISABLE_POWER9) - list(APPEND CRYPTOPP_COMPILE_DEFINITIONS CRYPTOPP_DISABLE_POWER9) -endif () -if (NOT CRYPTOPP_DATA_DIR STREQUAL "") - list(APPEND CRYPTOPP_COMPILE_DEFINITIONS "CRYPTOPP_DATA_DIR=${CRYPTOPP_DATA_DIR}") -endif () - -############################################################################### - -# Try to find a Posix compatible grep and sed. Solaris, Digital Unix, -# Tru64, HP-UX and a few others need tweaking - -if (EXISTS /usr/xpg4/bin/grep) - set(GREP_CMD /usr/xpg4/bin/grep) -elseif (EXISTS /usr/gnu/bin/grep) - set(GREP_CMD /usr/gnu/bin/grep) -elseif (EXISTS /usr/linux/bin/grep) - set(GREP_CMD /usr/linux/bin/grep) -else () - set(GREP_CMD grep) -endif () - -if (EXISTS /usr/xpg4/bin/sed) - set(SED_CMD /usr/xpg4/bin/sed) -elseif (EXISTS /usr/gnu/bin/sed) - set(SED_CMD /usr/gnu/bin/sed) -elseif (EXISTS /usr/linux/bin/sed) - set(SED_CMD /usr/linux/bin/sed) -else () - set(SED_CMD sed) -endif () - -############################################################################### - -function(CheckCompileOption opt var) - - if (MSVC) - - # TODO: improve this... - CHECK_CXX_COMPILER_FLAG(${opt} ${var}) - - elseif (CMAKE_CXX_COMPILER_ID MATCHES "SunPro") - - message(STATUS "Performing Test ${var}") - execute_process( - COMMAND sh -c "${CMAKE_CXX_COMPILER} ${CMAKE_CXX_FLAGS} ${opt} -c ${TEST_CXX_FILE} 2>&1" - COMMAND ${GREP_CMD} -i -c -E "illegal value ignored" - RESULT_VARIABLE COMMAND_RESULT - OUTPUT_VARIABLE COMMAND_OUTPUT - OUTPUT_STRIP_TRAILING_WHITESPACE) - - # No dereference below. Thanks for the warning, CMake (not!). - if (COMMAND_RESULT AND NOT COMMAND_OUTPUT) - set(${var} 1 PARENT_SCOPE) - message(STATUS "Performing Test ${var} - Success") - else () - set(${var} 0 PARENT_SCOPE) - message(STATUS "Performing Test ${var} - Failed") - endif () - - # Must use CMAKE_CXX_COMPILER here due to XLC 13.1 and LLVM front-end. - elseif (CMAKE_CXX_COMPILER MATCHES "xlC") - - message(STATUS "Performing Test ${var}") - execute_process( - COMMAND sh -c "${CMAKE_CXX_COMPILER} ${CMAKE_CXX_FLAGS} ${opt} -c ${TEST_CXX_FILE} 2>&1" - COMMAND ${GREP_CMD} -i -c -E "Unrecognized value" - RESULT_VARIABLE COMMAND_RESULT - OUTPUT_VARIABLE COMMAND_OUTPUT - OUTPUT_STRIP_TRAILING_WHITESPACE) - - # No dereference below. Thanks for the warning, CMake (not!). - if (COMMAND_RESULT AND NOT COMMAND_OUTPUT) - set(${var} 1 PARENT_SCOPE) - message(STATUS "Performing Test ${var} - Success") - else () - set(${var} 0 PARENT_SCOPE) - message(STATUS "Performing Test ${var} - Failed") - endif () - - else () - - CHECK_CXX_COMPILER_FLAG(${opt} ${var}) - - endif () - -endfunction(CheckCompileOption) - -function(CheckCompileLinkOption opt var prog) - - if (MSVC) - - # TODO: improve this... - CHECK_CXX_COMPILER_FLAG(${opt} ${var}) - - elseif (APPLE) - - message(STATUS "Performing Test ${var}") - try_compile(COMMAND_SUCCESS ${CMAKE_BINARY_DIR} ${prog} COMPILE_DEFINITIONS ${opt}) - if (COMMAND_SUCCESS) - set(${var} 1 PARENT_SCOPE) - message(STATUS "Performing Test ${var} - Success") - else () - set(${var} 0 PARENT_SCOPE) - message(STATUS "Performing Test ${var} - Failed") - endif () - - else () - - message(STATUS "Performing Test ${var}") - try_compile(COMMAND_SUCCESS ${CMAKE_BINARY_DIR} ${prog} COMPILE_DEFINITIONS ${opt}) - if (COMMAND_SUCCESS) - set(${var} 1 PARENT_SCOPE) - message(STATUS "Performing Test ${var} - Success") - else () - set(${var} 0 PARENT_SCOPE) - message(STATUS "Performing Test ${var} - Failed") - endif () - - endif () - -endfunction(CheckCompileLinkOption) - -function(AddCompileOption opt) - - if ("${COMMAND_OUTPUT}" NOT STREQUAL "") - list(APPEND CRYPTOPP_COMPILE_OPTIONS "${opt}") - endif () - -endfunction(AddCompileOption) - -############################################################################### - -function(DumpMachine output pattern) - - if (MSVC) - - # CMake does not provide a generic shell/terminal mechanism - # and Microsoft environments don't know what 'sh' is. - set(${output} 0 PARENT_SCOPE) - - else () - execute_process( - COMMAND sh -c "${CMAKE_CXX_COMPILER} -dumpmachine 2>&1" - COMMAND ${GREP_CMD} -i -c -E "${pattern}" - OUTPUT_VARIABLE ${output} - OUTPUT_STRIP_TRAILING_WHITESPACE) - set(${output} "${${output}}" PARENT_SCOPE) - endif() - -endfunction(DumpMachine) - -# Thanks to Anonimal for MinGW; see http://github.com/weidai11/cryptopp/issues/466 -DumpMachine(CRYPTOPP_AMD64 "(x86_64|AMD64|amd64)") -DumpMachine(CRYPTOPP_I386 "^i.86$") -DumpMachine(CRYPTOPP_MINGW32 "^mingw32") -DumpMachine(CRYPTOPP_MINGW64 "(w64-mingw32|mingw64)") -DumpMachine(CRYPTOPP_ARMV8 "(armv8|arm64|aarch32|aarch64)") -DumpMachine(CRYPTOPP_ARM32 "(arm|armhf|arm7l|eabihf)") -DumpMachine(CRYPTOPP_PPC32 "^(powerpc|ppc)") -DumpMachine(CRYPTOPP_PPC64 "^ppc64") - -# Cleanup 32/64 bit -if (CRYPTOPP_AMD64) - set (CRYPTOPP_I386 0) -endif () - -if (CRYPTOPP_ARMV8) - set (CRYPTOPP_ARM32 0) -endif () - -if (CRYPTOPP_PPC64) - set (CRYPTOPP_PPC32 0) -endif () - - -############################################################################### - -# Test SunCC for a string like 'CC: Sun C++ 5.13 SunOS_i386' -if (NOT CRYPTOPP_SOLARIS AND NOT MSVC) - execute_process(COMMAND sh -c "${CMAKE_CXX_COMPILER} -V 2>&1" - COMMAND ${GREP_CMD} -i -c "SunOS" - OUTPUT_VARIABLE CRYPTOPP_SOLARIS - OUTPUT_STRIP_TRAILING_WHITESPACE) -endif () - -# Test GCC for a string like 'i386-pc-solaris2.11' -if (NOT CRYPTOPP_SOLARIS AND NOT MSVC) - execute_process(COMMAND sh -c "${CMAKE_CXX_COMPILER} -dumpmachine 2>&1" - COMMAND ${GREP_CMD} -i -c "Solaris" - OUTPUT_VARIABLE CRYPTOPP_SOLARIS - OUTPUT_STRIP_TRAILING_WHITESPACE) -endif () - -# Fixup PowerPC. If both 32-bit and 64-bit use 64-bit. -if (CRYPTOPP_PPC32 AND CRYPTOPP_PPC64) - unset(CRYPTOPP_PPC32) -endif () - -# Fixup for xlC compiler. -dumpmachine fails so we miss PowerPC -# TODO: something better than proxying the platform via compiler -# Must use CMAKE_CXX_COMPILER here due to XLC 13.1 and LLVM front-end. -if (CMAKE_CXX_COMPILER MATCHES "xlC") - message ("-- Fixing platform due to IBM xlC") - set(CRYPTOPP_PPC64 1) -endif () - -# DumpMachine SunCC style -if (CMAKE_CXX_COMPILER_ID STREQUAL "SunPro") - - # SunCC is 32-bit, but it builds both 32 and 64 bit. Use - execute_process(COMMAND sh -c "${CMAKE_CXX_COMPILER} -V 2>&1" - COMMAND ${GREP_CMD} -i -c "Sparc" - OUTPUT_VARIABLE CRYPTOPP_SPARC - OUTPUT_STRIP_TRAILING_WHITESPACE) - - execute_process(COMMAND sh -c "${CMAKE_CXX_COMPILER} -V 2>&1" - COMMAND ${GREP_CMD} -i -c -E "i386|i86" - OUTPUT_VARIABLE CRYPTOPP_I386 - OUTPUT_STRIP_TRAILING_WHITESPACE) - - execute_process(COMMAND isainfo -k - COMMAND ${GREP_CMD} -i -c "i386" - OUTPUT_VARIABLE KERNEL_I386 - OUTPUT_STRIP_TRAILING_WHITESPACE) - - execute_process(COMMAND isainfo -k - COMMAND ${GREP_CMD} -i -c "amd64" - OUTPUT_VARIABLE KERNEL_AMD64 - OUTPUT_STRIP_TRAILING_WHITESPACE) - - execute_process(COMMAND isainfo -k - COMMAND ${GREP_CMD} -i -c "Sparc" - OUTPUT_VARIABLE KERNEL_SPARC - OUTPUT_STRIP_TRAILING_WHITESPACE) - - execute_process(COMMAND isainfo -k - COMMAND ${GREP_CMD} -i -c -E "UltraSarc|Sparc64|SparcV9" - OUTPUT_VARIABLE KERNEL_SPARC64 - OUTPUT_STRIP_TRAILING_WHITESPACE) - -endif () - -############################################################################### - -# TODO: what about ICC and LLVM on Windows? -if (MSVC) - if (CMAKE_SYSTEM_VERSION MATCHES "10\\.0.*") - # https://docs.microsoft.com/en-us/cpp/porting/modifying-winver-and-win32-winnt - list(APPEND CRYPTOPP_COMPILE_DEFINITIONS "_WIN32_WINNT=0x0A00") - endif () - # winapifamily.h is missing on AppVeyor machines - INCLUDE (CheckIncludeFiles) - CHECK_INCLUDE_FILES (winapifamily.h HAVE_WINAPIFAMILY_H) - if (HAVE_WINAPIFAMILY_H) - list(APPEND CRYPTOPP_COMPILE_OPTIONS "/FIwinapifamily.h") - endif() -endif () - -# Enable PIC for all target machines except 32-bit i386 due to register pressures. -if (NOT CRYPTOPP_I386) - SET(CMAKE_POSITION_INDEPENDENT_CODE 1) -endif () - -# IBM XLC compiler options for AIX and Linux. -# Must use CMAKE_CXX_COMPILER here due to XLC 13.1 and LLVM front-end. -if (CMAKE_CXX_COMPILER MATCHES "xlC") - - #CheckCompileLinkOption("-qxlcompatmacros" CRYPTOPP_XLC_COMPAT "${TEST_CXX_FILE}") - #if (CRYPTOPP_XLC_COMPAT) - # list(APPEND CRYPTOPP_COMPILE_OPTIONS "-qxlcompatmacros") - #endif () - - CheckCompileLinkOption("-qrtti" CRYPTOPP_PPC_RTTI "${TEST_CXX_FILE}") - if (CRYPTOPP_PPC_RTTI) - list(APPEND CRYPTOPP_COMPILE_OPTIONS "-qrtti") - endif () - - CheckCompileLinkOption("-qmaxmem=-1" CRYPTOPP_PPC_MAXMEM "${TEST_CXX_FILE}") - if (CRYPTOPP_PPC_MAXMEM) - list(APPEND CRYPTOPP_COMPILE_OPTIONS "-qmaxmem=-1") - endif () - - CheckCompileLinkOption("-qthreaded" CRYPTOPP_PPC_THREADED "${TEST_CXX_FILE}") - if (CRYPTOPP_PPC_THREADED) - list(APPEND CRYPTOPP_COMPILE_OPTIONS "-qthreaded") - endif () -endif () - -# Solaris specific -if (CRYPTOPP_SOLARIS) - - # SunCC needs -template=no%extdef - if (CMAKE_CXX_COMPILER_ID STREQUAL "SunPro") - list(APPEND CRYPTOPP_COMPILE_OPTIONS "-template=no%extdef") - endif () - - # SunCC needs -xregs=no%appl on Sparc (not x86) for libraries (not test program) - # TODO: wire this up properly - if (CMAKE_CXX_COMPILER_ID STREQUAL "SunPro" AND (CRYPTOPP_SPARC OR CRYPTOPP_SPARC64)) - list(APPEND CRYPTOPP_COMPILE_OPTIONS "-xregs=no%appl") - endif () - - # GCC needs to enable use of '/' for division in the assembler - if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") - list(APPEND CRYPTOPP_COMPILE_OPTIONS "-Wa,--divide") - endif () - -endif () - -#============================================================================ -# Sources & headers -#============================================================================ - -# Library headers -file(GLOB cryptopp_HEADERS ${SRC_DIR}/*.h) - -# Remove headers used to build test suite -list(REMOVE_ITEM cryptopp_HEADERS - ${SRC_DIR}/bench.h - ${SRC_DIR}/validate.h - ) - -# Test sources. You can use the GNUmakefile to generate the list: `make sources`. -set(cryptopp_SOURCES_TEST - ${SRC_DIR}/test.cpp - ${SRC_DIR}/bench1.cpp - ${SRC_DIR}/bench2.cpp - ${SRC_DIR}/bench3.cpp - ${SRC_DIR}/validat0.cpp - ${SRC_DIR}/validat1.cpp - ${SRC_DIR}/validat2.cpp - ${SRC_DIR}/validat3.cpp - ${SRC_DIR}/validat4.cpp - ${SRC_DIR}/validat5.cpp - ${SRC_DIR}/validat6.cpp - ${SRC_DIR}/validat7.cpp - ${SRC_DIR}/validat8.cpp - ${SRC_DIR}/validat9.cpp - ${SRC_DIR}/validat10.cpp - ${SRC_DIR}/regtest1.cpp - ${SRC_DIR}/regtest2.cpp - ${SRC_DIR}/regtest3.cpp - ${SRC_DIR}/regtest4.cpp - ${SRC_DIR}/datatest.cpp - ${SRC_DIR}/fipsalgt.cpp - ${SRC_DIR}/fipstest.cpp - ${SRC_DIR}/dlltest.cpp - #${SRC_DIR}/adhoc.cpp - ) - -# Library sources. You can use the GNUmakefile to generate the list: `make sources`. -# Makefile sorted them at http://github.com/weidai11/cryptopp/pull/426. -file(GLOB cryptopp_SOURCES ${SRC_DIR}/*.cpp) -list(SORT cryptopp_SOURCES) -list(REMOVE_ITEM cryptopp_SOURCES - ${SRC_DIR}/cryptlib.cpp - ${SRC_DIR}/cpu.cpp - ${SRC_DIR}/integer.cpp - ${SRC_DIR}/pch.cpp - ${SRC_DIR}/simple.cpp - ${SRC_DIR}/adhoc.cpp - ${cryptopp_SOURCES_TEST} - ) -set(cryptopp_SOURCES - ${SRC_DIR}/cryptlib.cpp - ${SRC_DIR}/cpu.cpp - ${SRC_DIR}/integer.cpp - ${cryptopp_SOURCES} - ) - -if(ANDROID) - include_directories(${ANDROID_NDK}/sources/android/cpufeatures) - list(APPEND cryptopp_SOURCES ${ANDROID_NDK}/sources/android/cpufeatures/cpu-features.c) -endif() - -set(cryptopp_SOURCES_ASM) - -if (MSVC AND NOT DISABLE_ASM) - if (${CMAKE_GENERATOR} MATCHES ".*ARM") - message(STATUS "Disabling ASM because ARM is specified as target platform.") - else () - enable_language(ASM_MASM) - list(APPEND cryptopp_SOURCES_ASM - ${SRC_DIR}/rdrand.asm - ${SRC_DIR}/rdseed.asm - ) - if (CMAKE_SIZEOF_VOID_P EQUAL 8) - list(APPEND cryptopp_SOURCES_ASM - ${SRC_DIR}/x64dll.asm - ${SRC_DIR}/x64masm.asm - ) - set_source_files_properties(${cryptopp_SOURCES_ASM} PROPERTIES COMPILE_DEFINITIONS "_M_X64") - else () - set_source_files_properties(${cryptopp_SOURCES_ASM} PROPERTIES COMPILE_DEFINITIONS "_M_X86" COMPILE_FLAGS "/safeseh") - endif () - set_source_files_properties(${cryptopp_SOURCES_ASM} PROPERTIES LANGUAGE ASM_MASM) - endif () -endif () - -#============================================================================ -# Architecture flags -#============================================================================ - -# TODO: Android, AIX, IBM xlC, iOS and a few other profiles are missing. - -# New as of Pull Request 461, http://github.com/weidai11/cryptopp/pull/461. -# Must use CMAKE_CXX_COMPILER here due to XLC 13.1 and LLVM front-end. -if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Intel" OR CMAKE_CXX_COMPILER MATCHES "xlC") - - if (CRYPTOPP_AMD64 OR CRYPTOPP_I386) - - # For Darwin and a GCC port compiler, we need to check for -Wa,-q first. -Wa,-q - # is a GCC option, and it tells GCC to use the Clang Integrated Assembler. We - # need LLVM's assembler because GAS is too old on Apple platforms. GAS will - # not assemble modern ISA, like AVX or AVX2. - if (CMAKE_SYSTEM_NAME STREQUAL "Darwin") - CheckCompileLinkOption("-Wa,-q" CRYPTOPP_X86_WAQ - "${TEST_PROG_DIR}/test_x86_sse2.cpp") - - if (CRYPTOPP_X86_WAQ) - list(APPEND CRYPTOPP_COMPILE_OPTIONS "-Wa,-q") - endif () - endif () - - # Now we can move on to normal feature testing. - CheckCompileLinkOption("-msse2" CRYPTOPP_X86_SSE2 - "${TEST_PROG_DIR}/test_x86_sse2.cpp") - CheckCompileLinkOption("-mssse3" CRYPTOPP_X86_SSSE3 - "${TEST_PROG_DIR}/test_x86_ssse3.cpp") - CheckCompileLinkOption("-msse4.1" CRYPTOPP_X86_SSE41 - "${TEST_PROG_DIR}/test_x86_sse41.cpp") - CheckCompileLinkOption("-msse4.2" CRYPTOPP_X86_SSE42 - "${TEST_PROG_DIR}/test_x86_sse42.cpp") - CheckCompileLinkOption("-mssse3 -mpclmul" CRYPTOPP_X86_CLMUL - "${TEST_PROG_DIR}/test_x86_clmul.cpp") - CheckCompileLinkOption("-msse4.1 -maes" CRYPTOPP_X86_AES - "${TEST_PROG_DIR}/test_x86_aes.cpp") - CheckCompileLinkOption("-mavx" CRYPTOPP_X86_AVX - "${TEST_PROG_DIR}/test_x86_avx.cpp") - CheckCompileLinkOption("-mavx2" CRYPTOPP_X86_AVX2 - "${TEST_PROG_DIR}/test_x86_avx2.cpp") - CheckCompileLinkOption("-msse4.2 -msha" CRYPTOPP_X86_SHA - "${TEST_PROG_DIR}/test_x86_sha.cpp") - if (EXISTS "${TEST_PROG_DIR}/test_asm_mixed.cpp") - CheckCompileLinkOption("" CRYPTOPP_MIXED_ASM - "${TEST_PROG_DIR}/test_asm_mixed.cpp") - else () - CheckCompileLinkOption("" CRYPTOPP_MIXED_ASM - "${TEST_PROG_DIR}/test_mixed_asm.cpp") - endif () - - # https://github.com/weidai11/cryptopp/issues/756 - if (NOT CRYPTOPP_MIXED_ASM) - list(APPEND CRYPTOPP_COMPILE_OPTIONS "-DCRYPTOPP_DISABLE_MIXED_ASM") - endif () - - if (NOT CRYPTOPP_X86_SSE2 AND NOT DISABLE_ASM) - list(APPEND CRYPTOPP_COMPILE_OPTIONS "-DCRYPTOPP_DISABLE_ASM") - elseif (CRYPTOPP_X86_SSE2 AND NOT DISABLE_ASM) - set_source_files_properties(${SRC_DIR}/sse_simd.cpp PROPERTIES COMPILE_FLAGS "-msse2") - set_source_files_properties(${SRC_DIR}/chacha_simd.cpp PROPERTIES COMPILE_FLAGS "-msse2") - set_source_files_properties(${SRC_DIR}/donna_sse.cpp PROPERTIES COMPILE_FLAGS "-msse2") - endif () - if (NOT CRYPTOPP_X86_SSSE3 AND NOT DISABLE_SSSE3) - list(APPEND CRYPTOPP_COMPILE_OPTIONS "-DCRYPTOPP_DISABLE_SSSE3") - elseif (CRYPTOPP_X86_SSSE3 AND NOT DISABLE_SSSE3) - set_source_files_properties(${SRC_DIR}/aria_simd.cpp PROPERTIES COMPILE_FLAGS "-mssse3") - set_source_files_properties(${SRC_DIR}/cham_simd.cpp PROPERTIES COMPILE_FLAGS "-mssse3") - set_source_files_properties(${SRC_DIR}/keccak_simd.cpp PROPERTIES COMPILE_FLAGS "-mssse3") - set_source_files_properties(${SRC_DIR}/lea_simd.cpp PROPERTIES COMPILE_FLAGS "-mssse3") - set_source_files_properties(${SRC_DIR}/lsh256_sse.cpp PROPERTIES COMPILE_FLAGS "-mssse3") - set_source_files_properties(${SRC_DIR}/lsh512_sse.cpp PROPERTIES COMPILE_FLAGS "-mssse3") - set_source_files_properties(${SRC_DIR}/simon128_simd.cpp PROPERTIES COMPILE_FLAGS "-mssse3") - set_source_files_properties(${SRC_DIR}/speck128_simd.cpp PROPERTIES COMPILE_FLAGS "-mssse3") - if (NOT CRYPTOPP_X86_SSE41 AND NOT DISABLE_SSE4) - list(APPEND CRYPTOPP_COMPILE_OPTIONS "-DCRYPTOPP_DISABLE_SSE4") - elseif (CRYPTOPP_X86_SSE41 AND NOT DISABLE_SSE4) - set_source_files_properties(${SRC_DIR}/blake2s_simd.cpp PROPERTIES COMPILE_FLAGS "-msse4.1") - set_source_files_properties(${SRC_DIR}/blake2b_simd.cpp PROPERTIES COMPILE_FLAGS "-msse4.1") - endif () - if (NOT CRYPTOPP_X86_SSE42 AND NOT DISABLE_SSE4) - list(APPEND CRYPTOPP_COMPILE_OPTIONS "-DCRYPTOPP_DISABLE_SSE4") - elseif (CRYPTOPP_X86_SSE42 AND NOT DISABLE_SSE4) - set_source_files_properties(${SRC_DIR}/crc_simd.cpp PROPERTIES COMPILE_FLAGS "-msse4.2") - if (NOT CRYPTOPP_X86_CLMUL AND NOT DISABLE_CLMUL) - list(APPEND CRYPTOPP_COMPILE_OPTIONS "-DCRYPTOPP_DISABLE_CLMUL") - elseif (CRYPTOPP_X86_CLMUL AND NOT DISABLE_CLMUL) - set_source_files_properties(${SRC_DIR}/gcm_simd.cpp PROPERTIES COMPILE_FLAGS "-mssse3 -mpclmul") - set_source_files_properties(${SRC_DIR}/gf2n_simd.cpp PROPERTIES COMPILE_FLAGS "-mpclmul") - endif () - if (NOT CRYPTOPP_X86_AES AND NOT DISABLE_AES) - list(APPEND CRYPTOPP_COMPILE_OPTIONS "-DCRYPTOPP_DISABLE_AESNI") - elseif (CRYPTOPP_X86_AES AND NOT DISABLE_AES) - set_source_files_properties(${SRC_DIR}/rijndael_simd.cpp PROPERTIES COMPILE_FLAGS "-msse4.1 -maes") - set_source_files_properties(${SRC_DIR}/sm4_simd.cpp PROPERTIES COMPILE_FLAGS "-mssse3 -maes") - endif () - if (NOT CRYPTOPP_X86_AVX2 AND NOT DISABLE_AVX2) - list(APPEND CRYPTOPP_COMPILE_OPTIONS "-DCRYPTOPP_DISABLE_AVX2") - elseif (CRYPTOPP_X86_AVX2 AND NOT DISABLE_AVX2) - set_source_files_properties(${SRC_DIR}/chacha_avx.cpp PROPERTIES COMPILE_FLAGS "-mavx2") - set_source_files_properties(${SRC_DIR}/lsh256_avx.cpp PROPERTIES COMPILE_FLAGS "-mavx2") - set_source_files_properties(${SRC_DIR}/lsh512_avx.cpp PROPERTIES COMPILE_FLAGS "-mavx2") - endif () - if (NOT CRYPTOPP_X86_SHA AND NOT DISABLE_SHA) - list(APPEND CRYPTOPP_COMPILE_OPTIONS "-DCRYPTOPP_DISABLE_SHANI") - elseif (CRYPTOPP_X86_SHA AND NOT DISABLE_SHA) - set_source_files_properties(${SRC_DIR}/sha_simd.cpp PROPERTIES COMPILE_FLAGS "-msse4.2 -msha") - set_source_files_properties(${SRC_DIR}/shacal2_simd.cpp PROPERTIES COMPILE_FLAGS "-msse4.2 -msha") - endif () - endif () - endif () - - elseif (CRYPTOPP_ARMV8) - - # This checks for - CheckCompileLinkOption("-march=armv8-a" CRYPTOPP_ARM_ACLE_HEADER - "${TEST_PROG_DIR}/test_arm_acle_header.cpp") - - # Use if available - if (CRYPTOPP_ARM_NEON_HEADER) - CheckCompileOption("-march=armv8-a -DCRYPTOPP_ARM_ACLE_HEADER=1" CRYPTOPP_ARMV8A_ASIMD) - CheckCompileOption("-march=armv8-a+crc -DCRYPTOPP_ARM_ACLE_HEADER=1" CRYPTOPP_ARMV8A_CRC) - CheckCompileOption("-march=armv8-a+crypto -DCRYPTOPP_ARM_ACLE_HEADER=1" CRYPTOPP_ARMV8A_CRYPTO) - else () - CheckCompileOption("-march=armv8-a" CRYPTOPP_ARMV8A_ASIMD) - CheckCompileOption("-march=armv8-a+crc" CRYPTOPP_ARMV8A_CRC) - CheckCompileOption("-march=armv8-a+crypto" CRYPTOPP_ARMV8A_CRYPTO) - endif () - - if (CRYPTOPP_ARMV8A_ASIMD) - set_source_files_properties(${SRC_DIR}/aria_simd.cpp PROPERTIES COMPILE_FLAGS "-march=armv8-a") - set_source_files_properties(${SRC_DIR}/blake2s_simd.cpp PROPERTIES COMPILE_FLAGS "-march=armv8-a") - set_source_files_properties(${SRC_DIR}/blake2b_simd.cpp PROPERTIES COMPILE_FLAGS "-march=armv8-a") - set_source_files_properties(${SRC_DIR}/chacha_simd.cpp PROPERTIES COMPILE_FLAGS "-march=armv8-a") - set_source_files_properties(${SRC_DIR}/cham_simd.cpp PROPERTIES COMPILE_FLAGS "-march=armv8-a") - set_source_files_properties(${SRC_DIR}/lea_simd.cpp PROPERTIES COMPILE_FLAGS "-march=armv8-a") - set_source_files_properties(${SRC_DIR}/neon_simd.cpp PROPERTIES COMPILE_FLAGS "-march=armv8-a") - set_source_files_properties(${SRC_DIR}/simon128_simd.cpp PROPERTIES COMPILE_FLAGS "-march=armv8-a") - set_source_files_properties(${SRC_DIR}/speck128_simd.cpp PROPERTIES COMPILE_FLAGS "-march=armv8-a") - else () - list(APPEND CRYPTOPP_COMPILE_OPTIONS "-DCRYPTOPP_DISABLE_ARM_ASIMD") - endif () - if (CRYPTOPP_ARMV8A_CRC) - set_source_files_properties(${SRC_DIR}/crc_simd.cpp PROPERTIES COMPILE_FLAGS "-march=armv8-a+crc") - else () - list(APPEND CRYPTOPP_COMPILE_OPTIONS "-DCRYPTOPP_DISABLE_ARM_CRC32") - endif () - if (CRYPTOPP_ARMV8A_CRYPTO) - set_source_files_properties(${SRC_DIR}/gcm_simd.cpp PROPERTIES COMPILE_FLAGS "-march=armv8-a+crypto") - set_source_files_properties(${SRC_DIR}/gf2n_simd.cpp PROPERTIES COMPILE_FLAGS "-march=armv8-a+crypto") - set_source_files_properties(${SRC_DIR}/rijndael_simd.cpp PROPERTIES COMPILE_FLAGS "-march=armv8-a+crypto") - set_source_files_properties(${SRC_DIR}/sha_simd.cpp PROPERTIES COMPILE_FLAGS "-march=armv8-a+crypto") - set_source_files_properties(${SRC_DIR}/shacal2_simd.cpp PROPERTIES COMPILE_FLAGS "-march=armv8-a+crypto") - else () - list(APPEND CRYPTOPP_COMPILE_OPTIONS "-DCRYPTOPP_DISABLE_ARM_AES") - list(APPEND CRYPTOPP_COMPILE_OPTIONS "-DCRYPTOPP_DISABLE_ARM_PMULL") - list(APPEND CRYPTOPP_COMPILE_OPTIONS "-DCRYPTOPP_DISABLE_ARM_SHA") - endif () - - elseif (CRYPTOPP_ARM32) - - # This checks for - CheckCompileLinkOption("-march=armv7-a -mfpu=neon" CRYPTOPP_ARM_NEON_HEADER - "${TEST_PROG_DIR}/test_arm_neon_header.cpp") - - # Use if available - if (CRYPTOPP_ARM_NEON_HEADER) - CheckCompileLinkOption("-march=armv7-a -mfpu=neon -DCRYPTOPP_ARM_NEON_HEADER=1" CRYPTOPP_ARMV7A_NEON - "${TEST_PROG_DIR}/test_arm_neon.cpp") - else () - CheckCompileLinkOption("-march=armv7-a -mfpu=neon" CRYPTOPP_ARMV7A_NEON - "${TEST_PROG_DIR}/test_arm_neon.cpp") - endif () - - if (CRYPTOPP_ARMV7A_NEON) - - # Add Cryptogams ASM files for ARM on Linux. Linux is required due to GNU Assembler. - # AES requires -mthumb under Clang. Do not add -mthumb for SHA for any files. - if (CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Android") - list(APPEND cryptopp_SOURCES ${SRC_DIR}/aes_armv4.S) - list(APPEND cryptopp_SOURCES ${SRC_DIR}/sha1_armv4.S) - list(APPEND cryptopp_SOURCES ${SRC_DIR}/sha256_armv4.S) - list(APPEND cryptopp_SOURCES ${SRC_DIR}/sha512_armv4.S) - - set_source_files_properties(${SRC_DIR}/aes_armv4.S PROPERTIES LANGUAGE CXX) - set_source_files_properties(${SRC_DIR}/sha1_armv4.S PROPERTIES LANGUAGE CXX) - set_source_files_properties(${SRC_DIR}/sha256_armv4.S PROPERTIES LANGUAGE CXX) - set_source_files_properties(${SRC_DIR}/sha512_armv4.S PROPERTIES LANGUAGE CXX) - - if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") - set_source_files_properties(${SRC_DIR}/aes_armv4.S PROPERTIES COMPILE_FLAGS "-march=armv7-a -mthumb -mfpu=neon -Wa,--noexecstack") - else () - set_source_files_properties(${SRC_DIR}/aes_armv4.S PROPERTIES COMPILE_FLAGS "-march=armv7-a -mfpu=neon -Wa,--noexecstack") - endif () - - set_source_files_properties(${SRC_DIR}/sha1_armv4.S PROPERTIES COMPILE_FLAGS "-march=armv7-a -mfpu=neon -Wa,--noexecstack") - set_source_files_properties(${SRC_DIR}/sha256_armv4.S PROPERTIES COMPILE_FLAGS "-march=armv7-a -mfpu=neon -Wa,--noexecstack") - set_source_files_properties(${SRC_DIR}/sha512_armv4.S PROPERTIES COMPILE_FLAGS "-march=armv7-a -mfpu=neon -Wa,--noexecstack") - endif () - - set_source_files_properties(${SRC_DIR}/aria_simd.cpp PROPERTIES COMPILE_FLAGS "-march=armv7-a -mfpu=neon") - set_source_files_properties(${SRC_DIR}/blake2s_simd.cpp PROPERTIES COMPILE_FLAGS "-march=armv7-a -mfpu=neon") - set_source_files_properties(${SRC_DIR}/blake2b_simd.cpp PROPERTIES COMPILE_FLAGS "-march=armv7-a -mfpu=neon") - set_source_files_properties(${SRC_DIR}/chacha_simd.cpp PROPERTIES COMPILE_FLAGS "-march=armv7-a -mfpu=neon") - set_source_files_properties(${SRC_DIR}/cham_simd.cpp PROPERTIES COMPILE_FLAGS "-march=armv7-a -mfpu=neon") - set_source_files_properties(${SRC_DIR}/crc_simd.cpp PROPERTIES COMPILE_FLAGS "-march=armv7-a -mfpu=neon") - set_source_files_properties(${SRC_DIR}/lea_simd.cpp PROPERTIES COMPILE_FLAGS "-march=armv7-a -mfpu=neon") - set_source_files_properties(${SRC_DIR}/gcm_simd.cpp PROPERTIES COMPILE_FLAGS "-march=armv7-a -mfpu=neon") - set_source_files_properties(${SRC_DIR}/rijndael_simd.cpp PROPERTIES COMPILE_FLAGS "-march=armv7-a -mfpu=neon") - set_source_files_properties(${SRC_DIR}/neon_simd.cpp PROPERTIES COMPILE_FLAGS "-march=armv7-a -mfpu=neon") - set_source_files_properties(${SRC_DIR}/sha_simd.cpp PROPERTIES COMPILE_FLAGS "-march=armv7-a -mfpu=neon") - set_source_files_properties(${SRC_DIR}/simon128_simd.cpp PROPERTIES COMPILE_FLAGS "-march=armv7-a -mfpu=neon") - set_source_files_properties(${SRC_DIR}/speck128_simd.cpp PROPERTIES COMPILE_FLAGS "-march=armv7-a -mfpu=neon") - set_source_files_properties(${SRC_DIR}/sm4_simd.cpp PROPERTIES COMPILE_FLAGS "-march=armv7-a -mfpu=neon") - else () - list(APPEND CRYPTOPP_COMPILE_OPTIONS "-DCRYPTOPP_DISABLE_ARM_NEON") - endif () - - elseif (CRYPTOPP_PPC32 OR CRYPTOPP_PPC64) - - # XLC requires -qaltivec in addition to Arch or CPU option - # Disable POWER9 due to https://github.com/weidai11/cryptopp/issues/986. - if (CMAKE_CXX_COMPILER MATCHES "xlC") - set(CRYPTOPP_ALTIVEC_FLAGS "-qaltivec") - set(CRYPTOPP_POWER4_FLAGS "-qarch=pwr4 -qaltivec") - set(CRYPTOPP_POWER5_FLAGS "-qarch=pwr5 -qaltivec") - set(CRYPTOPP_POWER6_FLAGS "-qarch=pwr6 -qaltivec") - set(CRYPTOPP_POWER7_VSX_FLAG "-qarch=pwr7 -qvsx -qaltivec") - set(CRYPTOPP_POWER7_PWR_FLAGS "-qarch=pwr7 -qaltivec") - set(CRYPTOPP_POWER8_FLAGS "-qarch=pwr8 -qaltivec") - #set(CRYPTOPP_POWER9_FLAGS "-qarch=pwr9 -qaltivec") - else () - set(CRYPTOPP_ALTIVEC_FLAGS "-maltivec") - set(CRYPTOPP_POWER7_VSX_FLAGS "-mcpu=power7 -mvsx") - set(CRYPTOPP_POWER7_PWR_FLAGS "-mcpu=power7") - set(CRYPTOPP_POWER8_FLAGS "-mcpu=power8") - #set(CRYPTOPP_POWER9_FLAGS "-mcpu=power9") - endif () - - CheckCompileLinkOption("${CRYPTOPP_ALTIVEC_FLAGS}" PPC_ALTIVEC_FLAG - "${TEST_PROG_DIR}/test_ppc_altivec.cpp") - - # Hack for XLC. Find the lowest PWR architecture. - if (CMAKE_CXX_COMPILER MATCHES "xlC") - if (NOT PPC_ALTIVEC_FLAG) - CheckCompileLinkOption("${CRYPTOPP_POWER4_FLAGS}" PPC_POWER4_FLAG - "${TEST_PROG_DIR}/test_ppc_altivec.cpp") - if (PPC_POWER4_FLAG) - set(PPC_ALTIVEC_FLAG 1) - set(CRYPTOPP_ALTIVEC_FLAGS "${CRYPTOPP_POWER4_FLAGS}") - endif () - endif () - if (NOT PPC_ALTIVEC_FLAG) - CheckCompileLinkOption("${CRYPTOPP_POWER5_FLAGS}" PPC_POWER5_FLAG - "${TEST_PROG_DIR}/test_ppc_altivec.cpp") - if (PPC_POWER5_FLAG) - set(PPC_ALTIVEC_FLAG 1) - set(CRYPTOPP_ALTIVEC_FLAGS "${CRYPTOPP_POWER5_FLAGS}") - endif () - endif () - if (NOT PPC_ALTIVEC_FLAG) - CheckCompileLinkOption("${CRYPTOPP_POWER6_FLAGS}" PPC_POWER6_FLAG - "${TEST_PROG_DIR}/test_ppc_altivec.cpp") - if (PPC_POWER6_FLAG) - set(PPC_ALTIVEC_FLAG 1) - set(CRYPTOPP_ALTIVEC_FLAGS "${CRYPTOPP_POWER6_FLAGS}") - endif () - endif () - endif () - - # Hack for XLC and GCC. Find the right combination for PWR7 and the VSX unit. - CheckCompileLinkOption("${CRYPTOPP_POWER7_VSX_FLAGS}" PPC_POWER7_FLAG - "${TEST_PROG_DIR}/test_ppc_power7.cpp") - if (PPC_POWER7_FLAG) - set (CRYPTOPP_POWER7_FLAGS "${CRYPTOPP_POWER7_VSX_FLAGS}") - else () - CheckCompileLinkOption("${CRYPTOPP_POWER7_PWR_FLAGS}" PPC_POWER7_FLAG - "${TEST_PROG_DIR}/test_ppc_power7.cpp") - if (PPC_POWER7_FLAG) - set (CRYPTOPP_POWER7_FLAGS "${CRYPTOPP_POWER7_PWR_FLAGS}") - endif () - endif () - - CheckCompileLinkOption("${CRYPTOPP_POWER8_FLAGS}" PPC_POWER8_FLAG - "${TEST_PROG_DIR}/test_ppc_power8.cpp") - - # Disable POWER9 due to https://github.com/weidai11/cryptopp/issues/986. - #CheckCompileLinkOption("${CRYPTOPP_POWER9_FLAGS}" PPC_POWER9_FLAG - # "${TEST_PROG_DIR}/test_ppc_power9.cpp") - - #if (PPC_POWER9_FLAG AND NOT DISABLE_POWER9) - # set_source_files_properties(${SRC_DIR}/ppc_power9.cpp PROPERTIES COMPILE_FLAGS ${CRYPTOPP_POWER9_FLAGS}) - #endif () - - if (PPC_POWER8_FLAG AND NOT DISABLE_POWER8) - set_source_files_properties(${SRC_DIR}/ppc_power8.cpp PROPERTIES COMPILE_FLAGS ${CRYPTOPP_POWER8_FLAGS}) - #set_source_files_properties(${SRC_DIR}/aria_simd.cpp PROPERTIES COMPILE_FLAGS ${CRYPTOPP_POWER8_FLAGS}) - set_source_files_properties(${SRC_DIR}/blake2b_simd.cpp PROPERTIES COMPILE_FLAGS ${CRYPTOPP_POWER8_FLAGS}) - set_source_files_properties(${SRC_DIR}/cham_simd.cpp PROPERTIES COMPILE_FLAGS ${CRYPTOPP_POWER8_FLAGS}) - #set_source_files_properties(${SRC_DIR}/crc_simd.cpp PROPERTIES COMPILE_FLAGS ${CRYPTOPP_POWER8_FLAGS}) - set_source_files_properties(${SRC_DIR}/gcm_simd.cpp PROPERTIES COMPILE_FLAGS ${CRYPTOPP_POWER8_FLAGS}) - set_source_files_properties(${SRC_DIR}/gf2n_simd.cpp PROPERTIES COMPILE_FLAGS ${CRYPTOPP_POWER8_FLAGS}) - set_source_files_properties(${SRC_DIR}/lea_simd.cpp PROPERTIES COMPILE_FLAGS ${CRYPTOPP_POWER8_FLAGS}) - set_source_files_properties(${SRC_DIR}/rijndael_simd.cpp PROPERTIES COMPILE_FLAGS ${CRYPTOPP_POWER8_FLAGS}) - set_source_files_properties(${SRC_DIR}/sha_simd.cpp PROPERTIES COMPILE_FLAGS ${CRYPTOPP_POWER8_FLAGS}) - set_source_files_properties(${SRC_DIR}/shacal2_simd.cpp PROPERTIES COMPILE_FLAGS ${CRYPTOPP_POWER8_FLAGS}) - set_source_files_properties(${SRC_DIR}/simon128_simd.cpp PROPERTIES COMPILE_FLAGS ${CRYPTOPP_POWER8_FLAGS}) - set_source_files_properties(${SRC_DIR}/speck128_simd.cpp PROPERTIES COMPILE_FLAGS ${CRYPTOPP_POWER8_FLAGS}) - endif () - - if (PPC_POWER7_FLAG AND NOT DISABLE_POWER7) - set_source_files_properties(${SRC_DIR}/ppc_power7.cpp PROPERTIES COMPILE_FLAGS ${CRYPTOPP_POWER7_FLAGS}) - endif () - - if (PPC_ALTIVEC_FLAG AND NOT DISABLE_ALTIVEC) - set_source_files_properties(${SRC_DIR}/ppc_simd.cpp PROPERTIES COMPILE_FLAGS ${CRYPTOPP_ALTIVEC_FLAGS}) - set_source_files_properties(${SRC_DIR}/blake2s_simd.cpp PROPERTIES COMPILE_FLAGS ${CRYPTOPP_ALTIVEC_FLAGS}) - set_source_files_properties(${SRC_DIR}/chacha_simd.cpp PROPERTIES COMPILE_FLAGS ${CRYPTOPP_ALTIVEC_FLAGS}) - endif () - - # Drop to Altivec if Power8 unavailable - if (NOT PPC_POWER8_FLAG) - if (PPC_ALTIVEC_FLAG) - set_source_files_properties(${SRC_DIR}/gcm_simd.cpp PROPERTIES COMPILE_FLAGS ${CRYPTOPP_ALTIVEC_FLAGS}) - endif () - endif () - - if (NOT PPC_ALTIVEC_FLAG) - list(APPEND CRYPTOPP_COMPILE_OPTIONS "-DCRYPTOPP_DISABLE_ALTIVEC") - elseif (NOT PPC_POWER7_FLAG) - list(APPEND CRYPTOPP_COMPILE_OPTIONS "-DCRYPTOPP_DISABLE_POWER7") - elseif (NOT PPC_POWER8_FLAG) - list(APPEND CRYPTOPP_COMPILE_OPTIONS "-DCRYPTOPP_DISABLE_POWER8") - #elseif (NOT PPC_POWER9_FLAG) - # list(APPEND CRYPTOPP_COMPILE_OPTIONS "-DCRYPTOPP_DISABLE_POWER9") - endif () - - endif () -endif () - -# New as of Pull Request 461, http://github.com/weidai11/cryptopp/pull/461. -if (CMAKE_CXX_COMPILER_ID STREQUAL "SunPro") - - if (CRYPTOPP_AMD64 OR CRYPTOPP_I386) - - CheckCompileLinkOption("-xarch=sse2" CRYPTOPP_X86_SSE2 - "${TEST_PROG_DIR}/test_x86_sse2.cpp") - CheckCompileLinkOption("-xarch=ssse3" CRYPTOPP_X86_SSSE3 - "${TEST_PROG_DIR}/test_x86_ssse3.cpp") - CheckCompileLinkOption("-xarch=sse4_1" CRYPTOPP_X86_SSE41 - "${TEST_PROG_DIR}/test_x86_sse41.cpp") - CheckCompileLinkOption("-xarch=sse4_2" CRYPTOPP_X86_SSE42 - "${TEST_PROG_DIR}/test_x86_sse42.cpp") - CheckCompileLinkOption("-xarch=aes" CRYPTOPP_X86_CLMUL - "${TEST_PROG_DIR}/test_x86_clmul.cpp") - CheckCompileLinkOption("-xarch=aes" CRYPTOPP_X86_AES - "${TEST_PROG_DIR}/test_x86_aes.cpp") - CheckCompileLinkOption("-xarch=avx" CRYPTOPP_X86_AVX - "${TEST_PROG_DIR}/test_x86_avx.cpp") - CheckCompileLinkOption("-xarch=avx2" CRYPTOPP_X86_AVX2 - "${TEST_PROG_DIR}/test_x86_avx2.cpp") - CheckCompileLinkOption("-xarch=sha" CRYPTOPP_X86_SHA - "${TEST_PROG_DIR}/test_x86_sha.cpp") - - # Each -xarch=XXX options must be added to LDFLAGS if the option is used during a compile. - set(XARCH_LDFLAGS "") - - if (CRYPTOPP_X86_SSE2 AND NOT DISABLE_ASM) - set_source_files_properties(${SRC_DIR}/sse_simd.cpp PROPERTIES COMPILE_FLAGS "-xarch=sse2") - set_source_files_properties(${SRC_DIR}/chacha_simd.cpp PROPERTIES COMPILE_FLAGS "-xarch=sse2") - set(XARCH_LDFLAGS "-xarch=sse2") - endif () - if (CRYPTOPP_X86_SSSE3 AND NOT DISABLE_SSSE3) - set_source_files_properties(${SRC_DIR}/aria_simd.cpp PROPERTIES COMPILE_FLAGS "-xarch=ssse3") - set_source_files_properties(${SRC_DIR}/cham_simd.cpp PROPERTIES COMPILE_FLAGS "-xarch=ssse3") - set_source_files_properties(${SRC_DIR}/lea_simd.cpp PROPERTIES COMPILE_FLAGS "-xarch=ssse3") - set_source_files_properties(${SRC_DIR}/simon128_simd.cpp PROPERTIES COMPILE_FLAGS "-xarch=ssse3") - set_source_files_properties(${SRC_DIR}/speck128_simd.cpp PROPERTIES COMPILE_FLAGS "-xarch=ssse3") - set(XARCH_LDFLAGS "${XARCH_LDFLAGS} -xarch=ssse3") - if (CRYPTOPP_X86_SSE41 AND NOT DISABLE_SSE4) - set_source_files_properties(${SRC_DIR}/blake2s_simd.cpp PROPERTIES COMPILE_FLAGS "-xarch=sse4_1") - set_source_files_properties(${SRC_DIR}/blake2b_simd.cpp PROPERTIES COMPILE_FLAGS "-xarch=sse4_1") - set(XARCH_LDFLAGS "${XARCH_LDFLAGS} -xarch=sse4_1") - endif () - if (CRYPTOPP_X86_SSE42 AND NOT DISABLE_SSE4) - set_source_files_properties(${SRC_DIR}/crc_simd.cpp PROPERTIES COMPILE_FLAGS "-xarch=sse4_2") - set(XARCH_LDFLAGS "${XARCH_LDFLAGS} -xarch=sse4_2") - if (CRYPTOPP_X86_CLMUL AND NOT DISABLE_CLMUL) - set_source_files_properties(${SRC_DIR}/gcm_simd.cpp PROPERTIES COMPILE_FLAGS "-xarch=aes") - set_source_files_properties(${SRC_DIR}/gf2n_simd.cpp PROPERTIES COMPILE_FLAGS "-xarch=aes") - endif () - if (CRYPTOPP_X86_AES AND NOT DISABLE_AES) - set_source_files_properties(${SRC_DIR}/rijndael_simd.cpp PROPERTIES COMPILE_FLAGS "-xarch=aes") - set_source_files_properties(${SRC_DIR}/sm4_simd.cpp PROPERTIES COMPILE_FLAGS "-xarch=aes") - set(XARCH_LDFLAGS "${XARCH_LDFLAGS} -xarch=aes") - endif () - #if (CRYPTOPP_X86_AVX AND NOT DISABLE_AVX) - # set_source_files_properties(${SRC_DIR}/XXX_avx.cpp PROPERTIES COMPILE_FLAGS "-xarch=avx2") - # set(XARCH_LDFLAGS "${XARCH_LDFLAGS} -xarch=avx") - #endif () - if (CRYPTOPP_X86_AVX2 AND NOT DISABLE_AVX2) - set_source_files_properties(${SRC_DIR}/chacha_avx.cpp PROPERTIES COMPILE_FLAGS "-xarch=avx2") - set(XARCH_LDFLAGS "${XARCH_LDFLAGS} -xarch=avx2") - endif () - if (CRYPTOPP_X86_SHA AND NOT DISABLE_SHA) - set_source_files_properties(${SRC_DIR}/sha_simd.cpp PROPERTIES COMPILE_FLAGS "-xarch=sha") - set_source_files_properties(${SRC_DIR}/shacal2_simd.cpp PROPERTIES COMPILE_FLAGS "-xarch=sha") - set(XARCH_LDFLAGS "${XARCH_LDFLAGS} -xarch=sha") - endif () - endif () - endif () - - # https://stackoverflow.com/a/6088646/608639 - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${XARCH_LDFLAGS} -M${SRC_DIR}/cryptopp.mapfile") - set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${XARCH_LDFLAGS} -M${SRC_DIR}/cryptopp.mapfile") - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${XARCH_LDFLAGS} -M${SRC_DIR}/cryptopp.mapfile") - - # elseif (CRYPTOPP_SPARC OR CRYPTOPP_SPARC64) - - endif () -endif () - -#============================================================================ -# Compiler flags -#============================================================================ - -# add_compile_definitions added in CMake 3.12 -if (${CMAKE_VERSION} VERSION_LESS "3.12") - # https://stackoverflow.com/q/61250087 - add_definitions("${CMAKE_CPP_FLAGS}" "${CMAKE_CXX_FLAGS}" "${CRYPTOPP_COMPILE_DEFINITIONS}" "${CRYPTOPP_COMPILE_OPTIONS}") -else() - add_compile_definitions("${CMAKE_CPP_FLAGS}" "${CRYPTOPP_COMPILE_DEFINITIONS}") - add_compile_options("${CMAKE_CXX_FLAGS}" "${CRYPTOPP_COMPILE_OPTIONS}") -endif() - -#============================================================================ -# Compile targets -#============================================================================ - -# Work around the archaic versions of cmake that do not support -# target_compile_xxxx commands -# !!! DO NOT try to use the old way for newer version - it does not work !!! -function(cryptopp_target_compile_properties target) - # CMake >= 2.8.12 - if (NOT ${CMAKE_VERSION} VERSION_LESS "2.8.12") - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CRYPTOPP_COMPILE_OPTIONS}") - else() - string (REPLACE ";" " " PROP_STR "${CRYPTOPP_COMPILE_OPTIONS}") - set_target_properties(${target} PROPERTIES COMPILE_FLAGS "${PROP_STR}") - endif() - # CMake >= 2.8.11 - if (NOT ${CMAKE_VERSION} VERSION_LESS "2.8.11") - target_compile_definitions(${target} PUBLIC ${CRYPTOPP_COMPILE_DEFINITIONS}) - else() - string (REPLACE ";" " " PROP_STR "${CRYPTOPP_COMPILE_DEFINITIONS}") - set_target_properties(${target} PROPERTIES COMPILE_DEFINITIONS "${CRYPTOPP_COMPILE_DEFINITIONS}") - endif() -endfunction() - -set(cryptopp_LIBRARY_SOURCES ${cryptopp_SOURCES_ASM}) -if (USE_INTERMEDIATE_OBJECTS_TARGET AND NOT ${CMAKE_VERSION} VERSION_LESS "2.8.8") - add_library(cryptopp-object OBJECT ${cryptopp_SOURCES}) - cryptopp_target_compile_properties(cryptopp-object) - - list(APPEND cryptopp_LIBRARY_SOURCES - $ - ) -else () - list(APPEND cryptopp_LIBRARY_SOURCES - ${cryptopp_SOURCES} - ) -endif () - -if (BUILD_STATIC) - add_library(cryptopp-static STATIC ${cryptopp_LIBRARY_SOURCES}) - cryptopp_target_compile_properties(cryptopp-static) - # CMake >= 2.8.11 - if (NOT ${CMAKE_VERSION} VERSION_LESS "2.8.11") - target_include_directories(cryptopp-static PUBLIC $ $) - else () - set_target_properties(cryptopp-static PROPERTIES INCLUDE_DIRECTORIES "$ $") - endif () -endif () - -if (BUILD_SHARED) - add_library(cryptopp-shared SHARED ${cryptopp_LIBRARY_SOURCES}) - cryptopp_target_compile_properties(cryptopp-shared) - if (NOT ${CMAKE_VERSION} VERSION_LESS "2.8.11") - target_include_directories(cryptopp-shared PUBLIC $ $) - else () - set_target_properties(cryptopp-shared PROPERTIES INCLUDE_DIRECTORIES "$ $") - endif () -endif () - -# Set filenames for targets to be "cryptopp" -if (NOT MSVC) - set(COMPAT_VERSION ${cryptopp_VERSION_MAJOR}.${cryptopp_VERSION_MINOR}) - - if (BUILD_STATIC) - set_target_properties(cryptopp-static - PROPERTIES - OUTPUT_NAME cryptopp) - endif () - if (BUILD_SHARED) - set_target_properties(cryptopp-shared - PROPERTIES - SOVERSION ${COMPAT_VERSION} - OUTPUT_NAME cryptopp) - endif () -endif () - -# Add alternate ways to invoke the build for the shared library that are -# similar to how the crypto++ 'make' tool works. -# see https://github.com/noloader/cryptopp-cmake/issues/32 -if (BUILD_STATIC) - # add_custom_target(static DEPENDS cryptopp-static) -endif () -if (BUILD_SHARED) - add_custom_target(shared DEPENDS cryptopp-shared) - add_custom_target(dynamic DEPENDS cryptopp-shared) -endif () - -#============================================================================ -# Third-party libraries -#============================================================================ - -if (WIN32) - if (BUILD_STATIC) - target_link_libraries(cryptopp-static ws2_32) - endif () - if (BUILD_SHARED) - target_link_libraries(cryptopp-shared ws2_32) - endif () -endif () - -# This may need to be expanded to "Solaris" -if (CRYPTOPP_SOLARIS) - if (BUILD_STATIC) - target_link_libraries(cryptopp-static nsl socket) - endif () - if (BUILD_SHARED) - target_link_libraries(cryptopp-shared nsl socket) - endif () -endif () - -find_package(Threads) -if (BUILD_STATIC) - target_link_libraries(cryptopp-static ${CMAKE_THREAD_LIBS_INIT}) -endif () -if (BUILD_SHARED) - target_link_libraries(cryptopp-shared ${CMAKE_THREAD_LIBS_INIT}) -endif () - - -#============================================================================ -# Setup OpenMP -#============================================================================ -if (${CMAKE_VERSION} VERSION_GREATER "3.1" AND USE_OPENMP) - find_package(OpenMP) - - if (OPENMP_FOUND OR OPENMP_CXX_FOUND) - message(STATUS "OpenMP: Found libomp without any special flags") - endif() - - # If OpenMP wasn't found, try if we can find it in the default Macports location - if((NOT OPENMP_FOUND) AND (NOT OPENMP_CXX_FOUND) AND EXISTS "/opt/local/lib/libomp/libomp.dylib") # older cmake uses OPENMP_FOUND, newer cmake also sets OPENMP_CXX_FOUND, homebrew installations seem only to get the latter set. - set(OpenMP_CXX_FLAGS "-Xpreprocessor -fopenmp -I/opt/local/include/libomp/") - set(OpenMP_CXX_LIB_NAMES omp) - set(OpenMP_omp_LIBRARY /opt/local/lib/libomp/libomp.dylib) - - find_package(OpenMP) - if (OPENMP_FOUND OR OPENMP_CXX_FOUND) - message(STATUS "OpenMP: Found libomp in macports default location.") - else() - message(FATAL_ERROR "OpenMP: Didn't find libomp. Tried macports default location but also didn't find it.") - endif() - endif() - - # If OpenMP wasn't found, try if we can find it in the default Homebrew location - if((NOT OPENMP_FOUND) AND (NOT OPENMP_CXX_FOUND) AND EXISTS "/usr/local/opt/libomp/lib/libomp.dylib") - set(OpenMP_CXX_FLAGS "-Xpreprocessor -fopenmp -I/usr/local/opt/libomp/include") - set(OpenMP_CXX_LIB_NAMES omp) - set(OpenMP_omp_LIBRARY /usr/local/opt/libomp/lib/libomp.dylib) - - find_package(OpenMP) - if (OPENMP_FOUND OR OPENMP_CXX_FOUND) - message(STATUS "OpenMP: Found libomp in homebrew default location.") - else() - message(FATAL_ERROR "OpenMP: Didn't find libomp. Tried homebrew default location but also didn't find it.") - endif() - endif() - - set(Additional_OpenMP_Libraries_Workaround "") - - # Workaround because older cmake on apple doesn't support FindOpenMP - if((NOT OPENMP_FOUND) AND (NOT OPENMP_CXX_FOUND)) - if((APPLE AND ((CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") OR (CMAKE_CXX_COMPILER_ID STREQUAL "Clang"))) - AND ((CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "7.0") AND (CMAKE_VERSION VERSION_LESS "3.12.0"))) - message(STATUS "OpenMP: Applying workaround for OSX OpenMP with old cmake that doesn't have FindOpenMP") - set(OpenMP_CXX_FLAGS "-Xclang -fopenmp") - set(Additional_OpenMP_Libraries_Workaround "-lomp") - else() - message(FATAL_ERROR "OpenMP: Did not find OpenMP. Build without USE_OPENMP if you want to allow this.") - endif() - endif() - - if(NOT TARGET OpenMP::OpenMP_CXX) - # We're on cmake < 3.9, handle behavior of the old FindOpenMP implementation - message(STATUS "OpenMP: Applying workaround for old CMake that doesn't define FindOpenMP using targets") - add_library(OpenMP_TARGET INTERFACE) - add_library(OpenMP::OpenMP_CXX ALIAS OpenMP_TARGET) - target_compile_options(OpenMP_TARGET INTERFACE ${OpenMP_CXX_FLAGS}) # add to all targets depending on this - find_package(Threads REQUIRED) - target_link_libraries(OpenMP_TARGET INTERFACE Threads::Threads) - target_link_libraries(OpenMP_TARGET INTERFACE ${OpenMP_CXX_FLAGS} ${Additional_OpenMP_Libraries_Workaround}) - endif() - - if (BUILD_STATIC) - target_link_libraries(cryptopp-static ${OpenMP_CXX_FLAGS}) # Workaround for Ubuntu 18.04 that otherwise doesn't set -fopenmp for linking - target_link_libraries(cryptopp-static OpenMP::OpenMP_CXX) - endif() - if (BUILD_SHARED) - target_link_libraries(cryptopp-shared ${OpenMP_CXX_FLAGS}) # Workaround for Ubuntu 18.04 that otherwise doesn't set -fopenmp for linking - target_link_libraries(cryptopp-shared OpenMP::OpenMP_CXX) - endif() -endif() - -#============================================================================ -# Tests -#============================================================================ - -enable_testing() -if (BUILD_TESTING) - add_executable(cryptest ${cryptopp_SOURCES_TEST}) - target_link_libraries(cryptest cryptopp-static) - - # Setting "cryptest" binary name to "cryptest.exe" - if (NOT (WIN32 OR CYGWIN)) - set_target_properties(cryptest PROPERTIES OUTPUT_NAME cryptest.exe) - endif () - if (NOT TARGET cryptest.exe) - add_custom_target(cryptest.exe) - add_dependencies(cryptest.exe cryptest) - endif () - - file(COPY ${SRC_DIR}/TestData DESTINATION ${PROJECT_BINARY_DIR}) - file(COPY ${SRC_DIR}/TestVectors DESTINATION ${PROJECT_BINARY_DIR}) - - add_test(NAME build_cryptest COMMAND "${CMAKE_COMMAND}" --build ${CMAKE_BINARY_DIR} --target cryptest) - add_test(NAME cryptest COMMAND $ v) - set_tests_properties(cryptest PROPERTIES DEPENDS build_cryptest) -endif () - -#============================================================================ -# Doxygen documentation -#============================================================================ - -if (BUILD_DOCUMENTATION) - find_package(Doxygen REQUIRED) - - set(in_source_DOCS_DIR "${SRC_DIR}/html-docs") - set(out_source_DOCS_DIR "${PROJECT_BINARY_DIR}/html-docs") - - add_custom_target(docs ALL - COMMAND ${DOXYGEN_EXECUTABLE} Doxyfile -d CRYPTOPP_DOXYGEN_PROCESSING - WORKING_DIRECTORY ${SRC_DIR} - SOURCES ${SRC_DIR}/Doxyfile - ) - - if (NOT ${in_source_DOCS_DIR} STREQUAL ${out_source_DOCS_DIR}) - add_custom_command( - TARGET docs POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy_directory "${in_source_DOCS_DIR}" "${out_source_DOCS_DIR}" - COMMAND ${CMAKE_COMMAND} -E remove_directory "${in_source_DOCS_DIR}" - ) - endif () -endif () - -#============================================================================ -# Install -#============================================================================ - -set(export_name "cryptopp-targets") - -# Runtime package -if (BUILD_SHARED) - export(TARGETS cryptopp-shared FILE ${export_name}.cmake ) - install( - TARGETS cryptopp-shared - EXPORT ${export_name} - DESTINATION ${CMAKE_INSTALL_LIBDIR} - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - ) -endif () - -# Development package -if (BUILD_STATIC) - export(TARGETS cryptopp-static FILE ${export_name}.cmake ) - install(TARGETS cryptopp-static EXPORT ${export_name} DESTINATION ${CMAKE_INSTALL_LIBDIR}) -endif () -install(FILES ${cryptopp_HEADERS} DESTINATION include/cryptopp) - -# CMake Package -if (NOT CMAKE_VERSION VERSION_LESS 2.8.8) - include(CMakePackageConfigHelpers) - write_basic_package_version_file("${PROJECT_BINARY_DIR}/cryptopp-config-version.cmake" VERSION ${cryptopp_VERSION_MAJOR}.${cryptopp_VERSION_MINOR}.${cryptopp_VERSION_PATCH} COMPATIBILITY SameMajorVersion) - install(FILES cryptopp-config.cmake ${PROJECT_BINARY_DIR}/cryptopp-config-version.cmake DESTINATION "lib/cmake/cryptopp") - install(EXPORT ${export_name} DESTINATION "lib/cmake/cryptopp") -endif () - -# Tests -if (BUILD_TESTING) - install(TARGETS cryptest DESTINATION ${CMAKE_INSTALL_BINDIR}) - install(DIRECTORY ${SRC_DIR}/TestData DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/cryptopp) - install(DIRECTORY ${SRC_DIR}/TestVectors DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/cryptopp) -endif () - -# Documentation -if (BUILD_DOCUMENTATION) - install(DIRECTORY "${out_source_DOCS_DIR}" DESTINATION ${CMAKE_INSTALL_DOCDIR}) -endif () - -# Print a configuration summary. We want CXX and CXXFLAGS, but they are not includd in ALL. -if (CRYPTOPP_I386) - message(STATUS "Platform: i386/i686") -elseif (CRYPTOPP_AMD64) - message(STATUS "Platform: x86_64") -elseif (CRYPTOPP_ARM32) - message(STATUS "Platform: ARM-32") -elseif (CRYPTOPP_ARMV8) - message(STATUS "Platform: ARMv8") -elseif (CRYPTOPP_SPARC) - message(STATUS "Platform: Sparc") -elseif (CRYPTOPP_SPARC64) - message(STATUS "Platform: Sparc64") -elseif (CRYPTOPP_PPC32) - message(STATUS "Platform: PowerPC") -elseif (CRYPTOPP_PPC64) - message(STATUS "Platform: PowerPC-64") -elseif (CRYPTOPP_MINGW32) - message(STATUS "Platform: MinGW-32") -elseif (CRYPTOPP_MINGW64) - message(STATUS "Platform: MinGW-64") -endif () -if (CRYPTOPP_ARMV7A_NEON) - message(STATUS "NEON: TRUE") -endif () -message(STATUS "Compiler: ${CMAKE_CXX_COMPILER}") -message(STATUS "Compiler options: ${CMAKE_CXX_FLAGS} ${CRYPTOPP_COMPILE_OPTIONS}") -message(STATUS "Compiler definitions: ${CRYPTOPP_COMPILE_DEFINITIONS}") -message(STATUS "Build type: ${CMAKE_BUILD_TYPE}") diff --git a/vendor/cryptopp/Doxyfile b/vendor/cryptopp/Doxyfile deleted file mode 100644 index 05f7b46..0000000 --- a/vendor/cryptopp/Doxyfile +++ /dev/null @@ -1,2429 +0,0 @@ -# Doxyfile 1.8.13 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project. -# -# All text after a double hash (##) is considered a comment and is placed in -# front of the TAG it is preceding. -# -# All text after a single hash (#) is considered a comment and will be ignored. -# The format is: -# TAG = value [value, ...] -# For lists, items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (\" \"). - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# This tag specifies the encoding used for all characters in the config file -# that follow. The default is UTF-8 which is also the encoding used for all text -# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv -# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv -# for the list of possible encodings. -# The default value is: UTF-8. - -DOXYFILE_ENCODING = UTF-8 - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by -# double-quotes, unless you are using Doxywizard) that should identify the -# project for which the documentation is generated. This name is used in the -# title of most generated pages and in a few other places. -# The default value is: My Project. - -PROJECT_NAME = Crypto++ - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. This -# could be handy for archiving the generated documentation or if some version -# control system is used. - -PROJECT_NUMBER = 8.6 - -# Using the PROJECT_BRIEF tag one can provide an optional one line description -# for a project that appears at the top of each page and should give viewer a -# quick idea about the purpose of the project. Keep the description short. - -PROJECT_BRIEF = "Free C++ class library of cryptographic schemes" - -# With the PROJECT_LOGO tag one can specify a logo or an icon that is included -# in the documentation. The maximum height of the logo should not exceed 55 -# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy -# the logo to the output directory. - -# The logo looks really bad here. Don't use it. -# PROJECT_LOGO = Logo-Steel.png - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path -# into which the generated documentation will be written. If a relative path is -# entered, it will be relative to the location where doxygen was started. If -# left blank the current directory will be used. - -OUTPUT_DIRECTORY = html-docs - -# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- -# directories (in 2 levels) under the output directory of each output format and -# will distribute the generated files over these directories. Enabling this -# option can be useful when feeding doxygen a huge amount of source files, where -# putting all generated files in the same directory would otherwise causes -# performance problems for the file system. -# The default value is: NO. - -CREATE_SUBDIRS = NO - -# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII -# characters to appear in the names of generated files. If set to NO, non-ASCII -# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode -# U+3044. -# The default value is: NO. - -ALLOW_UNICODE_NAMES = NO - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, -# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), -# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, -# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), -# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, -# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, -# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, -# Ukrainian and Vietnamese. -# The default value is: English. - -OUTPUT_LANGUAGE = English - -# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member -# descriptions after the members that are listed in the file and class -# documentation (similar to Javadoc). Set to NO to disable this. -# The default value is: YES. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief -# description of a member or function before the detailed description -# -# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. -# The default value is: YES. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator that is -# used to form the text in various listings. Each string in this list, if found -# as the leading text of the brief description, will be stripped from the text -# and the result, after processing the whole list, is used as the annotated -# text. Otherwise, the brief description is used as-is. If left blank, the -# following values are used ($name is automatically replaced with the name of -# the entity):The $name class, The $name widget, The $name file, is, provides, -# specifies, contains, represents, a, an and the. - -ABBREVIATE_BRIEF = - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# doxygen will generate a detailed section even if there is only a brief -# description. -# The default value is: NO. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment -# operators of the base classes will not be shown. -# The default value is: NO. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path -# before files name in the file list and in the header files. If set to NO the -# shortest path that makes the file name unique will be used -# The default value is: YES. - -FULL_PATH_NAMES = NO - -# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. -# Stripping is only done if one of the specified strings matches the left-hand -# part of the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the path to -# strip. -# -# Note that you can specify absolute paths here, but also relative paths, which -# will be relative from the directory where doxygen is started. -# This tag requires that the tag FULL_PATH_NAMES is set to YES. - -STRIP_FROM_PATH = - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the -# path mentioned in the documentation of a class, which tells the reader which -# header file to include in order to use a class. If left blank only the name of -# the header file containing the class definition is used. Otherwise one should -# specify the list of include paths that are normally passed to the compiler -# using the -I flag. - -STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but -# less readable) file names. This can be useful is your file systems doesn't -# support long names like on DOS, Mac, or CD-ROM. -# The default value is: NO. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the -# first line (until the first dot) of a Javadoc-style comment as the brief -# description. If set to NO, the Javadoc-style will behave just like regular Qt- -# style comments (thus requiring an explicit @brief command for a brief -# description.) -# The default value is: NO. - -JAVADOC_AUTOBRIEF = YES - -# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first -# line (until the first dot) of a Qt-style comment as the brief description. If -# set to NO, the Qt-style will behave just like regular Qt-style comments (thus -# requiring an explicit \brief command for a brief description.) -# The default value is: NO. - -QT_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a -# multi-line C++ special comment block (i.e. a block of //! or /// comments) as -# a brief description. This used to be the default behavior. The new default is -# to treat a multi-line C++ comment block as a detailed description. Set this -# tag to YES if you prefer the old behavior instead. -# -# Note that setting this tag to YES also means that rational rose comments are -# not recognized any more. -# The default value is: NO. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the -# documentation from any documented member that it re-implements. -# The default value is: YES. - -INHERIT_DOCS = YES - -# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new -# page for each member. If set to NO, the documentation of a member will be part -# of the file/class/namespace that contains it. -# The default value is: NO. - -SEPARATE_MEMBER_PAGES = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen -# uses this value to replace tabs by spaces in code fragments. -# Minimum value: 1, maximum value: 16, default value: 4. - -TAB_SIZE = 4 - -# This tag can be used to specify a number of aliases that act as commands in -# the documentation. An alias has the form: -# name=value -# For example adding -# "sideeffect=@par Side Effects:\n" -# will allow you to put the command \sideeffect (or @sideeffect) in the -# documentation, which will result in a user-defined paragraph with heading -# "Side Effects:". You can put \n's in the value part of an alias to insert -# newlines. - -ALIASES = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources -# only. Doxygen will then generate output that is more tailored for C. For -# instance, some of the names that are used will be different. The list of all -# members will be omitted, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_FOR_C = NO - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or -# Python sources only. Doxygen will then generate output that is more tailored -# for that language. For instance, namespaces will be presented as packages, -# qualified scopes will look different, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources. Doxygen will then generate output that is tailored for Fortran. -# The default value is: NO. - -OPTIMIZE_FOR_FORTRAN = NO - -# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for VHDL. -# The default value is: NO. - -OPTIMIZE_OUTPUT_VHDL = NO - -# Doxygen selects the parser to use depending on the extension of the files it -# parses. With this tag you can assign which parser to use for a given -# extension. Doxygen has a built-in mapping, but you can override or extend it -# using this tag. The format is ext=language, where ext is a file extension, and -# language is one of the parsers supported by doxygen: IDL, Java, Javascript, -# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: -# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: -# Fortran. In the later case the parser tries to guess whether the code is fixed -# or free formatted code, this is the default for Fortran type files), VHDL. For -# instance to make doxygen treat .inc files as Fortran files (default is PHP), -# and .f files as C (default is Fortran), use: inc=Fortran f=C. -# -# Note: For files without extension you can use no_extension as a placeholder. -# -# Note that for custom extensions you also need to set FILE_PATTERNS otherwise -# the files are not read by doxygen. - -EXTENSION_MAPPING = - -# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments -# according to the Markdown format, which allows for more readable -# documentation. See http://daringfireball.net/projects/markdown/ for details. -# The output of markdown processing is further processed by doxygen, so you can -# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in -# case of backward compatibilities issues. -# The default value is: YES. - -MARKDOWN_SUPPORT = NO - -# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up -# to that level are automatically included in the table of contents, even if -# they do not have an id attribute. -# Note: This feature currently applies only to Markdown headings. -# Minimum value: 0, maximum value: 99, default value: 0. -# This tag requires that the tag MARKDOWN_SUPPORT is set to YES. - -TOC_INCLUDE_HEADINGS = 0 - -# When enabled doxygen tries to link words that correspond to documented -# classes, or namespaces to their corresponding documentation. Such a link can -# be prevented in individual cases by putting a % sign in front of the word or -# globally by setting AUTOLINK_SUPPORT to NO. -# The default value is: YES. - -AUTOLINK_SUPPORT = YES - -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should set this -# tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); -# versus func(std::string) {}). This also make the inheritance and collaboration -# diagrams that involve STL classes more complete and accurate. -# The default value is: NO. - -BUILTIN_STL_SUPPORT = YES - -# If you use Microsoft's C++/CLI language, you should set this option to YES to -# enable parsing support. -# The default value is: NO. - -CPP_CLI_SUPPORT = NO - -# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: -# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen -# will parse them like normal C++ but will assume all classes use public instead -# of private inheritance when no explicit protection keyword is present. -# The default value is: NO. - -SIP_SUPPORT = NO - -# For Microsoft's IDL there are propget and propput attributes to indicate -# getter and setter methods for a property. Setting this option to YES will make -# doxygen to replace the get and set methods by a property in the documentation. -# This will only work if the methods are indeed getting or setting a simple -# type. If this is not the case, or you want to show the methods anyway, you -# should set this option to NO. -# The default value is: YES. - -IDL_PROPERTY_SUPPORT = NO - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. -# The default value is: NO. - -DISTRIBUTE_GROUP_DOC = NO - -# If one adds a struct or class to a group and this option is enabled, then also -# any nested class or struct is added to the same group. By default this option -# is disabled and one has to add nested compounds explicitly via \ingroup. -# The default value is: NO. - -GROUP_NESTED_COMPOUNDS = NO - -# Set the SUBGROUPING tag to YES to allow class member groups of the same type -# (for instance a group of public functions) to be put as a subgroup of that -# type (e.g. under the Public Functions section). Set it to NO to prevent -# subgrouping. Alternatively, this can be done per class using the -# \nosubgrouping command. -# The default value is: YES. - -SUBGROUPING = YES - -# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions -# are shown inside the group in which they are included (e.g. using \ingroup) -# instead of on a separate page (for HTML and Man pages) or section (for LaTeX -# and RTF). -# -# Note that this feature does not work in combination with -# SEPARATE_MEMBER_PAGES. -# The default value is: NO. - -INLINE_GROUPED_CLASSES = NO - -# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions -# with only public data fields or simple typedef fields will be shown inline in -# the documentation of the scope in which they are defined (i.e. file, -# namespace, or group documentation), provided this scope is documented. If set -# to NO, structs, classes, and unions are shown on a separate page (for HTML and -# Man pages) or section (for LaTeX and RTF). -# The default value is: NO. - -INLINE_SIMPLE_STRUCTS = NO - -# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or -# enum is documented as struct, union, or enum with the name of the typedef. So -# typedef struct TypeS {} TypeT, will appear in the documentation as a struct -# with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically be -# useful for C code in case the coding convention dictates that all compound -# types are typedef'ed and only the typedef is referenced, never the tag name. -# The default value is: NO. - -TYPEDEF_HIDES_STRUCT = NO - -# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This -# cache is used to resolve symbols given their name and scope. Since this can be -# an expensive process and often the same symbol appears multiple times in the -# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small -# doxygen will become slower. If the cache is too large, memory is wasted. The -# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range -# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 -# symbols. At the end of a run doxygen will report the cache usage and suggest -# the optimal cache size from a speed point of view. -# Minimum value: 0, maximum value: 9, default value: 0. - -LOOKUP_CACHE_SIZE = 0 - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in -# documentation are documented, even if no documentation was available. Private -# class members and static file members will be hidden unless the -# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. -# Note: This will also disable the warnings about undocumented members that are -# normally produced when WARNINGS is set to YES. -# The default value is: NO. - -EXTRACT_ALL = NO - -# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will -# be included in the documentation. -# The default value is: NO. - -EXTRACT_PRIVATE = NO - -# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal -# scope will be included in the documentation. -# The default value is: NO. - -EXTRACT_PACKAGE = NO - -# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be -# included in the documentation. -# The default value is: NO. - -EXTRACT_STATIC = NO - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined -# locally in source files will be included in the documentation. If set to NO, -# only classes defined in header files are included. Does not have any effect -# for Java sources. -# The default value is: YES. - -EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. If set to YES, local methods, -# which are defined in the implementation section but not in the interface are -# included in the documentation. If set to NO, only methods in the interface are -# included. -# The default value is: NO. - -EXTRACT_LOCAL_METHODS = NO - -# If this flag is set to YES, the members of anonymous namespaces will be -# extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base name of -# the file that contains the anonymous namespace. By default anonymous namespace -# are hidden. -# The default value is: NO. - -EXTRACT_ANON_NSPACES = NO - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all -# undocumented members inside documented classes or files. If set to NO these -# members will be included in the various overviews, but no documentation -# section is generated. This option has no effect if EXTRACT_ALL is enabled. -# The default value is: NO. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. If set -# to NO, these classes will be included in the various overviews. This option -# has no effect if EXTRACT_ALL is enabled. -# The default value is: NO. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend -# (class|struct|union) declarations. If set to NO, these declarations will be -# included in the documentation. -# The default value is: NO. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any -# documentation blocks found inside the body of a function. If set to NO, these -# blocks will be appended to the function's detailed documentation block. -# The default value is: NO. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation that is typed after a -# \internal command is included. If the tag is set to NO then the documentation -# will be excluded. Set it to YES to include the internal documentation. -# The default value is: NO. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file -# names in lower-case letters. If set to YES, upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# and Mac users are advised to set this option to NO. -# The default value is: system dependent. - -CASE_SENSE_NAMES = NO - -# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with -# their full class and namespace scopes in the documentation. If set to YES, the -# scope will be hidden. -# The default value is: NO. - -HIDE_SCOPE_NAMES = NO - -# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will -# append additional text to a page's title, such as Class Reference. If set to -# YES the compound reference will be hidden. -# The default value is: NO. - -HIDE_COMPOUND_REFERENCE= NO - -# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of -# the files that are included by a file in the documentation of that file. -# The default value is: YES. - -SHOW_INCLUDE_FILES = NO - -# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each -# grouped member an include statement to the documentation, telling the reader -# which file to include in order to use the member. -# The default value is: NO. - -SHOW_GROUPED_MEMB_INC = NO - -# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include -# files with double quotes in the documentation rather than with sharp brackets. -# The default value is: NO. - -FORCE_LOCAL_INCLUDES = NO - -# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the -# documentation for inline members. -# The default value is: YES. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the -# (detailed) documentation of file and class members alphabetically by member -# name. If set to NO, the members will appear in declaration order. -# The default value is: YES. - -SORT_MEMBER_DOCS = NO - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief -# descriptions of file, namespace and class members alphabetically by member -# name. If set to NO, the members will appear in declaration order. Note that -# this will also influence the order of the classes in the class list. -# The default value is: NO. - -SORT_BRIEF_DOCS = NO - -# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the -# (brief and detailed) documentation of class members so that constructors and -# destructors are listed first. If set to NO the constructors will appear in the -# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. -# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief -# member documentation. -# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting -# detailed member documentation. -# The default value is: NO. - -SORT_MEMBERS_CTORS_1ST = NO - -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy -# of group names into alphabetical order. If set to NO the group names will -# appear in their defined order. -# The default value is: NO. - -SORT_GROUP_NAMES = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by -# fully-qualified names, including namespaces. If set to NO, the class list will -# be sorted only by class name, not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the alphabetical -# list. -# The default value is: NO. - -SORT_BY_SCOPE_NAME = NO - -# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper -# type resolution of all parameters of a function it will reject a match between -# the prototype and the implementation of a member function even if there is -# only one candidate or it is obvious which candidate to choose by doing a -# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still -# accept a match between prototype and implementation in such cases. -# The default value is: NO. - -STRICT_PROTO_MATCHING = NO - -# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo -# list. This list is created by putting \todo commands in the documentation. -# The default value is: YES. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test -# list. This list is created by putting \test commands in the documentation. -# The default value is: YES. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug -# list. This list is created by putting \bug commands in the documentation. -# The default value is: YES. - -GENERATE_BUGLIST = NO - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) -# the deprecated list. This list is created by putting \deprecated commands in -# the documentation. -# The default value is: YES. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional documentation -# sections, marked by \if ... \endif and \cond -# ... \endcond blocks. - -ENABLED_SECTIONS = NO - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the -# initial value of a variable or macro / define can have for it to appear in the -# documentation. If the initializer consists of more lines than specified here -# it will be hidden. Use a value of 0 to hide initializers completely. The -# appearance of the value of individual variables and macros / defines can be -# controlled using \showinitializer or \hideinitializer command in the -# documentation regardless of this setting. -# Minimum value: 0, maximum value: 10000, default value: 30. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at -# the bottom of the documentation of classes and structs. If set to YES, the -# list will mention the files that were used to generate the documentation. -# The default value is: YES. - -SHOW_USED_FILES = YES - -# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This -# will remove the Files entry from the Quick Index and from the Folder Tree View -# (if specified). -# The default value is: YES. - -SHOW_FILES = YES - -# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces -# page. This will remove the Namespaces entry from the Quick Index and from the -# Folder Tree View (if specified). -# The default value is: YES. - -SHOW_NAMESPACES = YES - -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from -# the version control system). Doxygen will invoke the program by executing (via -# popen()) the command command input-file, where command is the value of the -# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided -# by doxygen. Whatever the program writes to standard output is used as the file -# version. For an example see the documentation. - -FILE_VERSION_FILTER = - -# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed -# by doxygen. The layout file controls the global structure of the generated -# output files in an output format independent way. To create the layout file -# that represents doxygen's defaults, run doxygen with the -l option. You can -# optionally specify a file name after the option, if omitted DoxygenLayout.xml -# will be used as the name of the layout file. -# -# Note that if you run doxygen from a directory containing a file called -# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE -# tag is left empty. - -LAYOUT_FILE = - -# The CITE_BIB_FILES tag can be used to specify one or more bib files containing -# the reference definitions. This must be a list of .bib files. The .bib -# extension is automatically appended if omitted. This requires the bibtex tool -# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. -# For LaTeX the style of the bibliography can be controlled using -# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the -# search path. See also \cite for info how to create references. - -CITE_BIB_FILES = - -#--------------------------------------------------------------------------- -# Configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated to -# standard output by doxygen. If QUIET is set to YES this implies that the -# messages are off. -# The default value is: NO. - -QUIET = NO - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES -# this implies that the warnings are on. -# -# Tip: Turn warnings on while writing the documentation. -# The default value is: YES. - -WARNINGS = NO - -# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate -# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag -# will automatically be disabled. -# The default value is: YES. - -WARN_IF_UNDOCUMENTED = NO - -# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some parameters -# in a documented function, or documenting parameters that don't exist or using -# markup commands wrongly. -# The default value is: YES. - -WARN_IF_DOC_ERROR = YES - -# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that -# are documented, but have no documentation for their parameters or return -# value. If set to NO, doxygen will only warn about wrong or incomplete -# parameter documentation, but not about the absence of documentation. -# The default value is: NO. - -WARN_NO_PARAMDOC = NO - -# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when -# a warning is encountered. -# The default value is: NO. - -WARN_AS_ERROR = NO - -# The WARN_FORMAT tag determines the format of the warning messages that doxygen -# can produce. The string should contain the $file, $line, and $text tags, which -# will be replaced by the file and line number from which the warning originated -# and the warning text. Optionally the format may contain $version, which will -# be replaced by the version of the file (if it could be obtained via -# FILE_VERSION_FILTER) -# The default value is: $file:$line: $text. - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning and error -# messages should be written. If left blank the output is written to standard -# error (stderr). - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# Configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag is used to specify the files and/or directories that contain -# documented source files. You may enter file names like myfile.cpp or -# directories like /usr/src/myproject. Separate the files or directories with -# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING -# Note: If this tag is empty the current directory is searched. - -INPUT = . \ - GNUmakefile \ - GNUmakefile-cross \ - rdrand.asm - -# This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses -# libiconv (or the iconv built into libc) for the transcoding. See the libiconv -# documentation (see: http://www.gnu.org/software/libiconv) for the list of -# possible encodings. -# The default value is: UTF-8. - -INPUT_ENCODING = UTF-8 - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and -# *.h) to filter out the source-files in the directories. -# -# Note that for custom extensions or not directly supported extensions you also -# need to set EXTENSION_MAPPING for the extension otherwise the files are not -# read by doxygen. -# -# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, -# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, -# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, -# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, -# *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf and *.qsf. - -FILE_PATTERNS = *.h \ - *.cpp - -# The RECURSIVE tag can be used to specify whether or not subdirectories should -# be searched for input files as well. -# The default value is: NO. - -RECURSIVE = NO - -# The EXCLUDE tag can be used to specify files and/or directories that should be -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. -# -# Note that relative paths are relative to the directory from which doxygen is -# run. - -EXCLUDE = adhoc.cpp - -# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or -# directories that are symbolic links (a Unix file system feature) are excluded -# from the input. -# The default value is: NO. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. -# -# Note that the wildcards are matched against the file with absolute path, so to -# exclude all test directories for example use the pattern */test/* - -EXCLUDE_PATTERNS = *test* \ - *validat* - -# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -# (namespaces, classes, functions, etc.) that should be excluded from the -# output. The symbol name can be a fully qualified name, a word, or if the -# wildcard * is used, a substring. Examples: ANamespace, AClass, -# AClass::ANamespace, ANamespace::*Test -# -# Note that the wildcards are matched against the file with absolute path, so to -# exclude all test directories use the pattern */test/* - -EXCLUDE_SYMBOLS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or directories -# that contain example code fragments that are included (see the \include -# command). - -EXAMPLE_PATH = . - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and -# *.h) to filter out the source-files in the directories. If left blank all -# files are included. - -EXAMPLE_PATTERNS = - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude commands -# irrespective of the value of the RECURSIVE tag. -# The default value is: NO. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or directories -# that contain images that are to be included in the documentation (see the -# \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command: -# -# -# -# where is the value of the INPUT_FILTER tag, and is the -# name of an input file. Doxygen will then use the output that the filter -# program writes to standard output. If FILTER_PATTERNS is specified, this tag -# will be ignored. -# -# Note that the filter must not add or remove lines; it is applied before the -# code is scanned, but not when the output code is generated. If lines are added -# or removed, the anchors will not be placed correctly. -# -# Note that for custom extensions or not directly supported extensions you also -# need to set EXTENSION_MAPPING for the extension otherwise the files are not -# properly processed by doxygen. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: pattern=filter -# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how -# filters are used. If the FILTER_PATTERNS tag is empty or if none of the -# patterns match the file name, INPUT_FILTER is applied. -# -# Note that for custom extensions or not directly supported extensions you also -# need to set EXTENSION_MAPPING for the extension otherwise the files are not -# properly processed by doxygen. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will also be used to filter the input files that are used for -# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). -# The default value is: NO. - -FILTER_SOURCE_FILES = NO - -# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file -# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and -# it is also possible to disable source filtering for a specific pattern using -# *.ext= (so without naming a filter). -# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. - -FILTER_SOURCE_PATTERNS = - -# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that -# is part of the input, its contents will be placed on the main page -# (index.html). This can be useful if you have a project on for instance GitHub -# and want to reuse the introduction page also for the doxygen output. - -USE_MDFILE_AS_MAINPAGE = - -#--------------------------------------------------------------------------- -# Configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will be -# generated. Documented entities will be cross-referenced with these sources. -# -# Note: To get rid of all source code in the generated output, make sure that -# also VERBATIM_HEADERS is set to NO. -# The default value is: NO. - -SOURCE_BROWSER = YES - -# Setting the INLINE_SOURCES tag to YES will include the body of functions, -# classes and enums directly into the documentation. -# The default value is: NO. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any -# special comment blocks from generated source code fragments. Normal C, C++ and -# Fortran comments will always remain visible. -# The default value is: YES. - -STRIP_CODE_COMMENTS = NO - -# If the REFERENCED_BY_RELATION tag is set to YES then for each documented -# function all documented functions referencing it will be listed. -# The default value is: NO. - -REFERENCED_BY_RELATION = NO - -# If the REFERENCES_RELATION tag is set to YES then for each documented function -# all documented entities called/used by that function will be listed. -# The default value is: NO. - -REFERENCES_RELATION = NO - -# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set -# to YES then the hyperlinks from functions in REFERENCES_RELATION and -# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will -# link to the documentation. -# The default value is: YES. - -REFERENCES_LINK_SOURCE = YES - -# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the -# source code will show a tooltip with additional information such as prototype, -# brief description and links to the definition and documentation. Since this -# will make the HTML file larger and loading of large files a bit slower, you -# can opt to disable this feature. -# The default value is: YES. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - -SOURCE_TOOLTIPS = YES - -# If the USE_HTAGS tag is set to YES then the references to source code will -# point to the HTML generated by the htags(1) tool instead of doxygen built-in -# source browser. The htags tool is part of GNU's global source tagging system -# (see http://www.gnu.org/software/global/global.html). You will need version -# 4.8.6 or higher. -# -# To use it do the following: -# - Install the latest version of global -# - Enable SOURCE_BROWSER and USE_HTAGS in the config file -# - Make sure the INPUT points to the root of the source tree -# - Run doxygen as normal -# -# Doxygen will invoke htags (and that will in turn invoke gtags), so these -# tools must be available from the command line (i.e. in the search path). -# -# The result: instead of the source browser generated by doxygen, the links to -# source code will now point to the output of htags. -# The default value is: NO. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - -USE_HTAGS = NO - -# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a -# verbatim copy of the header file for each class for which an include is -# specified. Set to NO to disable this. -# See also: Section \class. -# The default value is: YES. - -VERBATIM_HEADERS = YES - -# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the -# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the -# cost of reduced performance. This can be particularly helpful with template -# rich C++ code for which doxygen's built-in parser lacks the necessary type -# information. -# Note: The availability of this option depends on whether or not doxygen was -# generated with the -Duse-libclang=ON option for CMake. -# The default value is: NO. - -CLANG_ASSISTED_PARSING = NO - -# If clang assisted parsing is enabled you can provide the compiler with command -# line options that you would normally use when invoking the compiler. Note that -# the include paths will already be set by doxygen for the files and directories -# specified with INPUT and INCLUDE_PATH. -# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. - -CLANG_OPTIONS = - -#--------------------------------------------------------------------------- -# Configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all -# compounds will be generated. Enable this if the project contains a lot of -# classes, structs, unions or interfaces. -# The default value is: YES. - -ALPHABETICAL_INDEX = YES - -# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in -# which the alphabetical index list will be split. -# Minimum value: 1, maximum value: 20, default value: 5. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. - -COLS_IN_ALPHA_INDEX = 3 - -# In case all classes in a project start with a common prefix, all classes will -# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag -# can be used to specify a prefix (or a list of prefixes) that should be ignored -# while generating the index headers. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output -# The default value is: YES. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a -# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of -# it. -# The default directory is: html. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_OUTPUT = . - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each -# generated HTML page (for example: .htm, .php, .asp). -# The default value is: .html. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a user-defined HTML header file for -# each generated HTML page. If the tag is left blank doxygen will generate a -# standard header. -# -# To get valid HTML the header file that includes any scripts and style sheets -# that doxygen needs, which is dependent on the configuration options used (e.g. -# the setting GENERATE_TREEVIEW). It is highly recommended to start with a -# default header using -# doxygen -w html new_header.html new_footer.html new_stylesheet.css -# YourConfigFile -# and then modify the file new_header.html. See also section "Doxygen usage" -# for information on how to generate the default header that doxygen normally -# uses. -# Note: The header is subject to change so you typically have to regenerate the -# default header when upgrading to a newer version of doxygen. For a description -# of the possible markers and block names see the documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each -# generated HTML page. If the tag is left blank doxygen will generate a standard -# footer. See HTML_HEADER for more information on how to generate a default -# footer and what special commands can be used inside the footer. See also -# section "Doxygen usage" for information on how to generate the default footer -# that doxygen normally uses. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style -# sheet that is used by each HTML page. It can be used to fine-tune the look of -# the HTML output. If left blank doxygen will generate a default style sheet. -# See also section "Doxygen usage" for information on how to generate the style -# sheet that doxygen normally uses. -# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as -# it is more robust and this tag (HTML_STYLESHEET) will in the future become -# obsolete. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_STYLESHEET = - -# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined -# cascading style sheets that are included after the standard style sheets -# created by doxygen. Using this option one can overrule certain style aspects. -# This is preferred over using HTML_STYLESHEET since it does not replace the -# standard style sheet and is therefore more robust against future updates. -# Doxygen will copy the style sheet files to the output directory. -# Note: The order of the extra style sheet files is of importance (e.g. the last -# style sheet in the list overrules the setting of the previous ones in the -# list). For an example see the documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_EXTRA_STYLESHEET = - -# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or -# other source files which should be copied to the HTML output directory. Note -# that these files will be copied to the base HTML output directory. Use the -# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these -# files. In the HTML_STYLESHEET file, use the file name only. Also note that the -# files will be copied as-is; there are no commands or markers available. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_EXTRA_FILES = - -# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen -# will adjust the colors in the style sheet and background images according to -# this color. Hue is specified as an angle on a colorwheel, see -# http://en.wikipedia.org/wiki/Hue for more information. For instance the value -# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 -# purple, and 360 is red again. -# Minimum value: 0, maximum value: 359, default value: 220. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_HUE = 220 - -# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors -# in the HTML output. For a value of 0 the output will use grayscales only. A -# value of 255 will produce the most vivid colors. -# Minimum value: 0, maximum value: 255, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_SAT = 100 - -# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the -# luminance component of the colors in the HTML output. Values below 100 -# gradually make the output lighter, whereas values above 100 make the output -# darker. The value divided by 100 is the actual gamma applied, so 80 represents -# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not -# change the gamma. -# Minimum value: 40, maximum value: 240, default value: 80. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_GAMMA = 80 - -# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML -# page will contain the date and time when the page was generated. Setting this -# to YES can help to show when doxygen was last run and thus if the -# documentation is up to date. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_TIMESTAMP = YES - -# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML -# documentation will contain sections that can be hidden and shown after the -# page has loaded. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_DYNAMIC_SECTIONS = YES - -# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries -# shown in the various tree structured indices initially; the user can expand -# and collapse entries dynamically later on. Doxygen will expand the tree to -# such a level that at most the specified number of entries are visible (unless -# a fully collapsed tree already exceeds this amount). So setting the number of -# entries 1 will produce a full collapsed tree by default. 0 is a special value -# representing an infinite number of entries and will result in a full expanded -# tree by default. -# Minimum value: 0, maximum value: 9999, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_INDEX_NUM_ENTRIES = 100 - -# If the GENERATE_DOCSET tag is set to YES, additional index files will be -# generated that can be used as input for Apple's Xcode 3 integrated development -# environment (see: http://developer.apple.com/tools/xcode/), introduced with -# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a -# Makefile in the HTML output directory. Running make will produce the docset in -# that directory and running make install will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at -# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html -# for more information. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_DOCSET = NO - -# This tag determines the name of the docset feed. A documentation feed provides -# an umbrella under which multiple documentation sets from a single provider -# (such as a company or product suite) can be grouped. -# The default value is: Doxygen generated docs. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_FEEDNAME = "Doxygen generated docs" - -# This tag specifies a string that should uniquely identify the documentation -# set bundle. This should be a reverse domain-name style string, e.g. -# com.mycompany.MyDocSet. Doxygen will append .docset to the name. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_BUNDLE_ID = com.cryptopp.Project - -# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify -# the documentation publisher. This should be a reverse domain-name style -# string, e.g. com.mycompany.MyDocSet.documentation. -# The default value is: org.doxygen.Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_PUBLISHER_ID = com.cryptopp.Publisher - -# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. -# The default value is: Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_PUBLISHER_NAME = Crypto++ - -# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three -# additional HTML index files: index.hhp, index.hhc, and index.hhk. The -# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop -# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on -# Windows. -# -# The HTML Help Workshop contains a compiler that can convert all HTML output -# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML -# files are now used as the Windows 98 help format, and will replace the old -# Windows help format (.hlp) on all Windows platforms in the future. Compressed -# HTML files also contain an index, a table of contents, and you can search for -# words in the documentation. The HTML workshop also contains a viewer for -# compressed HTML files. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_HTMLHELP = NO - -# The CHM_FILE tag can be used to specify the file name of the resulting .chm -# file. You can add a path in front of the file if the result should not be -# written to the html output directory. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -CHM_FILE = - -# The HHC_LOCATION tag can be used to specify the location (absolute path -# including file name) of the HTML help compiler (hhc.exe). If non-empty, -# doxygen will try to run the HTML help compiler on the generated index.hhp. -# The file has to be specified with full path. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -HHC_LOCATION = - -# The GENERATE_CHI flag controls if a separate .chi index file is generated -# (YES) or that it should be included in the master .chm file (NO). -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -GENERATE_CHI = NO - -# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) -# and project file content. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -CHM_INDEX_ENCODING = - -# The BINARY_TOC flag controls whether a binary table of contents is generated -# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it -# enables the Previous and Next buttons. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members to -# the table of contents of the HTML help documentation and to the tree view. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -TOC_EXPAND = YES - -# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and -# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that -# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help -# (.qch) of the generated HTML documentation. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_QHP = NO - -# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify -# the file name of the resulting .qch file. The path specified is relative to -# the HTML output folder. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QCH_FILE = - -# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help -# Project output. For more information please see Qt Help Project / Namespace -# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_NAMESPACE = org.doxygen.Project - -# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt -# Help Project output. For more information please see Qt Help Project / Virtual -# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- -# folders). -# The default value is: doc. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_VIRTUAL_FOLDER = doc - -# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom -# filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- -# filters). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_CUST_FILTER_NAME = - -# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the -# custom filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- -# filters). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_CUST_FILTER_ATTRS = - -# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this -# project's filter section matches. Qt Help Project / Filter Attributes (see: -# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_SECT_FILTER_ATTRS = - -# The QHG_LOCATION tag can be used to specify the location of Qt's -# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the -# generated .qhp file. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHG_LOCATION = - -# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be -# generated, together with the HTML files, they form an Eclipse help plugin. To -# install this plugin and make it available under the help contents menu in -# Eclipse, the contents of the directory containing the HTML and XML files needs -# to be copied into the plugins directory of eclipse. The name of the directory -# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. -# After copying Eclipse needs to be restarted before the help appears. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_ECLIPSEHELP = NO - -# A unique identifier for the Eclipse help plugin. When installing the plugin -# the directory name containing the HTML and XML files should also have this -# name. Each documentation set should have its own identifier. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. - -ECLIPSE_DOC_ID = org.doxygen.Project - -# If you want full control over the layout of the generated HTML pages it might -# be necessary to disable the index and replace it with your own. The -# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top -# of each HTML page. A value of NO enables the index and the value YES disables -# it. Since the tabs in the index contain the same information as the navigation -# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -DISABLE_INDEX = NO - -# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index -# structure should be generated to display hierarchical information. If the tag -# value is set to YES, a side panel will be generated containing a tree-like -# index structure (just like the one that is generated for HTML Help). For this -# to work a browser that supports JavaScript, DHTML, CSS and frames is required -# (i.e. any modern browser). Windows users are probably better off using the -# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can -# further fine-tune the look of the index. As an example, the default style -# sheet generated by doxygen has an example that shows how to put an image at -# the root of the tree instead of the PROJECT_NAME. Since the tree basically has -# the same information as the tab index, you could consider setting -# DISABLE_INDEX to YES when enabling this option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_TREEVIEW = NO - -# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that -# doxygen will group on one line in the generated HTML documentation. -# -# Note that a value of 0 will completely suppress the enum values from appearing -# in the overview section. -# Minimum value: 0, maximum value: 20, default value: 4. -# This tag requires that the tag GENERATE_HTML is set to YES. - -ENUM_VALUES_PER_LINE = 4 - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used -# to set the initial width (in pixels) of the frame in which the tree is shown. -# Minimum value: 0, maximum value: 1500, default value: 250. -# This tag requires that the tag GENERATE_HTML is set to YES. - -TREEVIEW_WIDTH = 250 - -# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to -# external symbols imported via tag files in a separate window. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -EXT_LINKS_IN_WINDOW = NO - -# Use this tag to change the font size of LaTeX formulas included as images in -# the HTML documentation. When you change the font size after a successful -# doxygen run you need to manually remove any form_*.png images from the HTML -# output directory to force them to be regenerated. -# Minimum value: 8, maximum value: 50, default value: 10. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FORMULA_FONTSIZE = 10 - -# Use the FORMULA_TRANPARENT tag to determine whether or not the images -# generated for formulas are transparent PNGs. Transparent PNGs are not -# supported properly for IE 6.0, but are supported on all modern browsers. -# -# Note that when changing this option you need to delete any form_*.png files in -# the HTML output directory before the changes have effect. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FORMULA_TRANSPARENT = YES - -# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see -# http://www.mathjax.org) which uses client side Javascript for the rendering -# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX -# installed or if you want to formulas look prettier in the HTML output. When -# enabled you may also need to install MathJax separately and configure the path -# to it using the MATHJAX_RELPATH option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -USE_MATHJAX = NO - -# When MathJax is enabled you can set the default output format to be used for -# the MathJax output. See the MathJax site (see: -# http://docs.mathjax.org/en/latest/output.html) for more details. -# Possible values are: HTML-CSS (which is slower, but has the best -# compatibility), NativeMML (i.e. MathML) and SVG. -# The default value is: HTML-CSS. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_FORMAT = HTML-CSS - -# When MathJax is enabled you need to specify the location relative to the HTML -# output directory using the MATHJAX_RELPATH option. The destination directory -# should contain the MathJax.js script. For instance, if the mathjax directory -# is located at the same level as the HTML output directory, then -# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax -# Content Delivery Network so you can quickly see the result without installing -# MathJax. However, it is strongly recommended to install a local copy of -# MathJax from http://www.mathjax.org before deployment. -# The default value is: http://cdn.mathjax.org/mathjax/latest. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest - -# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax -# extension names that should be enabled during MathJax rendering. For example -# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_EXTENSIONS = - -# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces -# of code that will be used on startup of the MathJax code. See the MathJax site -# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an -# example see the documentation. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_CODEFILE = - -# When the SEARCHENGINE tag is enabled doxygen will generate a search box for -# the HTML output. The underlying search engine uses javascript and DHTML and -# should work on any modern browser. Note that when using HTML help -# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) -# there is already a search function so this one should typically be disabled. -# For large projects the javascript based search engine can be slow, then -# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to -# search using the keyboard; to jump to the search box use + S -# (what the is depends on the OS and browser, but it is typically -# , /