Merge ~hectorcao/ubuntu/+source/ipp-crypto:ubuntu/devel into ubuntu/+source/ipp-crypto:ubuntu/devel

Proposed by Hector CAO
Status: Needs review
Proposed branch: ~hectorcao/ubuntu/+source/ipp-crypto:ubuntu/devel
Merge into: ubuntu/+source/ipp-crypto:ubuntu/devel
Diff against target: 222616 lines (+106969/-25034)
971 files modified
.clang-tidy (+24/-0)
BUILD.md (+60/-54)
CHANGELOG.md (+14/-3)
CMakeLists.txt (+27/-11)
CONST_TIME_EXECUTION_TESTING.md (+17/-3)
CONTRIBUTING.md (+10/-10)
DEPRECATION_NOTES.md (+19/-4)
OVERVIEW.md (+191/-31)
README.md (+17/-13)
README_FIPS.md (+38/-29)
THIRD-PARTY-PROGRAMS.txt (+1/-1)
debian/changelog (+12/-0)
debian/control (+10/-10)
debian/patches/0001-Undefine-FORTIFY_SOURCE-before-define.patch (+27/-27)
debian/watch (+3/-3)
dev/null (+0/-124)
examples/CMakeLists.txt (+10/-4)
examples/FindIPPCrypto.cmake (+8/-8)
examples/README.md (+8/-8)
examples/ecdsa/categoryOptions.cmake (+20/-0)
examples/ecdsa/ecdsa-256r1-sign.cpp (+141/-0)
examples/examplesBuildOptions.cmake (+4/-3)
examples/hash/sm3_hash_rmf.cpp (+103/-0)
examples/post-quantum/lms_m32_h5_w8_verification.cpp (+213/-0)
examples/utils/examples_common.h (+2/-2)
include/ippcp.h (+15/-358)
include/ippcp/fips_cert.h (+6/-2)
include/ippcpdefs.h (+33/-15)
include/ippcpversion.h (+41/-0)
include/ippversion.h (+13/-8)
sources/cmake/CMakeASM_NASMOptions.txt (+1/-1)
sources/cmake/ippcp-config-version.cmake.in (+1/-1)
sources/cmake/ippcp-config.cmake.in (+4/-5)
sources/cmake/ippcp-utils.cmake (+10/-10)
sources/cmake/linux/Clang9.0.0.cmake (+4/-5)
sources/cmake/linux/GNU8.2.0.cmake (+5/-6)
sources/cmake/linux/Intel19.0.0.cmake (+7/-7)
sources/cmake/linux/IntelLLVM2023.1.0.cmake (+9/-10)
sources/cmake/linux/common.cmake (+1/-1)
sources/cmake/macosx/AppleClang11.0.0.cmake (+4/-5)
sources/cmake/macosx/Intel19.0.0.cmake (+5/-6)
sources/cmake/macosx/common.cmake (+1/-1)
sources/cmake/os_common.cmake (+2/-2)
sources/cmake/pkg-config/crypto_mb-dynamic.pc.in (+1/-1)
sources/cmake/pkg-config/crypto_mb-static.pc.in (+1/-1)
sources/cmake/pkg-config/ippcp-dynamic.pc.in (+1/-1)
sources/cmake/pkg-config/ippcp-static.pc.in (+1/-1)
sources/cmake/windows/Intel19.0.0.cmake (+7/-5)
sources/cmake/windows/IntelLLVM2023.1.0.cmake (+6/-7)
sources/cmake/windows/MSVC19.14.cmake (+4/-2)
sources/cmake/windows/common.cmake (+1/-1)
sources/dispatcher/gen_disp_common.py (+8/-8)
sources/dispatcher/gen_disp_lin32.nonpic.py (+3/-3)
sources/dispatcher/gen_disp_lin32.py (+2/-2)
sources/dispatcher/gen_disp_lin64.nonpic.py (+2/-2)
sources/dispatcher/gen_disp_lin64.py (+4/-2)
sources/dispatcher/gen_disp_mac64.py (+4/-4)
sources/dispatcher/gen_disp_win32.py (+4/-4)
sources/dispatcher/gen_disp_win64.py (+11/-11)
sources/gen_cpu_spc_header/gen_cpu_spc_1cpu_header.py (+19/-3)
sources/gen_cpu_spc_header/gen_cpu_spc_header.py (+1/-1)
sources/include/asmdefs.inc (+3/-17)
sources/include/dispatcher.h (+20/-36)
sources/include/fips_cert_internal/bn_common.h (+2/-2)
sources/include/ippres.gen (+33/-33)
sources/include/ippver.h (+7/-7)
sources/include/lms_internal/lmots.h (+3/-3)
sources/include/lms_internal/lms.h (+1/-1)
sources/include/noexec_stack.inc (+47/-0)
sources/include/owndefs.h (+12/-12)
sources/include/stateful_sig_common/common.h (+1/-1)
sources/include/xmss_internal/wots.h (+3/-3)
sources/include/xmss_internal/xmss.h (+1/-1)
sources/ippcp/CMakeLists.txt (+33/-19)
sources/ippcp/asm_ia32/pcpbnumulschoolv8as.asm (+13/-13)
sources/ippcp/asm_ia32/pcpbnusqrw7as.asm (+13/-13)
sources/ippcp/asm_ia32/pcpmd5w7as.asm (+3/-7)
sources/ippcp/asm_ia32/pcpsha1w7as.asm (+3/-7)
sources/ippcp/asm_ia32/pcpsha256g9as.asm (+5/-0)
sources/ippcp/asm_ia32/pcpsha256w7as.asm (+3/-15)
sources/ippcp/asm_ia32/pcpsha512g9as.asm (+3/-12)
sources/ippcp/asm_ia32/pcpsha512w7as.asm (+3/-12)
sources/ippcp/asm_ia32/pcpvariant.inc (+1/-2)
sources/ippcp/asm_ia32/pcpvariant_txt_acm.inc (+1/-2)
sources/ippcp/asm_ia32/pcpvariant_xmm7560.inc (+1/-2)
sources/ippcp/asm_intel64/gcm_vaes_avx512.inc (+1/-1)
sources/ippcp/asm_intel64/pcpaesgcme9as.asm (+8/-8)
sources/ippcp/asm_intel64/pcpbnudivm7as.asm (+1/-1)
sources/ippcp/asm_intel64/pcpsha1e9as.asm (+4/-6)
sources/ippcp/asm_intel64/pcpsha1m7as.asm (+3/-7)
sources/ippcp/asm_intel64/pcpsha1u8as.asm (+3/-7)
sources/ippcp/asm_intel64/pcpsha256m7as.asm (+3/-15)
sources/ippcp/asm_intel64/pcpsha512m7as.asm (+3/-14)
sources/ippcp/asm_intel64/pcpsm3l9_ni_as.asm (+231/-0)
sources/ippcp/asm_intel64/pcpvariant.inc (+1/-2)
sources/ippcp/asm_intel64/pcpvariant_txt_acm.inc (+1/-2)
sources/ippcp/cpinit.c (+89/-62)
sources/ippcp/crypto_mb/CMakeLists.txt (+67/-8)
sources/ippcp/crypto_mb/Readme.md (+27/-17)
sources/ippcp/crypto_mb/dispatcher/gen_disp_common_crypto_mb.py (+81/-0)
sources/ippcp/crypto_mb/dispatcher/gen_disp_crypto_mb.py (+113/-0)
sources/ippcp/crypto_mb/gen_cpu_spc_header/gen_cpu_spc_1cpu_header_crypto_mb.py (+92/-0)
sources/ippcp/crypto_mb/gen_cpu_spc_header/gen_cpu_spc_header_crypto_mb.py (+91/-0)
sources/ippcp/crypto_mb/include/crypto_mb/cpu_features.h (+24/-6)
sources/ippcp/crypto_mb/include/crypto_mb/defs.h (+44/-11)
sources/ippcp/crypto_mb/include/crypto_mb/ec_nistp256.h (+24/-25)
sources/ippcp/crypto_mb/include/crypto_mb/ec_nistp384.h (+25/-25)
sources/ippcp/crypto_mb/include/crypto_mb/ec_nistp521.h (+24/-25)
sources/ippcp/crypto_mb/include/crypto_mb/ec_sm2.h (+17/-16)
sources/ippcp/crypto_mb/include/crypto_mb/ed25519.h (+7/-6)
sources/ippcp/crypto_mb/include/crypto_mb/exp.h (+11/-12)
sources/ippcp/crypto_mb/include/crypto_mb/fips_cert.h (+13/-12)
sources/ippcp/crypto_mb/include/crypto_mb/rsa.h (+29/-28)
sources/ippcp/crypto_mb/include/crypto_mb/sm3.h (+7/-7)
sources/ippcp/crypto_mb/include/crypto_mb/sm4.h (+17/-16)
sources/ippcp/crypto_mb/include/crypto_mb/sm4_ccm.h (+12/-10)
sources/ippcp/crypto_mb/include/crypto_mb/sm4_gcm.h (+9/-9)
sources/ippcp/crypto_mb/include/crypto_mb/status.h (+34/-21)
sources/ippcp/crypto_mb/include/crypto_mb/version.h (+8/-7)
sources/ippcp/crypto_mb/include/crypto_mb/x25519.h (+4/-4)
sources/ippcp/crypto_mb/include/internal/common/crypto_mb_ver.h (+4/-9)
sources/ippcp/crypto_mb/include/internal/common/ifma_cvt52.h (+24/-0)
sources/ippcp/crypto_mb/include/internal/common/ifma_defs.h (+10/-0)
sources/ippcp/crypto_mb/include/internal/common/ifma_math.h (+33/-18)
sources/ippcp/crypto_mb/include/internal/common/internal_defs.h (+46/-0)
sources/ippcp/crypto_mb/include/internal/common/mem_fns.h (+2/-2)
sources/ippcp/crypto_mb/include/internal/ecnist/ifma_arith_p256.h (+13/-9)
sources/ippcp/crypto_mb/include/internal/ecnist/ifma_arith_p384.h (+12/-8)
sources/ippcp/crypto_mb/include/internal/ecnist/ifma_arith_p521.h (+12/-8)
sources/ippcp/crypto_mb/include/internal/ecnist/ifma_ecpoint_p256.h (+104/-6)
sources/ippcp/crypto_mb/include/internal/ecnist/ifma_ecpoint_p384.h (+103/-6)
sources/ippcp/crypto_mb/include/internal/ecnist/ifma_ecpoint_p521.h (+103/-6)
sources/ippcp/crypto_mb/include/internal/ecnist/ifma_ecprecomp4_p256.h (+4/-0)
sources/ippcp/crypto_mb/include/internal/ecnist/ifma_ecprecomp4_p384.h (+4/-0)
sources/ippcp/crypto_mb/include/internal/ecnist/ifma_ecprecomp4_p521.h (+4/-0)
sources/ippcp/crypto_mb/include/internal/ecnist/ifma_ecprecomp5_p256.h (+4/-0)
sources/ippcp/crypto_mb/include/internal/ecnist/ifma_ecprecomp7_p256.h (+4/-0)
sources/ippcp/crypto_mb/include/internal/ed25519/ifma_arith_ed25519.h (+29/-10)
sources/ippcp/crypto_mb/include/internal/ed25519/ifma_arith_n25519.h (+4/-0)
sources/ippcp/crypto_mb/include/internal/ed25519/ifma_arith_p25519.h (+14/-10)
sources/ippcp/crypto_mb/include/internal/ed25519/ifma_ed25519_precomp4.h (+4/-0)
sources/ippcp/crypto_mb/include/internal/ed25519/sha512.h (+8/-0)
sources/ippcp/crypto_mb/include/internal/exp/ifma_exp_method.h (+14/-5)
sources/ippcp/crypto_mb/include/internal/rsa/avxifma_ahmm.h (+230/-0)
sources/ippcp/crypto_mb/include/internal/rsa/avxifma_ahmr.h (+89/-0)
sources/ippcp/crypto_mb/include/internal/rsa/avxifma_amm.h (+191/-0)
sources/ippcp/crypto_mb/include/internal/rsa/avxifma_ams.h (+281/-0)
sources/ippcp/crypto_mb/include/internal/rsa/avxifma_extract_multiplier.h (+91/-0)
sources/ippcp/crypto_mb/include/internal/rsa/ifma_div_104_by_52.h (+48/-44)
sources/ippcp/crypto_mb/include/internal/rsa/ifma_rsa_arith.h (+334/-109)
sources/ippcp/crypto_mb/include/internal/rsa/ifma_rsa_layer_cp.h (+67/-37)
sources/ippcp/crypto_mb/include/internal/rsa/ifma_rsa_layer_ssl.h (+116/-72)
sources/ippcp/crypto_mb/include/internal/rsa/ifma_rsa_method.h (+104/-56)
sources/ippcp/crypto_mb/include/internal/sm2/ifma_arith_sm2.h (+13/-9)
sources/ippcp/crypto_mb/include/internal/sm2/ifma_ecpoint_sm2.h (+100/-5)
sources/ippcp/crypto_mb/include/internal/sm2/ifma_ecprecomp4_psm2.h (+4/-0)
sources/ippcp/crypto_mb/include/internal/sm3/sm3_common.h (+12/-14)
sources/ippcp/crypto_mb/include/internal/sm3/sm3_mb16.h (+15/-4)
sources/ippcp/crypto_mb/include/internal/sm3/sm3_mb8.h (+6/-2)
sources/ippcp/crypto_mb/include/internal/sm4/sm4_ccm_mb.h (+14/-4)
sources/ippcp/crypto_mb/include/internal/sm4/sm4_gcm_mb.h (+18/-9)
sources/ippcp/crypto_mb/include/internal/sm4/sm4_mb.h (+50/-23)
sources/ippcp/crypto_mb/src/CMakeLists.txt (+152/-65)
sources/ippcp/crypto_mb/src/cmake/crypto_mb-utils.cmake (+4/-4)
sources/ippcp/crypto_mb/src/cmake/dll_export/crypto_mb.defs (+1/-0)
sources/ippcp/crypto_mb/src/cmake/dll_export/crypto_mb.linux.lib-export (+1/-0)
sources/ippcp/crypto_mb/src/cmake/dll_export/crypto_mb.macosx.lib-export (+1/-0)
sources/ippcp/crypto_mb/src/cmake/dll_export/crypto_mb_fips_selftests.defs (+1/-0)
sources/ippcp/crypto_mb/src/cmake/linux/Clang.cmake (+13/-9)
sources/ippcp/crypto_mb/src/cmake/linux/GNU.cmake (+14/-9)
sources/ippcp/crypto_mb/src/cmake/linux/Intel.cmake (+7/-5)
sources/ippcp/crypto_mb/src/cmake/linux/IntelLLVM.cmake (+12/-5)
sources/ippcp/crypto_mb/src/cmake/macosx/AppleClang.cmake (+5/-5)
sources/ippcp/crypto_mb/src/cmake/macosx/Intel.cmake (+5/-2)
sources/ippcp/crypto_mb/src/cmake/windows/Intel.cmake (+4/-1)
sources/ippcp/crypto_mb/src/cmake/windows/IntelLLVM.cmake (+12/-7)
sources/ippcp/crypto_mb/src/cmake/windows/MSVC.cmake (+4/-1)
sources/ippcp/crypto_mb/src/common/cpu_features.c (+107/-27)
sources/ippcp/crypto_mb/src/common/crypto_mb_res.gen (+2/-2)
sources/ippcp/crypto_mb/src/common/emptyfile.c (+3/-6)
sources/ippcp/crypto_mb/src/common/ifma_cvt52.c (+680/-19)
sources/ippcp/crypto_mb/src/common/ifma_version.c (+17/-8)
sources/ippcp/crypto_mb/src/ecnist/ifma_arith_m256.c (+3/-0)
sources/ippcp/crypto_mb/src/ecnist/ifma_arith_n256.c (+3/-0)
sources/ippcp/crypto_mb/src/ecnist/ifma_arith_n384.c (+5/-1)
sources/ippcp/crypto_mb/src/ecnist/ifma_arith_n521.c (+8/-4)
sources/ippcp/crypto_mb/src/ecnist/ifma_arith_p256.c (+3/-0)
sources/ippcp/crypto_mb/src/ecnist/ifma_arith_p384.c (+6/-2)
sources/ippcp/crypto_mb/src/ecnist/ifma_arith_p521.c (+8/-4)
sources/ippcp/crypto_mb/src/ecnist/ifma_ecdh_p256.c (+13/-126)
sources/ippcp/crypto_mb/src/ecnist/ifma_ecdh_p384.c (+12/-126)
sources/ippcp/crypto_mb/src/ecnist/ifma_ecdh_p521.c (+12/-126)
sources/ippcp/crypto_mb/src/ecnist/ifma_ecdsa_p256.c (+49/-530)
sources/ippcp/crypto_mb/src/ecnist/ifma_ecdsa_p384.c (+50/-528)
sources/ippcp/crypto_mb/src/ecnist/ifma_ecdsa_p521.c (+49/-523)
sources/ippcp/crypto_mb/src/ecnist/ifma_ecpoint_p256.c (+8/-5)
sources/ippcp/crypto_mb/src/ecnist/ifma_ecpoint_p384.c (+9/-6)
sources/ippcp/crypto_mb/src/ecnist/ifma_ecpoint_p521.c (+8/-5)
sources/ippcp/crypto_mb/src/ecnist/ifma_ecpubkey_p256.c (+12/-88)
sources/ippcp/crypto_mb/src/ecnist/ifma_ecpubkey_p384.c (+13/-88)
sources/ippcp/crypto_mb/src/ecnist/ifma_ecpubkey_p521.c (+12/-88)
sources/ippcp/crypto_mb/src/ecnist/internal_avx512/internal_ecdsa_p256.c (+632/-0)
sources/ippcp/crypto_mb/src/ecnist/internal_avx512/internal_ecdsa_p384.c (+634/-0)
sources/ippcp/crypto_mb/src/ecnist/internal_avx512/internal_ecdsa_p521.c (+632/-0)
sources/ippcp/crypto_mb/src/ecnist/internal_avx512/internal_ecpubkey_p256.c (+136/-0)
sources/ippcp/crypto_mb/src/ecnist/internal_avx512/internal_ecpubkey_p384.c (+137/-0)
sources/ippcp/crypto_mb/src/ecnist/internal_avx512/internal_ecpubkey_p521.c (+137/-0)
sources/ippcp/crypto_mb/src/ecnist/internal_avx512/internal_ifma_ecdh_p256.c (+173/-0)
sources/ippcp/crypto_mb/src/ecnist/internal_avx512/internal_ifma_ecdh_p384.c (+170/-0)
sources/ippcp/crypto_mb/src/ecnist/internal_avx512/internal_ifma_ecdh_p521.c (+169/-0)
sources/ippcp/crypto_mb/src/ed25519/ifma_arith_ed25519.c (+9/-5)
sources/ippcp/crypto_mb/src/ed25519/ifma_arith_n25519.c (+4/-0)
sources/ippcp/crypto_mb/src/ed25519/ifma_arith_p25519.c (+10/-6)
sources/ippcp/crypto_mb/src/ed25519/ifma_ed25519.c (+18/-252)
sources/ippcp/crypto_mb/src/ed25519/internal_avx512/internal_ed25519.c (+306/-0)
sources/ippcp/crypto_mb/src/ed25519/sha512.c (+11/-7)
sources/ippcp/crypto_mb/src/exp/ifma_exp1k_mb.c (+3/-0)
sources/ippcp/crypto_mb/src/exp/ifma_exp2k_mb.c (+3/-0)
sources/ippcp/crypto_mb/src/exp/ifma_exp3k_mb.c (+3/-0)
sources/ippcp/crypto_mb/src/exp/ifma_exp4k_mb.c (+3/-0)
sources/ippcp/crypto_mb/src/exp/ifma_exp_mb.c (+40/-10)
sources/ippcp/crypto_mb/src/exp/ifma_exp_method.c (+5/-1)
sources/ippcp/crypto_mb/src/fips_cert/selftest_mbx_ed25519_public_key_mb8.c (+16/-3)
sources/ippcp/crypto_mb/src/fips_cert/selftest_mbx_ed25519_sign_mb8.c (+6/-1)
sources/ippcp/crypto_mb/src/fips_cert/selftest_mbx_ed25519_verify_mb8.c (+4/-0)
sources/ippcp/crypto_mb/src/fips_cert/selftest_mbx_nistp256_ecdh_mb8.c (+12/-2)
sources/ippcp/crypto_mb/src/fips_cert/selftest_mbx_nistp256_ecdsa_sign_mb8.c (+12/-2)
sources/ippcp/crypto_mb/src/fips_cert/selftest_mbx_nistp256_ecdsa_sign_setup_complete_mb8.c (+21/-3)
sources/ippcp/crypto_mb/src/fips_cert/selftest_mbx_nistp256_ecdsa_verify_mb8.c (+12/-2)
sources/ippcp/crypto_mb/src/fips_cert/selftest_mbx_nistp256_ecpublic_key_mb8.c (+41/-10)
sources/ippcp/crypto_mb/src/fips_cert/selftest_mbx_nistp384_ecdh_mb8.c (+12/-2)
sources/ippcp/crypto_mb/src/fips_cert/selftest_mbx_nistp384_ecdsa_sign_mb8.c (+12/-2)
sources/ippcp/crypto_mb/src/fips_cert/selftest_mbx_nistp384_ecdsa_sign_setup_complete_mb8.c (+24/-4)
sources/ippcp/crypto_mb/src/fips_cert/selftest_mbx_nistp384_ecdsa_verify_mb8.c (+12/-2)
sources/ippcp/crypto_mb/src/fips_cert/selftest_mbx_nistp384_ecpublic_key_mb8.c (+30/-5)
sources/ippcp/crypto_mb/src/fips_cert/selftest_mbx_nistp521_ecdh_mb8.c (+12/-2)
sources/ippcp/crypto_mb/src/fips_cert/selftest_mbx_nistp521_ecdsa_sign_mb8.c (+12/-2)
sources/ippcp/crypto_mb/src/fips_cert/selftest_mbx_nistp521_ecdsa_sign_setup_complete_mb8.c (+24/-4)
sources/ippcp/crypto_mb/src/fips_cert/selftest_mbx_nistp521_ecdsa_verify_mb8.c (+12/-2)
sources/ippcp/crypto_mb/src/fips_cert/selftest_mbx_nistp521_ecpublic_key_mb8.c (+36/-6)
sources/ippcp/crypto_mb/src/fips_cert/selftest_mbx_rsa2k_private_crt_mb8.c (+12/-2)
sources/ippcp/crypto_mb/src/fips_cert/selftest_mbx_rsa2k_private_mb8.c (+12/-2)
sources/ippcp/crypto_mb/src/fips_cert/selftest_mbx_rsa2k_public_mb8.c (+12/-2)
sources/ippcp/crypto_mb/src/fips_cert/selftest_mbx_rsa3k_private_crt_mb8.c (+12/-2)
sources/ippcp/crypto_mb/src/fips_cert/selftest_mbx_rsa3k_private_mb8.c (+12/-2)
sources/ippcp/crypto_mb/src/fips_cert/selftest_mbx_rsa3k_public_mb8.c (+12/-2)
sources/ippcp/crypto_mb/src/fips_cert/selftest_mbx_rsa4k_private_crt_mb8.c (+12/-2)
sources/ippcp/crypto_mb/src/fips_cert/selftest_mbx_rsa4k_private_mb8.c (+12/-2)
sources/ippcp/crypto_mb/src/fips_cert/selftest_mbx_rsa4k_public_mb8.c (+12/-2)
sources/ippcp/crypto_mb/src/rsa/ifma_div_104_by_52.c (+109/-107)
sources/ippcp/crypto_mb/src/rsa/ifma_exp52x10_mb8.c (+240/-101)
sources/ippcp/crypto_mb/src/rsa/ifma_exp52x20_65537_mb8.c (+105/-52)
sources/ippcp/crypto_mb/src/rsa/ifma_exp52x20_mb8.c (+326/-173)
sources/ippcp/crypto_mb/src/rsa/ifma_exp52x30_mb8.c (+306/-165)
sources/ippcp/crypto_mb/src/rsa/ifma_exp52x40_65537_mb8.c (+105/-51)
sources/ippcp/crypto_mb/src/rsa/ifma_exp52x40_mb8.c (+339/-201)
sources/ippcp/crypto_mb/src/rsa/ifma_exp52x60_65537_mb8.c (+96/-46)
sources/ippcp/crypto_mb/src/rsa/ifma_exp52x60_mb8.c (+396/-256)
sources/ippcp/crypto_mb/src/rsa/ifma_exp52x79_65537_mb8.c (+96/-46)
sources/ippcp/crypto_mb/src/rsa/ifma_exp52x79_mb8.c (+452/-312)
sources/ippcp/crypto_mb/src/rsa/ifma_method.c (+546/-266)
sources/ippcp/crypto_mb/src/rsa/ifma_other52x_mb8.c (+1389/-531)
sources/ippcp/crypto_mb/src/rsa/ifma_rsa_layer_mb8.c (+313/-94)
sources/ippcp/crypto_mb/src/rsa/ifma_rsa_mb8.c (+149/-126)
sources/ippcp/crypto_mb/src/rsa/ifma_rsa_ssl_prv2_layer_mb8.c (+312/-99)
sources/ippcp/crypto_mb/src/rsa/ifma_rsa_ssl_prv2_mb8.c (+76/-35)
sources/ippcp/crypto_mb/src/rsa/ifma_rsa_ssl_prv5_layer_mb8.c (+653/-190)
sources/ippcp/crypto_mb/src/rsa/ifma_rsa_ssl_prv5_mb8.c (+83/-43)
sources/ippcp/crypto_mb/src/rsa/ifma_rsa_ssl_pub65537_mb8.c (+77/-38)
sources/ippcp/crypto_mb/src/rsa/ifma_rsa_ssl_pub_layer_mb8.c (+221/-82)
sources/ippcp/crypto_mb/src/rsa/internal_avx2/AMS4x52x20_diagonal_stitched_with_extract_mb4.c (+93/-0)
sources/ippcp/crypto_mb/src/rsa/internal_avx2/AMS4x52x30_diagonal_stitched_with_extract_mb4.c (+93/-0)
sources/ippcp/crypto_mb/src/rsa/internal_avx2/AMS4x52x40_diagonal_stitched_with_extract_mb4.c (+93/-0)
sources/ippcp/crypto_mb/src/rsa/internal_avx2/ifma_ahmm52x20_mb4.c (+34/-0)
sources/ippcp/crypto_mb/src/rsa/internal_avx2/ifma_ahmm52x30_mb4.c (+34/-0)
sources/ippcp/crypto_mb/src/rsa/internal_avx2/ifma_ahmm52x40_mb4.c (+34/-0)
sources/ippcp/crypto_mb/src/rsa/internal_avx2/ifma_ahmr52x20_mb4.c (+29/-0)
sources/ippcp/crypto_mb/src/rsa/internal_avx2/ifma_ahmr52x30_mb4.c (+29/-0)
sources/ippcp/crypto_mb/src/rsa/internal_avx2/ifma_ahmr52x40_mb4.c (+29/-0)
sources/ippcp/crypto_mb/src/rsa/internal_avx2/ifma_amm52x10_mb4.c (+27/-0)
sources/ippcp/crypto_mb/src/rsa/internal_avx2/ifma_amm52x20_mb4.c (+28/-0)
sources/ippcp/crypto_mb/src/rsa/internal_avx2/ifma_amm52x30_mb4.c (+28/-0)
sources/ippcp/crypto_mb/src/rsa/internal_avx2/ifma_amm52x40_mb4.c (+22/-29)
sources/ippcp/crypto_mb/src/rsa/internal_avx2/ifma_amm52x60_mb4.c (+28/-0)
sources/ippcp/crypto_mb/src/rsa/internal_avx2/ifma_amm52x79_mb4.c (+28/-0)
sources/ippcp/crypto_mb/src/rsa/internal_avx2/ifma_ams52x10_diagonal_mb4.c (+274/-0)
sources/ippcp/crypto_mb/src/rsa/internal_avx2/ifma_ams52x20_diagonal_mb4.c (+669/-0)
sources/ippcp/crypto_mb/src/rsa/internal_avx2/ifma_ams52x30_diagonal_mb4.c (+1274/-0)
sources/ippcp/crypto_mb/src/rsa/internal_avx2/ifma_ams52x40_diagonal_mb4.c (+2089/-0)
sources/ippcp/crypto_mb/src/rsa/internal_avx2/ifma_ams52x60_diagonal_mb4.c (+4384/-0)
sources/ippcp/crypto_mb/src/rsa/internal_avx2/ifma_ams52x79_diagonal_mb4.c (+7328/-0)
sources/ippcp/crypto_mb/src/rsa/internal_avx512/AMS4x52x20_diagonal_stitched_with_extract_mb8.c (+2051/-0)
sources/ippcp/crypto_mb/src/rsa/internal_avx512/ifma_ahmm52x20_mb8.c (+297/-0)
sources/ippcp/crypto_mb/src/rsa/internal_avx512/ifma_ahmr52x20_mb8.c (+213/-210)
sources/ippcp/crypto_mb/src/rsa/internal_avx512/ifma_amm52x10_mb8.c (+116/-113)
sources/ippcp/crypto_mb/src/rsa/internal_avx512/ifma_amm52x20_mb8.c (+198/-195)
sources/ippcp/crypto_mb/src/rsa/internal_avx512/ifma_amm52x30_mb8.c (+278/-276)
sources/ippcp/crypto_mb/src/rsa/internal_avx512/ifma_amm52x40_mb8.c (+360/-359)
sources/ippcp/crypto_mb/src/rsa/internal_avx512/ifma_amm52x60_mb8.c (+522/-525)
sources/ippcp/crypto_mb/src/rsa/internal_avx512/ifma_amm52x79_mb8.c (+676/-683)
sources/ippcp/crypto_mb/src/rsa/internal_avx512/ifma_ams52x10_diagonal_mb8.c (+433/-0)
sources/ippcp/crypto_mb/src/rsa/internal_avx512/ifma_ams52x20_diagonal_mb8.c (+1464/-0)
sources/ippcp/crypto_mb/src/rsa/internal_avx512/ifma_ams52x30_diagonal_mb8.c (+1410/-1410)
sources/ippcp/crypto_mb/src/rsa/internal_avx512/ifma_ams52x40_diagonal_mb8.c (+2160/-2160)
sources/ippcp/crypto_mb/src/rsa/internal_avx512/ifma_ams52x60_diagonal_mb8.c (+4370/-0)
sources/ippcp/crypto_mb/src/rsa/internal_avx512/ifma_ams52x79_diagonal_mb8.c (+7107/-0)
sources/ippcp/crypto_mb/src/rsa/internal_avx512/ifma_ams5x52x10_diagonal_mb8.c (+438/-0)
sources/ippcp/crypto_mb/src/rsa/internal_avx512/ifma_ams5x52x20_diagonal_mb8.c (+1406/-1411)
sources/ippcp/crypto_mb/src/rsa/internal_avx512/ifma_ams5x52x40_diagonal_mb8.c (+2263/-2264)
sources/ippcp/crypto_mb/src/rsa/internal_avx512/ifma_extract_amm52x20_mb8.c (+251/-245)
sources/ippcp/crypto_mb/src/sm2/ifma_arith_nsm2.c (+3/-0)
sources/ippcp/crypto_mb/src/sm2/ifma_arith_psm2.c (+4/-0)
sources/ippcp/crypto_mb/src/sm2/ifma_ecdh_sm2.c (+13/-126)
sources/ippcp/crypto_mb/src/sm2/ifma_ecdsa_sm2.c (+33/-590)
sources/ippcp/crypto_mb/src/sm2/ifma_ecpoint_sm2.c (+9/-5)
sources/ippcp/crypto_mb/src/sm2/ifma_ecpubkey_sm2.c (+12/-89)
sources/ippcp/crypto_mb/src/sm2/internal_avx512/internal_ecdsa_sm2.c (+694/-0)
sources/ippcp/crypto_mb/src/sm2/internal_avx512/internal_ifma_ecdh_sm2.c (+178/-0)
sources/ippcp/crypto_mb/src/sm2/internal_avx512/internal_ifma_ecpubkey_sm2.c (+144/-0)
sources/ippcp/crypto_mb/src/sm3/internal_avx512/internal_sm3_final_mb16.c (+120/-0)
sources/ippcp/crypto_mb/src/sm3/internal_avx512/internal_sm3_init_mb16.c (+59/-0)
sources/ippcp/crypto_mb/src/sm3/internal_avx512/internal_sm3_messagedigest_mb16.c (+48/-0)
sources/ippcp/crypto_mb/src/sm3/internal_avx512/internal_sm3_update_mb16.c (+154/-0)
sources/ippcp/crypto_mb/src/sm3/sm3_avx512_mb16.c (+16/-12)
sources/ippcp/crypto_mb/src/sm3/sm3_avx512_mb8.c (+10/-7)
sources/ippcp/crypto_mb/src/sm3/sm3_final_mb16.c (+6/-79)
sources/ippcp/crypto_mb/src/sm3/sm3_final_mb8.c (+16/-8)
sources/ippcp/crypto_mb/src/sm3/sm3_init_mb16.c (+6/-35)
sources/ippcp/crypto_mb/src/sm3/sm3_init_mb8.c (+4/-0)
sources/ippcp/crypto_mb/src/sm3/sm3_messagedigest_mb16.c (+6/-21)
sources/ippcp/crypto_mb/src/sm3/sm3_messagedigest_mb8.c (+4/-0)
sources/ippcp/crypto_mb/src/sm3/sm3_update_mb16.c (+6/-108)
sources/ippcp/crypto_mb/src/sm3/sm3_update_mb8.c (+22/-9)
sources/ippcp/crypto_mb/src/sm4/ccm/internal_avx512/sm4_ccm_decrypt_mb16.c (+8/-1)
sources/ippcp/crypto_mb/src/sm4/ccm/internal_avx512/sm4_ccm_encrypt_mb16.c (+8/-1)
sources/ippcp/crypto_mb/src/sm4/ccm/internal_avx512/sm4_ccm_get_tag_mb16.c (+8/-1)
sources/ippcp/crypto_mb/src/sm4/ccm/internal_avx512/sm4_ccm_init_mb16.c (+62/-0)
sources/ippcp/crypto_mb/src/sm4/ccm/internal_avx512/sm4_ccm_set_msg_len_mb16.c (+4/-0)
sources/ippcp/crypto_mb/src/sm4/ccm/internal_avx512/sm4_ccm_set_tag_len_mb16.c (+4/-0)
sources/ippcp/crypto_mb/src/sm4/ccm/internal_avx512/sm4_ccm_update_aad_mb16.c (+8/-1)
sources/ippcp/crypto_mb/src/sm4/ccm/internal_avx512/sm4_ccm_update_iv_mb16.c (+4/-0)
sources/ippcp/crypto_mb/src/sm4/ccm/sm4_ccm_decrypt_mb16_api.c (+8/-4)
sources/ippcp/crypto_mb/src/sm4/ccm/sm4_ccm_encrypt_mb16_api.c (+8/-4)
sources/ippcp/crypto_mb/src/sm4/ccm/sm4_ccm_get_tag_mb16_api.c (+8/-4)
sources/ippcp/crypto_mb/src/sm4/ccm/sm4_ccm_init_mb16_api.c (+9/-32)
sources/ippcp/crypto_mb/src/sm4/ccm/sm4_ccm_update_aad_mb16_api.c (+8/-4)
sources/ippcp/crypto_mb/src/sm4/gcm/internal_avx512/sm4_gcm_decrypt_mb16.c (+4/-0)
sources/ippcp/crypto_mb/src/sm4/gcm/internal_avx512/sm4_gcm_encrypt_j0_mb16.c (+4/-0)
sources/ippcp/crypto_mb/src/sm4/gcm/internal_avx512/sm4_gcm_encrypt_mb16.c (+4/-0)
sources/ippcp/crypto_mb/src/sm4/gcm/internal_avx512/sm4_gcm_finalize_iv_mb16.c (+8/-4)
sources/ippcp/crypto_mb/src/sm4/gcm/internal_avx512/sm4_gcm_gctr_kernel_mb16.c (+5/-1)
sources/ippcp/crypto_mb/src/sm4/gcm/internal_avx512/sm4_gcm_get_tag_mb16.c (+12/-5)
sources/ippcp/crypto_mb/src/sm4/gcm/internal_avx512/sm4_gcm_ghash_mul_single_block_mb16.c (+4/-0)
sources/ippcp/crypto_mb/src/sm4/gcm/internal_avx512/sm4_gcm_init_mb16.c (+71/-0)
sources/ippcp/crypto_mb/src/sm4/gcm/internal_avx512/sm4_gcm_precompute_hashkey_mb16.c (+3/-0)
sources/ippcp/crypto_mb/src/sm4/gcm/internal_avx512/sm4_gcm_update_aad_mb16.c (+4/-0)
sources/ippcp/crypto_mb/src/sm4/gcm/internal_avx512/sm4_gcm_update_ghash_full_blocks_mb16.c (+10/-6)
sources/ippcp/crypto_mb/src/sm4/gcm/internal_avx512/sm4_gcm_update_ghash_partial_blocks_mb16.c (+9/-5)
sources/ippcp/crypto_mb/src/sm4/gcm/internal_avx512/sm4_gcm_update_iv_mb16.c (+4/-0)
sources/ippcp/crypto_mb/src/sm4/gcm/sm4_gcm_decrypt_mb16_api.c (+8/-4)
sources/ippcp/crypto_mb/src/sm4/gcm/sm4_gcm_encrypt_mb16_api.c (+8/-4)
sources/ippcp/crypto_mb/src/sm4/gcm/sm4_gcm_get_tag_mb16_api.c (+9/-6)
sources/ippcp/crypto_mb/src/sm4/gcm/sm4_gcm_init_mb16_api.c (+11/-45)
sources/ippcp/crypto_mb/src/sm4/gcm/sm4_gcm_update_aad_mb16_api.c (+8/-4)
sources/ippcp/crypto_mb/src/sm4/gcm/sm4_gcm_update_iv_mb16_api.c (+8/-4)
sources/ippcp/crypto_mb/src/sm4/internal_avx512/internal_sm4_setkey_mb16.c (+111/-0)
sources/ippcp/crypto_mb/src/sm4/internal_avx512/sm4_cbc_mb16.c (+11/-2)
sources/ippcp/crypto_mb/src/sm4/internal_avx512/sm4_cfb_mb16.c (+10/-2)
sources/ippcp/crypto_mb/src/sm4/internal_avx512/sm4_ctr_mb16.c (+9/-2)
sources/ippcp/crypto_mb/src/sm4/internal_avx512/sm4_ecb_mb16.c (+8/-1)
sources/ippcp/crypto_mb/src/sm4/internal_avx512/sm4_ofb_mb16.c (+8/-1)
sources/ippcp/crypto_mb/src/sm4/internal_avx512/sm4_xts_mb16.c (+8/-1)
sources/ippcp/crypto_mb/src/sm4/sm4_cbc_dec_mb16.c (+8/-4)
sources/ippcp/crypto_mb/src/sm4/sm4_cbc_enc_mb16.c (+8/-4)
sources/ippcp/crypto_mb/src/sm4/sm4_cfb_dec_mb16.c (+8/-4)
sources/ippcp/crypto_mb/src/sm4/sm4_cfb_enc_mb16.c (+8/-4)
sources/ippcp/crypto_mb/src/sm4/sm4_ctr_dec_mb16.c (+3/-4)
sources/ippcp/crypto_mb/src/sm4/sm4_ctr_enc_mb16.c (+8/-4)
sources/ippcp/crypto_mb/src/sm4/sm4_ecb_dec_mb16.c (+8/-3)
sources/ippcp/crypto_mb/src/sm4/sm4_ecb_enc_mb16.c (+8/-4)
sources/ippcp/crypto_mb/src/sm4/sm4_ofb_dec_mb16.c (+3/-2)
sources/ippcp/crypto_mb/src/sm4/sm4_ofb_enc_mb16.c (+8/-4)
sources/ippcp/crypto_mb/src/sm4/sm4_setkey_mb16.c (+17/-83)
sources/ippcp/crypto_mb/src/sm4/sm4_xts_dec_mb16.c (+9/-5)
sources/ippcp/crypto_mb/src/sm4/sm4_xts_enc_mb16.c (+9/-5)
sources/ippcp/crypto_mb/src/x25519/ifma_x25519.c (+12/-1634)
sources/ippcp/crypto_mb/src/x25519/internal_avx512/internal_ifma_x25519.c (+1677/-0)
sources/ippcp/exports.linux.lib-export (+2/-244)
sources/ippcp/exports.linux.selftests-export (+6/-244)
sources/ippcp/exports.macosx.lib-export (+1/-122)
sources/ippcp/exports.macosx.selftests-export (+2/-1)
sources/ippcp/fips_cert/selftest_aes_upd_hmac.c (+33/-4)
sources/ippcp/fips_cert/selftest_hash_msg_upd_sha.c (+37/-21)
sources/ippcp/fips_cert/selftest_lms_verify.c (+276/-0)
sources/ippcp/fips_cert/selftest_rsa_enc_dec_oaep.c (+43/-5)
sources/ippcp/fips_cert/selftest_rsa_sign_verify_pkcs_v15.c (+41/-5)
sources/ippcp/fips_cert/selftest_rsa_sign_verify_pss.c (+60/-8)
sources/ippcp/gfpec/ecnist/ifma_arith_method_n256.c (+3/-3)
sources/ippcp/gfpec/ecnist/ifma_arith_method_n384.c (+3/-3)
sources/ippcp/gfpec/ecnist/ifma_arith_method_n521.c (+3/-3)
sources/ippcp/gfpec/ecnist/ifma_arith_method_p256.c (+2/-2)
sources/ippcp/gfpec/ecnist/ifma_arith_method_p384.c (+2/-2)
sources/ippcp/gfpec/ecnist/ifma_arith_method_p521.c (+2/-2)
sources/ippcp/gfpec/ecnist/ifma_arith_method_p521.h (+1/-1)
sources/ippcp/gfpec/ecnist/ifma_arith_n256.c (+4/-4)
sources/ippcp/gfpec/ecnist/ifma_arith_n384.c (+4/-4)
sources/ippcp/gfpec/ecnist/ifma_arith_n521.c (+2/-2)
sources/ippcp/gfpec/ecnist/ifma_arith_n521.h (+1/-1)
sources/ippcp/gfpec/ecnist/ifma_arith_p256.c (+5/-5)
sources/ippcp/gfpec/ecnist/ifma_arith_p256.h (+3/-3)
sources/ippcp/gfpec/ecnist/ifma_arith_p384.c (+5/-5)
sources/ippcp/gfpec/ecnist/ifma_arith_p384.h (+3/-3)
sources/ippcp/gfpec/ecnist/ifma_arith_p521.c (+4/-4)
sources/ippcp/gfpec/ecnist/ifma_arith_p521.h (+1/-1)
sources/ippcp/gfpec/ecnist/ifma_defs.h (+2/-2)
sources/ippcp/gfpec/ecnist/ifma_defs_p521.h (+3/-3)
sources/ippcp/gfpec/ecnist/ifma_ec_addpoint_p256.c (+4/-4)
sources/ippcp/gfpec/ecnist/ifma_ec_addpoint_p384.c (+4/-4)
sources/ippcp/gfpec/ecnist/ifma_ec_addpoint_p521.c (+4/-4)
sources/ippcp/gfpec/ecnist/ifma_ec_dh_p256.c (+5/-5)
sources/ippcp/gfpec/ecnist/ifma_ec_dh_p384.c (+5/-5)
sources/ippcp/gfpec/ecnist/ifma_ec_dh_p521.c (+4/-4)
sources/ippcp/gfpec/ecnist/ifma_ec_dsasign_p256.c (+11/-7)
sources/ippcp/gfpec/ecnist/ifma_ec_dsasign_p384.c (+11/-7)
sources/ippcp/gfpec/ecnist/ifma_ec_dsasign_p521.c (+11/-7)
sources/ippcp/gfpec/ecnist/ifma_ec_dsaverify_p256.c (+4/-4)
sources/ippcp/gfpec/ecnist/ifma_ec_dsaverify_p384.c (+4/-4)
sources/ippcp/gfpec/ecnist/ifma_ec_dsaverify_p521.c (+4/-4)
sources/ippcp/gfpec/ecnist/ifma_ec_mulpoint_p256.c (+4/-4)
sources/ippcp/gfpec/ecnist/ifma_ec_mulpoint_p384.c (+4/-4)
sources/ippcp/gfpec/ecnist/ifma_ec_mulpoint_p521.c (+4/-4)
sources/ippcp/gfpec/ecnist/ifma_ec_on_curve_p256.c (+4/-4)
sources/ippcp/gfpec/ecnist/ifma_ec_on_curve_p384.c (+4/-4)
sources/ippcp/gfpec/ecnist/ifma_ec_on_curve_p521.c (+4/-4)
sources/ippcp/gfpec/ecnist/ifma_ec_pubkey_p256.c (+5/-5)
sources/ippcp/gfpec/ecnist/ifma_ec_pubkey_p384.c (+5/-5)
sources/ippcp/gfpec/ecnist/ifma_ec_pubkey_p521.c (+5/-5)
sources/ippcp/gfpec/ecnist/ifma_ecpoint_p256.c (+9/-9)
sources/ippcp/gfpec/ecnist/ifma_ecpoint_p256.h (+6/-6)
sources/ippcp/gfpec/ecnist/ifma_ecpoint_p384.c (+8/-8)
sources/ippcp/gfpec/ecnist/ifma_ecpoint_p384.h (+6/-6)
sources/ippcp/gfpec/ecnist/ifma_ecpoint_p521.c (+7/-7)
sources/ippcp/gfpec/ecnist/ifma_ecpoint_p521.h (+6/-6)
sources/ippcp/gfpec/ecnist/ifma_ecprecomp4_p256.h (+2/-2)
sources/ippcp/gfpec/ecnist/ifma_ecprecomp4_p384.h (+3/-3)
sources/ippcp/gfpec/ecnist/ifma_ecprecomp4_p521.h (+3/-3)
sources/ippcp/gfpec/ecnist/ifma_ecprecomp7_p256.h (+3/-3)
sources/ippcp/gfpec/ecnist/ifma_norm.c (+2/-2)
sources/ippcp/gfpec/pcpeccp.h (+8/-12)
sources/ippcp/gfpec/pcpeccpstdca_112r1.c (+1/-1)
sources/ippcp/gfpec/pcpeccpstdca_112r2.c (+1/-1)
sources/ippcp/gfpec/pcpeccpstdca_128r1.c (+1/-1)
sources/ippcp/gfpec/pcpeccpstdca_128r2.c (+1/-1)
sources/ippcp/gfpec/pcpeccpstdca_160r1.c (+1/-1)
sources/ippcp/gfpec/pcpeccpstdca_160r2.c (+1/-1)
sources/ippcp/gfpec/pcpeccpstdca_192r1.c (+1/-1)
sources/ippcp/gfpec/pcpeccpstdca_224r1.c (+1/-1)
sources/ippcp/gfpec/pcpeccpstdca_256r1.c (+1/-1)
sources/ippcp/gfpec/pcpeccpstdca_384r1.c (+1/-1)
sources/ippcp/gfpec/pcpeccpstdca_521r1.c (+1/-1)
sources/ippcp/gfpec/pcpeccpstdca_BN_256.c (+1/-1)
sources/ippcp/gfpec/pcpeccpstdca_SM2_256.c (+1/-1)
sources/ippcp/gfpec/pcpgfp.c (+8/-8)
sources/ippcp/gfpec/pcpgfp_exp.c (+2/-2)
sources/ippcp/gfpec/pcpgfp_get.c (+2/-2)
sources/ippcp/gfpec/pcpgfp_getoctstring.c (+2/-2)
sources/ippcp/gfpec/pcpgfp_gfeqnr.c (+7/-7)
sources/ippcp/gfpec/pcpgfp_inv.c (+2/-2)
sources/ippcp/gfpec/pcpgfp_rand.c (+2/-2)
sources/ippcp/gfpec/pcpgfp_set.c (+2/-2)
sources/ippcp/gfpec/pcpgfp_setgfp.c (+7/-7)
sources/ippcp/gfpec/pcpgfp_setoctstring.c (+2/-2)
sources/ippcp/gfpec/pcpgfp_sqrt.c (+2/-2)
sources/ippcp/gfpec/pcpgfpadd.c (+6/-6)
sources/ippcp/gfpec/pcpgfpaddpe.c (+6/-6)
sources/ippcp/gfpec/pcpgfpbufsize.c (+3/-3)
sources/ippcp/gfpec/pcpgfpcmpelem.c (+3/-3)
sources/ippcp/gfpec/pcpgfpconj.c (+6/-6)
sources/ippcp/gfpec/pcpgfpcpyelem.c (+6/-6)
sources/ippcp/gfpec/pcpgfpec.c (+5/-5)
sources/ippcp/gfpec/pcpgfpec_add.c (+5/-5)
sources/ippcp/gfpec/pcpgfpec_addaffine.c (+5/-5)
sources/ippcp/gfpec/pcpgfpec_baseprod.c (+2/-2)
sources/ippcp/gfpec/pcpgfpec_comppont.c (+5/-5)
sources/ippcp/gfpec/pcpgfpec_dblpoint.c (+5/-5)
sources/ippcp/gfpec/pcpgfpec_getpoint.c (+5/-5)
sources/ippcp/gfpec/pcpgfpec_makepoint.c (+5/-5)
sources/ippcp/gfpec/pcpgfpec_mul.c (+5/-5)
sources/ippcp/gfpec/pcpgfpec_mul1.c (+2/-2)
sources/ippcp/gfpec/pcpgfpec_mulbase.c (+5/-5)
sources/ippcp/gfpec/pcpgfpec_mulbase1.c (+2/-2)
sources/ippcp/gfpec/pcpgfpec_negpoint.c (+5/-5)
sources/ippcp/gfpec/pcpgfpec_prod.c (+5/-5)
sources/ippcp/gfpec/pcpgfpec_selectp192r1w7.c (+5/-5)
sources/ippcp/gfpec/pcpgfpec_selectp224r1w7.c (+5/-5)
sources/ippcp/gfpec/pcpgfpec_selectp256r1w7.c (+5/-5)
sources/ippcp/gfpec/pcpgfpec_selectp384r1w5.c (+5/-5)
sources/ippcp/gfpec/pcpgfpec_selectp521r1w5.c (+5/-5)
sources/ippcp/gfpec/pcpgfpec_setpoint.c (+5/-5)
sources/ippcp/gfpec/pcpgfpec_setuptable.c (+129/-0)
sources/ippcp/gfpec/pcpgfpecaddpoint.c (+109/-0)
sources/ippcp/gfpec/pcpgfpecbindstd192r1.c (+5/-5)
sources/ippcp/gfpec/pcpgfpecbindstd224r1.c (+5/-5)
sources/ippcp/gfpec/pcpgfpecbindstd256r1.c (+109/-0)
sources/ippcp/gfpec/pcpgfpecbindstd384r1.c (+109/-0)
sources/ippcp/gfpec/pcpgfpecbindstd521r1.c (+109/-0)
sources/ippcp/gfpec/pcpgfpecbindstdsm2.c (+108/-0)
sources/ippcp/gfpec/pcpgfpecbufsize.c (+3/-3)
sources/ippcp/gfpec/pcpgfpeccmppoint.c (+76/-0)
sources/ippcp/gfpec/pcpgfpeccpypoint.c (+74/-0)
sources/ippcp/gfpec/pcpgfpecdh.c (+183/-0)
sources/ippcp/gfpec/pcpgfpecdhc.c (+140/-0)
sources/ippcp/gfpec/pcpgfpecesdecryptsm2.c (+65/-0)
sources/ippcp/gfpec/pcpgfpecesencryptsm2.c (+65/-0)
sources/ippcp/gfpec/pcpgfpecesfinalsm2.c (+72/-0)
sources/ippcp/gfpec/pcpgfpecesgetbufferssizesm2.c (+60/-0)
sources/ippcp/gfpec/pcpgfpecesgetsizesm2.c (+29/-30)
sources/ippcp/gfpec/pcpgfpecesinitsm2.c (+77/-0)
sources/ippcp/gfpec/pcpgfpecessetkeysm2.c (+97/-0)
sources/ippcp/gfpec/pcpgfpecessm2.h (+76/-0)
sources/ippcp/gfpec/pcpgfpecesstartsm2.c (+14/-24)
sources/ippcp/gfpec/pcpgfpecget.c (+38/-62)
sources/ippcp/gfpec/pcpgfpecgetinfo.c (+32/-28)
sources/ippcp/gfpec/pcpgfpecgetpoint.c (+84/-0)
sources/ippcp/gfpec/pcpgfpecgetpointoctstring.c (+88/-0)
sources/ippcp/gfpec/pcpgfpecgetpointreg.c (+106/-0)
sources/ippcp/gfpec/pcpgfpecgetsize.c (+25/-23)
sources/ippcp/gfpec/pcpgfpecgetsubgroup.c (+120/-0)
sources/ippcp/gfpec/pcpgfpecinit.c (+121/-0)
sources/ippcp/gfpec/pcpgfpecinitstd128r1.c (+116/-0)
sources/ippcp/gfpec/pcpgfpecinitstd128r2.c (+116/-0)
sources/ippcp/gfpec/pcpgfpecinitstd192r1.c (+116/-0)
sources/ippcp/gfpec/pcpgfpecinitstd224r1.c (+116/-0)
sources/ippcp/gfpec/pcpgfpecinitstd256r1.c (+125/-0)
sources/ippcp/gfpec/pcpgfpecinitstd384r1.c (+124/-0)
sources/ippcp/gfpec/pcpgfpecinitstd521r1.c (+125/-0)
sources/ippcp/gfpec/pcpgfpecinitstdbn256.c (+116/-0)
sources/ippcp/gfpec/pcpgfpecinitstdsm2.c (+127/-0)
sources/ippcp/gfpec/pcpgfpeckeys.c (+156/-0)
sources/ippcp/gfpec/pcpgfpecmakepoint.c (+86/-0)
sources/ippcp/gfpec/pcpgfpecmulpoint.c (+154/-0)
sources/ippcp/gfpec/pcpgfpecnegpoint.c (+18/-52)
sources/ippcp/gfpec/pcpgfpecpoint.c (+111/-0)
sources/ippcp/gfpec/pcpgfpecpointstuff.c (+132/-0)
sources/ippcp/gfpec/pcpgfpecprivatekey.c (+29/-42)
sources/ippcp/gfpec/pcpgfpecpublickey.c (+122/-0)
sources/ippcp/gfpec/pcpgfpecset.c (+98/-0)
sources/ippcp/gfpec/pcpgfpecsetpoint.c (+84/-0)
sources/ippcp/gfpec/pcpgfpecsetpointatinf.c (+20/-28)
sources/ippcp/gfpec/pcpgfpecsetpointhash.c (+153/-0)
sources/ippcp/gfpec/pcpgfpecsetpointhash_backc.c (+154/-0)
sources/ippcp/gfpec/pcpgfpecsetpointhash_backc_rmf.c (+150/-0)
sources/ippcp/gfpec/pcpgfpecsetpointhash_rmf.c (+149/-0)
sources/ippcp/gfpec/pcpgfpecsetpointoctstring.c (+88/-0)
sources/ippcp/gfpec/pcpgfpecsetpointrand.c (+134/-0)
sources/ippcp/gfpec/pcpgfpecsetpointreg.c (+105/-0)
sources/ippcp/gfpec/pcpgfpecsetsubgroup.c (+119/-0)
sources/ippcp/gfpec/pcpgfpecsigndsa.c (+251/-0)
sources/ippcp/gfpec/pcpgfpecsignnr.c (+205/-0)
sources/ippcp/gfpec/pcpgfpecsignsm2.c (+164/-31)
sources/ippcp/gfpec/pcpgfpecstuff.h (+15/-15)
sources/ippcp/gfpec/pcpgfpectstpoint.c (+79/-0)
sources/ippcp/gfpec/pcpgfpectstpointinsubgroup.c (+90/-0)
sources/ippcp/gfpec/pcpgfpecverify.c (+141/-0)
sources/ippcp/gfpec/pcpgfpecverifydsa.c (+204/-0)
sources/ippcp/gfpec/pcpgfpecverifynr.c (+165/-0)
sources/ippcp/gfpec/pcpgfpecverifysm2.c (+84/-71)
sources/ippcp/gfpec/pcpgfpelemgetsize.c (+61/-0)
sources/ippcp/gfpec/pcpgfpeleminit.c (+77/-0)
sources/ippcp/gfpec/pcpgfpexp.c (+79/-0)
sources/ippcp/gfpec/pcpgfpgetelem.c (+82/-0)
sources/ippcp/gfpec/pcpgfpgetelemoctstr.c (+90/-0)
sources/ippcp/gfpec/pcpgfpgetsize.c (+22/-30)
sources/ippcp/gfpec/pcpgfpinfo.c (+26/-39)
sources/ippcp/gfpec/pcpgfpinit.c (+109/-0)
sources/ippcp/gfpec/pcpgfpinitarbitrary.c (+82/-0)
sources/ippcp/gfpec/pcpgfpinitfixed.c (+74/-0)
sources/ippcp/gfpec/pcpgfpinv.c (+76/-0)
sources/ippcp/gfpec/pcpgfpisunityelem.c (+83/-0)
sources/ippcp/gfpec/pcpgfpiszeroelem.c (+73/-0)
sources/ippcp/gfpec/pcpgfpmethod.h (+62/-0)
sources/ippcp/gfpec/pcpgfpmethod_192r1.c (+206/-0)
sources/ippcp/gfpec/pcpgfpmethod_224r1.c (+206/-0)
sources/ippcp/gfpec/pcpgfpmethod_256.c (+50/-0)
sources/ippcp/gfpec/pcpgfpmethod_256.h (+129/-0)
sources/ippcp/gfpec/pcpgfpmethod_256bn.c (+52/-0)
sources/ippcp/gfpec/pcpgfpmethod_256r1.c (+214/-0)
sources/ippcp/gfpec/pcpgfpmethod_384r1.c (+212/-0)
sources/ippcp/gfpec/pcpgfpmethod_521r1.c (+219/-0)
sources/ippcp/gfpec/pcpgfpmethod_com.c (+47/-0)
sources/ippcp/gfpec/pcpgfpmethod_sm2.c (+218/-0)
sources/ippcp/gfpec/pcpgfpmul.c (+78/-0)
sources/ippcp/gfpec/pcpgfpmulexp.c (+132/-0)
sources/ippcp/gfpec/pcpgfpmulpe.c (+82/-0)
sources/ippcp/gfpec/pcpgfpneg.c (+72/-0)
sources/ippcp/gfpec/pcpgfpsetelem.c (+88/-0)
sources/ippcp/gfpec/pcpgfpsetelemhash.c (+98/-0)
sources/ippcp/gfpec/pcpgfpsetelemhashrmf.c (+98/-0)
sources/ippcp/gfpec/pcpgfpsetelemoctstr.c (+95/-0)
sources/ippcp/gfpec/pcpgfpsetelemrand.c (+72/-0)
sources/ippcp/gfpec/pcpgfpsetelemreg.c (+30/-30)
sources/ippcp/gfpec/pcpgfpsqr.c (+73/-0)
sources/ippcp/gfpec/pcpgfpsqrt.c (+78/-0)
sources/ippcp/gfpec/pcpgfpstuff.h (+208/-0)
sources/ippcp/gfpec/pcpgfpsub.c (+75/-0)
sources/ippcp/gfpec/pcpgfpsubpe.c (+79/-0)
sources/ippcp/gfpec/pcpgfpx.c (+70/-0)
sources/ippcp/gfpec/pcpgfpx_add_gfe.c (+42/-0)
sources/ippcp/gfpec/pcpgfpx_conj.c (+41/-0)
sources/ippcp/gfpec/pcpgfpx_exp.c (+141/-0)
sources/ippcp/gfpec/pcpgfpx_get.c (+57/-0)
sources/ippcp/gfpec/pcpgfpx_getpolyterm.c (+35/-0)
sources/ippcp/gfpec/pcpgfpx_inv.c (+222/-0)
sources/ippcp/gfpec/pcpgfpx_mul_gfe.c (+47/-0)
sources/ippcp/gfpec/pcpgfpx_multiexp.c (+183/-0)
sources/ippcp/gfpec/pcpgfpx_neg.c (+45/-0)
sources/ippcp/gfpec/pcpgfpx_rand.c (+51/-0)
sources/ippcp/gfpec/pcpgfpx_set.c (+55/-0)
sources/ippcp/gfpec/pcpgfpx_setpolyterm.c (+35/-0)
sources/ippcp/gfpec/pcpgfpx_sub_gfe.c (+42/-0)
sources/ippcp/gfpec/pcpgfpxgetsize.c (+84/-0)
sources/ippcp/gfpec/pcpgfpxinit.c (+107/-0)
sources/ippcp/gfpec/pcpgfpxinitbinomial.c (+91/-0)
sources/ippcp/gfpec/pcpgfpxmethod_binom.c (+122/-0)
sources/ippcp/gfpec/pcpgfpxmethod_binom2.c (+190/-0)
sources/ippcp/gfpec/pcpgfpxmethod_binom3.c (+194/-0)
sources/ippcp/gfpec/pcpgfpxmethod_binom3_epid2.c (+253/-0)
sources/ippcp/gfpec/pcpgfpxmethod_binom_epid2.c (+273/-0)
sources/ippcp/gfpec/pcpgfpxmethod_binom_epid2.h (+98/-0)
sources/ippcp/gfpec/pcpgfpxmethod_binom_mulc.h (+56/-0)
sources/ippcp/gfpec/pcpgfpxmethod_com.c (+73/-0)
sources/ippcp/gfpec/pcpgfpxmethod_com.h (+52/-0)
sources/ippcp/gfpec/pcpgfpxmethod_com_add.c (+44/-0)
sources/ippcp/gfpec/pcpgfpxmethod_com_decode.c (+43/-0)
sources/ippcp/gfpec/pcpgfpxmethod_com_div2.c (+43/-0)
sources/ippcp/gfpec/pcpgfpxmethod_com_encode.c (+43/-0)
sources/ippcp/gfpec/pcpgfpxmethod_com_mul.c (+83/-0)
sources/ippcp/gfpec/pcpgfpxmethod_com_mul2.c (+43/-0)
sources/ippcp/gfpec/pcpgfpxmethod_com_mul3.c (+43/-0)
sources/ippcp/gfpec/pcpgfpxmethod_com_neg.c (+43/-0)
sources/ippcp/gfpec/pcpgfpxmethod_com_sqr.c (+83/-0)
sources/ippcp/gfpec/pcpgfpxmethod_com_sub.c (+44/-0)
sources/ippcp/gfpec/pcpgfpxstuff.c (+55/-0)
sources/ippcp/gfpec/pcpgfpxstuff.h (+142/-0)
sources/ippcp/gfpec/pcpp192r1precomca.c (+1936/-0)
sources/ippcp/gfpec/pcpp224r1precomca.c (+4488/-0)
sources/ippcp/gfpec/pcpp256r1precomca.c (+2539/-0)
sources/ippcp/gfpec/pcpp384r1precomca.c (+1523/-0)
sources/ippcp/gfpec/pcpp521r1precomca.c (+4056/-0)
sources/ippcp/gfpec/sm2/ifma_arith_method_nsm2.c (+49/-0)
sources/ippcp/gfpec/sm2/ifma_arith_method_psm2.c (+48/-0)
sources/ippcp/gfpec/sm2/ifma_arith_method_sm2.h (+37/-0)
sources/ippcp/gfpec/sm2/ifma_arith_nsm2.c (+250/-0)
sources/ippcp/gfpec/sm2/ifma_arith_nsm2.h (+110/-0)
sources/ippcp/gfpec/sm2/ifma_arith_psm2.c (+387/-0)
sources/ippcp/gfpec/sm2/ifma_arith_psm2.h (+174/-0)
sources/ippcp/gfpec/sm2/ifma_defs_sm2.h (+77/-0)
sources/ippcp/gfpec/sm2/ifma_ec_addpoint_sm2.c (+58/-0)
sources/ippcp/gfpec/sm2/ifma_ec_dh_sm2.c (+79/-0)
sources/ippcp/gfpec/sm2/ifma_ec_mulpoint_sm2.c (+64/-0)
sources/ippcp/gfpec/sm2/ifma_ec_on_curve_sm2.c (+44/-0)
sources/ippcp/gfpec/sm2/ifma_ec_pubkey_sm2.c (+74/-0)
sources/ippcp/gfpec/sm2/ifma_ec_sign_sm2.c (+164/-0)
sources/ippcp/gfpec/sm2/ifma_ec_verify_sm2.c (+147/-0)
sources/ippcp/gfpec/sm2/ifma_ecpoint_sm2.c (+8/-8)
sources/ippcp/gfpec/sm2/ifma_ecpoint_sm2.h (+192/-0)
sources/ippcp/gfpec/sm2/ifma_ecprecomp7_sm2.h (+3/-3)
sources/ippcp/gfpec/sm2/ifma_sm2_key_exchange_shared_key.c (+263/-0)
sources/ippcp/gfpec/sm2/pcpsm2pprecomca.c (+2539/-0)
sources/ippcp/gfpec/sm2/sm2_decrypt_ext.c (+186/-0)
sources/ippcp/gfpec/sm2/sm2_decrypt_ext_dec_msg_size.c (+65/-0)
sources/ippcp/gfpec/sm2/sm2_encrypt_ext.c (+199/-0)
sources/ippcp/gfpec/sm2/sm2_encrypt_ext_enc_msg_size.c (+68/-0)
sources/ippcp/gfpec/sm2/sm2_key_exchange_confirmation.c (+115/-0)
sources/ippcp/gfpec/sm2/sm2_key_exchange_get_size.c (+57/-0)
sources/ippcp/gfpec/sm2/sm2_key_exchange_init.c (+107/-0)
sources/ippcp/gfpec/sm2/sm2_key_exchange_method.h (+62/-0)
sources/ippcp/gfpec/sm2/sm2_key_exchange_setup.c (+144/-0)
sources/ippcp/gfpec/sm2/sm2_key_exchange_shared_key.c (+309/-0)
sources/ippcp/gfpec/sm2/sm2_message_representation.c (+105/-0)
sources/ippcp/gfpec/sm2/sm2_stuff.c (+177/-0)
sources/ippcp/gfpec/sm2/sm2_stuff.h (+179/-0)
sources/ippcp/gfpec/sm2/sm2_user_id_hash.c (+124/-0)
sources/ippcp/gsmod_montinv.c (+4/-4)
sources/ippcp/gsmodmethod.h (+5/-5)
sources/ippcp/gsmodstuff.h (+2/-2)
sources/ippcp/hash/md5/pcphashmd5px.c (+205/-0)
sources/ippcp/hash/md5/pcphashmethod_md5.c (+66/-0)
sources/ippcp/hash/md5/pcphashmethodset_md5.c (+27/-30)
sources/ippcp/hash/md5/pcpmd5ca.c (+60/-0)
sources/ippcp/hash/md5/pcpmd5stuff.h (+99/-0)
sources/ippcp/hash/pcphash.h (+236/-0)
sources/ippcp/hash/pcphash_digest.c (+125/-0)
sources/ippcp/hash/pcphash_func.h (+107/-0)
sources/ippcp/hash/pcphash_init.c (+65/-0)
sources/ippcp/hash/pcphash_reinit.c (+24/-13)
sources/ippcp/hash/pcphash_rmf.h (+47/-0)
sources/ippcp/hash/pcphashca_rmf.c (+56/-0)
sources/ippcp/hash/pcphashcnt.c (+434/-0)
sources/ippcp/hash/pcphashduplicate.c (+28/-16)
sources/ippcp/hash/pcphashduplicate_rmf.c (+25/-20)
sources/ippcp/hash/pcphashfinal.c (+30/-12)
sources/ippcp/hash/pcphashfinal_rmf.c (+37/-11)
sources/ippcp/hash/pcphashgetinfo_rmf.c (+88/-0)
sources/ippcp/hash/pcphashgetsize.c (+19/-13)
sources/ippcp/hash/pcphashgetsize_rmf.c (+20/-14)
sources/ippcp/hash/pcphashgettag.c (+31/-12)
sources/ippcp/hash/pcphashgettag_rmf.c (+33/-32)
sources/ippcp/hash/pcphashinit.c (+31/-13)
sources/ippcp/hash/pcphashinit_rmf.c (+23/-13)
sources/ippcp/hash/pcphashmessage.c (+144/-0)
sources/ippcp/hash/pcphashmessage_rmf.c (+85/-0)
sources/ippcp/hash/pcphashmethod_rmf.h (+44/-0)
sources/ippcp/hash/pcphashmethodgetsize.c (+12/-17)
sources/ippcp/hash/pcphashpack.c (+30/-13)
sources/ippcp/hash/pcphashpack_rmf.c (+28/-13)
sources/ippcp/hash/pcphashunpack.c (+22/-14)
sources/ippcp/hash/pcphashunpack_rmf.c (+22/-14)
sources/ippcp/hash/pcphashupdate.c (+136/-0)
sources/ippcp/hash/pcphashupdate_rmf.c (+114/-0)
sources/ippcp/hash/sha1/pcphashmethod_sha1.c (+63/-0)
sources/ippcp/hash/sha1/pcphashmethod_sha1_ni.c (+68/-0)
sources/ippcp/hash/sha1/pcphashmethod_sha1_tt.c (+72/-0)
sources/ippcp/hash/sha1/pcphashmethodset_sha1.c (+22/-20)
sources/ippcp/hash/sha1/pcphashmethodset_sha1_ni.c (+75/-0)
sources/ippcp/hash/sha1/pcphashmethodset_sha1_tt.c (+32/-27)
sources/ippcp/hash/sha1/pcphashsha1px.c (+176/-0)
sources/ippcp/hash/sha1/pcpsha1ca.c (+65/-0)
sources/ippcp/hash/sha1/pcpsha1stuff.h (+86/-0)
sources/ippcp/hash/sha224/pcphashmethod_sha224.c (+64/-0)
sources/ippcp/hash/sha224/pcphashmethod_sha224_ni.c (+69/-0)
sources/ippcp/hash/sha224/pcphashmethod_sha224_tt.c (+72/-0)
sources/ippcp/hash/sha224/pcphashmethodset_sha224.c (+27/-15)
sources/ippcp/hash/sha224/pcphashmethodset_sha224_ni.c (+76/-0)
sources/ippcp/hash/sha224/pcphashmethodset_sha224_tt.c (+29/-19)
sources/ippcp/hash/sha224/pcphashstatemethodset_sha224.c (+24/-29)
sources/ippcp/hash/sha224/pcphashstatemethodset_sha224_ni.c (+78/-0)
sources/ippcp/hash/sha224/pcphashstatemethodset_sha224_tt.c (+34/-27)
sources/ippcp/hash/sha256/pcphashmethod_sha256.c (+63/-0)
sources/ippcp/hash/sha256/pcphashmethod_sha256_ni.c (+68/-0)
sources/ippcp/hash/sha256/pcphashmethod_sha256_tt.c (+72/-0)
sources/ippcp/hash/sha256/pcphashmethodset_sha256.c (+26/-15)
sources/ippcp/hash/sha256/pcphashmethodset_sha256_ni.c (+39/-27)
sources/ippcp/hash/sha256/pcphashmethodset_sha256_tt.c (+33/-27)
sources/ippcp/hash/sha256/pcphashsha256px.c (+207/-0)
sources/ippcp/hash/sha256/pcphashstatemethodset_sha256.c (+26/-28)
sources/ippcp/hash/sha256/pcphashstatemethodset_sha256_ni.c (+77/-0)
sources/ippcp/hash/sha256/pcphashstatemethodset_sha256_tt.c (+35/-28)
sources/ippcp/hash/sha256/pcpsha256ca.c (+64/-0)
sources/ippcp/hash/sha256/pcpsha256stuff.h (+174/-0)
sources/ippcp/hash/sha384/pcphashmethod_sha384.c (+30/-34)
sources/ippcp/hash/sha384/pcphashmethodset_sha384.c (+22/-24)
sources/ippcp/hash/sha384/pcphashstatemethodset_sha384.c (+27/-23)
sources/ippcp/hash/sha512/pcphashmethod_sha512.c (+64/-0)
sources/ippcp/hash/sha512/pcphashmethod_sha512_224.c (+64/-0)
sources/ippcp/hash/sha512/pcphashmethod_sha512_256.c (+64/-0)
sources/ippcp/hash/sha512/pcphashmethodset_sha512.c (+26/-15)
sources/ippcp/hash/sha512/pcphashmethodset_sha512_224.c (+21/-19)
sources/ippcp/hash/sha512/pcphashmethodset_sha512_256.c (+27/-15)
sources/ippcp/hash/sha512/pcphashsha512px.c (+214/-0)
sources/ippcp/hash/sha512/pcphashstatemethodset_sha512.c (+27/-27)
sources/ippcp/hash/sha512/pcphashstatemethodset_sha512_224.c (+23/-19)
sources/ippcp/hash/sha512/pcphashstatemethodset_sha512_256.c (+27/-27)
sources/ippcp/hash/sha512/pcpsha512stuff.h (+199/-0)
sources/ippcp/hash/sm3/pcphashmethod_sm3.c (+71/-0)
sources/ippcp/hash/sm3/pcphashmethodset_sm3.c (+31/-30)
sources/ippcp/hash/sm3/pcphashsm3px.c (+337/-0)
sources/ippcp/hash/sm3/pcphashstatemethodset_sm3.c (+71/-0)
sources/ippcp/hash/sm3/pcpsm3ca.c (+55/-0)
sources/ippcp/hash/sm3/pcpsm3stuff.h (+102/-0)
sources/ippcp/ifma_exp52x20.c (+1/-1)
sources/ippcp/ifma_exp52x20_dual.c (+1/-1)
sources/ippcp/ifma_exp52x30_dual.c (+1/-1)
sources/ippcp/ifma_exp52x40_dual.c (+1/-1)
sources/ippcp/ifma_math_avx512vl.h (+11/-11)
sources/ippcp/ippcp.def (+1/-122)
sources/ippcp/ippcp_fips_selftests.def (+3/-122)
sources/ippcp/lms/lms_setters_getters.c (+2/-2)
sources/ippcp/owncp.h (+3/-4)
sources/ippcp/pcpaes_avx2_vaes.h (+12/-12)
sources/ippcp/pcpaes_ccmdecrypt.c (+1/-1)
sources/ippcp/pcpaes_ccmencrypt.c (+2/-2)
sources/ippcp/pcpaes_ccmgetsize.c (+2/-2)
sources/ippcp/pcpaes_ccmgettag.c (+2/-2)
sources/ippcp/pcpaes_ccminit.c (+2/-2)
sources/ippcp/pcpaes_ccmmessagelen.c (+2/-2)
sources/ippcp/pcpaes_ccmstart.c (+1/-1)
sources/ippcp/pcpaes_ccmtaglen.c (+2/-2)
sources/ippcp/pcpaes_cfbdecrypt_vaes512.c (+2/-2)
sources/ippcp/pcpaes_cmac_stuff.h (+3/-3)
sources/ippcp/pcpaes_ctr_process.h (+9/-9)
sources/ippcp/pcpaes_ctrencrypt_rij128pipe_vaes512.c (+2/-2)
sources/ippcp/pcpaes_gcm_vaes512.h (+4/-4)
sources/ippcp/pcpaes_gcmmul_vaes512.c (+3/-3)
sources/ippcp/pcpaes_sivstuff.h (+7/-7)
sources/ippcp/pcpaes_xts_vaes512.c (+2/-2)
sources/ippcp/pcpaesauthgcm.h (+8/-8)
sources/ippcp/pcpaesgcmtbl2k_mulpx.c (+9/-9)
sources/ippcp/pcpaesm.h (+6/-6)
sources/ippcp/pcpaesmxts.h (+5/-5)
sources/ippcp/pcpaesmxtsstuff.h (+5/-5)
sources/ippcp/pcpaesnoise.h (+3/-3)
sources/ippcp/pcpbn.h (+14/-15)
sources/ippcp/pcpbn_pack.c (+5/-6)
sources/ippcp/pcpbn_unpack.c (+5/-6)
sources/ippcp/pcpbn_val1.c (+5/-6)
sources/ippcp/pcpbn_val2.c (+4/-5)
sources/ippcp/pcpbn_val3.c (+4/-5)
sources/ippcp/pcpbnarithadd.c (+4/-5)
sources/ippcp/pcpbnarithcmp.c (+4/-5)
sources/ippcp/pcpbnarithcmpz.c (+4/-5)
sources/ippcp/pcpbnarithdiv.c (+4/-5)
sources/ippcp/pcpbnarithgcd.c (+4/-5)
sources/ippcp/pcpbnarithmac.c (+4/-5)
sources/ippcp/pcpbnarithminv.c (+4/-5)
sources/ippcp/pcpbnarithmod.c (+4/-5)
sources/ippcp/pcpbnarithmul.c (+4/-5)
sources/ippcp/pcpbnarithsub.c (+4/-5)
sources/ippcp/pcpbngetext.c (+4/-5)
sources/ippcp/pcpbngetlen.c (+4/-5)
sources/ippcp/pcpbngetref.c (+9/-10)
sources/ippcp/pcpbngetsize.c (+4/-5)
sources/ippcp/pcpbngetwords.c (+3/-4)
sources/ippcp/pcpbninit.c (+1/-2)
sources/ippcp/pcpbnsetwords.c (+3/-4)
sources/ippcp/pcpbnu32_arith_add.c (+4/-4)
sources/ippcp/pcpbnu32_arith_dec.c (+4/-4)
sources/ippcp/pcpbnu32_arith_div.c (+5/-5)
sources/ippcp/pcpbnu32_arith_inc.c (+4/-4)
sources/ippcp/pcpbnu32_arith_muldigit.c (+4/-4)
sources/ippcp/pcpbnu32_arith_sub.c (+1/-1)
sources/ippcp/pcpbnu32_arith_submuldigit.c (+4/-4)
sources/ippcp/pcpbnu32_getoctstr.c (+4/-4)
sources/ippcp/pcpbnu32_nlz.c (+4/-4)
sources/ippcp/pcpbnu32_setoctstr.c (+4/-4)
sources/ippcp/pcpbnu32arith.h (+4/-4)
sources/ippcp/pcpbnu32misc.h (+5/-5)
sources/ippcp/pcpbnu_arith_add.c (+4/-4)
sources/ippcp/pcpbnu_arith_addmuldigit.c (+4/-4)
sources/ippcp/pcpbnu_arith_dec.c (+4/-4)
sources/ippcp/pcpbnu_arith_gcd.c (+4/-4)
sources/ippcp/pcpbnu_arith_inc.c (+4/-4)
sources/ippcp/pcpbnu_arith_minv.c (+4/-4)
sources/ippcp/pcpbnu_arith_mul_adc.c (+4/-4)
sources/ippcp/pcpbnu_arith_sqr_adc.c (+4/-4)
sources/ippcp/pcpbnu_arith_sub.c (+4/-4)
sources/ippcp/pcpbnu_arith_submuldigit.c (+4/-4)
sources/ippcp/pcpbnu_getoctstr.c (+5/-5)
sources/ippcp/pcpbnu_lsr.c (+5/-5)
sources/ippcp/pcpbnu_msbit.c (+4/-4)
sources/ippcp/pcpbnu_nlz.c (+4/-4)
sources/ippcp/pcpbnu_ntz.c (+4/-4)
sources/ippcp/pcpbnu_setoctstr.c (+5/-5)
sources/ippcp/pcpbnuarith.h (+10/-10)
sources/ippcp/pcpbnuimpl.h (+5/-5)
sources/ippcp/pcpbnumisc.h (+10/-10)
sources/ippcp/pcpdlp_packctx.c (+3/-3)
sources/ippcp/pcpdlpgeneratedh.c (+13/-4)
sources/ippcp/pcpdlpgeneratedsa.c (+13/-3)
sources/ippcp/pcpdlpsigndsaca.c (+1/-1)
sources/ippcp/pcphmac.h (+1/-1)
sources/ippcp/pcphmac_rmf.h (+1/-1)
sources/ippcp/pcpmask_ct.h (+30/-53)
sources/ippcp/pcpmgf1ca_rmf.c (+1/-1)
sources/ippcp/pcpmgf2ca_rmf.c (+1/-1)
sources/ippcp/pcpmont_expbinbnu_sscm.c (+6/-8)
sources/ippcp/pcpmont_getsize.c (+3/-4)
sources/ippcp/pcpmont_init.c (+3/-4)
sources/ippcp/pcpmont_multiexp_fast.c (+1/-1)
sources/ippcp/pcpmont_multiexpinitarray.c (+1/-7)
sources/ippcp/pcpmont_packctx.c (+3/-4)
sources/ippcp/pcpmont_set.c (+4/-5)
sources/ippcp/pcpmont_unpackctx.c (+3/-4)
sources/ippcp/pcpmontexp.c (+3/-4)
sources/ippcp/pcpmontform.c (+3/-4)
sources/ippcp/pcpmontget.c (+3/-4)
sources/ippcp/pcpmontgetsize.c (+3/-4)
sources/ippcp/pcpmontgomery.h (+17/-18)
sources/ippcp/pcpmontinit.c (+3/-4)
sources/ippcp/pcpmontmul.c (+4/-5)
sources/ippcp/pcpmontred.c (+3/-4)
sources/ippcp/pcpmontred.h (+4/-5)
sources/ippcp/pcpmontset.c (+3/-4)
sources/ippcp/pcpname.h (+2/-4)
sources/ippcp/pcpngmontexpstuff.h (+8/-8)
sources/ippcp/pcpngmontexpstuff_avx2.c (+2/-2)
sources/ippcp/pcpngmontexpstuff_avx2.h (+3/-3)
sources/ippcp/pcpngmontexpstuff_avx512.h (+4/-4)
sources/ippcp/pcpngmontexpstuff_sse2.h (+3/-3)
sources/ippcp/pcpprime_mimimaltest.c (+3/-3)
sources/ippcp/pcpprime_packctx.c (+3/-3)
sources/ippcp/pcpprime_test.c (+4/-4)
sources/ippcp/pcpprime_unpackctx.c (+3/-3)
sources/ippcp/pcpprimeg.h (+4/-5)
sources/ippcp/pcpprimegen_bn.c (+3/-3)
sources/ippcp/pcpprimegenca.c (+3/-3)
sources/ippcp/pcpprimeget.c (+3/-3)
sources/ippcp/pcpprimeget_bn.c (+3/-3)
sources/ippcp/pcpprimegetsize.c (+3/-3)
sources/ippcp/pcpprimeginitca.c (+3/-3)
sources/ippcp/pcpprimegsetca.c (+3/-3)
sources/ippcp/pcpprimeset_bn.c (+4/-4)
sources/ippcp/pcpprimetest.c (+3/-3)
sources/ippcp/pcpprimetest_bn.c (+3/-3)
sources/ippcp/pcpprng_gen.c (+1/-1)
sources/ippcp/pcpprng_genhw.h (+8/-8)
sources/ippcp/pcpprngen_bn.c (+1/-1)
sources/ippcp/pcpprngen_pattern.c (+0/-1)
sources/ippcp/pcpprngen_range.c (+0/-1)
sources/ippcp/pcpprngenca.c (+0/-1)
sources/ippcp/pcpprnggetsize.c (+0/-1)
sources/ippcp/pcpprnginitca.c (+1/-1)
sources/ippcp/pcprij128safe.h (+7/-7)
sources/ippcp/pcprij128safe2.h (+7/-7)
sources/ippcp/pcprij128safedec2pxca.c (+11/-11)
sources/ippcp/pcprij128safeenc2pxca.c (+8/-8)
sources/ippcp/pcprij128safeencpxca.c (+6/-6)
sources/ippcp/pcprijkeysca.c (+1/-1)
sources/ippcp/pcprsa_emsa_pkcs1v15.h (+0/-1)
sources/ippcp/pcprsa_generatesign_pkcs1v15.h (+0/-1)
sources/ippcp/pcprsa_gsmethod__avx2_private.c (+2/-2)
sources/ippcp/pcprsa_gsmethod__avx2_public.c (+2/-2)
sources/ippcp/pcprsa_gsmethod__avx512_private.c (+2/-2)
sources/ippcp/pcprsa_gsmethod__avx512_public.c (+2/-2)
sources/ippcp/pcprsa_gsmethod__gpr_private.c (+2/-2)
sources/ippcp/pcprsa_gsmethod__gpr_public.c (+2/-2)
sources/ippcp/pcprsa_gsmethod__sse2_private.c (+2/-2)
sources/ippcp/pcprsa_gsmethod__sse2_public.c (+2/-2)
sources/ippcp/pcprsa_montexpgetsize.c (+2/-2)
sources/ippcp/pcprsa_pkcs1c15_data.h (+1/-1)
sources/ippcp/pcprsa_pkcs1v15_preproc.h (+3/-3)
sources/ippcp/pcprsa_pss_preproc.h (+3/-3)
sources/ippcp/pcprsa_verifysign_pkcs1v15.h (+0/-1)
sources/ippcp/pcprsadecrypt_oaep.c (+10/-1)
sources/ippcp/pcprsadecrypt_oaep_rmf.c (+10/-1)
sources/ippcp/pcprsaencrypt_oaep.c (+1/-1)
sources/ippcp/pcprsaencrypt_oaep_rmf.c (+1/-1)
sources/ippcp/pcprsasign_pkcs1v15.c (+1/-1)
sources/ippcp/pcprsasign_pkcs1v15_rmf.c (+1/-1)
sources/ippcp/pcprsasign_pss.c (+1/-1)
sources/ippcp/pcprsasign_pss_rmf.c (+1/-1)
sources/ippcp/pcprsaverify_pkcs1v15.c (+1/-1)
sources/ippcp/pcprsaverify_pkcs1v15_rmf.c (+1/-1)
sources/ippcp/pcprsaverify_pss.c (+1/-1)
sources/ippcp/pcprsaverify_pss_rmf.c (+1/-1)
sources/ippcp/pcpscramble.h (+7/-7)
sources/ippcp/pcpshsmgfca.c (+1/-1)
sources/ippcp/pcpsms4.h (+11/-11)
sources/ippcp/pcpsms4_ccmdecrypt.c (+7/-7)
sources/ippcp/pcpsms4_ccmencrypt.c (+8/-8)
sources/ippcp/pcpsms4_ctr_gfni.c (+2/-2)
sources/ippcp/pcpsms4ctrl9cn.c (+3/-3)
sources/ippcp/pcpsms4ctry8cn.c (+1/-1)
sources/ippcp/pcpsms4ecb_setkeysy8cn.c (+6/-6)
sources/ippcp/pcptool.h (+18/-18)
sources/ippcp/pcpvariant.h (+15/-14)
sources/ippcp/pcpver.c (+67/-33)
sources/ippcp/pcpver.h (+1/-2)
tools/ipp_custom_library_tool_python/gui/app.py (+24/-28)
tools/ipp_custom_library_tool_python/gui/controller.py (+60/-60)
tools/ipp_custom_library_tool_python/gui/custom_functions_panel.py (+67/-8)
tools/ipp_custom_library_tool_python/gui/selection_panel.py (+19/-12)
tools/ipp_custom_library_tool_python/gui/settings_panel.py (+51/-45)
tools/ipp_custom_library_tool_python/main.py (+100/-87)
tools/ipp_custom_library_tool_python/tests/functions_tests.py (+38/-38)
tools/ipp_custom_library_tool_python/tests/utils.py (+10/-32)
tools/ipp_custom_library_tool_python/tool/core.py (+27/-22)
tools/ipp_custom_library_tool_python/tool/generators.py (+183/-126)
tools/ipp_custom_library_tool_python/tool/generators_utils.py (+198/-252)
tools/ipp_custom_library_tool_python/tool/package.py (+76/-66)
tools/ipp_custom_library_tool_python/tool/utils.py (+163/-222)
Reviewer Review Type Date Requested Status
Simon Quigley (community) retroactive no-op approve Approve
git-ubuntu import Pending
Review via email: mp+477141@code.launchpad.net

Commit message

To post a comment you must log in.
Revision history for this message
Simon Quigley (tsimonq2) :
review: Approve (retroactive no-op approve)

Unmerged commits

fcdf44a... by Hector CAO

changelog

08a2e43... by Hector CAO

d/control : update package names for ipcrypto-mb and libippcp

bc9a5b6... by Hector CAO

d/p: refresh patch

a79ce29... by Hector CAO

d/control : change upstream vcs and description

d73e77c... by Hector CAO

New upstream version 1.0.0

086ff37... by Hector CAO

d/watch : upstream repo renaming and versioning scheme change

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/.clang-tidy b/.clang-tidy
0new file mode 1006440new file mode 100644
index 0000000..2cd04a8
--- /dev/null
+++ b/.clang-tidy
@@ -0,0 +1,24 @@
1#===============================================================================
2# Copyright (C) 2024 Intel Corporation
3#
4# Licensed under the Apache License, Version 2.0 (the 'License');
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing,
11# software distributed under the License is distributed on an 'AS IS' BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions
14# and limitations under the License.
15#
16#===============================================================================
17
18Checks: '
19 -*,
20 bugprone-infinite-loop,
21 misc-header-include-cycle,
22 readability-duplicate-include'
23
24HeaderFilterRegex: '.*(/include/ipp/|/sources/ippcp/|/examples/).*'
diff --git a/BUILD.md b/BUILD.md
index e6b0fe9..8c0074c 100644
--- a/BUILD.md
+++ b/BUILD.md
@@ -1,13 +1,13 @@
1# How to Build Intel® Integrated Performance Primitives Cryptography (Intel® IPP Cryptography) <!-- omit in toc -->1# How to Build Intel® Cryptography Primitives Library <!-- omit in toc -->
22
3- [Software Requirements](#software-requirements)3- [Software Requirements](#software-requirements)
4 - [Common tools](#common-tools)4 - [Common tools](#common-tools)
5 - [Linux* OS](#linux-os)5 - [Linux* OS](#linux-os)
6 - [Windows* OS](#windows-os)6 - [Windows* OS](#windows-os)
7 - [macOS*](#macos)7 - [macOS*](#macos)
8- [Building Intel IPP Cryptography on Linux\* OS](#building-intel-ipp-cryptography-on-linux-os)8- [Building Intel® Cryptography Primitives Library on Linux\* OS](#building-intel-cryptography-primitives-library-on-linux-os)
9- [Building Intel IPP Cryptography on Windows\* OS](#building-intel-ipp-cryptography-on-windows-os)9- [Building Intel® Cryptography Primitives Library on Windows\* OS](#building-intel-cryptography-primitives-library-on-windows-os)
10- [Building Intel IPP Cryptography on macOS\*](#building-intel-ipp-cryptography-on-macos)10- [Building Intel® Cryptography Primitives Library on macOS\*](#building-intel-cryptography-primitives-library-on-macos)
11- [CMake Build Options](#cmake-build-options)11- [CMake Build Options](#cmake-build-options)
12 - [Common for all operating systems](#common-for-all-operating-systems)12 - [Common for all operating systems](#common-for-all-operating-systems)
13 - [Windows\* OS](#windows-os)13 - [Windows\* OS](#windows-os)
@@ -17,44 +17,48 @@
17 - [How to build a 64-bit generic library without any CPU-specific optimizations?](#how-to-build-a-64-bit-generic-library-without-any-cpu-specific-optimizations)17 - [How to build a 64-bit generic library without any CPU-specific optimizations?](#how-to-build-a-64-bit-generic-library-without-any-cpu-specific-optimizations)
18 - [How to build two libraries with optimizations for Intel® Advanced Vector Extensions 2 and Intel® Advanced Vector Extensions 512 instruction sets?](#how-to-build-two-libraries-with-optimizations-for-intel-advanced-vector-extensions-2-and-intel-advanced-vector-extensions-512-instruction-sets)18 - [How to build two libraries with optimizations for Intel® Advanced Vector Extensions 2 and Intel® Advanced Vector Extensions 512 instruction sets?](#how-to-build-two-libraries-with-optimizations-for-intel-advanced-vector-extensions-2-and-intel-advanced-vector-extensions-512-instruction-sets)
19 - [How to build a library to work in a kernel space?](#how-to-build-a-library-to-work-in-a-kernel-space)19 - [How to build a library to work in a kernel space?](#how-to-build-a-library-to-work-in-a-kernel-space)
20- [Incorporating Intel® IPP Cryptography sources into custom build system](#incorporating-intel-ipp-cryptography-sources-into-custom-build-system)20- [Incorporating Intel® Cryptography Primitives Library sources into custom build system](#incorporating-intel-cryptography-primitives-library-sources-into-custom-build-system)
2121
2222
23## Software Requirements23## Software Requirements
24### Common tools24### Common tools
25- [CMake\*](https://cmake.org/download) 3.18 or higher25- [CMake\*](https://cmake.org/download) 3.18 or higher
26- Python 3.8.126- Python 3.8.1
27- The Netwide Assembler (NASM) 2.1527- The Netwide Assembler (NASM) 2.16.02
28- OpenSSL\* 3.0.8 or higher **OR** BoringSSL* [45cf810d](https://github.com/google/boringssl/archive/45cf810dbdbd767f09f8cb0b0fcccd342c39041f.tar.gz) **OR** Tongsuo* 8.2.128- OpenSSL\* 3.0.8 or higher **OR** BoringSSL* [45cf810d](https://github.com/google/boringssl/archive/45cf810dbdbd767f09f8cb0b0fcccd342c39041f.tar.gz) **OR** Tongsuo* 8.3.3
2929
3030
31### Linux* OS31### Linux* OS
32- [Common tools](#common-tools)32- [Common tools](#common-tools)
33- Intel® C++ Compiler Classic 2021.9 for Linux\* OS33- Intel® oneAPI DPC++/C++ Compiler latest for Linux\* OS
34- GCC 8.534- GCC 8.5
35- GCC 11.435- GCC 11.4
36- GCC 14.1
36- Clang 9.037- Clang 9.0
37- Clang 12.038- Clang 12.0
38- Clang 16.039- Clang 16.0
39- GNU binutils 2.3240- GNU binutils 2.32
41> **NOTE:** [CMake\*](https://cmake.org/download) 3.22 or higher is required to build using Intel® oneAPI DPC++/C++ Compiler.
42
40### Windows* OS43### Windows* OS
41- [Common tools](#common-tools)44- [Common tools](#common-tools)
42- Intel® C++ Compiler Classic 2021.9 for Windows\* OS45- Intel® oneAPI DPC++/C++ Compiler latest for Windows\* OS
43- Microsoft Visual C++ Compiler\* version 19.16 provided by Microsoft Visual Studio\* 2017 version 15.946- Microsoft Visual C++ Compiler\* version 19.29 provided by Microsoft Visual Studio\* 2019 version 16.11
44> **NOTE:** Support for this compiler version will be removed from Intel IPP Cryptography starting 2021.4 release. If you use it for building Intel IPP Cryptography library, please plan on migrating to a newer supported version of Microsoft Visual C++ Compiler\*.47- Microsoft Visual C++ Compiler\* version 19.30 provided by Microsoft Visual Studio\* 2022 version 17.11
45- Microsoft Visual C++ Compiler\* version 19.24 provided by Microsoft Visual Studio\* 2019 version 16.4
46- Microsoft Visual C++ Compiler\* version 19.30 provided by Microsoft Visual Studio\* 2022 version 17.0
47> **NOTE:** [CMake\*](https://cmake.org/download) 3.21 or higher is required to build using Microsoft Visual Studio\* 2022.48> **NOTE:** [CMake\*](https://cmake.org/download) 3.21 or higher is required to build using Microsoft Visual Studio\* 2022.
49
50> **NOTE:** [CMake\*](https://cmake.org/download) 3.22 or higher is required to build using Intel® oneAPI DPC++/C++ Compiler.
51
48### macOS*52### macOS*
49- [Common tools](#common-tools)53- [Common tools](#common-tools)
50- Intel® C++ Compiler Classic 2021.9 for macOS\*54- Intel® C++ Compiler Classic 2021.9 for macOS\*
51## Building Intel IPP Cryptography on Linux\* OS55## Building Intel® Cryptography Primitives Library on Linux\* OS
5256
53The software was validated on:57The software was validated on:
5458
55- Red Hat\* Enterprise Linux\* 859- Red Hat\* Enterprise Linux\* 8
5660
57To build the Intel IPP Cryptography library on Linux\* OS, complete the following steps:61To build the Intel® Cryptography Primitives Library on Linux\* OS, complete the following steps:
581. Clone the source code from GitHub\* as follows:621. Clone the source code from GitHub\* as follows:
5963
60 ``` bash64 ``` bash
@@ -63,22 +67,22 @@ To build the Intel IPP Cryptography library on Linux\* OS, complete the followin
6367
642. Set the environment for one of the supported C/C++ compilers.682. Set the environment for one of the supported C/C++ compilers.
6569
66 *Example for Intel® Compiler:*70 *example for Intel® oneAPI DPC++/C++ Compiler:*
6771
68 ```bash72 ```bash
69 source /opt/intel/bin/compilervars.sh intel6473 source /opt/intel/oneapi/setvars.sh intel64
70 ```74 ```
7175
72 For details, refer to the [Intel® C++ Compiler Developer Guide and Reference](https://www.intel.com/content/www/us/en/docs/cpp-compiler/developer-guide-reference/current/specifying-the-location-of-compiler-components.html).76 For details, refer to the [Intel® oneAPI DPC++/C++ Compiler Developer Guide and Reference](https://www.intel.com/content/www/us/en/docs/dpcpp-cpp-compiler/developer-guide-reference/current/specifying-the-location-of-compiler-components.html).
7377
743. Run CMake\* in the command line.783. Run CMake\* in the command line.
7579
76 *Examples*:80 *Examples*:
7781
78 For Intel® C++ Compiler:82 for Intel® oneAPI DPC++/C++ Compiler:
7983
80 ``` bash84 ``` bash
81 CC=icc CXX=icpc cmake CMakeLists.txt -B_build -DARCH=intel6485 CC=icx CXX=icpx cmake CMakeLists.txt -B_build -DARCH=intel64
82 ```86 ```
8387
84 For GCC:88 For GCC:
@@ -98,13 +102,13 @@ To build the Intel IPP Cryptography library on Linux\* OS, complete the followin
98102
99 You can find the built libraries in the `<build_dir>/.build/<RELEASE|DEBUG>/lib` directory.103 You can find the built libraries in the `<build_dir>/.build/<RELEASE|DEBUG>/lib` directory.
100104
101## Building Intel IPP Cryptography on Windows\* OS105## Building Intel® Cryptography Primitives Library on Windows\* OS
102106
103The software was validated on:107The software was validated on:
104108
105- Windows Server\* 2019109- Windows Server\* 2019
106110
107To build the Intel IPP Cryptography library on Windows* OS, complete the following steps:111To build the Intel® Cryptography Primitives Library on Windows* OS, complete the following steps:
108112
1091. Clone the source code from GitHub\* as follows:1131. Clone the source code from GitHub\* as follows:
110114
@@ -113,17 +117,18 @@ To build the Intel IPP Cryptography library on Windows* OS, complete the followi
113 ```117 ```
114118
1152. Set the environment variables for one of the supported C/C++ compilers.1192. Set the environment variables for one of the supported C/C++ compilers.
116 For Intel® Compiler instructions, refer to the [Intel® C++ Compiler Developer Guide and Reference](https://www.intel.com/content/www/us/en/docs/cpp-compiler/developer-guide-reference/current/overview.html).120
117 For MSVC* Compiler, refer to [Use the MSVC toolset from the command line](https://docs.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=vs-2017).121 For Intel® oneAPI DPC++/C++ Compiler instructions, refer to the [Intel® oneAPI DPC++/C++ Compiler Developer Guide and Reference](https://www.intel.com/content/www/us/en/docs/dpcpp-cpp-compiler/developer-guide-reference/current/specifying-the-location-of-compiler-components.html).
122 For MSVC* Compiler, refer to [Use the MSVC toolset from the command line](https://learn.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=msvc-160).
118123
1193. Run CMake\* in the command line.1243. Run CMake\* in the command line.
120125
121 *Examples*:126 *Examples*:
122127
123 For Intel® C++ Compiler and Visual Studio\* 2019:128 For Intel® oneAPI DPC++/C++ Compiler and Visual Studio\* 2019:
124129
125 ``` bash130 ``` bash
126 cmake CMakeLists.txt -B_build -G"Visual Studio 16 2019" -T"Intel C++ Compiler 19.2" -Ax64131 cmake CMakeLists.txt -B_build -G"Visual Studio 16 2019" -T"Intel C++ Compiler 2024" -Ax64
127 ```132 ```
128133
129 For MSVC\* Compiler and Visual Studio\* 2019:134 For MSVC\* Compiler and Visual Studio\* 2019:
@@ -145,13 +150,13 @@ To build the Intel IPP Cryptography library on Windows* OS, complete the followi
145 *Build from Visual Studio\*:*150 *Build from Visual Studio\*:*
146 Open the Microsoft Visual Studio\* solution `Intel(R) IPP Crypto.sln`, choose project (build target) from the Solution Explorer and run the build.151 Open the Microsoft Visual Studio\* solution `Intel(R) IPP Crypto.sln`, choose project (build target) from the Solution Explorer and run the build.
147152
148## Building Intel IPP Cryptography on macOS\*153## Building Intel® Cryptography Primitives Library on macOS\*
149154
150> **NOTE:** Intel IPP Cryptography stopped macOS\* validation and maintenance based on the announcement in the [Intel IPP Cryptography 2021.9 release notes](https://www.intel.com/content/www/us/en/developer/articles/release-notes/release-notes-for-oneapi-integrated-performance-primitives.html#inpage-nav-3-1).\155> **NOTE:** Intel® Cryptography Primitives Library stopped macOS\* validation and maintenance based on the announcement in the [Intel® Integrated Performance Primitives Cryptography (Intel® IPP Cryptography) 2021.9 release notes](https://www.intel.com/content/www/us/en/developer/articles/release-notes/release-notes-for-oneapi-integrated-performance-primitives.html#inpage-nav-3-1).\
151The Intel IPP Cryptography 2021.10 release is the last release validated on macOS\* 12.0.\156The Intel® IPP Cryptography 2021.10 release is the last release validated on macOS\* 12.0.\
152For further macOS\* testing and maintenance we are relying on contributions from the community. For more details, see [Contributing Rules](./CONTRIBUTING.md).157For further macOS\* testing and maintenance we are relying on contributions from the community. For more details, see [Contributing Rules](./CONTRIBUTING.md).
153158
154To build the Intel IPP Cryptography library on macOS\*, complete the following steps:159To build the Intel® Cryptography Primitives Library on macOS\*, complete the following steps:
155160
1561. Clone the source code from GitHub\* as follows:1611. Clone the source code from GitHub\* as follows:
157162
@@ -196,12 +201,12 @@ To build the Intel IPP Cryptography library on macOS\*, complete the following s
196201
197- `-B<build-dir>` - defines the build directory. This is the directory where CMake puts the generated Microsoft Visual Studio\* solution or makefiles.202- `-B<build-dir>` - defines the build directory. This is the directory where CMake puts the generated Microsoft Visual Studio\* solution or makefiles.
198203
199- `-DARCH=<ia32|intel64>` - on Linux* OS and macOS*, defines the target architecture for the build of the Intel IPP Cryptography library.204- `-DARCH=<ia32|intel64>` - on Linux* OS and macOS*, defines the target architecture for the build of the Intel® Cryptography Primitives Library.
200 > **NOTE:** On Windows* OS, use `-G`/`-A` instead. See the description of these options [below](#windows-os-1).205 > **NOTE:** On Windows* OS, use `-G`/`-A` instead. See the description of these options [below](#windows-os-1).
201206
202 > **NOTE:** Due to the significant shift in the industry towards 64-bit architecture, the support of 32-bit libraries is deprecated in the Intel IPP Cryptography 2021.9 release and targeted to be removed after one year deprecation notice period.207 > **NOTE:** Due to the significant shift in the industry towards 64-bit architecture, the support of 32-bit libraries is deprecated in the Intel® IPP Cryptography 2021.9 release and targeted to be removed after one year deprecation notice period.
203208
204- `-DMERGED_BLD:BOOL=<on|off>` - optional. Defines the configuration of the Intel IPP Cryptography library to build:209- `-DMERGED_BLD:BOOL=<on|off>` - optional. Defines the configuration of the Intel® Cryptography Primitives Library to build:
205210
206 - `-DMERGED_BLD:BOOL=on`: default configuration. It includes the following steps:211 - `-DMERGED_BLD:BOOL=on`: default configuration. It includes the following steps:
207 - Build of a dispatched static library with all available optimizations212 - Build of a dispatched static library with all available optimizations
@@ -213,12 +218,13 @@ To build the Intel IPP Cryptography library on macOS\*, complete the following s
213- `-DPLATFORM_LIST="<platform list>"` - optional, works only if `-DMERGED_BLD:BOOL=off` is set. Sets target platforms for the code to be compiled. See the supported platforms list [here](./OVERVIEW.md).218- `-DPLATFORM_LIST="<platform list>"` - optional, works only if `-DMERGED_BLD:BOOL=off` is set. Sets target platforms for the code to be compiled. See the supported platforms list [here](./OVERVIEW.md).
214219
215 - Example for Linux\* OS and the IA-32 architecture:220 - Example for Linux\* OS and the IA-32 architecture:
216 `-DPLATFORM_LIST="m7;s8;p8;g9;h9"`221 `-DPLATFORM_LIST="w7;s8;p8;g9;h9"`
217222
218 - Example for Linux\* OS and the Intel® 64 architecture:223 - Example for Linux\* OS and the Intel® 64 architecture:
219 `-DPLATFORM_LIST="w7;n8;y8;e9;l9;k0"`224 `-DPLATFORM_LIST="m7;n8;y8;e9;l9;k0;k1"`
220- `-DNO_CRYPTO_MB:BOOL=TRUE` - optional, turns off the build of [Crypto Multi Buffer library](./sources/ippcp/crypto_mb/Readme.md) and, as a consequence, removes all dependencies on OpenSSL library.225- `-DNO_CRYPTO_MB:BOOL=TRUE` - optional, turns off the build of [Crypto Multi Buffer library](./sources/ippcp/crypto_mb/Readme.md) and, as a consequence, removes all dependencies on OpenSSL library.
221- `-DBABASSL:BOOL=on`, `-DBORINGSSL:BOOL=on` - required only if forks of OpenSSL library are used to resolve OpenSSL dependencies - Tongsuo and BoringSSL respectively. These flags make sense when [Crypto Multi Buffer library](./sources/ippcp/crypto_mb/Readme.md) is built.226- `-DTONGSUO:BOOL=on`, `-DBORINGSSL:BOOL=on` - required only if forks of OpenSSL library are used to resolve OpenSSL dependencies - Tongsuo and BoringSSL respectively. These flags make sense when [Crypto Multi Buffer library](./sources/ippcp/crypto_mb/Readme.md) is built.
227> **NOTE:** -DBABASSL:BOOL=on flag is deprecated and targeted to be removed in the future releases. Please use -DTONGSUO:BOOL=on instead.\*.
222- `-DIPPCP_CUSTOM_BUILD="<CPU features list>"` - optional, works only if `-DMERGED_BLD:BOOL=off` is set, i.e. only for 1CPU libraries. Enables the CPU feature dispatching mask at compile-time based on the provided list.228- `-DIPPCP_CUSTOM_BUILD="<CPU features list>"` - optional, works only if `-DMERGED_BLD:BOOL=off` is set, i.e. only for 1CPU libraries. Enables the CPU feature dispatching mask at compile-time based on the provided list.
223229
224 - Currently supported by the library custom features dispatching:230 - Currently supported by the library custom features dispatching:
@@ -228,11 +234,11 @@ To build the Intel IPP Cryptography library on macOS\*, complete the following s
228 `-DIPPCP_CUSTOM_BUILD="IPPCP_AES_ON;IPPCP_CLMUL_ON"` - this combination enables Intel® AES-NI in all 1CPU libraries, which contains this code path.234 `-DIPPCP_CUSTOM_BUILD="IPPCP_AES_ON;IPPCP_CLMUL_ON"` - this combination enables Intel® AES-NI in all 1CPU libraries, which contains this code path.
229 - Example of using a combination of CPU features:235 - Example of using a combination of CPU features:
230 `-DIPPCP_CUSTOM_BUILD="IPPCP_AES_ON;IPPCP_CLMUL_ON;IPPCP_VAES_ON;IPPCP_VCLMUL_ON"` - in this combination the highest available feature in each 1CPU library will be enabled (e.g. for `"y8"` it’s Intel® AES-NI, for `"l9"` it's Intel® AVX2 VAES, and for `"k1"` - Intel® AVX-512 VAES)236 `-DIPPCP_CUSTOM_BUILD="IPPCP_AES_ON;IPPCP_CLMUL_ON;IPPCP_VAES_ON;IPPCP_VCLMUL_ON"` - in this combination the highest available feature in each 1CPU library will be enabled (e.g. for `"y8"` it’s Intel® AES-NI, for `"l9"` it's Intel® AVX2 VAES, and for `"k1"` - Intel® AVX-512 VAES)
231- `-DIPPCP_FIPS_MODE:BOOL=<on|off>` - optional. Regulates the build of FIPS-compliant Intel IPP Cryptography library.237- `-DIPPCP_FIPS_MODE:BOOL=<on|off>` - optional. Regulates the build of FIPS-compliant Intel® Cryptography Primitives Library.
232238
233 - `-DIPPCP_FIPS_MODE:BOOL=on`: enables all FIPS-compliance changes in Intel IPP Cryptography library.239 - `-DIPPCP_FIPS_MODE:BOOL=on`: enables all FIPS-compliance changes in Intel® Cryptography Primitives Library.
234 - `-DIPPCP_FIPS_MODE:BOOL=off`: default configuration. Intel IPP Cryptography library build with such option is not FIPS-compliant.240 - `-DIPPCP_FIPS_MODE:BOOL=off`: default configuration. Intel® Cryptography Primitives Library build with such option is not FIPS-compliant.
235- `-DIPPCP_SELFTEST_USE_MALLOC:BOOL=<on|off>` - optional. Enables internal memory allocation and release using `malloc()` and `free()` functions inside Intel IPP Cryptography library selftests.241- `-DIPPCP_SELFTEST_USE_MALLOC:BOOL=<on|off>` - optional. Enables internal memory allocation and release using `malloc()` and `free()` functions inside Intel® Cryptography Primitives Library selftests.
236 - `-DIPPCP_SELFTEST_USE_MALLOC:BOOL=on`: memory management is held by FIPS selftests, all processing APIs should be called with input parameters equal to `NULL`.242 - `-DIPPCP_SELFTEST_USE_MALLOC:BOOL=on`: memory management is held by FIPS selftests, all processing APIs should be called with input parameters equal to `NULL`.
237 - `-DIPPCP_SELFTEST_USE_MALLOC:BOOL=off`: default configuration. Memory management is held by customer's application, all processing APIs should be called with work buffers of the valid length.243 - `-DIPPCP_SELFTEST_USE_MALLOC:BOOL=off`: default configuration. Memory management is held by customer's application, all processing APIs should be called with work buffers of the valid length.
238- `-DMBX_FIPS_MODE:BOOL=<on|off>` - optional. Regulates the build of FIPS-compliant Crypto Multi-buffer Library.244- `-DMBX_FIPS_MODE:BOOL=<on|off>` - optional. Regulates the build of FIPS-compliant Crypto Multi-buffer Library.
@@ -247,10 +253,10 @@ To build the Intel IPP Cryptography library on macOS\*, complete the following s
247- `-G"<tool-chain-generator>"` - defines the native build system CMake will generate from the input files.253- `-G"<tool-chain-generator>"` - defines the native build system CMake will generate from the input files.
248 Refer to CMake [documentation](https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html#visual-studio-generators) for the Visual Studio\* generators options.254 Refer to CMake [documentation](https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html#visual-studio-generators) for the Visual Studio\* generators options.
249255
250- `-A<x64|Win32>` - for Visual Studio\* 2019+, defines the target architecture for the build of the Intel IPP Cryptography library.256- `-A<x64|Win32>` - for Visual Studio\* 2019+, defines the target architecture for the build of the Intel® Cryptography Primitives Library.
251257
252- `-T<Compiler>` - defines the compiler for building.258- `-T<Compiler>` - defines the compiler for building.
253 For example, to use Intel® Compiler, specify `-T"Intel C++ Compiler 19.1"`.259 For example, to use Intel® oneAPI DPC++/C++ Compiler, specify `-T"Intel C++ Compiler 2024"`.
254260
255> **NOTE:** Refer to CMake [documentation](https://cmake.org/cmake/help/latest/manual/ccmake.1.html) for more information on these options.261> **NOTE:** Refer to CMake [documentation](https://cmake.org/cmake/help/latest/manual/ccmake.1.html) for more information on these options.
256262
@@ -264,10 +270,6 @@ To build the Intel IPP Cryptography library on macOS\*, complete the following s
264270
265## CMake Commands FAQ271## CMake Commands FAQ
266272
267### How to build a 32-bit library?
268
269`cmake CMakeLists.txt -B_build -DARCH=ia32`
270
271### How to build a 64-bit generic library without any CPU-specific optimizations?273### How to build a 64-bit generic library without any CPU-specific optimizations?
272274
273`cmake CMakeLists.txt -B_build -DARCH=intel64 -DMERGED_BLD:BOOL=off -DPLATFORM_LIST=mx`275`cmake CMakeLists.txt -B_build -DARCH=intel64 -DMERGED_BLD:BOOL=off -DPLATFORM_LIST=mx`
@@ -283,9 +285,9 @@ To build the Intel IPP Cryptography library on macOS\*, complete the following s
283### How to specify path to OpenSSL\*285### How to specify path to OpenSSL\*
284`cmake CMakeLists.txt -B_build -DARCH=intel64 -DOPENSSL_INCLUDE_DIR=/path/to/openssl/include -DOPENSSL_LIBRARIES=/path/to/openssl/lib -DOPENSSL_ROOT_DIR=/path/to/openssl`286`cmake CMakeLists.txt -B_build -DARCH=intel64 -DOPENSSL_INCLUDE_DIR=/path/to/openssl/include -DOPENSSL_LIBRARIES=/path/to/openssl/lib -DOPENSSL_ROOT_DIR=/path/to/openssl`
285287
286## Incorporating Intel® IPP Cryptography sources into custom build system288## Incorporating Intel® Cryptography Primitives Library sources into custom build system
287289
288You can include Intel IPP Cryptography sources into some arbitrary project's CMake build system and build them with it.290You can include Intel® Cryptography Primitives Library sources into some arbitrary project's CMake build system and build them with it.
289291
290Here is the minimal working example:292Here is the minimal working example:
291293
@@ -294,28 +296,32 @@ cmake_minimum_required(VERSION 3.18)
294296
295project("test_proj")297project("test_proj")
296298
297# `crypto` is the repository root folder of Intel IPP Cryptography299# `crypto` is the repository root folder of Intel® Cryptography Primitives Library
298add_subdirectory(crypto)300add_subdirectory(crypto)
299include_directories(crypto/include)301include_directories(crypto/include)
300302
301# 'main.cpp' is some arbitrary project's source file303# 'main.cpp' is some arbitrary project's source file
302add_executable("test_proj" main.cpp)304add_executable("test_proj" main.cpp)
303# `ippcp_s` is the target name of static library in the Intel IPP Cryptography build system.305# `ippcp_s` is the target name of static library in the Intel® Cryptography Primitives Library build system.
304# This static library will be built automatically, when you build your project.306# This static library will be built automatically, when you build your project.
305target_link_libraries("test_proj" "ippcp_s")307target_link_libraries("test_proj" "ippcp_s")
306```308```
307309
308Also you can use CMake module to find the Intel IPP Cryptography library installed on the system. The module location is `examples/FindIPPCrypto.cmake` and here is the example of its usage:310Also you can use the CMake module to find the Intel® Cryptography Primitives Library installed on the system. The module location is `examples/FindIPPCrypto.cmake` and here is the example of its usage:
309311
310``` bash312``` bash
311find_package(IPPCrypto REQUIRED MODULE)313find_package(IPPCrypto REQUIRED MODULE)
312314
313if (NOT IPPCRYPTO_FOUND)315if (NOT IPPCRYPTO_FOUND)
314 message(FATAL_ERROR "No Intel IPP Cryptography library found on the system.")316 message(FATAL_ERROR "No Intel® Cryptography Primitives Library found on the system.")
315endif()317endif()
316318
317# If Intel IPP Cryptography is found, the following variables will be defined:319# If Intel® Cryptography Primitives Library is found, the following variables will be defined:
318# `IPPCRYPTO_LIBRARIES` - static library name320# `IPPCRYPTO_LIBRARIES` - static library name
319# `IPPCRYPTO_INCLUDE_DIRS` - path to Intel IPP Cryptography headers321# `IPPCRYPTO_INCLUDE_DIRS` - path to Intel® Cryptography Primitives Library headers
320# `IPPCRYPTO_ROOT_DIR` - library root dir (a folder with 'include' and 'lib' directories)322# `IPPCRYPTO_ROOT_DIR` - library root dir (a folder with 'include' and 'lib' directories)
321```323```
324
325### How to run Intel® IPP Cryptography with clang-tidy?
326
327`CC=clang CXX=clang++ cmake CMakeLists.txt -B_build -DARCH=intel64 -DCRYPTO_USE_CLANG_TIDY:BOOL=on`
322\ No newline at end of file328\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a3d628b..c51d085 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,17 @@
1# Intel® Integrated Performance Primitives Cryptography (Intel® IPP Cryptography)1# Intel® Cryptography Primitives Library
22
3This is a list of notable changes to Intel(R) IPP Cryptography, in reverse chronological order.3This is a list of notable changes to Intel® Cryptography Primitives Library, in reverse chronological order.
4
5## Intel(R) Cryptography Primitives Library 1.0.0
6- Intel® Integrated Performance Primitives Cryptography (Intel® IPP Cryptography) was renamed to Intel(R) Cryptography Primitives Library.
7- Added IPPCP SM3 hash algorithm optimization with the new instruction set (SM3-NI) for Lunar Lake and Arrow Lake CPUs.
8- Added Intel® AVX-IFMA RSA implementation to Crypto Multi buffer library.
9- Fixed bug in IceLake optimization (`k1` branch) of ECDSA signature function caused by incorrect processing of R and S component's size and sign.
10- Added FIPS selftest for Leighton-Micali Hash-Based Signatures(LMS) verification algorithm.
11- Added examples for SM3 Hash / LMS post-quantum verification / NIST Curve P-256 ECDSA signature generation algorithms.
12- Changed `-DBABASSL:BOOL=on` CMake build option to `-DTONGSUO:BOOL=on` for Tongsuo library.
13- Removed API that were deprecated in Intel® Integrated Performance Primitives Cryptography 2020 Update1. More details can be found in [DEPRECATION_NOTES.md](./DEPRECATION_NOTES.md). Please note that `ippsHash<GetSize/Init/Duplicate/Pack/Unpack/Update/GetTag/Final/HashMessage>` API still remain in the library.
14- Removed support for SSSE3(`s8` for ia32 and `n8` for intel64) and AVX(`g9` for ia32 and `e9` for intel64) code-paths. Execution was moved to SSE3(`w7` for ia32 and `m7` for intel64) and SSE4.2(`p8` for ia32 and `y8` for intel64) respectively. There is still the possibility to use 1cpu headers and 1cpu libraries without breaking change for 1 year but some performance drops are expected.
415
5## Intel(R) IPP Cryptography 2021.12.116## Intel(R) IPP Cryptography 2021.12.1
6- Added `FIPS_CUSTOM_IPPCP_API_HEADER` build flag to support FIPS self-tests for a specific use case when Custom Library Tool is used with custom prefix for IPPCP API.17- Added `FIPS_CUSTOM_IPPCP_API_HEADER` build flag to support FIPS self-tests for a specific use case when Custom Library Tool is used with custom prefix for IPPCP API.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 27d9d3a..6d0d978 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -15,23 +15,22 @@
15#=========================================================================15#=========================================================================
1616
17#17#
18# Intel® Integrated Performance Primitives Cryptography (Intel® IPP Cryptography)18# Intel® Cryptography Primitives Library
19#19#
2020
21cmake_minimum_required(VERSION 3.12)21cmake_minimum_required(VERSION 3.12)
2222
23include("${CMAKE_CURRENT_SOURCE_DIR}/sources/cmake/ippcp-utils.cmake")23include("${CMAKE_CURRENT_SOURCE_DIR}/sources/cmake/ippcp-utils.cmake")
24ippcp_getlibversion("${CMAKE_CURRENT_SOURCE_DIR}/include/ippversion.h")24ippcp_getlibversion("${CMAKE_CURRENT_SOURCE_DIR}/include/ippcpversion.h")
25if ((NOT DEFINED IPPCP_VERSION_MAJOR) OR25if ((NOT DEFINED IPPCP_VERSION_MAJOR) OR
26 (NOT DEFINED IPPCP_VERSION_MINOR) OR26 (NOT DEFINED IPPCP_VERSION_MINOR) OR
27 (NOT DEFINED IPPCP_VERSION_UPDATE) OR27 (NOT DEFINED IPPCP_VERSION_UPDATE) OR
28 (NOT DEFINED IPPCP_INTERFACE_VERSION_MAJOR) OR28 (NOT DEFINED IPPCP_INTERFACE_VERSION_MAJOR) OR
29 (NOT DEFINED IPPCP_INTERFACE_VERSION_MINOR))29 (NOT DEFINED IPPCP_INTERFACE_VERSION_MINOR))
30 message(WARNING "Cannot parse version from ippversion.h file. The project might be corrupted.")30 message(WARNING "Cannot parse version from ippcpversion.h file. The project might be corrupted.")
31endif()31endif()
3232
33set(PROJECT_FULL_NAME "Intel® Integrated Performance Primitives Cryptography (Intel® IPP Cryptography)")33set(PROJECT_FULL_NAME "Intel® Cryptography Primitives Library")
34set(PROJECT_NAME "Intel(R) IPP Crypto")
35set(PROJECT_VERSION ${IPPCP_VERSION})34set(PROJECT_VERSION ${IPPCP_VERSION})
3635
37set(LIB_NAME ippcp)36set(LIB_NAME ippcp)
@@ -51,7 +50,7 @@ if("${CMAKE_GENERATOR}" STREQUAL "NMake Makefiles")
51 endif()50 endif()
52endif()51endif()
5352
54project(${PROJECT_NAME}53project(${PROJECT_FULL_NAME}
55 VERSION ${PROJECT_VERSION}54 VERSION ${PROJECT_VERSION}
56 LANGUAGES C CXX)55 LANGUAGES C CXX)
5756
@@ -148,6 +147,12 @@ if(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
148 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG}")147 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG}")
149endif()148endif()
150149
150if (CRYPTO_USE_CLANG_TIDY AND ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang" AND ${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER_EQUAL "12.0.0")
151 find_program(DO_CLANG_TIDY NAMES clang-tidy)
152 set(CMAKE_CXX_CLANG_TIDY ${DO_CLANG_TIDY})
153 set(CMAKE_C_CLANG_TIDY ${DO_CLANG_TIDY})
154endif ()
155
151message (STATUS "PROJECT ............................... " ${PROJECT_FULL_NAME})156message (STATUS "PROJECT ............................... " ${PROJECT_FULL_NAME})
152message (STATUS "CMAKE_BINARY_DIR ...................... " ${CMAKE_BINARY_DIR})157message (STATUS "CMAKE_BINARY_DIR ...................... " ${CMAKE_BINARY_DIR})
153message (STATUS "CMAKE_OUTPUT_DIR ...................... " ${CMAKE_OUTPUT_DIR})158message (STATUS "CMAKE_OUTPUT_DIR ...................... " ${CMAKE_OUTPUT_DIR})
@@ -163,6 +168,12 @@ message (STATUS "ARCH .................................. " ${ARCH})
163message (STATUS "DYNAMIC_LIB ........................... " ${DYNAMIC_LIB})168message (STATUS "DYNAMIC_LIB ........................... " ${DYNAMIC_LIB})
164message (STATUS "CMAKE_INSTALL_PREFIX .................. " ${CMAKE_INSTALL_PREFIX})169message (STATUS "CMAKE_INSTALL_PREFIX .................. " ${CMAKE_INSTALL_PREFIX})
165170
171if(CRYPTO_USE_CLANG_TIDY)
172 message (STATUS "CLANG_TIDY ............................ on")
173else()
174 message (STATUS "CLANG_TIDY ............................ off")
175endif()
176
166if(Python_Interpreter_FOUND)177if(Python_Interpreter_FOUND)
167 message (STATUS "PYTHON_VERSION_STRING ................. " ${Python_VERSION})178 message (STATUS "PYTHON_VERSION_STRING ................. " ${Python_VERSION})
168else()179else()
@@ -221,13 +232,18 @@ else()
221endif()232endif()
222233
223add_subdirectory(sources/ippcp)234add_subdirectory(sources/ippcp)
224if(EXISTS "${IPP_CRYPTO_DIR}/tests/")235
225 add_subdirectory(tests)236if (NOT (CRYPTO_USE_CLANG_TIDY))
226endif()237
227if(EXISTS "${IPP_CRYPTO_DIR}/perf_tests/")238 if(EXISTS "${IPP_CRYPTO_DIR}/tests/")
228 add_subdirectory(perf_tests)239 add_subdirectory(tests)
240 endif()
241 if(EXISTS "${IPP_CRYPTO_DIR}/perf_tests/")
242 add_subdirectory(perf_tests)
243 endif()
229endif()244endif()
230245
246
231if(BUILD_EXAMPLES)247if(BUILD_EXAMPLES)
232 # This helps to organize examples projects structure in IDE by folders248 # This helps to organize examples projects structure in IDE by folders
233 set_property(GLOBAL PROPERTY USE_FOLDERS ON)249 set_property(GLOBAL PROPERTY USE_FOLDERS ON)
diff --git a/CONST_TIME_EXECUTION_TESTING.md b/CONST_TIME_EXECUTION_TESTING.md
index 1bf9c7d..9acc211 100644
--- a/CONST_TIME_EXECUTION_TESTING.md
+++ b/CONST_TIME_EXECUTION_TESTING.md
@@ -1,12 +1,12 @@
1# Scope of the Constant-time execution testing of Intel® Integrated Performance Primitives Cryptography (Intel® IPP Cryptography)1# Scope of the Constant-time execution testing of Intel® Cryptography Primitives Library
22
3- [General information](#general)3- [General information](#general)
4- [Scope for ippcp library](#ippcp)4- [Scope for ippcp library](#ippcp)
5- [Scope for crypto_mb library](#cryptomb)5- [Scope for crypto_mb library](#cryptomb)
66
7## General information <div id = 'general'>7## General information <div id = 'general'>
8- Testing is conducted under Linux for 64-bit Intel® IPP Cryptography built with the compilers listed in [Build](./BUILD.md).8- Testing is conducted under Linux for 64-bit Intel® Cryptography Primitives Library built with the compilers listed in [Build](./BUILD.md).
9- Tested platforms: w7, n8, y8, e9, l9, k0 (see the supported platforms list [here](./OVERVIEW.md#target-optimization-codes-in-function-names)).9- Tested platforms: m7, y8, l9, k0, k1 (see the supported platforms list [here](./OVERVIEW.md#target-optimization-codes-in-function-names)).
10- Testing scope described below is guaranteed to pass for **`release`** branches. This is not guaranteed for the **`develop`** branch ([branches description](./OVERVIEW.md#branches-description))10- Testing scope described below is guaranteed to pass for **`release`** branches. This is not guaranteed for the **`develop`** branch ([branches description](./OVERVIEW.md#branches-description))
11- Information about Pin-Based Constant Execution Checker can be found [here](https://github.com/intel/pin_based_cec)11- Information about Pin-Based Constant Execution Checker can be found [here](https://github.com/intel/pin_based_cec)
1212
@@ -69,6 +69,7 @@
69| ippsGFpMul_PE | - |69| ippsGFpMul_PE | - |
70| ippsGFpMultiExp | - |70| ippsGFpMultiExp | - |
71| ippsGFpNeg | - |71| ippsGFpNeg | - |
72| ippsGFpSqr | - |
72| ippsGFpSub | - |73| ippsGFpSub | - |
73| ippsGFpSub_PE | - |74| ippsGFpSub_PE | - |
74| ippsHMACInit_rmf | Different hashes:<br>sha1, sha256, sha224, sha384, sha512, <br>sha512-256, sha512-224, sm3 |75| ippsHMACInit_rmf | Different hashes:<br>sha1, sha256, sha224, sha384, sha512, <br>sha512-256, sha512-224, sm3 |
@@ -150,5 +151,18 @@
150| mbx_sm4_encrypt_ofb_mb16 | - |151| mbx_sm4_encrypt_ofb_mb16 | - |
151| mbx_sm4_encrypt_cfb128_mb16 | - |152| mbx_sm4_encrypt_cfb128_mb16 | - |
152| mbx_sm4_decrypt_cfb128_mb16 | - |153| mbx_sm4_decrypt_cfb128_mb16 | - |
154| mbx_sm4_xts_encrypt_mb16 | - |
155| mbx_sm4_xts_decrypt_mb16 | - |
156| mbx_sm4_ccm_init_mb16 | - |
157| mbx_sm4_ccm_update_aad_mb16 | - |
158| mbx_sm4_ccm_encrypt_mb16 | - |
159| mbx_sm4_ccm_decrypt_mb16 | - |
160| mbx_sm4_ccm_get_tag_mb16 | - |
161| mbx_sm4_gcm_init_mb16 | - |
162| mbx_sm4_gcm_update_iv_mb16 | - |
163| mbx_sm4_gcm_update_aad_mb16 | - |
164| mbx_sm4_gcm_encrypt_mb16 | - |
165| mbx_sm4_gcm_decrypt_mb16 | - |
166| mbx_sm4_gcm_get_tag_mb16 | - |
153| mbx_x25519_public_key_mb8 | - |167| mbx_x25519_public_key_mb8 | - |
154| mbx_x25519_mb8 | - |168| mbx_x25519_mb8 | - |
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index a417079..dfaa0ef 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,9 +1,9 @@
1Intel® Integrated Performance Primitives Cryptography (Intel® IPP Cryptography) Contribution Rules1Intel® Cryptography Primitives Library Contribution Rules
2===============================================================2=========================================================
33
4## How to Contribute4## How to Contribute
55
6We welcome community contributions to Intel® IPP Cryptography!6We welcome community contributions to Intel® Cryptography Primitives Library!
77
8If you have an idea how to improve the product:8If you have an idea how to improve the product:
99
@@ -12,9 +12,9 @@ If you have an idea how to improve the product:
1212
1313
1414
15## Intel® IPP Cryptography repository scheme15## Intel® Cryptography Primitives Library repository scheme
1616
17Intel® IPP Cryptography supports two repositories that are named as "Public Repository" and "Inner Repository". Privately hosted "Inner Repository" is required for extensive internal testing and experimental features development.17Intel® Cryptography Primitives Library supports two repositories that are named as "Public Repository" and "Inner Repository". Privately hosted "Inner Repository" is required for extensive internal testing and experimental features development.
1818
19Existing automation guarantees regular synchronization of repositories.19Existing automation guarantees regular synchronization of repositories.
2020
@@ -29,7 +29,7 @@ Existing automation guarantees regular synchronization of repositories.
29</pre>29</pre>
3030
31## License31## License
32Intel® IPP Cryptography is licensed under the terms in LICENSE <https://github.com/intel/ipp-crypto/blob/develop/LICENSE>. By contributing to the project, you agree to the license and copyright terms therein and release your contribution under these terms.32Intel® Cryptography Primitives Library is licensed under the terms in LICENSE <https://github.com/intel/ipp-crypto/blob/develop/LICENSE>. By contributing to the project, you agree to the license and copyright terms therein and release your contribution under these terms.
3333
34## Developer Certification of Origin (DCO)34## Developer Certification of Origin (DCO)
35We encourage you to use Signed-off-by feature to comply with [Developer Certification of Origin (DCO)](https://developercertificate.org/). 35We encourage you to use Signed-off-by feature to comply with [Developer Certification of Origin (DCO)](https://developercertificate.org/).
@@ -42,9 +42,9 @@ The name in the commit message Signed-off-by line and your email must match the
42## Contribution Flow42## Contribution Flow
4343
44- Contributor creates fork from develop, commits the changes into the created branch, opens a PR and requests a review.44- Contributor creates fork from develop, commits the changes into the created branch, opens a PR and requests a review.
45- Contributor applies feedback provided by Intel® IPP Cryptography repository maintainer in opened PR.45- Contributor applies feedback provided by Intel® Cryptography Primitives Library repository maintainer in opened PR.
46- Intel® IPP Cryptography repository maintainer must ensure that the code is safe for internal execution, get code into inner repository and run private testing.46- Intel® Cryptography Primitives Library repository maintainer must ensure that the code is safe for internal execution, get code into inner repository and run private testing.
47- Intel® IPP Cryptography repository maintainer merges the changes "as is" from inner repository, when private testing is passed.47- Intel® Cryptography Primitives Library repository maintainer merges the changes "as is" from inner repository, when private testing is passed.
48> **Note**48> **Note**
49> Original PR is closed because merging PRs on the external GitHub repo isn't supported.49> Original PR is closed because merging PRs on the external GitHub repo isn't supported.
5050
@@ -74,7 +74,7 @@ The name in the commit message Signed-off-by line and your email must match the
7474
75## Pull Request Checklist75## Pull Request Checklist
76Before sending your pull requests, ensure that:76Before sending your pull requests, ensure that:
77 - Intel® IPP Cryptography builds successfully with proposed changes using one of the compilers listed in [Build](./BUILD.md). Please specify which exact compiler was used.77 - Intel® Cryptography Primitives Library builds successfully with proposed changes using one of the compilers listed in [Build](./BUILD.md). Please specify which exact compiler was used.
78 - Relevant documentation are added (for example CHANDELOG.md, README.md etc)78 - Relevant documentation are added (for example CHANDELOG.md, README.md etc)
79 - For new features make sure that79 - For new features make sure that
80 - All new files are covered by copyrights.80 - All new files are covered by copyrights.
diff --git a/DEPRECATION_NOTES.md b/DEPRECATION_NOTES.md
index 3ef6475..138bb66 100644
--- a/DEPRECATION_NOTES.md
+++ b/DEPRECATION_NOTES.md
@@ -1,10 +1,25 @@
1# Deprecated API in Intel® Integrated Performance Primitives Cryptography (Intel® IPP Cryptography)1# Deprecated API in Intel® Cryptography Primitives Library
22
3This document describes deprecated API in different Intel IPP Cryptography versions and recommendations for transition.3This document describes deprecated API in different Intel® Cryptography Primitives Library versions and recommendations for transition.
44
5The deprecated API means it is obsolete and will be removed in one of future Intel IPP Cryptography releases. If you have any concerns, please use the following link for opening a ticket and providing feedback: <https://supporttickets.intel.com.>5The deprecated API means it is obsolete and will be removed in one of future Intel® Cryptography Primitives Library releases. If you have any concerns, please use the following link for opening a ticket and providing feedback: <https://supporttickets.intel.com.>
66
7## 2020 Update1 (branch [ipp-crypto_2020_update1](https://github.com/intel/ipp-crypto/tree/ipp-crypto_2020_update1))7## Intel® Cryptography Primitives Library v1.0.0
8
9### Service Functions
10
11| Deprecated | Recommended replacement |
12| :------------------------------------------------ | :------------------------------------------------------------: |
13| ippcpGetNumThreads | N/A |
14| ippcpGetEnabledNumThreads | N/A |
15| ippcpSetNumThreads | N/A |
16| ippcpGetLibVersion | cryptoGetLibVersion |
17
18### Deprecated Optimizations
19
20The code paths n8/s8 (Intel® SSSE3) and g9/e9 (Intel® AVX) are deprecated and removed from the merged build of Intel® Cryptography Primitives Library, lower optimizations are used instead. 1cpu headers are still available for all code paths. These branches can also be built as 1cpu libraries if specified in the platform list, e.g. `-DMERGED_BLD:BOOL=off -DPLATFORM_LIST=s8;e9`.
21
22## Intel® Integrated Performance Primitives Cryptography (Intel® IPP Cryptography) 2020 Update1 (branch [ipp-crypto_2020_update1](https://github.com/intel/ipp-crypto/tree/ipp-crypto_2020_update1))
823
9### Hash Functionality24### Hash Functionality
1025
diff --git a/OVERVIEW.md b/OVERVIEW.md
index 0cf934e..7e1c85e 100644
--- a/OVERVIEW.md
+++ b/OVERVIEW.md
@@ -1,4 +1,4 @@
1# Intel® Integrated Performance Primitives Cryptography (Intel® IPP Cryptography) Library Overview <!-- omit in toc -->1# Intel® Cryptography Primitives Library Overview <!-- omit in toc -->
22
3- [Repository Structure](#repository-structure)3- [Repository Structure](#repository-structure)
4 - [Branches Description](#branches-description)4 - [Branches Description](#branches-description)
@@ -19,7 +19,7 @@
19 - [Dynamic Library with Custom functionality](#dynamic-library-with-custom-functionality)19 - [Dynamic Library with Custom functionality](#dynamic-library-with-custom-functionality)
2020
21<!-- Images List -->21<!-- Images List -->
22[sha256-dispatching]: ./data/images/README-pictures-0-dispatcher.png "Intel IPP Crypto function dispatching scheme"22[sha256-dispatching]: ./data/images/README-pictures-0-dispatcher.png "Intel® Cryptography Primitives Library function dispatching scheme"
23[library configurations]: ./data/images/README-pictures-1-library-configurations.png "Library configurations picture"23[library configurations]: ./data/images/README-pictures-1-library-configurations.png "Library configurations picture"
24[build targets]: ./data/images/README-pictures-1a-build-targets.png "Build targets picture"24[build targets]: ./data/images/README-pictures-1a-build-targets.png "Build targets picture"
25[merged library]: ./data/images/README-pictures-2-merged-library.png "Merged library scheme"25[merged library]: ./data/images/README-pictures-2-merged-library.png "Merged library scheme"
@@ -31,26 +31,43 @@
31## Repository Structure31## Repository Structure
3232
33``` bash33``` bash
34├── CHANGELOG.md34├── data/images
35├── CMakeLists.txt < Main CMake file35├── examples < Examples of the library usage
36├── examples < Examples of the library usage36├── include < Public headers
37├── include < Public headers
38├── LICENSE
39├── README.md
40├── sources37├── sources
41│   ├── cmake < OS-specific CMake files38│   ├── cmake < OS-specific CMake files
42│   │   ├── linux39│   │   ├── linux
43│   │   ├── macosx40│   │   ├── macosx
44│   │   └── windows41│   │   └── windows
45│   ├── dispatcher < CPU dispatcher generator42│   ├── dispatcher < CPU dispatcher generator
46│   ├── gen_cpu_spc_header < Single CPU headers generator43│   ├── gen_cpu_spc_header < Single CPU headers generator
47│   ├── include < Internal headers44│   ├── include < Internal headers
48│   └── ippcp < C-sources45│   └── ippcp < C-sources
49│   ├── asm_ia32 < IA-32 Assembler sources46│   ├── asm_ia32 < IA-32 Assembler sources
50│   ├── asm_intel64 < Intel® 64 Assembler sources47│   ├── asm_intel64 < Intel® 64 Assembler sources
51│   └── ifma_rsa_mb < Sources of RSA IFMA Multi-buffer library48│   ├── crypto_mb < Sources of the Crypto Multi-buffer library
52└── tools49│   ├── fips_cert
53 └── ipp_custom_library_tool_python < Custom Library Tool50│   ├── gfpec
51│   ├── hash
52│   ├── lms
53│   └── xmss
54├── tools
55| └── ipp_custom_library_tool_python < Custom Library Tool
56├── .clang-format
57├── .clang-tidy
58├── BUILD.md
59├── CHANGELOG.md
60├── CMakeLists.txt < Main CMake file
61├── CONST_TIME_EXECUTION_TESTING.md < Information about security testing
62├── CONTRIBUTING.md
63├── DEPRECATION_NOTES.md
64├── LICENSE
65├── OVERVIEW.md
66├── README.md
67├── README_FIPS.md < FIPS compliance guide
68├── SECURITY.md
69├── SUPPORT.md
70└── THIRD-PARTY-PROGRAMS.txt
54```71```
5572
56### Branches Description73### Branches Description
@@ -63,13 +80,42 @@ Contains code that may not be fully functional and that Intel may substantially
6380
64### CPU Dispatching81### CPU Dispatching
6582
66For the best performance, Intel IPP Cryptography uses multiple implementations of each function, optimized for various CPUs, and the [library version targeted for any CPU](#all-cpus-library) contains all of these implementations.83For the best performance, Intel® Cryptography Primitives Library uses multiple implementations of each function, optimized for various CPUs, and the [library version targeted for any CPU](#all-cpus-library) contains all of these implementations.
6784
68With the dispatcher, the library detects an available CPU in a runtime and chooses the best for the current hardware version of a function. The process of dispatching is transparent and you can always call a generic function as illustrated at the picture below.85With the dispatcher, the library detects an available CPU in a runtime and chooses the best for the current hardware version of a function. The process of dispatching is transparent and you can always call a generic function as illustrated at the picture below.
6986
70![Dispatcher picture][sha256-dispatching]87```mermaid
88flowchart LR
89 classDef class1 fill:#0054AE, stroke:none, color:#FFFFFF
90
91 function["ippsAES_GCMEncrypt()"]:::class1
92
93 %% Subgraph for Merged Library
94 subgraph ML[**Merged Library**]
95 dispatcher["Dispatcher"]:::class1
7196
72The prefix before the function name ("m7_", "n8_", etc) is a naming convention for the function implementations that are included in the [library with dispatcher](#all-cpus-library). It refers to the CPU instruction set for which the function is optimized (for all available prefixes see the [table](#target-optimization-codes-in-function-names) below).97 m7["m7_ippsAES_GCMEncrypt()"]:::class1
98 y8["y8_ippsAES_GCMEncrypt()"]:::class1
99 l9["l9_ippsAES_GCMEncrypt()"]:::class1
100 k0["k0_ippsAES_GCMEncrypt()"]:::class1
101 k1["k1_ippsAES_GCMEncrypt()"]:::class1
102
103 %% Connections
104 dispatcher == SSE3==> m7
105 dispatcher == SSSE4.2 ==> y8
106 dispatcher == AVX2 ==> l9
107 dispatcher == AVX512 (formerly codenamed SkyLake) ==> k0
108 dispatcher == AVX512 (formerly codenamed IceLake) ==> k1
109 end
110
111 style ML fill:#15BCEF, stroke:#15BCEF, color:#FFFFFF
112
113 function ==> dispatcher
114
115 linkStyle 0,1,2,3,4,5 stroke:#FFE500
116```
117
118The prefix before the function name ("m7_", "y8_", etc) is a naming convention for the function implementations that are included in the [library with dispatcher](#all-cpus-library). It refers to the CPU instruction set for which the function is optimized (for all available prefixes see the [table](#target-optimization-codes-in-function-names) below).
73119
74The dispatcher is designed to add no performance overhead when the library is initialized, in other words, when CPU features are detected. You can initialize the library either explicitly in advance by calling the dedicated function [ippcpInit()](https://www.intel.com/content/www/us/en/docs/ipp-crypto/developer-reference/current/init.html) or it will be done implicitly during the first call of any function of the library.120The dispatcher is designed to add no performance overhead when the library is initialized, in other words, when CPU features are detected. You can initialize the library either explicitly in advance by calling the dedicated function [ippcpInit()](https://www.intel.com/content/www/us/en/docs/ipp-crypto/developer-reference/current/init.html) or it will be done implicitly during the first call of any function of the library.
75121
@@ -82,14 +128,12 @@ By default, the dispatcher chooses the most appropriate optimization for the cur
82| px | mx | Generic code without hardware specific optimizations suitable for any CPU |128| px | mx | Generic code without hardware specific optimizations suitable for any CPU |
83| w7 | - | Optimized for processors with Intel® Streaming SIMD Extensions 2 (Intel® SSE2) |129| w7 | - | Optimized for processors with Intel® Streaming SIMD Extensions 2 (Intel® SSE2) |
84| - | m7 | Optimized for processors with Intel® SSE3 |130| - | m7 | Optimized for processors with Intel® SSE3 |
85| s8 | n8 | Optimized for processors with Supplemental Streaming SIMD Extensions 3 (SSSE3) |
86| p8 | y8 | Optimized for processors with Intel® SSE4.2 |131| p8 | y8 | Optimized for processors with Intel® SSE4.2 |
87| g9 | e9 | Optimized for processors with Intel® Advanced Vector Extensions (Intel® AVX) |
88| h9 | l9 | Optimized for processors with Intel® Advanced Vector Extensions 2 (Intel® AVX2) |132| h9 | l9 | Optimized for processors with Intel® Advanced Vector Extensions 2 (Intel® AVX2) |
89| - | k0 | Optimized for processors with Intel® Advanced Vector Extensions 512 (Intel® AVX-512) (formerly codenamed SkyLake) |133| - | k0 | Optimized for processors with Intel® Advanced Vector Extensions 512 (Intel® AVX-512) (formerly codenamed SkyLake) |
90| - | k1 | Optimized for processors with Intel® Advanced Vector Extensions 512 (Intel® AVX-512) (formerly codenamed IceLake) |134| - | k1 | Optimized for processors with Intel® Advanced Vector Extensions 512 (Intel® AVX-512) (formerly codenamed IceLake) |
91135
92> **NOTE:** Due to the significant shift in the industry towards 64-bit architecture, the support of 32-bit libraries is deprecated in the Intel IPP Cryptography 2021.9 release and targeted to be removed after one year deprecation notice period.136> **NOTE:** Due to the significant shift in the industry towards 64-bit architecture, the support of 32-bit libraries is deprecated in the Intel® Integrated Performance Primitives Cryptography (Intel® IPP Cryptography) 2021.9 release. No new features (only critical security fixes) are targeted for 32-bit libraries and testing scope is limited by Linux OS & Clang compiler.
93137
94### CPU Feature Dispatching138### CPU Feature Dispatching
95139
@@ -106,6 +150,7 @@ List of CPU feature subsets that the library has special optimizations for:
106- Intel AVX-512/AVX2 VAES150- Intel AVX-512/AVX2 VAES
107- Intel AVX-512 IFMA151- Intel AVX-512 IFMA
108- Intel AVX-512 GFNI152- Intel AVX-512 GFNI
153- SM3-NI
109154
110 > **NOTE:** For some features there is also an opportunity to force their dispatching inside the 1CPU libraries manually during the compile time. For more information please, refer to [common for all operating systems CMake build options](./BUILD.md/#common-for-all-operating-systems).155 > **NOTE:** For some features there is also an opportunity to force their dispatching inside the 1CPU libraries manually during the compile time. For more information please, refer to [common for all operating systems CMake build options](./BUILD.md/#common-for-all-operating-systems).
111156
@@ -115,7 +160,7 @@ To leave only specific ISA when linking with an [All CPUs Static Library](#all-c
115160
116## Library Configurations161## Library Configurations
117162
118The Intel IPP Cryptography library supports configurations by:163The Intel® Cryptography Primitives Library supports configurations by:
119164
1201) [*Linkage Mode*](#linkage-mode): to produce a static or dynamic library1651) [*Linkage Mode*](#linkage-mode): to produce a static or dynamic library
121166
@@ -133,7 +178,61 @@ The Intel IPP Cryptography library supports configurations by:
133178
134All possible configuration combinations are shown in the picture below.179All possible configuration combinations are shown in the picture below.
135180
136![Library configurations picture][library configurations]181
182```mermaid
183flowchart
184
185 %% Style for classes
186 classDef class1 fill:#0054AE, stroke:none, color:#FFFFFF
187 classDef class2 fill:#0054AE, stroke:none, color:#FFFFFF
188
189 library["Intel® Cryptography Primitives Library"]:::class1
190
191 %% Subgraph for the picture
192 subgraph base[" "]
193 subgraph first["Link type "]
194 Static:::class2
195 Dynamic:::class2
196 end
197
198 subgraph second["Position Independent Code"]
199 non-PIC:::class2
200 PIC:::class2
201 end
202
203 subgraph third["Dispatcher"]
204 allCPU["All CPU + Disptacher"]:::class2
205 singleCPU[Single CPU]:::class2
206 end
207
208 subgraph forth["Library Components"]
209 customFunc["Custom Functionality"]:::class2
210 allFunc["All Functionality"]:::class2
211 end
212
213 %% Connections
214 library ==> Static
215 library ==> Dynamic
216
217 Static ==> non-PIC
218 Static & Dynamic ==> PIC
219
220 second ==> third
221
222 allCPU ==> customFunc
223 singleCPU & allCPU ==> allFunc
224 end
225
226 %% Style for subgraphs
227 style first fill:#15BCEF, stroke:#15BCEF, color:#FFFFFF
228 style second fill:#15BCEF, stroke:#15BCEF, color:#FFFFFF
229 style third fill:#15BCEF, stroke:#15BCEF, color:#FFFFFF
230 style forth fill:#15BCEF, stroke:#15BCEF, color:#FFFFFF
231
232 linkStyle 0,1,2,3,4,5,6,7,8 stroke:#FFE500
233
234 style base fill:none, stroke:#15BCEF, stroke-width:3px
235```
137236
138### Linkage Mode237### Linkage Mode
139238
@@ -145,7 +244,7 @@ The corresponding build target names for the libraries are shown at the picture
145244
146### Code Position245### Code Position
147246
148Be default, the Intel IPP Cryptography library is built with the [Position Independent Code (PIC)](https://en.wikipedia.org/wiki/Position-independent_code) option.247Be default, the Intel® Cryptography Primitives Library is built with the [Position Independent Code (PIC)](https://en.wikipedia.org/wiki/Position-independent_code) option.
149248
150But on Linux* OS, when the library is supposed to work in kernel space, it is possible to compile the static library in a non-PIC mode. For more information about build options, refer to the [Linux* OS build options](./BUILD.md).249But on Linux* OS, when the library is supposed to work in kernel space, it is possible to compile the static library in a non-PIC mode. For more information about build options, refer to the [Linux* OS build options](./BUILD.md).
151250
@@ -155,7 +254,66 @@ But on Linux* OS, when the library is supposed to work in kernel space, it is po
155254
156Each function of the library is built in several instances with optimizations for each supported instruction set (see example for the `func2` function in green). Those functions instances are all included into a single library along with the [dispatcher](#dispatcher) that lets the library choose right function instance depending on current CPU. Such library build is called a merged library build.255Each function of the library is built in several instances with optimizations for each supported instruction set (see example for the `func2` function in green). Those functions instances are all included into a single library along with the [dispatcher](#dispatcher) that lets the library choose right function instance depending on current CPU. Such library build is called a merged library build.
157256
158![Merged library picture][merged library]257```mermaid
258flowchart TD
259 %% Style for classes
260 classDef class1 fill:#0054AE, stroke:none, color:#FFFFFF, font-size:16pt
261 classDef class2 fill:#0054AE, stroke:none, color:#FFFFFF, font-size:12pt
262 subgraph base[" "]
263
264 Dispatcher["Dispatcher"]:::class1
265
266 subgraph m7_graph["SSE3 version"]
267 m7_1["m7_func1"]:::class2
268 m7_2["m7_func2"]:::class2
269 m7_3["m7_<...>"]:::class2
270 m7_4["m7_funcN"]:::class2
271 end
272
273 subgraph y8_graph["SSE4.2 version"]
274 y8_1["y8_func1"]:::class2
275 y8_2["y8_func2"]:::class2
276 y8_3["y8_<...>"]:::class2
277 y8_4["y8_funcN"]:::class2
278 end
279
280 subgraph l9_graph["AVX2 version"]
281 l9_1["l9_func1"]:::class2
282 l9_2["l9_func2"]:::class2
283 l9_3["l9_<...>"]:::class2
284 l9_4["l9_funcN"]:::class2
285 end
286
287 subgraph k0_graph["AVX512 k0 version"]
288 k0_1["k0_func1"]:::class2
289 k0_2["k0_func2"]:::class2
290 k0_3["k0_<...>"]:::class2
291 k0_4["k0_funcN"]:::class2
292 end
293
294 subgraph k1_graph["AVX512 k1 version"]
295 k1_1["k1_func1"]:::class2
296 k1_2["k1_func2"]:::class2
297 k1_3["k1_<...>"]:::class2
298 k1_4["k1_funcN"]:::class2
299 end
300
301 Dispatcher ~~~ m7_graph
302 Dispatcher ~~~ y8_graph
303 Dispatcher ~~~ l9_graph
304 Dispatcher ~~~ k0_graph
305 Dispatcher ~~~ k1_graph
306 end
307
308 %% Style for subgraphs
309 style m7_graph fill:#15BCEF, stroke:#15BCEF, color:#FFFFFF
310 style y8_graph fill:#15BCEF, stroke:#15BCEF, color:#FFFFFF
311 style l9_graph fill:#15BCEF, stroke:#15BCEF, color:#FFFFFF
312 style k0_graph fill:#15BCEF, stroke:#15BCEF, color:#FFFFFF
313 style k1_graph fill:#15BCEF, stroke:#15BCEF, color:#FFFFFF
314
315 style base fill:none, stroke:#15BCEF, stroke-width:3px, color:#0054AE, font-size:16pt
316```
159317
160The advantage of this configuration is that the library works on any CPU.318The advantage of this configuration is that the library works on any CPU.
161319
@@ -167,6 +325,8 @@ The build system produces several separate libraries each optimized for its own
167325
168To specify for what instruction set targeted libraries must be produced, use the `PLATFORM_LIST` CMake variable. It contains semicolon-delimited list of CPU codes (for the complete list of codes see the table in [this](#target-optimization-codes-in-function-names) section).326To specify for what instruction set targeted libraries must be produced, use the `PLATFORM_LIST` CMake variable. It contains semicolon-delimited list of CPU codes (for the complete list of codes see the table in [this](#target-optimization-codes-in-function-names) section).
169327
328> **NOTE:** Platforms n8 (optimized for processors with Supplemental Streaming SIMD Extensions 3 (SSSE3)) and e9 (optimized for processors with Intel® Advanced Vector Extensions (Intel® AVX)) have been deprecated but are still supported in the specific ISA library build. Support for these platforms is targeted to be removed in a future release.
329
170For example, to create two libraries - one with SSE4.2 optimizations and another with Intel AVX-512 optimizations, specify `-DPLATFORM_LIST="y8;k0"`.330For example, to create two libraries - one with SSE4.2 optimizations and another with Intel AVX-512 optimizations, specify `-DPLATFORM_LIST="y8;k0"`.
171331
172![CPU specific libraries picture][CPU-specific libraries]332![CPU specific libraries picture][CPU-specific libraries]
@@ -193,13 +353,13 @@ It is important to ensure that both processor and operating system supports full
193353
194### Functionality354### Functionality
195355
196By default, Intel IPP Cryptography libraries (both static and dynamic) contain all functionality that exists in the product. But when footprint size matters, the library can contain only required functionality and have no unused code.356By default, Intel® Cryptography Primitives Library (both static and dynamic libraries) contain all functionality that exists in the product. But when footprint size matters, the library can contain only required functionality and have no unused code.
197357
198#### Static Library with Custom functionality358#### Static Library with Custom functionality
199359
200With the static linking having only required functionality in the library is not so actual as leaving only those parts of a library that are used by application, is automatically managed by linker.360With the static linking having only required functionality in the library is not so actual as leaving only those parts of a library that are used by application, is automatically managed by linker.
201361
202Considering Intel IPP Cryptography design that implies minimal internal dependencies, the application linked with the Intel IPP Cryptography static library contains only relevant library functionality, and has minimal footprint size.362Considering Intel® Cryptography Primitives Library design that implies minimal internal dependencies, the application linked with the static Intel® Cryptography Primitives Library contains only relevant library functionality, and has minimal footprint size.
203363
204#### Dynamic Library with Custom functionality364#### Dynamic Library with Custom functionality
205365
@@ -207,4 +367,4 @@ To build your own dynamic library containing only the functionality that is nece
207367
208The tool is located in the `tools/ipp_custom_library_tool_python` directory.368The tool is located in the `tools/ipp_custom_library_tool_python` directory.
209369
210Please refer to the [tool documentation](https://www.intel.com/content/www/us/en/docs/ipp/developer-guide-oneapi/current/ipp-custom-library-tool.html) for more information.370Please refer to the [tool documentation](https://www.intel.com/content/www/us/en/docs/ipp/developer-guide-reference/current/ipp-custom-library-tool.html) for more information.
diff --git a/README.md b/README.md
index bda5510..82c1f06 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,8 @@
1# Intel® Integrated Performance Primitives Cryptography1# Intel® Cryptography Primitives Library
22
3[Build Instructions](./BUILD.md) | [Contributing Guide](#how-to-contribute) | [Documentation](#documentation) | [Get Help](#get-help) | [Intel IPP Product Page](https://www.intel.com/content/www/us/en/developer/tools/oneapi/ipp.html)3[Build Instructions](./BUILD.md) | [Contributing Guide](#how-to-contribute) | [Documentation](#documentation) | [Get Help](#get-help) | [Intel IPP Product Page](https://www.intel.com/content/www/us/en/developer/tools/oneapi/ipp.html)
44
5Intel® Integrated Performance Primitives Cryptography (Intel® IPP Cryptography) is a secure, fast and lightweight library of building blocks for cryptography, highly-optimized for various Intel® CPUs.5Intel® Cryptography Primitives Library is a secure, fast and lightweight library of building blocks for cryptography, highly-optimized for various Intel® CPUs.
66
7## Key Features7## Key Features
8The library provides a comprehensive set of routines commonly used for cryptographic operations, including:8The library provides a comprehensive set of routines commonly used for cryptographic operations, including:
@@ -28,7 +28,7 @@ The library provides a comprehensive set of routines commonly used for cryptogra
28- PRNG/TRNG and Prime Numbers Generation28- PRNG/TRNG and Prime Numbers Generation
29- Hash-based signature algorithms29- Hash-based signature algorithms
3030
31## Reasons to Use Intel IPP Cryptography31## Reasons to Use Intel® Cryptography Primitives Library
32- Security (constant-time execution for secret processing functions)32- Security (constant-time execution for secret processing functions)
33- Designed for the small footprint size33- Designed for the small footprint size
34- Optimized for different Intel CPUs and instruction set architectures (including hardware cryptography instructions support):34- Optimized for different Intel CPUs and instruction set architectures (including hardware cryptography instructions support):
@@ -44,21 +44,21 @@ The library provides a comprehensive set of routines commonly used for cryptogra
4444
45## FIPS 140 Compliance45## FIPS 140 Compliance
4646
47Intel IPP Cryptography supports building blocks (self-tests, services) for FIPS 140-3 compliance.47Intel® Cryptography Primitives Library supports building blocks (self-tests, services) for FIPS 140-3 compliance.
48See [FIPS] (./README_FIPS.md) document for details.48See [FIPS](./README_FIPS.md) document for details.
4949
50## Installation50## Installation
5151
52[How to Get and Build the Intel IPP Cryptography Library](./BUILD.md)52[How to Get and Build the Intel® Cryptography Primitives Library](./BUILD.md)
5353
54## Documentation54## Documentation
5555
56- [Introduction to Intel IPP Cryptography Library](./OVERVIEW.md)56- [Introduction to Intel® Cryptography Primitives Library](./OVERVIEW.md)
57- [Introduction to Crypto Multi-buffer Library](./sources/ippcp/crypto_mb/Readme.md)57- [Introduction to Crypto Multi-buffer Library](./sources/ippcp/crypto_mb/Readme.md)
58- [Intel IPP Cryptography Build Instructions](./BUILD.md)58- [Intel® Cryptography Primitives Library Build Instructions](./BUILD.md)
59- [Intel IPP Release Notes](https://www.intel.com/content/www/us/en/developer/articles/release-notes/release-notes-for-oneapi-integrated-performance-primitives.html)59- [Intel® Integrated Performance Primitives Release Notes](https://www.intel.com/content/www/us/en/developer/articles/release-notes/release-notes-for-oneapi-integrated-performance-primitives.html)
60- [Intel IPP Cryptography Developer Reference](https://www.intel.com/content/www/us/en/docs/ipp-crypto/developer-reference/current/overview.html)60- [Developer Guide and Reference for Intel® Cryptography Primitives Library](https://www.intel.com/content/www/us/en/docs/ipp-crypto/developer-guide-reference/current/overview.htmll)
61- [Intel IPP Documentation](https://www.intel.com/content/www/us/en/developer/tools/oneapi/ipp-documentation.html)61- [Intel® Integrated Performance Primitives Documentation](https://www.intel.com/content/www/us/en/developer/tools/oneapi/ipp-documentation.html)
6262
63## Branches Description63## Branches Description
6464
@@ -71,8 +71,12 @@ Contains code that may not be fully functional and that Intel may substantially
71See [Contributing](./CONTRIBUTING.md) document for details about contribution process.71See [Contributing](./CONTRIBUTING.md) document for details about contribution process.
7272
73### License73### License
74Intel IPP Cryptography is licensed under Apache License, Version 2.0. By contributing to the project, you agree to the license and copyright terms therein and release your contribution under these terms.74Intel® Cryptography Primitives Library is licensed under Apache License, Version 2.0. By contributing to the project, you agree to the license and copyright terms therein and release your contribution under these terms.
7575
76## Certification76## Certification
7777
78Intel IPP Cryptography library is not certified for FIPS-140-2 (Security Requirements for Cryptographic Modules) and CMVP (Cryptographic Module Validation Program).78Intel® Integrated Performance Primitives Cryptography (Intel® IPP Cryptography) 2021.10 release is validated for FIPS-140-3 (Security Requirements for Cryptographic Modules) compliance and has the following CAVP (Cryptographic Algorithm Validation Program) certificates:
79
80- [Intel® Crypto Multi-buffer Library](https://csrc.nist.gov/projects/cryptographic-algorithm-validation-program/details?product=17987)
81- [Intel® Cryptography Primitives Library optimized for Intel® AVX2 ISA](https://csrc.nist.gov/projects/cryptographic-algorithm-validation-program/details?product=17988)
82- [Intel® Cryptography Primitives Library optimized for Intel® AVX512 ISA](https://csrc.nist.gov/projects/cryptographic-algorithm-validation-program/details?product=17989)
diff --git a/README_FIPS.md b/README_FIPS.md
index ca16a29..6c3870a 100644
--- a/README_FIPS.md
+++ b/README_FIPS.md
@@ -1,4 +1,4 @@
1# Intel(R) Integrated Performance Primitives Cryptography (Intel(R) IPP Cryptography) FIPS1# Intel(R) Cryptography Primitives Library FIPS
22
3## What is FIPS 140?3## What is FIPS 140?
44
@@ -23,44 +23,44 @@ In addition, **in recent years FIPS 140 has become a more and more popular requi
23FIPS 140-3 defines 4 security levels (from level 1 - the easiest to level 4 - the most stringent).23FIPS 140-3 defines 4 security levels (from level 1 - the easiest to level 4 - the most stringent).
24In general, software may be certified at up to level 2.24In general, software may be certified at up to level 2.
2525
26Intel® Integrated Performance Primitives Cryptography (Intel(R) IPP Cryptography)26Intel® Cryptography Primitives Library
27provides building blocks of FIPS-mode API (such as self-tests, FIPS-approved27provides building blocks of FIPS-mode API (such as self-tests, FIPS-approved
28functionality status query) which can help the end users to fulfill FIPS level 1 requirements.28functionality status query) which can help the end users to fulfill FIPS level 1 requirements.
29Please, refer to [Covered Algorithms](#covered-algorithms) section for the full29Please, refer to [Covered Algorithms](#covered-algorithms) section for the full
30list of FIPS-Approved API which are covered with the selftests.30list of FIPS-Approved API which are covered with the selftests.
3131
32> NOTE: Intel(R) IPP Cryptography is not **FIPS-Certified** on its own but **FIPS-Compliant**:32> NOTE: Intel® Cryptography Primitives Library is not **FIPS-Certified** on its own but **FIPS-Compliant**:
33that means Intel(R) IPP Cryptography releases will have Cryptographic Algorithm33that means Intel® Cryptography Primitives Library releases will have Cryptographic Algorithm
34Validation Program (CAVP) testing and certification done but don't have full34Validation Program (CAVP) testing and certification done but don't have full
35Cryptographic Module Validation Program certificate as the context of the usage35Cryptographic Module Validation Program certificate as the context of the usage
36of Intel(R) IPP Cryptography's high-performant primitives depends on a more high-level application.36of Intel® Cryptography Primitives Library's high-performant primitives depends on a more high-level application.
3737
38For the results of CAVP testing please contact us via [Intel(R) Community](https://community.intel.com/t5/Intel-Integrated-Performance/bd-p/integrated-performance-primitives).38For the results of CAVP testing please refer to [Certification](./README.md#Certification) chapter.
3939
40Intel(R) IPP Cryptography may be built in FIPS-mode with IPPCP_FIPS_MODE=on40Intel® Cryptography Primitives Library may be built in FIPS-mode with IPPCP_FIPS_MODE=on
41configuration for ippcp and MBX_FIPS_MODE=on for crypto_MB (see details in [Build section](#build)).41configuration for ippcp and MBX_FIPS_MODE=on for crypto_MB (see details in [Build section](#build)).
4242
43Application, which uses Intel(R) IPP Cryptography may be **FIPS-Certified** by43Application, which uses Intel® Cryptography Primitives Library may be **FIPS-Certified** by
44matching FIPS 140 requirement and obtaining NIST certificate or also be **FIPS-Compliant** for their own customers.44matching FIPS 140 requirement and obtaining NIST certificate or also be **FIPS-Compliant** for their own customers.
4545
46Please, refer to [Level 1 Specific Requirements](#level-1-specific-requirements)46Please, refer to [Level 1 Specific Requirements](#level-1-specific-requirements)
47for the detailed description of what is done on Intel(R) IPP Cryptography-side47for the detailed description of what is done on Intel® Cryptography Primitives Library-side
48and what should be done by a more high-level application.48and what should be done by a more high-level application.
4949
50### Level 1 Specific Requirements50### Level 1 Specific Requirements
5151
52| # | Requirement | Note |52| # | Requirement | Note |
53|---|-------------|------|53|---|-------------|------|
54| 1 |Provide service to output module's name / identifier and version to User | Intel(R) IPP Cryptography provides such functionality via ippcpGetLibVersion() API for IPPCP and mbx_getversion() API for crypto_MB |54| 1 |Provide service to output module's name / identifier and version to User | Intel® Cryptography Primitives Library provides such functionality via ippcpGetLibVersion() API for IPPCP and mbx_getversion() API for crypto_MB |
55| 2 |For every service, output to the user whether it is a FIPS-approved service or not | Intel(R) IPP Cryptography provides such functionality via [ippcp_is_fips_approved_func](#api-for-an-indicator-if-a-function-is-fips-approved) for ippcp and [mbx_is_fips_approved_func](#crypto-multi-buffer-library-api-for-an-indicator-if-a-function-is-fips-approved) for crypto_MB |55| 2 |For every service, output to the user whether it is a FIPS-approved service or not | Intel® Cryptography Primitives Library provides such functionality via [ippcp_is_fips_approved_func](#api-for-an-indicator-if-a-function-is-fips-approved) for ippcp and [mbx_is_fips_approved_func](#crypto-multi-buffer-library-api-for-an-indicator-if-a-function-is-fips-approved) for crypto_MB |
56| 3 |Zeroize unprotected keys using manual/procedural destruction method | **User's application effort required** |56| 3 |Zeroize unprotected keys using manual/procedural destruction method | **User's application effort required** |
57| 4 |Run integrity selftest at power on for SW component | **User's application effort required** |57| 4 |Run integrity selftest at power on for SW component | **User's application effort required** |
58| 5 | Run known-answer or comparison or fault-detection selftest for individual crypto algorithms before first use | Intel(R) IPP Cryptography provides [fips_selftest_ippcp<algorithm name> API](#covered-algorithms) to run selftests. User's application should call them before the first use of algorithm (see [Example](#example-of-api-usage)) |58| 5 | Run known-answer or comparison or fault-detection selftest for individual crypto algorithms before first use | Intel® Cryptography Primitives Library provides [fips_selftest_ippcp<algorithm name> API](#covered-algorithms) to run selftests. User's application should call them before the first use of algorithm (see [Example](#example-of-api-usage)) |
59| 6 | Run pairwise consistency selftest for newly generated RSA/ECC keypair | Intel(R) IPP Cryptography provides [fips_selftest_ippcp<algorithm name> API](#covered-algorithms) to run selftests |59| 6 | Run pairwise consistency selftest for newly generated RSA/ECC keypair | Intel® Cryptography Primitives Library provides [fips_selftest_ippcp<algorithm name> API](#covered-algorithms) to run selftests |
60| 7 | Module to guarantee uniqueness of GSM key + IV | **User's application effort required** |60| 7 | Module to guarantee uniqueness of GCM key + IV | **User's application effort required** |
61| 8 | Module to guarantee XTS key1 != key2 | Intel(R) IPP Cryptography-side check |61| 8 | Module to guarantee XTS key1 != key2 | Intel® Cryptography Primitives Library-side check |
62| 9 | (non-production) Extract raw noise source output samples of RBG for quality analysis | DBRNG is currently out of the cryptography boundary |62| 9 | (non-production) Extract raw noise source output samples of RBG for quality analysis | DBRNG is currently out of the cryptography boundary |
63| 10| (non-production) Run crypto algorithm testing with NIST-generated vectors | Done offline by Intel(R) IPP Cryptography for the [covered algorithms](#covered-algorithms) |63| 10| (non-production) Run crypto algorithm testing with NIST-generated vectors | Done offline by Intel® Cryptography Primitives Library for the [covered algorithms](#covered-algorithms) |
6464
65For the implementation details about the steps in [Level 1 Specific Requirements](#level-1-specific-requirements)65For the implementation details about the steps in [Level 1 Specific Requirements](#level-1-specific-requirements)
66specified as **User's application effort required** please refer to the66specified as **User's application effort required** please refer to the
@@ -68,11 +68,11 @@ specified as **User's application effort required** please refer to the
6868
69## Cryptographic boundary69## Cryptographic boundary
7070
71### Intel(R) IPP Cryptography Structure Diagram71### Intel® Cryptography Primitives Library Structure Diagram
7272
73![Intel(R) IPP Cryptography Architecture](./data/images/README_FIPS-pictures-0-ippcp_architecture.png)73![Intel® Cryptography Primitives Library Architecture](./data/images/README_FIPS-pictures-0-ippcp_architecture.png)
7474
751. Intel(R) IPP Cryptography Library uses special structures (Spec and States)751. Intel® Cryptography Primitives Library uses special structures (Spec and States)
76to store context information and provides service functions to work with context (e.g. Initialization).76to store context information and provides service functions to work with context (e.g. Initialization).
7777
78> Note: Application responsible for the life-cycle of context. All memory allocations78> Note: Application responsible for the life-cycle of context. All memory allocations
@@ -82,7 +82,7 @@ and sanitizing happens on application side (including #3 in [Level 1 Specific Re
823. FIPS Self-tests API and service to query if algorithm is FIPS-Compliant823. FIPS Self-tests API and service to query if algorithm is FIPS-Compliant
83(API for #2, #5, #6 in [Level 1 Specific Requirements](#level-1-specific-requirements)).83(API for #2, #5, #6 in [Level 1 Specific Requirements](#level-1-specific-requirements)).
844. Version information (API for #1 in [Level 1 Specific Requirements](#level-1-specific-requirements)), Dispatcher control.844. Version information (API for #1 in [Level 1 Specific Requirements](#level-1-specific-requirements)), Dispatcher control.
855. Intel(R) IPP Cryptography chooses the optimal code path depending on855. Intel® Cryptography Primitives Library chooses the optimal code path depending on
86hardware features and application settings (via Dispatcher control API).86hardware features and application settings (via Dispatcher control API).
876. The algorithms may have multiple code branches for different hardware876. The algorithms may have multiple code branches for different hardware
88architecture and different compilation flags may be used to achieve better performance.88architecture and different compilation flags may be used to achieve better performance.
@@ -91,10 +91,10 @@ Refer to [Covered Algorithms](#covered-algorithms) section to check which
91algorithms are within the cryptographic boundary.91algorithms are within the cryptographic boundary.
9292
93> Note: For #10 in [Level 1 Specific Requirements](#level-1-specific-requirements)93> Note: For #10 in [Level 1 Specific Requirements](#level-1-specific-requirements)
94Intel(R) IPP Cryptography tests all code-paths and algorithms modes as94Intel® Cryptography Primitives Library tests all code-paths and algorithms modes as
95the implementation may vary depending on the target hardware.95the implementation may vary depending on the target hardware.
9696
97## Intel(R) IPP Cryptography Usage in the FIPS-mode97## Intel® Cryptography Primitives Library Usage in the FIPS-mode
9898
99### Build99### Build
100100
@@ -103,9 +103,9 @@ CMake flag -DIPPCP_FIPS_MODE:BOOL=on should be used to build ippcp library and
103self-tests and FIPS-support query (see [covered algorithms](#covered-algorithms) for the details).103self-tests and FIPS-support query (see [covered algorithms](#covered-algorithms) for the details).
104Selftests can be build in two modes - with internal memory allocation or without it.104Selftests can be build in two modes - with internal memory allocation or without it.
105105
106Configuration example for ippcp with Intel® C++ Compiler:106Configuration example for ippcp with Intel® oneAPI DPC++/C++ Compiler:
107107
108`CC=icc CXX=icpc cmake CMakeLists.txt -B_build -DARCH=intel64 -DIPPCP_FIPS_MODE:BOOL=on[-DIPPCP_SELFTEST_USE_MALLOC:BOOL=on]`108`CC=icx CXX=icpx cmake CMakeLists.txt -B_build -DARCH=intel64 -DIPPCP_FIPS_MODE:BOOL=on [-DIPPCP_SELFTEST_USE_MALLOC:BOOL=on]`
109109
110> Note: selftests with internal memory allocation uses malloc, which introduces110> Note: selftests with internal memory allocation uses malloc, which introduces
111a c runtime dependency.111a c runtime dependency.
@@ -118,7 +118,7 @@ Configuration example for crypto_MB with GCC:
118118
119### Example of API Usage119### Example of API Usage
120120
121#### Intel(R) IPP Cryptography Example121#### Intel® Cryptography Primitives Library Example
122122
123```cpp123```cpp
124124
@@ -132,7 +132,7 @@ if(!ippcp_is_fips_approved_func(AESEncryptCBC)) {
132// 2. Run the Selftest132// 2. Run the Selftest
133fips_test_status selftest_status = IPPCP_ALGO_SELFTEST_OK;133fips_test_status selftest_status = IPPCP_ALGO_SELFTEST_OK;
134134
135// Query buffer size for the test and allocate it (it can be done on Intel(R) IPP Cryptography side with IPPCP_SELFTEST_USE_MALLOC=on)135// Query buffer size for the test and allocate it (it can be done on Intel® Cryptography Primitives Library side with IPPCP_SELFTEST_USE_MALLOC=on)
136int BuffSize = 0;136int BuffSize = 0;
137selftest_status += fips_selftest_ippsAESEncryptDecrypt_get_size(&BuffSize);137selftest_status += fips_selftest_ippsAESEncryptDecrypt_get_size(&BuffSize);
138std::vector<Ipp8u> pBuff(BuffSize);138std::vector<Ipp8u> pBuff(BuffSize);
@@ -147,7 +147,7 @@ if (IPPCP_ALGO_SELFTEST_OK != selftest_status) {
147147
148//------ FIPS-required part ends (only needed before the first use of algorithm)148//------ FIPS-required part ends (only needed before the first use of algorithm)
149149
150//------ Common Intel(R) IPP Cryptography usage150//------ Common Intel® Cryptography Primitives Library usage
151// ...151// ...
152IppStatus status = ippsAESEncryptCBC(plain, cipher, block_size, pAES, cipherV);152IppStatus status = ippsAESEncryptCBC(plain, cipher, block_size, pAES, cipherV);
153// ...153// ...
@@ -183,10 +183,10 @@ mbx_nistp256_ecdh_mb8(sharedBA, prvB, pubAx, pubAy, pubAz_curr, 0);
183183
184### Covered Algorithms184### Covered Algorithms
185185
186#### Intel(R) IPP Cryptography186#### Intel® Cryptography Primitives Library
187187
188Each API from the list is covered with the selftest fips_selftest_ipps<API_name>188Each API from the list is covered with the selftest fips_selftest_ipps<API_name>
189available in Intel(R) IPP Cryptography build in FIPS mode.189available in Intel® Cryptography Primitives Library build in FIPS mode.
190190
191##### AES191##### AES
192192
@@ -316,6 +316,15 @@ fips_test_status fips_selftest_ippsGFpECSharedSecretDH (Ipp8u *pGFpBuff Ipp8u *p
316valid buffer for selftest of size indicated by `fips_selftest_ippsGFpECSignVerifyDSA_get_size_GFpEC_buff`316valid buffer for selftest of size indicated by `fips_selftest_ippsGFpECSignVerifyDSA_get_size_GFpEC_buff`
317and `pDataBuff` is the valid buffer for selftest of size indicated by `fips_selftest_ippsGFpECSignVerifyDSA_get_size_data_buff`.317and `pDataBuff` is the valid buffer for selftest of size indicated by `fips_selftest_ippsGFpECSignVerifyDSA_get_size_data_buff`.
318318
319##### LMS verify
320
321```cpp
322fips_test_status fips_selftest_ippsLMSVerify_get_size (int *pBuffSize);
323fips_test_status fips_selftest_ippsLMSVerify (Ipp8u *pBuffer);
324```
325
326, where `pBuffer` is the valid buffer for selftest of size indicated by `fips_selftest_ippsLMSVerify_get_size`.
327
319##### API for an indicator if a function is FIPS-approved328##### API for an indicator if a function is FIPS-approved
320329
321```cpp330```cpp
diff --git a/THIRD-PARTY-PROGRAMS.txt b/THIRD-PARTY-PROGRAMS.txt
index ba4c3b5..d84bd6c 100644
--- a/THIRD-PARTY-PROGRAMS.txt
+++ b/THIRD-PARTY-PROGRAMS.txt
@@ -1,4 +1,4 @@
1Intel(R) Integrated Performance Primitives Cryptography Third Party Programs File1Intel(R) Cryptography Primitives Library Third Party Programs File
22
3This file contains the list of third party software (“third party programs”) contained in the Intel software and their required notices and/or license terms.3This file contains the list of third party software (“third party programs”) contained in the Intel software and their required notices and/or license terms.
4This third party software, even if included with the distribution of the Intel software, may be governed by separate license terms, including without limitation, third party license terms, other Intel software license terms, and open source software license terms.4This third party software, even if included with the distribution of the Intel software, may be governed by separate license terms, including without limitation, third party license terms, other Intel software license terms, and open source software license terms.
diff --git a/debian/changelog b/debian/changelog
index 4cc1686..10326db 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,15 @@
1ipp-crypto (1:1.0.0-0ubuntu1) plucky; urgency=medium
2
3 * d/changelog : add epoch to version since upstream uses now
4 semantic versioning
5 * d/control : update package names for ipcrypto-mb and libippcp
6 * d/control : change upstream vcs and description
7 * d/p : refresh patch
8 * New upstream version 1.0.0
9 * d/watch : upstream repo renaming and versioning scheme change
10
11 -- Hector Cao <hector.cao@canonical.com> Mon, 25 Nov 2024 12:45:16 +0100
12
1ipp-crypto (2021.12.1-0ubuntu1) oracular; urgency=medium13ipp-crypto (2021.12.1-0ubuntu1) oracular; urgency=medium
214
3 * New upstream release (LP: #2075496).15 * New upstream release (LP: #2075496).
diff --git a/debian/control b/debian/control
index 9f0a92a..bcdc780 100644
--- a/debian/control
+++ b/debian/control
@@ -12,15 +12,15 @@ Build-Depends: debhelper-compat (=13),
12 nasm,12 nasm,
13 libssl-dev13 libssl-dev
14Standards-Version: 4.6.214Standards-Version: 4.6.2
15Homepage: https://github.com/intel/ipp-crypto15Homepage: https://github.com/intel/cryptography-primitives
1616
17Package: libippcp1117Package: libippcp12
18Section: libs18Section: libs
19Architecture: amd6419Architecture: amd64
20Depends: ${shlibs:Depends}, ${misc:Depends}20Depends: ${shlibs:Depends}, ${misc:Depends}
21Pre-Depends: ${misc:Pre-Depends}21Pre-Depends: ${misc:Pre-Depends}
22Description: Intel® Integrated Performance Primitives Cryptography22Description: Intel® Cryptography Primitives Library
23 Intel® Integrated Performance Primitives (Intel® IPP) Cryptography is a23 Intel® Cryptography Primitives Library (Intel® IPP) Cryptography is a
24 secure, fast and lightweight library of building blocks for cryptography,24 secure, fast and lightweight library of building blocks for cryptography,
25 highly-optimized for various Intel® CPUs.25 highly-optimized for various Intel® CPUs.
26 .26 .
@@ -37,20 +37,20 @@ Description: Intel® Integrated Performance Primitives Cryptography
37Package: libippcp-dev37Package: libippcp-dev
38Section: libdevel38Section: libdevel
39Architecture: amd6439Architecture: amd64
40Depends: ${misc:Depends}, libippcp11 (= ${binary:Version})40Depends: ${misc:Depends}, libippcp12 (= ${binary:Version})
41Pre-Depends: ${misc:Pre-Depends}41Pre-Depends: ${misc:Pre-Depends}
42Description: Intel® Integrated Performance Primitives Cryptography development files42Description: Intel® Cryptography Primitives Library development files
43 Intel® Integrated Performance Primitives (Intel® IPP) Cryptography is a43 Intel® Cryptography Primitives Library (Intel® IPP) Cryptography is a
44 secure, fast and lightweight library of building blocks for cryptography,44 secure, fast and lightweight library of building blocks for cryptography,
45 highly-optimized for various Intel® CPUs.45 highly-optimized for various Intel® CPUs.
46 This package contains the development libraries and headers.46 This package contains the development libraries and headers.
4747
48Package: libcrypto-mb1148Package: libcrypto-mb12
49Section: libs49Section: libs
50Architecture: amd6450Architecture: amd64
51Depends: ${shlibs:Depends}, ${misc:Depends}51Depends: ${shlibs:Depends}, ${misc:Depends}
52Pre-Depends: ${misc:Pre-Depends}52Pre-Depends: ${misc:Pre-Depends}
53Description: Intel® Integrated Performance Primitives Cryptography Multi-buffer53Description: Intel® Cryptography Primitives Library Multi-buffer
54 Some of the cryptography algorithms cannot be parallelized due to54 Some of the cryptography algorithms cannot be parallelized due to
55 their specificity (eg the RSA algorithm).55 their specificity (eg the RSA algorithm).
56 The way to get high-performance implementations of such cryptographic56 The way to get high-performance implementations of such cryptographic
@@ -70,7 +70,7 @@ Description: Intel® Integrated Performance Primitives Cryptography Multi-buffer
70Package: libcrypto-mb-dev70Package: libcrypto-mb-dev
71Section: libdevel71Section: libdevel
72Architecture: amd6472Architecture: amd64
73Depends: ${misc:Depends}, libcrypto-mb11 (= ${binary:Version})73Depends: ${misc:Depends}, libcrypto-mb12 (= ${binary:Version})
74Pre-Depends: ${misc:Pre-Depends}74Pre-Depends: ${misc:Pre-Depends}
75Description: Intel® IPP Cryptography Multi-buffer development files75Description: Intel® IPP Cryptography Multi-buffer development files
76 This package contains the development libraries and headers.76 This package contains the development libraries and headers.
diff --git a/debian/libcrypto-mb11.install b/debian/libcrypto-mb12.install
77similarity index 100%77similarity index 100%
78rename from debian/libcrypto-mb11.install78rename from debian/libcrypto-mb11.install
79rename to debian/libcrypto-mb12.install79rename to debian/libcrypto-mb12.install
diff --git a/debian/libippcp11.install b/debian/libippcp12.install
80similarity index 100%80similarity index 100%
81rename from debian/libippcp11.install81rename from debian/libippcp11.install
82rename to debian/libippcp12.install82rename to debian/libippcp12.install
diff --git a/debian/patches/0001-Undefine-FORTIFY_SOURCE-before-define.patch b/debian/patches/0001-Undefine-FORTIFY_SOURCE-before-define.patch
index 5784def..6f6bc6d 100644
--- a/debian/patches/0001-Undefine-FORTIFY_SOURCE-before-define.patch
+++ b/debian/patches/0001-Undefine-FORTIFY_SOURCE-before-define.patch
@@ -1,6 +1,6 @@
1From bb1d2b75834f9e89457aa4ae08552e6fa870375c Mon Sep 17 00:00:00 20011From 1018ebdc0543702edbedb81c57d432c46955a9da Mon Sep 17 00:00:00 2001
2From: Hector Cao <hector.cao@canonical.com>2From: Hector Cao <hector.cao@canonical.com>
3Date: Tue, 20 Feb 2024 14:45:02 +00003Date: Mon, 4 Nov 2024 01:06:29 +0100
4Subject: [PATCH] Undefine FORTIFY_SOURCE before define4Subject: [PATCH] Undefine FORTIFY_SOURCE before define
55
6Some toolchains have FORTIFY_SOURCE defined and wlil raise warning6Some toolchains have FORTIFY_SOURCE defined and wlil raise warning
@@ -14,44 +14,44 @@ So, undefine FORTIFY_SOURCE before defining it to get rid of this
14 3 files changed, 3 insertions(+), 3 deletions(-)14 3 files changed, 3 insertions(+), 3 deletions(-)
1515
16diff --git a/sources/cmake/linux/GNU8.2.0.cmake b/sources/cmake/linux/GNU8.2.0.cmake16diff --git a/sources/cmake/linux/GNU8.2.0.cmake b/sources/cmake/linux/GNU8.2.0.cmake
17index 96658a8..1d08d80 10064417index 55e60ae..5a4e431 100644
18--- a/sources/cmake/linux/GNU8.2.0.cmake18--- a/sources/cmake/linux/GNU8.2.0.cmake
19+++ b/sources/cmake/linux/GNU8.2.0.cmake19+++ b/sources/cmake/linux/GNU8.2.0.cmake
20@@ -74,7 +74,7 @@ if ((${ARCH} MATCHES "ia32") OR (NOT NONPIC_LIB))20@@ -95,7 +95,7 @@ endif(${ARCH} MATCHES "ia32")
21 endif()21 # Optimization level = 3, no-debug definition (turns off asserts), warnings=errors
22 22 set(CMAKE_C_FLAGS_RELEASE " -O3 -DNDEBUG -Werror")
23 # Security flag that adds compile-time and run-time checks23 # Security flag that adds compile-time and run-time checks
24-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_FORTIFY_SOURCE=2")24-set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -D_FORTIFY_SOURCE=2")
25+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2")25+set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2")
26 26
27 if(NOT NONPIC_LIB)27 set(w7_opt "${w7_opt} -march=pentium4 -msse2")
28 # Position Independent Execution (PIE)28 set(s8_opt "${s8_opt} -march=core2 -mssse3")
29diff --git a/sources/ippcp/CMakeLists.txt b/sources/ippcp/CMakeLists.txt29diff --git a/sources/ippcp/CMakeLists.txt b/sources/ippcp/CMakeLists.txt
30index 516fc1e..e01ab0b 10064430index 1864c1a..18f8358 100644
31--- a/sources/ippcp/CMakeLists.txt31--- a/sources/ippcp/CMakeLists.txt
32+++ b/sources/ippcp/CMakeLists.txt32+++ b/sources/ippcp/CMakeLists.txt
33@@ -538,7 +538,7 @@ if(MERGED_BLD)33@@ -560,7 +560,7 @@ if(MERGED_BLD)
34 if(${ARCH} MATCHES "ia32")34 if(UNIX)
35 set_source_files_properties(${DISPATCHER_C_SOURCES} PROPERTIES COMPILE_FLAGS "${CC_FLAGS_INLINE_ASM_UNIX_IA32} -D_GNU_SOURCE -D_FORTIFY_SOURCE=2 -O2")35 set(DISPATCHER_C_SOURCES_COMPILE_FLAGS "-D_GNU_SOURCE -O2")
36 else()36 if(CMAKE_BUILD_TYPE STREQUAL "Release")
37- set_source_files_properties(${DISPATCHER_C_SOURCES} PROPERTIES COMPILE_FLAGS "${CC_FLAGS_INLINE_ASM_UNIX_INTEL64} -D_GNU_SOURCE -D_FORTIFY_SOURCE=2 -O2")37- set(DISPATCHER_C_SOURCES_COMPILE_FLAGS "${DISPATCHER_C_SOURCES_COMPILE_FLAGS} -D_FORTIFY_SOURCE=2")
38+ set_source_files_properties(${DISPATCHER_C_SOURCES} PROPERTIES COMPILE_FLAGS "${CC_FLAGS_INLINE_ASM_UNIX_INTEL64} -D_GNU_SOURCE -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -O2")38+ set(DISPATCHER_C_SOURCES_COMPILE_FLAGS "${DISPATCHER_C_SOURCES_COMPILE_FLAGS} -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2")
39 endif()39 endif()
40 endif()
41 40
41 if(${ARCH} MATCHES "ia32")
42diff --git a/sources/ippcp/crypto_mb/src/cmake/linux/GNU.cmake b/sources/ippcp/crypto_mb/src/cmake/linux/GNU.cmake42diff --git a/sources/ippcp/crypto_mb/src/cmake/linux/GNU.cmake b/sources/ippcp/crypto_mb/src/cmake/linux/GNU.cmake
43index 327652d..1756da0 10064443index e88ddf5..a4e8d65 100644
44--- a/sources/ippcp/crypto_mb/src/cmake/linux/GNU.cmake44--- a/sources/ippcp/crypto_mb/src/cmake/linux/GNU.cmake
45+++ b/sources/ippcp/crypto_mb/src/cmake/linux/GNU.cmake45+++ b/sources/ippcp/crypto_mb/src/cmake/linux/GNU.cmake
46@@ -31,7 +31,7 @@ set(CMAKE_C_FLAGS_SECURITY "${CMAKE_C_FLAGS_SECURITY} -Wformat -Wformat-security46@@ -70,7 +70,7 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-pointer-to-int-cast")
47 if(${CMAKE_BUILD_TYPE} STREQUAL "Release")47 set(CMAKE_C_FLAGS_RELEASE " -O3 -DNDEBUG")
48 if(NOT DEFINED NO_FORTIFY_SOURCE)48 if(NOT DEFINED NO_FORTIFY_SOURCE)
49 # Security flag that adds compile-time and run-time checks. 49 # Security flag that adds compile-time and run-time checks
50- set(CMAKE_C_FLAGS_SECURITY "${CMAKE_C_FLAGS_SECURITY} -D_FORTIFY_SOURCE=2")50- set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -D_FORTIFY_SOURCE=2")
51+ set(CMAKE_C_FLAGS_SECURITY "${CMAKE_C_FLAGS_SECURITY} -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2")51+ set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2")
52 endif()
53 endif()52 endif()
54 53
54 set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")
55-- 55--
562.40.1562.43.0
5757
diff --git a/debian/watch b/debian/watch
index 6083681..1bbe8a6 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,4 +1,4 @@
1version=41version=4
2opts="filenamemangle=s%(?:.*?)ippcp_(\d[\d.][\d.]*)\.tar\.gz%@PACKAGE@-$1.tar.gz%" \2opts="filenamemangle=s%(?:.*?)v(\d[\d.][\d.]*)\.tar\.gz%@PACKAGE@-$1.tar.gz%" \
3 https://github.com/intel/ipp-crypto/tags \3 https://github.com/intel/cryptography-primitives/tags \
4 (?:.*?/)?ippcp_?(\d[\d.][\d.]*)\.tar\.gz debian uupdate4 (?:.*?/)?v(\d[\d.][\d.]*)\.tar\.gz debian uupdate
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index adeccbc..4e20d35 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -15,7 +15,7 @@
15#=========================================================================15#=========================================================================
1616
17#17#
18# Intel® Integrated Performance Primitives Cryptography (Intel® IPP Cryptography) examples18# Intel® Cryptography Primitives Library examples
19#19#
2020
21# List of examples for targets generation21# List of examples for targets generation
@@ -38,6 +38,12 @@ set(IPPCP_EXAMPLES
38 # SMS4 examples38 # SMS4 examples
39 sms4/sms4-128-cbc-encryption.cpp39 sms4/sms4-128-cbc-encryption.cpp
40 sms4/sms4-128-cbc-decryption.cpp40 sms4/sms4-128-cbc-decryption.cpp
41 # Hash examples
42 hash/sm3_hash_rmf.cpp
43 # Post-quantum algorithms examples
44 post-quantum/lms_m32_h5_w8_verification.cpp
45 # Elliptic curve algorithms examples
46 ecdsa/ecdsa-256r1-sign.cpp
41 )47 )
4248
43cmake_policy(SET CMP0003 NEW)49cmake_policy(SET CMP0003 NEW)
@@ -85,7 +91,7 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_LIST_DIR)
85# Build with standalone library91# Build with standalone library
86 cmake_minimum_required(VERSION 3.1)92 cmake_minimum_required(VERSION 3.1)
8793
88 project("Intel IPP Cryptography Examples" CXX)94 project("Intel Cryptography Primitives Library Examples" CXX)
89 set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "" FORCE)95 set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "" FORCE)
9096
91 option(BUILD_EXAMPLES "Build examples" ON)97 option(BUILD_EXAMPLES "Build examples" ON)
@@ -94,7 +100,7 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_LIST_DIR)
94 find_package(IPPCrypto REQUIRED MODULE)100 find_package(IPPCrypto REQUIRED MODULE)
95101
96 if (NOT IPPCRYPTO_FOUND)102 if (NOT IPPCRYPTO_FOUND)
97 message(FATAL_ERROR "No Intel IPP Cryptography library found on the system. To build examples with pre-built library, please specify -DIPPCRYPTO_ROOT_DIR=<path> option, where <path> is the path to directory that contains include/ and lib/ folders of Intel IPP Cryptography product.")103 message(FATAL_ERROR "No Intel Cryptography Primitives Library found on the system. To build examples with pre-built library, please specify -DIPPCRYPTO_ROOT_DIR=<path> option, where <path> is the path to directory that contains include/ and lib/ folders of Intel Cryptography Primitives Library product.")
98 endif()104 endif()
99105
100 # Define library to link106 # Define library to link
@@ -108,7 +114,7 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_LIST_DIR)
108else()114else()
109# Build with library sources115# Build with library sources
110 if(NOT BUILD_EXAMPLES OR NOT MERGED_BLD)116 if(NOT BUILD_EXAMPLES OR NOT MERGED_BLD)
111 message(FATAL_ERROR "Only merged library build is currently supported for Intel IPP Cryptography examples. Use -DMERGED_BLD:BOOL=on options.")117 message(FATAL_ERROR "Only merged library build is currently supported for Intel Cryptography Primitives Library examples. Use -DMERGED_BLD:BOOL=on options.")
112 endif()118 endif()
113endif()119endif()
114120
diff --git a/examples/FindIPPCrypto.cmake b/examples/FindIPPCrypto.cmake
index 454fb47..c8b35f4 100644
--- a/examples/FindIPPCrypto.cmake
+++ b/examples/FindIPPCrypto.cmake
@@ -15,7 +15,7 @@
15#=========================================================================15#=========================================================================
1616
17#17#
18# Intel® Integrated Performance Primitives Cryptography (Intel® IPP Cryptography)18# Intel® Cryptography Primitives Library
19# library detection routine.19# library detection routine.
20#20#
21# If found the following variables will be available:21# If found the following variables will be available:
@@ -29,11 +29,11 @@ include(FindPackageHandleStandardArgs)
2929
30macro(ippcp_not_found)30macro(ippcp_not_found)
31 set(IPPCRYPTO_FOUND OFF)31 set(IPPCRYPTO_FOUND OFF)
32 set(IPPCRYPTO_ROOT_DIR "${IPPCRYPTO_ROOT_DIR}" CACHE PATH "Path to Intel IPP Cryptography root directory")32 set(IPPCRYPTO_ROOT_DIR "${IPPCRYPTO_ROOT_DIR}" CACHE PATH "Path to Intel Cryptography Primitives Library root directory")
33 return()33 return()
34endmacro()34endmacro()
3535
36# Try to find Intel IPP Cryptography library on the system if root dir is not defined externally36# Try to find Intel Cryptography Primitives Library on the system if root dir is not defined externally
37if (NOT IPPCRYPTO_ROOT_DIR OR NOT EXISTS "${IPPCRYPTO_ROOT_DIR}/include/ippcp.h")37if (NOT IPPCRYPTO_ROOT_DIR OR NOT EXISTS "${IPPCRYPTO_ROOT_DIR}/include/ippcp.h")
38 set(ippcp_search_paths38 set(ippcp_search_paths
39 ${CMAKE_CURRENT_SOURCE_DIR}/../.build39 ${CMAKE_CURRENT_SOURCE_DIR}/../.build
@@ -56,7 +56,7 @@ if (NOT IPPCRYPTO_ROOT_DIR OR NOT EXISTS "${IPPCRYPTO_ROOT_DIR}/include/ippcp.h"
56 find_path(IPPCRYPTO_ROOT_DIR include/ippcp.h PATHS ${ippcp_search_paths})56 find_path(IPPCRYPTO_ROOT_DIR include/ippcp.h PATHS ${ippcp_search_paths})
57endif()57endif()
5858
59set(IPPCRYPTO_INCLUDE_DIRS "${IPPCRYPTO_ROOT_DIR}/include" CACHE PATH "Path to Intel IPP Cryptography library include directory" FORCE)59set(IPPCRYPTO_INCLUDE_DIRS "${IPPCRYPTO_ROOT_DIR}/include" CACHE PATH "Path to Intel Cryptography Primitives Library include directory" FORCE)
6060
61# Check found directory61# Check found directory
62if(NOT IPPCRYPTO_ROOT_DIR62if(NOT IPPCRYPTO_ROOT_DIR
@@ -107,9 +107,9 @@ endforeach()
107107
108list(REMOVE_DUPLICATES IPPCRYPTO_LIBRARIES)108list(REMOVE_DUPLICATES IPPCRYPTO_LIBRARIES)
109109
110message(STATUS "Found Intel IPP Cryptography at: ${IPPCRYPTO_ROOT_DIR}")110message(STATUS "Found Intel Cryptography Primitives Library at: ${IPPCRYPTO_ROOT_DIR}")
111111
112set(IPPCRYPTO_FOUND ON)112set(IPPCRYPTO_FOUND ON)
113set(IPPCRYPTO_ROOT_DIR "${IPPCRYPTO_ROOT_DIR}" CACHE PATH "Path to Intel IPP Cryptography root directory")113set(IPPCRYPTO_ROOT_DIR "${IPPCRYPTO_ROOT_DIR}" CACHE PATH "Path to Intel Cryptography Primitives Library root directory")
114set(IPPCRYPTO_INCLUDE_DIRS "${IPPCRYPTO_INCLUDE_DIRS}" CACHE PATH "Path to Intel IPP Cryptography include directory")114set(IPPCRYPTO_INCLUDE_DIRS "${IPPCRYPTO_INCLUDE_DIRS}" CACHE PATH "Path to Intel Cryptography Primitives Library include directory")
115set(IPPCRYPTO_LIBRARIES "${IPPCRYPTO_LIBRARIES}" CACHE STRING "Intel IPP Cryptography libraries")115set(IPPCRYPTO_LIBRARIES "${IPPCRYPTO_LIBRARIES}" CACHE STRING "Intel Cryptography Primitives Library libraries")
diff --git a/examples/README.md b/examples/README.md
index 445eb45..422be2d 100644
--- a/examples/README.md
+++ b/examples/README.md
@@ -1,4 +1,4 @@
1# Building usage examples of Intel® Integrated Performance Primitives Cryptography (Intel® IPP Cryptography) library1# Building usage examples of Intel® Cryptography Primitives Library
22
3## System requirements3## System requirements
44
@@ -20,9 +20,9 @@ Only merged library (cmake option `-DMERGED_BLD:BOOL=ON`) builds are supported f
20 `cmake CMakeLists.txt -B_build -G<vs_generator> [-T"Intel® C++ Compiler <version>"] -DBUILD_EXAMPLES:BOOL=ON`20 `cmake CMakeLists.txt -B_build -G<vs_generator> [-T"Intel® C++ Compiler <version>"] -DBUILD_EXAMPLES:BOOL=ON`
2121
22 For the Visual Studio\* generators options, please refer to the CMake help.22 For the Visual Studio\* generators options, please refer to the CMake help.
23 The toolchain switch is optional, specify it if you want to build the library and examples using Intel® C++ Compiler.23 The toolchain switch is optional, specify it if you want to build the library and examples using Intel® oneAPI DPC++/C++ Compiler.
2424
25 For the list of supported compiler versions or other cmake build options, please refer to the library root README.md file.25 For the list of supported compiler versions or other cmake build options, please refer to the library root [BUILD.md](../BUILD.md) file.
2626
272. On Linux\*/macOS\*, build with `make -j8 <target>`. You can use the following targets:272. On Linux\*/macOS\*, build with `make -j8 <target>`. You can use the following targets:
2828
@@ -50,17 +50,17 @@ Only merged library (cmake option `-DMERGED_BLD:BOOL=ON`) builds are supported f
50 `cmake CMakeLists.txt -B_build`50 `cmake CMakeLists.txt -B_build`
5151
52 On Windows\* OS it is required to specify a generator (`-G` option) and optionally a toolchain (`-T` option)52 On Windows\* OS it is required to specify a generator (`-G` option) and optionally a toolchain (`-T` option)
53 to build with Intel® C++ Compiler. Example:53 to build with Intel® oneAPI DPC++/C++ Compiler. Example:
5454
55 `cmake CMakeLists.txt -B_build -G<vs_generator> [-T"Intel C++ Compiler <version>"]`55 `cmake CMakeLists.txt -B_build -G<vs_generator> [-T"Intel C++ Compiler <version>"]`
5656
57 For the Visual Studio\* generators options, please refer to the CMake help.57 For the Visual Studio\* generators options, please refer to the CMake help.
5858
592. The build system will scan the system for the Intel IPP Cryptography library.592. The build system will scan the system for the Intel® Cryptography Primitives Library.
60 If it is found, you’ll see the following message:60 If it is found, you’ll see the following message:
6161
62 ```62 ```
63 -- Found Intel IPP Cryptography at: /home/user/intel/ippcp63 -- Found Intel® Cryptography Primitives Library at: /home/user/intel/ippcp
64 -- Configuring done64 -- Configuring done
65 ```65 ```
6666
@@ -70,7 +70,7 @@ Only merged library (cmake option `-DMERGED_BLD:BOOL=ON`) builds are supported f
703. Run the build process as described in the [Build with library sources](#build-with-library-sources).703. Run the build process as described in the [Build with library sources](#build-with-library-sources).
7171
7272
73# How to add a new example into Intel IPP Cryptography library:73# How to add a new example into Intel® Cryptography Primitives Library:
7474
751. Choose a category (a folder), where to put the example, and a filename. Use751. Choose a category (a folder), where to put the example, and a filename. Use
76 existing folders where applicable.76 existing folders where applicable.
@@ -89,7 +89,7 @@ Only merged library (cmake option `-DMERGED_BLD:BOOL=ON`) builds are supported f
894. Add the example to the build: open *examples/CMakeLists.txt* file and add the894. Add the example to the build: open *examples/CMakeLists.txt* file and add the
90 new file to the *IPPCP_EXAMPLES* list.90 new file to the *IPPCP_EXAMPLES* list.
9191
925. Make sure it can be built using Intel IPP Cryptography examples build procedure, and it925. Make sure it can be built using Intel® Cryptography Primitives Library examples build procedure, and it
93 works correctly.93 works correctly.
9494
95You are ready to submit a pull request!95You are ready to submit a pull request!
diff --git a/examples/ecdsa/categoryOptions.cmake b/examples/ecdsa/categoryOptions.cmake
96new file mode 10064496new file mode 100644
index 0000000..70c7535
--- /dev/null
+++ b/examples/ecdsa/categoryOptions.cmake
@@ -0,0 +1,20 @@
1#=========================================================================
2# Copyright (C) 2024 Intel Corporation
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#=========================================================================
16
17set(ecdsa_CATEGORY_COMMON_SOURCES
18 ${CMAKE_CURRENT_SOURCE_DIR}/utils/bignum.cpp
19 ${CMAKE_CURRENT_SOURCE_DIR}/utils/utils.cpp
20 )
diff --git a/examples/ecdsa/ecdsa-256r1-sign.cpp b/examples/ecdsa/ecdsa-256r1-sign.cpp
0new file mode 10064421new file mode 100644
index 0000000..ab78686
--- /dev/null
+++ b/examples/ecdsa/ecdsa-256r1-sign.cpp
@@ -0,0 +1,141 @@
1/*************************************************************************
2* Copyright (C) 2024 Intel Corporation
3*
4* Licensed under the Apache License, Version 2.0 (the "License");
5* you may not use this file except in compliance with the License.
6* You may obtain a copy of the License at
7*
8* http://www.apache.org/licenses/LICENSE-2.0
9*
10* Unless required by applicable law or agreed to in writing, software
11* distributed under the License is distributed on an "AS IS" BASIS,
12* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13* See the License for the specific language governing permissions and
14* limitations under the License.
15*************************************************************************/
16
17// /*!
18// *
19// * \file
20// *
21// * \brief ECDSA signature example
22// *
23// * This example showcases the utilization of the elliptic curve
24// * digital signature algorithm(ECDSA) over NIST P-256 curve with
25// * DSA scheme for signature generation.
26// *
27// */
28
29#include <string.h>
30#include <memory>
31
32#include <vector>
33
34#include "ippcp.h"
35#include "bignum.h"
36#include "utils.h"
37#include "examples_common.h"
38
39/* Message digest */
40static const Ipp8u msg_digest[] = { 0x56,0xec,0x33,0xa1,0xa6,0xe7,0xc4,0xdb,0x77,0x03,0x90,0x1a,0xfb,0x2e,0x1e,0x4e,
41 0x50,0x09,0xfe,0x04,0x72,0x89,0xc5,0xc2,0x42,0x13,0x6c,0xe3,0xb7,0xf6,0xac,0x44 };
42
43/* Regular and ephemeral private keys */
44static const Ipp8u d[] = { 0x64,0xb4,0x72,0xda,0x6d,0xa5,0x54,0xca,0xac,0x3e,0x4e,0x0b,0x13,0xc8,0x44,0x5b,
45 0x1a,0x77,0xf4,0x59,0xee,0xa8,0x4f,0x1f,0x58,0x8b,0x5f,0x71,0x3d,0x42,0x9b,0x51 };
46static const Ipp8u k[] = { 0xde,0x68,0x2a,0x64,0x87,0x07,0x67,0xb9,0x33,0x5d,0x4f,0x82,0x47,0x62,0x4a,0x3b,
47 0x7f,0x3c,0xe9,0xf9,0x45,0xf2,0x80,0xa2,0x61,0x6a,0x90,0x4b,0xb1,0xbb,0xa1,0x94 };
48
49/* signature */
50static const Ipp8u r[] = { 0xac,0xc2,0xc8,0x79,0x6f,0x5e,0xbb,0xca,0x7a,0x5a,0x55,0x6a,0x1f,0x6b,0xfd,0x2a,
51 0xed,0x27,0x95,0x62,0xd6,0xe3,0x43,0x88,0x5b,0x79,0x14,0xb5,0x61,0x80,0xac,0xf3 };
52static const Ipp8u s[] = { 0x03,0x89,0x05,0xcc,0x2a,0xda,0xcd,0x3c,0x5a,0x17,0x6f,0xe9,0x18,0xb2,0x97,0xef,
53 0x1c,0x37,0xf7,0x2b,0x26,0x76,0x6c,0x78,0xb2,0xa6,0x05,0xca,0x19,0x78,0xf7,0x8b };
54
55static const unsigned int primeBitSize = 256;
56
57static const unsigned int ordWordSize = 8;
58static const unsigned int msgWordSize = 8;
59static const unsigned int primeWordSize = 8;
60
61/*! Main function */
62int main(void)
63{
64 /* Internal function status */
65 IppStatus status = ippStsNoErr;
66
67 /* Size of the context of a GF field. It will be set up in ippsGFpGetSize() */
68 int GFpBuffSize = 0;
69
70 /* Size of the context of an elliptic curve field. It will be set up in ippsGFpECGetSize() */
71 int GFpECBuffSize = 0;
72
73 /* Size of the scratch buffer */
74 int scratchSize = 0;
75
76 /* Create integers R and S for the digital signature */
77 BigNumber bnR(NULL, ordWordSize, ippBigNumPOS);
78 BigNumber bnS(NULL, ordWordSize, ippBigNumPOS);
79
80 /* Initialize message digest to be digitally signed i.e. encrypted with a private key */
81 BigNumber bnMsgDigest((const Ipp32u *)msg_digest, msgWordSize, ippBigNumPOS);
82
83 /* Initialize regular and ephemeral private keys of the signer */
84 BigNumber bnRegPrivate((const Ipp32u *)d, primeWordSize, ippBigNumPOS);
85 BigNumber bnEphPrivate((const Ipp32u *)k, primeWordSize, ippBigNumPOS);
86
87 /* Initialize known digital signatures */
88 BigNumber bnRref((const Ipp32u *)r, ordWordSize, ippBigNumPOS);
89 BigNumber bnSref((const Ipp32u *)s, ordWordSize, ippBigNumPOS);
90
91 /* 1. Get the size of the context of a GF field */
92 status = ippsGFpGetSize(primeBitSize, &GFpBuffSize);
93 if (!checkStatus("ippsGFpGetSize", ippStsNoErr, status))
94 return status;
95
96 /* 2. Allocate memory for the GF field context */
97 std::vector<Ipp8u> pGFpBuff(GFpBuffSize);
98 IppsGFpState *pGF = (IppsGFpState *)(pGFpBuff.data());
99
100 /* 3. Initialize the context of a prime finite field GF */
101 status = ippsGFpInitFixed(primeBitSize, ippsGFpMethod_p256r1(), pGF);
102 if (!checkStatus("ippsGFpInitFixed", ippStsNoErr, status))
103 return status;
104
105 /* 4. Get the size of an elliptic curve over the finite field */
106 status = ippsGFpECGetSize(pGF, &GFpECBuffSize);
107 if (!checkStatus("ippsGFpECGetSize", ippStsNoErr, status))
108 return status;
109
110 /* 5. Allocate memory for elliptic curve cryptosystem */
111 std::vector<Ipp8u> pGFpECBuff(GFpECBuffSize);
112 IppsGFpECState *pEC = (IppsGFpECState *)(pGFpECBuff.data());
113
114 /* 6. Initialize the context for the cryptosystem based on a standard elliptic curve */
115 status = ippsGFpECInitStd256r1(pGF, pEC);
116 if (!checkStatus("ippsGFpECInitStd256r1", ippStsNoErr, status))
117 return status;
118
119 /* 7. Get the size of the scratch buffer */
120 status = ippsGFpECScratchBufferSize(2, pEC, &scratchSize);
121 if (!checkStatus("ippsGFpECScratchBufferSize", ippStsNoErr, status))
122 return status;
123
124 /* 8. Allocate memory for the scratch buffer */
125 std::vector<Ipp8u> pScratchBuffer(scratchSize);
126
127 /* 9. Compute the digital signature over the message digest */
128 status = ippsGFpECSignDSA(bnMsgDigest, bnRegPrivate, bnEphPrivate,
129 bnR, bnS, pEC, pScratchBuffer.data());
130 if (!checkStatus("ippsGFpECSignDSA", ippStsNoErr, status))
131 return status;
132
133 bool sigFlagErr;
134 /* 10. Validate the generated digest by comparing it to the known one */
135 sigFlagErr = (bnR == bnRref);
136 sigFlagErr &= (bnS == bnSref);
137
138 PRINT_EXAMPLE_STATUS("ippsGFpECSignDSA", "ECDSA signature", sigFlagErr)
139
140 return status;
141}
diff --git a/examples/examplesBuildOptions.cmake b/examples/examplesBuildOptions.cmake
index e3d830a..83e6c19 100644
--- a/examples/examplesBuildOptions.cmake
+++ b/examples/examplesBuildOptions.cmake
@@ -39,7 +39,7 @@ if(WIN32)
3939
40 set(LINK_FLAG_S_ST_WINDOWS "/nologo /NODEFAULTLIB /VERBOSE:SAFESEH /INCREMENTAL:NO /NXCOMPAT /DYNAMICBASE /SUBSYSTEM:CONSOLE")40 set(LINK_FLAG_S_ST_WINDOWS "/nologo /NODEFAULTLIB /VERBOSE:SAFESEH /INCREMENTAL:NO /NXCOMPAT /DYNAMICBASE /SUBSYSTEM:CONSOLE")
4141
42 ippcp_extend_variable(CMAKE_CXX_FLAGS "/TP /nologo /W3 /EHa /Zm512 /GS")42 ippcp_extend_variable(CMAKE_CXX_FLAGS "/nologo /W3 /EHa /Zm512 /GS")
43 # Intel compiler-specific option43 # Intel compiler-specific option
44 if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel" OR ${CMAKE_CXX_COMPILER_ID} STREQUAL "IntelLLVM")44 if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel" OR ${CMAKE_CXX_COMPILER_ID} STREQUAL "IntelLLVM")
45 ippcp_extend_variable(CMAKE_CXX_FLAGS "-nologo -Qfp-speculation:safe -Qfreestanding")45 ippcp_extend_variable(CMAKE_CXX_FLAGS "-nologo -Qfp-speculation:safe -Qfreestanding")
@@ -65,7 +65,8 @@ if(UNIX)
65 ippcp_extend_variable(LINK_FLAG_S_ST_LINUX "-no-pie")65 ippcp_extend_variable(LINK_FLAG_S_ST_LINUX "-no-pie")
66 endif()66 endif()
6767
68 ippcp_extend_variable(CMAKE_CXX_FLAGS "-D_FORTIFY_SOURCE=2 -Wformat -Wformat-security")68 ippcp_extend_variable(CMAKE_CXX_FLAGS "-Wformat -Wformat-security")
69 ippcp_extend_variable(CMAKE_CXX_FLAGS_RELEASE "-D_FORTIFY_SOURCE=2")
6970
70 if(${ARCH} MATCHES "ia32")71 if(${ARCH} MATCHES "ia32")
71 ippcp_extend_variable(LINK_FLAG_S_ST_LINUX "-m32")72 ippcp_extend_variable(LINK_FLAG_S_ST_LINUX "-m32")
@@ -110,4 +111,4 @@ macro(ippcp_example_set_build_options target link_libraries)
110 target_link_libraries(${target} ipgo)111 target_link_libraries(${target} ipgo)
111 endif()112 endif()
112 endif()113 endif()
113endmacro()
114\ No newline at end of file114\ No newline at end of file
115endmacro()
diff --git a/examples/hash/sm3_hash_rmf.cpp b/examples/hash/sm3_hash_rmf.cpp
115new file mode 100644116new file mode 100644
index 0000000..5dfb7ea
--- /dev/null
+++ b/examples/hash/sm3_hash_rmf.cpp
@@ -0,0 +1,103 @@
1/*************************************************************************
2* Copyright (C) 2024 Intel Corporation
3*
4* Licensed under the Apache License, Version 2.0 (the "License");
5* you may not use this file except in compliance with the License.
6* You may obtain a copy of the License at
7*
8* http://www.apache.org/licenses/LICENSE-2.0
9*
10* Unless required by applicable law or agreed to in writing, software
11* distributed under the License is distributed on an "AS IS" BASIS,
12* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13* See the License for the specific language governing permissions and
14* limitations under the License.
15*************************************************************************/
16
17/*!
18 *
19 * \file
20 *
21 * \brief SM3 Hash example
22 *
23 * This example demonstrates usage of Hash algorithms to digest a message by
24 * using SM3 standard.
25 * Reduce Memory Footprint (_rmf) APIs are used in this example.
26 *
27 */
28
29#include <string.h>
30#include <vector>
31
32#include "ippcp.h"
33#include "examples_common.h"
34
35/*! Message text */
36const Ipp8u msg[] = "abc";
37
38/*! Known digest to check the results */
39const
40Ipp8u sm3[] = "\x66\xc7\xf0\xf4\x62\xee\xed\xd9\xd1\xf2\xd4\x6b\xdc\x10\xe4\xe2"
41 "\x41\x67\xc4\x87\x5c\xf2\xf7\xa2\x29\x7d\xa0\x2b\x8f\x4b\xa8\xe0";
42
43/*! Message size in bytes */
44const int msg_byte_len = sizeof(msg)-1;
45
46int main(void)
47{
48 /*! Internal function status */
49 IppStatus status = ippStsNoErr;
50
51 /*! 1. Get the hash methods which is used */
52 const IppsHashMethod* hash_method = ippsHashMethod_SM3();
53
54 /*! The digest size of the SM3 standard */
55 Ipp32u hash_size = IPP_SM3_DIGEST_BYTESIZE;
56
57 /*! The size of the SM3 hash context structure. It will be set up in ippsHashGetSize_rmf(). */
58 int context_size = 0;
59
60 /*! 2. Get the size needed for the SM3 hash context structure */
61 status = ippsHashGetSize_rmf(&context_size);
62 if (!checkStatus("ippsHashGetSize", ippStsNoErr, status)) {
63 return status;
64 }
65
66 /*! 3. Allocate memory for the SM3 hash context structure */
67 std::vector<Ipp8u> context_buffer(context_size);
68
69 /*! 4. Buffers for the digest and the tag */
70 Ipp8u output_hash_buffer[IPP_SM3_DIGEST_BYTESIZE];
71
72 IppsHashState_rmf* hash_state = (IppsHashState_rmf*)(context_buffer.data());
73
74 /*! 5. Initialize the initial SM3 hash context */
75 status = ippsHashInit_rmf(hash_state, hash_method);
76 if (!checkStatus("ippsHashInit", ippStsNoErr, status)) {
77 return status;
78 }
79
80 /*! 6. Call HashUpdate function to digest the message of the given length */
81 /*! This function can be called multiple times for a stream of messages */
82 status = ippsHashUpdate_rmf(msg, msg_byte_len, hash_state);
83 if (!checkStatus("ippsHashUpdate", ippStsNoErr, status)) {
84 return status;
85 }
86
87 /*! 7. Complete the computation of the digest value */
88 status = ippsHashFinal_rmf(output_hash_buffer, hash_state);
89 if (!checkStatus("ippsHashFinal", ippStsNoErr, status)) {
90 return status;
91 }
92
93 /*! 8. Verify the resulted digest with the known one */
94 int check = memcmp(output_hash_buffer, sm3, hash_size);
95 if(check != 0) {
96 printf("ERROR: Hash and the reference do not match\n");
97 status = -1;
98 }
99
100 PRINT_EXAMPLE_STATUS("ippsHashUpdate_rmf", "SM3 Hash", !status)
101
102 return status;
103}
diff --git a/examples/post-quantum/lms_m32_h5_w8_verification.cpp b/examples/post-quantum/lms_m32_h5_w8_verification.cpp
0new file mode 100644104new file mode 100644
index 0000000..2261f6b
--- /dev/null
+++ b/examples/post-quantum/lms_m32_h5_w8_verification.cpp
@@ -0,0 +1,213 @@
1/*************************************************************************
2* Copyright (C) 2024 Intel Corporation
3*
4* Licensed under the Apache License, Version 2.0 (the "License");
5* you may not use this file except in compliance with the License.
6* You may obtain a copy of the License at
7*
8* http://www.apache.org/licenses/LICENSE-2.0
9*
10* Unless required by applicable law or agreed to in writing, software
11* distributed under the License is distributed on an "AS IS" BASIS,
12* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13* See the License for the specific language governing permissions and
14* limitations under the License.
15*************************************************************************/
16
17/*!
18 *
19 * \file
20 *
21 * \brief Leighton-Micali Hash-Based Signatures (LMS) example
22 *
23 * This example demonstrates usage of LMS signatures verification.
24 *
25 * The LMS algorithm is implemented according to the
26 * "Leighton-Micali Hash-Based Signatures" document:
27 *
28 * https://datatracker.ietf.org/doc/html/rfc8554
29 *
30 */
31
32/*! Define the macro to enable LMS usage */
33#define IPPCP_PREVIEW_LMS
34
35#include <memory>
36
37#include "ippcp.h"
38#include "examples_common.h"
39
40
41/*! Algorithm ID for LMS */
42IppsLMSAlgo lmsAlgo = IppsLMSAlgo::LMS_SHA256_M32_H5; //0x00000005
43
44/*! Algorithm ID for OTS (one-time signature) */
45IppsLMOTSAlgo lmotsAlgo = IppsLMOTSAlgo::LMOTS_SHA256_N32_W8; //0x00000004
46
47/*! Index of the LMS leaf */
48static Ipp32u q = 0x00000009;
49
50/*! Pointer to the LMS private key identifier */
51static Ipp8u pI[] = { 0x05,0xbd,0x3d,0x90,0xcc,0xa2,0x47,0x08,0xe4,0x20,0x55,0x3e,0x5a,0xf7,0xb9,0xc8 };
52
53/*! Pointer to the LMS public key */
54static Ipp8u pK[] = { 0x21,0xf9,0xd9,0x09,0x97,0x11,0xef,0x5b,0x14,0x50,0x0b,0x6a,0x18,0x1e,0x73,0x9e,
55 0xd3,0x12,0x74,0xdb,0x72,0xac,0xe7,0xcf,0x29,0x32,0x9a,0x45,0xe8,0xde,0x11,0xfe };
56
57/*! Message */
58static Ipp8u pMsg[] = { 0x04,0x3d,0x64,0x00,0x10,0x3b,0x16,0x0c,0xf1,0x89,0xb4,0xcf,0xff,0x08,0x06,0xfe,
59 0xe3,0xe1,0x56,0x7f,0x2c,0x31,0x71,0x0f,0x82,0x84,0x52,0x74,0xf6,0xed,0x23,0x8e,
60 0x14,0xde,0x4d,0x53,0x99,0x86,0x88,0x99,0xab,0x6b,0xcf,0x00,0x98,0x08,0xb8,0xca,
61 0x30,0x81,0xed,0x11,0xaa,0x70,0x35,0x52,0x90,0xfd,0x86,0x98,0xd4,0xc1,0x77,0xc1,
62 0x89,0x4c,0xd8,0xb8,0xd3,0x36,0x7f,0xd0,0xf3,0x00,0xef,0x62,0x83,0x02,0x0d,0x09,
63 0x1c,0x27,0x35,0x6d,0xaf,0xad,0xdb,0xed,0x96,0x21,0x8a,0x19,0x56,0x7b,0x99,0x9a,
64 0xcd,0x53,0x02,0xa5,0x11,0xd4,0xf1,0x65,0xef,0x9c,0xbe,0x85,0x5d,0xcc,0x73,0x1b,
65 0x16,0xdd,0x13,0x6e,0x5c,0x44,0x15,0x8b,0xf1,0xe9,0x8c,0xc5,0x9c,0x6f,0x6c,0xb2 };
66
67/*! Pointer to the C LM-OTS value */
68static Ipp8u pC[] = { 0x67,0x79,0x57,0x17,0x51,0x05,0x2c,0xe8,0xfe,0xe9,0x23,0xda,0x26,0xef,0x27,0x1e,
69 0x62,0xbe,0x08,0x43,0xaa,0xdf,0x7c,0x69,0x19,0x68,0x43,0x32,0x8c,0xb0,0x4e,0x3d };
70
71/*! Pointer to the y LM-OTS value */
72static Ipp8u pY[] = { 0x57,0x71,0xa7,0x12,0x2b,0x87,0xf2,0xbd,0x61,0x11,0x9c,0xd4,0x20,0x56,0xec,0x04,
73 0xc0,0x60,0xbe,0x2a,0xe2,0xc2,0xd6,0x72,0xa8,0x1f,0x1a,0x4a,0x6a,0x76,0xc2,0x4c,
74 0x01,0xa0,0x69,0x63,0x7f,0x85,0xdd,0xb4,0x5d,0x8d,0x19,0xd7,0xef,0x7c,0xc8,0x9a,
75 0x47,0xfe,0x1e,0x79,0xfd,0x80,0x65,0x51,0x17,0xed,0xb6,0x3f,0x17,0xd0,0xb6,0xcc,
76 0x0f,0xca,0xa9,0x28,0xc2,0xef,0x1e,0x41,0x4e,0xf7,0x34,0xa8,0xda,0xfe,0xbc,0x82,
77 0xdb,0x33,0x3e,0x03,0xba,0x51,0x40,0x6e,0x07,0x6b,0xfc,0x2d,0x3e,0x81,0x30,0x09,
78 0xd9,0x68,0xa8,0x71,0x00,0xf0,0x33,0xcf,0x0b,0x57,0x04,0xfc,0x4e,0x61,0x8a,0xa5,
79 0x80,0xa1,0xe0,0x48,0xef,0xc3,0xd5,0x6e,0xe7,0xa2,0xea,0x02,0x14,0xa6,0xfe,0x1f,
80 0x39,0xa4,0xf2,0xfb,0x61,0x2f,0x44,0xbe,0xde,0xd3,0x73,0x34,0x0e,0x76,0x48,0x27,
81 0xc5,0xc5,0x8c,0xb9,0x07,0xcd,0x08,0xdd,0xfb,0xde,0x01,0xbb,0x11,0xff,0x3a,0x89,
82 0xff,0xaa,0xd8,0xcd,0x7c,0x17,0x02,0x71,0x08,0x3c,0xe5,0x0f,0x0f,0xb9,0xea,0xbb,
83 0xa8,0x9d,0xb6,0x0b,0x00,0x73,0xe7,0xaf,0xc8,0x1e,0x4c,0x6f,0x82,0x4a,0xef,0x09,
84 0xf8,0xbf,0xc9,0x49,0x67,0x16,0x9b,0xcf,0xa0,0x84,0x76,0x55,0x57,0x41,0x10,0x19,
85 0x37,0x0b,0x29,0xba,0x0d,0x32,0xa8,0x8e,0x84,0x2c,0x19,0xdf,0x14,0x5a,0x69,0x36,
86 0x8d,0xf7,0xe1,0x55,0x7d,0x93,0x7a,0xae,0xdb,0x07,0xf6,0xbc,0xda,0xf9,0x78,0xeb,
87 0x9e,0x50,0xf3,0xc8,0x47,0x38,0x2a,0xd4,0x3b,0xfc,0xc0,0xe0,0xd0,0xbf,0xd8,0x60,
88 0x46,0x63,0xc7,0xfb,0xa8,0x84,0x45,0x4d,0x23,0x98,0x96,0xd8,0xff,0x8a,0x99,0xa3,
89 0x34,0xf0,0xd3,0x32,0x22,0xaa,0x15,0xbd,0x47,0x9f,0xcd,0x49,0x52,0x0b,0x5b,0x2d,
90 0x83,0xd8,0xbf,0x4d,0xbd,0x3d,0x7e,0x9d,0xc8,0x0b,0x62,0x0c,0xc7,0x03,0x45,0x7f,
91 0x55,0x90,0x35,0xdd,0x1f,0x53,0xdc,0xec,0x0b,0x4d,0x89,0xca,0xb1,0xa3,0xb8,0x87,
92 0x7b,0x31,0x1c,0x24,0x90,0x44,0x9d,0xf7,0xa6,0x1c,0xf8,0xed,0xf3,0x29,0xd6,0x96,
93 0x26,0xca,0x42,0x4b,0xdf,0x61,0x00,0x91,0x92,0x08,0x37,0x76,0xbb,0x96,0x9e,0xd5,
94 0x8d,0x76,0xa9,0x52,0x40,0xdb,0x3f,0xd6,0xec,0xa0,0x06,0x89,0x88,0x11,0x18,0x38,
95 0xae,0xcb,0xa0,0x71,0xab,0x3b,0x7b,0xe0,0x94,0x30,0x59,0x38,0xaf,0xb0,0x8c,0xdd,
96 0xf9,0xcd,0xaf,0x82,0x49,0x90,0x29,0xf6,0x24,0x9a,0xa5,0x51,0x1b,0x99,0x45,0x64,
97 0x13,0x94,0x9e,0x3e,0x4e,0x43,0x40,0x73,0x0d,0x68,0x0b,0x68,0xde,0xb5,0xc9,0xd5,
98 0xce,0xef,0x7b,0x8b,0x1e,0xd9,0x7e,0xc8,0xa1,0x69,0xb5,0x2b,0xd0,0x54,0xb0,0x53,
99 0x41,0x9f,0xfa,0x77,0x34,0x55,0xcd,0xf4,0x79,0xa6,0x0d,0x3c,0xc7,0x05,0xd8,0xf2,
100 0x08,0x48,0x32,0xb7,0x96,0x22,0xb6,0xe5,0xac,0x83,0x06,0xa7,0x68,0x3f,0xea,0x03,
101 0xcd,0x79,0xe8,0xff,0x54,0xe2,0xf5,0xa0,0x6b,0x69,0xc1,0xca,0xb3,0xd4,0x2b,0x60,
102 0xa8,0xa8,0xbe,0xcb,0x9e,0x94,0x2e,0xf1,0xfc,0xd7,0x55,0xac,0x08,0xd7,0xc4,0x22,
103 0x4f,0xf3,0xf5,0xbf,0x49,0xb8,0xf7,0x5f,0xae,0x60,0x92,0xe4,0x3a,0x8f,0x30,0x35,
104 0x41,0x8c,0xd4,0x03,0x31,0x6c,0x08,0xa8,0x08,0x37,0xb4,0x6c,0x22,0xca,0xa2,0xf7,
105 0xff,0xc1,0x62,0x49,0xcd,0x5c,0x17,0x25,0xc5,0x4e,0xaa,0x26,0xb9,0xd7,0x72,0xf9,
106 0x61,0x21,0xbf,0x95,0xda,0xcf,0x30,0x1d,0x42,0x8c,0x9d,0xf4,0x57,0x36,0x25,0xb7,
107 0xfb,0xfa,0x64,0xba,0x7f,0x3e,0x0d,0x5a,0x72,0xa7,0x8d,0x13,0xf6,0x2d,0x57,0x76,
108 0xa4,0x61,0x59,0x9d,0x4d,0xd5,0x99,0x0e,0xae,0x73,0x6b,0x6a,0xf1,0x64,0x93,0xf1,
109 0xa7,0xd0,0xe4,0x4f,0x2b,0x71,0xd9,0x6e,0x0e,0x89,0x28,0x5a,0xec,0xc1,0x15,0x50,
110 0x81,0x21,0x6c,0xe0,0xba,0xbb,0xce,0x4f,0x4e,0x0b,0x80,0xa1,0x92,0x6a,0xea,0x6a,
111 0xcb,0x3e,0xa3,0xcb,0x7a,0x23,0x61,0x5d,0x41,0x08,0xba,0xf4,0x51,0x9b,0xf7,0x10,
112 0x27,0x0e,0x89,0x6b,0x42,0xc5,0x5c,0x3c,0x9e,0x60,0x42,0x43,0x29,0xbf,0xbc,0x8a,
113 0xd5,0x9f,0x4c,0xa2,0x0b,0x5e,0xbb,0xa4,0x93,0xe0,0xb3,0x9d,0xb9,0x7e,0xc7,0x9b,
114 0x36,0x2a,0xc7,0x21,0x5e,0x25,0x5d,0xeb,0x74,0x68,0xfd,0xf4,0x0e,0x0f,0x39,0x0c,
115 0x65,0x0c,0x66,0x51,0x0c,0xf4,0xad,0x9c,0x44,0x94,0x34,0xae,0x25,0x8b,0x56,0x1e,
116 0x8e,0xc1,0x57,0x29,0xa6,0x90,0x62,0xb8,0xb2,0x8d,0x6c,0x79,0xf4,0x90,0x64,0xd2,
117 0x4a,0x52,0xe9,0x15,0x95,0xc9,0x3f,0x83,0xc4,0x0f,0xec,0xa2,0x11,0xe2,0x8b,0x50,
118 0x1f,0x13,0xcc,0x80,0x2f,0x0b,0x36,0x35,0x2c,0x85,0x41,0x79,0xd2,0xce,0x46,0x12,
119 0xc7,0xf0,0xd3,0x96,0x04,0x4d,0x1c,0x69,0x4f,0x8f,0xe3,0xa0,0x1c,0xe2,0xa8,0x8c,
120 0xe8,0xd1,0x74,0xca,0x66,0x99,0x1b,0x9d,0x6c,0x50,0x72,0xf2,0xd2,0x01,0x60,0xdf,
121 0x74,0x81,0xaf,0xbd,0x7a,0xc9,0xd2,0xf7,0x5a,0x7d,0xfe,0x36,0x9c,0x61,0xed,0xc9,
122 0xfb,0x27,0xbb,0xa3,0xd8,0x71,0x3c,0x57,0x5d,0xdd,0xab,0xcc,0x27,0xc6,0xb9,0x42,
123 0x9b,0xcb,0x7e,0xec,0xf8,0x53,0x2e,0xf0,0xf4,0xc9,0x46,0x46,0xd8,0x94,0xd6,0xf7,
124 0x8d,0x64,0xd7,0xba,0xb1,0x39,0x8e,0x7f,0xef,0xfd,0xb0,0xb0,0x31,0x4f,0x43,0x0f,
125 0xec,0xa8,0x70,0x57,0x3a,0xe3,0x88,0xbc,0xa7,0xd9,0xf9,0x39,0xa4,0xb9,0x91,0x59,
126 0xc7,0xbf,0xec,0x78,0xa9,0xce,0x33,0x99,0xf3,0x83,0xfa,0xaf,0x59,0xab,0x65,0xc6,
127 0xe2,0xaa,0x30,0x08,0xd7,0x99,0x71,0x65,0xf1,0xb6,0xfc,0x4f,0xf1,0x68,0xa2,0xd8,
128 0x61,0x8a,0xe5,0x0f,0x2b,0x60,0xda,0x8d,0xea,0x7e,0xf6,0x2c,0xae,0xeb,0x26,0xae,
129 0x29,0x5d,0xab,0xc7,0x3f,0x27,0x2c,0x51,0xf1,0x3f,0x22,0x22,0xef,0x52,0x4e,0xcb,
130 0x70,0xd8,0xba,0x41,0x53,0xb4,0xd9,0xdd,0xdc,0xe8,0xcd,0x7f,0xc1,0xb8,0x2b,0x8e,
131 0x3b,0x3b,0x86,0xd7,0x4c,0x36,0x69,0xf6,0x31,0xcf,0x37,0xbd,0x16,0xe9,0x2f,0x4f,
132 0xf9,0x13,0x19,0xf2,0x3b,0x41,0x1c,0x78,0x62,0x9c,0x5f,0x95,0xab,0xdd,0x17,0xe7,
133 0x2e,0x8f,0x92,0x79,0xe0,0xeb,0xe0,0x49,0x58,0x6d,0x3c,0x26,0xb8,0x5c,0x93,0xb9,
134 0xd7,0x6e,0xca,0x28,0x70,0x9c,0xbe,0xef,0x08,0x4e,0xe2,0x20,0x3a,0xdb,0x92,0x0b,
135 0x29,0x2f,0xfd,0xc8,0x3a,0x4a,0x7c,0xa4,0x87,0x6f,0x33,0x8d,0x8e,0x7f,0x51,0x6f,
136 0xab,0x11,0x42,0xc3,0x75,0xed,0x69,0xb1,0xf1,0x32,0xd8,0xd8,0xe2,0xc2,0x0d,0x52,
137 0x21,0xad,0x97,0x05,0x60,0x1d,0x43,0x52,0x4c,0xb1,0x61,0x49,0xef,0x2c,0xc1,0xad,
138 0x4c,0x0c,0xe7,0x1b,0x81,0xc6,0x2f,0x47,0xe2,0xb0,0xe6,0x6c,0xb8,0xd0,0x2d,0xe4,
139 0x46,0xd2,0x0a,0x13,0xab,0xb3,0xb9,0x13,0x9e,0x41,0xba,0x06,0x2d,0x11,0xe4,0xe6 };
140
141/*! Pointer to the LMS authorization path */
142static Ipp8u pAuthPath[] = { 0xc7,0x14,0x06,0x72,0xbf,0x82,0x00,0x91,0xe3,0xd5,0xd6,0x4c,0x2a,0x71,0x21,0x83,
143 0x3b,0xea,0xb1,0x16,0x74,0xd8,0xae,0x4e,0xe3,0x15,0xe7,0x85,0x4d,0xa7,0xa1,0x00,
144 0x4b,0x2b,0x7b,0xc6,0xad,0x89,0xa8,0x6c,0xe8,0xf6,0x60,0x22,0x19,0xb9,0xc3,0x37,
145 0x5b,0xca,0x93,0xf1,0x0e,0xa3,0x2f,0x10,0xfb,0x2f,0x39,0x21,0x1c,0x33,0x78,0xb7,
146 0x89,0x0f,0x77,0x18,0xe8,0x73,0x04,0x54,0x71,0x08,0x0b,0x86,0x94,0x9e,0xc7,0x55,
147 0x25,0xb9,0x4a,0xe1,0xbb,0x45,0x06,0x00,0x66,0xdf,0x75,0x17,0x8b,0x0d,0xc3,0xa6,
148 0x65,0x9a,0x5e,0xc7,0x5d,0xe5,0xc1,0x29,0x1f,0x5f,0xfc,0xcb,0x89,0x84,0x5c,0xfb,
149 0x7a,0x81,0xe2,0x54,0x05,0xd1,0x90,0xe3,0x7d,0xe4,0x3c,0x9f,0xe2,0xdc,0xd3,0xfd,
150 0x7e,0x6e,0x72,0xfa,0xc7,0xbe,0xcb,0xd5,0xd0,0x1e,0xc4,0xae,0x48,0x9a,0x92,0x45,
151 0xc3,0xc2,0xc1,0x06,0x91,0xbe,0x15,0x1f,0xa6,0xa1,0x87,0xbb,0x7c,0x68,0x7b,0xb8 };
152
153int main(void)
154{
155 /* Internal function status */
156 IppStatus status = ippStsNoErr;
157
158 /* Deleter to use in unique_ptr to clean the memory during the object's destruction */
159 auto toIpp8uDeleter = [] (auto* pData) { delete[] (Ipp8u*)pData; };
160
161 const Ipp32s msgLen = sizeof(pMsg);
162
163 /* Create an algorithm ID to put into the ippsLMS functions */
164 const IppsLMSAlgoType lmsAlgTypePk = { lmotsAlgo, lmsAlgo };
165
166 /* 1. Get the scratch buffer size */
167 int buffSize;
168 status = ippsLMSBufferGetSize(&buffSize, msgLen, lmsAlgTypePk);
169 if (!checkStatus("ippsLMSBufferGetSize", ippStsNoErr, status))
170 return status;
171 /* 2. Allocate memory for the scratch buffer */
172 std::unique_ptr<Ipp8u> pScratchBuffer(new Ipp8u[buffSize]);
173
174 /* 3. Get the LMS public key state size */
175 int ippcpPubKeySize;
176 status = ippsLMSPublicKeyStateGetSize(&ippcpPubKeySize, lmsAlgTypePk);
177 if (!checkStatus("ippsLMSPublicKeyStateGetSize", ippStsNoErr, status))
178 return status;
179
180 /* 4. Allocate memory for the LMS public key state */
181 std::unique_ptr<IppsLMSPublicKeyState, decltype(toIpp8uDeleter)>
182 pPubKey((IppsLMSPublicKeyState *)(new Ipp8u[ippcpPubKeySize]), toIpp8uDeleter);
183
184 /* 5. Set the LMS public key */
185 status = ippsLMSSetPublicKeyState(lmsAlgTypePk, pI, pK, pPubKey.get());
186 if (!checkStatus("ippsLMSSetPublicKeyState", ippStsNoErr, status))
187 return status;
188
189 /* 6. Get the LMS signature state size */
190 int sigBuffSize;
191 status = ippsLMSSignatureStateGetSize(&sigBuffSize, lmsAlgTypePk);
192 if (!checkStatus("ippsLMSSignatureStateGetSize", ippStsNoErr, status))
193 return status;
194
195 /* 7. Allocate memory for the LMS signature buffer */
196 std::unique_ptr<IppsLMSSignatureState, decltype(toIpp8uDeleter)>
197 pSignature((IppsLMSSignatureState *)(new Ipp8u[sigBuffSize]), toIpp8uDeleter);
198
199 /* 8. Set the LMS signature */
200 status = ippsLMSSetSignatureState(lmsAlgTypePk, q, pC, pY, pAuthPath, pSignature.get());
201 if (!checkStatus("ippsLMSSetSignatureState", ippStsNoErr, status))
202 return status;
203
204 int is_valid = 0;
205 /* 9. Verify the LMS signature */
206 status = ippsLMSVerify(pMsg, msgLen, pSignature.get(), &is_valid, pPubKey.get(), pScratchBuffer.get());
207 if (!checkStatus("ippsLMSVerify", ippStsNoErr, status))
208 return status;
209
210 PRINT_EXAMPLE_STATUS("ippsLMSVerify", "LMS Verification", 1 == is_valid);
211
212 return status;
213}
diff --git a/examples/utils/examples_common.h b/examples/utils/examples_common.h
index adbbff0..c0f230c 100644
--- a/examples/utils/examples_common.h
+++ b/examples/utils/examples_common.h
@@ -14,12 +14,12 @@
14* limitations under the License.14* limitations under the License.
15*************************************************************************/15*************************************************************************/
1616
17/* Intel® Integrated Performance Primitives Cryptography (Intel® IPP Cryptography) */17/* Intel® Cryptography Primitives Library */
1818
19/*!19/*!
20 *20 *
21 * \file21 * \file
22 * \brief Common header for Intel IPP Cryptography examples22 * \brief Common header for Intel Cryptography Primitives Library examples
23 *23 *
24 */24 */
2525
diff --git a/include/ippcp.h b/include/ippcp.h
index f5cb74e..fc36e87 100644
--- a/include/ippcp.h
+++ b/include/ippcp.h
@@ -16,7 +16,7 @@
1616
17/*17/*
18//18//
19// Intel® Integrated Performance Primitives Cryptography (Intel® IPP Cryptography)19// Intel® Cryptography Primitives Library
20//20//
21*/21*/
2222
@@ -48,16 +48,20 @@ extern "C" {
48#endif48#endif
4949
50/* /////////////////////////////////////////////////////////////////////////////50/* /////////////////////////////////////////////////////////////////////////////
51// Name: ippcpGetLibVersion51// Name: ippcpGetLibVersion / CryptoLibraryVersion
52// Purpose: getting of the library version52// Purpose: getting of the library version
53// Returns: the structure of information about version of ippCP library53// Returns: the structure of information about version of Intel Cryptography Primitives Library
54// Parameters:54// Parameters:
55//55//
56// Notes: not necessary to release the returned structure56// Notes: not necessary to release the returned structure
57*/57*/
58IPPAPI( const IppLibraryVersion*, ippcpGetLibVersion, (void) )58#define LIB_VERSION_DEPRECATED "ippcpGetLibVersion API is deprecated and will be removed in one of future Intel® Cryptography Primitives Library releases. \
59Please use cryptoGetLibVersion instead."
5960
61IPP_DEPRECATED(LIB_VERSION_DEPRECATED) \
62IPPAPI( const IppLibraryVersion*, ippcpGetLibVersion, (void) )
6063
64IPPAPI( const CryptoLibraryVersion*, cryptoGetLibVersion, (void) )
61/*65/*
62// =========================================================66// =========================================================
63// Symmetric Ciphers67// Symmetric Ciphers
@@ -370,7 +374,7 @@ IPPAPI(IppStatus, ippsAES_CMACGetTag,(Ipp8u* pMD, int mdLen, const IppsAES_CMACS
370*/374*/
371375
372#define RC4_DEPRECATED "is deprecated. This algorithm is considered weak due to known attacks on it. \376#define RC4_DEPRECATED "is deprecated. This algorithm is considered weak due to known attacks on it. \
373It is obsolete and will be removed in one of the future Intel IPP Cryptography releases."377It is obsolete and will be removed in one of the future Intel Cryptography Primitives Library releases."
374378
375IPP_DEPRECATED(RC4_DEPRECATED) \379IPP_DEPRECATED(RC4_DEPRECATED) \
376IPPAPI(IppStatus, ippsARCFourCheckKey, (const Ipp8u *pKey, int keyLen, IppBool* pIsWeak))380IPPAPI(IppStatus, ippsARCFourCheckKey, (const Ipp8u *pKey, int keyLen, IppBool* pIsWeak))
@@ -399,172 +403,14 @@ IPPAPI(IppStatus, ippsARCFourDecrypt, (const Ipp8u *pSrc, Ipp8u *pDst, int lengt
399// =========================================================403// =========================================================
400*/404*/
401405
402#define OBSOLETE_API "is deprecated. This API is considered obsolete and will be removed in one of future Intel IPP Cryptography releases. \
403Use the following link for opening a ticket and providing feedback: https://supporttickets.intel.com/ if you have concerns."
404
405#define SHA1_DEPRECATED "This algorithm is considered weak due to known attacks on it. \406#define SHA1_DEPRECATED "This algorithm is considered weak due to known attacks on it. \
406The functionality remains in the library, but the implementation will no be longer \407The functionality remains in the library, but the implementation will no be longer \
407optimized and no security patches will be applied. A more secure alternative is available: SHA-2"408optimized and no security patches will be applied. A more secure alternative is available: SHA-2"
408409
409/* SHA1 Hash Primitives */
410IPP_DEPRECATED(SHA1_DEPRECATED) \
411IPPAPI(IppStatus, ippsSHA1GetSize,(int* pSize))
412IPP_DEPRECATED(SHA1_DEPRECATED) \
413IPPAPI(IppStatus, ippsSHA1Init,(IppsSHA1State* pState))
414IPP_DEPRECATED(SHA1_DEPRECATED) \
415IPPAPI(IppStatus, ippsSHA1Duplicate,(const IppsSHA1State* pSrcState, IppsSHA1State* pDstState))
416
417IPP_DEPRECATED(SHA1_DEPRECATED) \
418IPPAPI(IppStatus, ippsSHA1Pack,(const IppsSHA1State* pState, Ipp8u* pBuffer))
419IPP_DEPRECATED(SHA1_DEPRECATED) \
420IPPAPI(IppStatus, ippsSHA1Unpack,(const Ipp8u* pBuffer, IppsSHA1State* pState))
421
422IPP_DEPRECATED(SHA1_DEPRECATED) \
423IPPAPI(IppStatus, ippsSHA1Update,(const Ipp8u* pSrc, int len, IppsSHA1State* pState))
424IPP_DEPRECATED(SHA1_DEPRECATED) \
425IPPAPI(IppStatus, ippsSHA1GetTag,(Ipp8u* pTag, Ipp32u tagLen, const IppsSHA1State* pState))
426IPP_DEPRECATED(SHA1_DEPRECATED) \
427IPPAPI(IppStatus, ippsSHA1Final,(Ipp8u* pMD, IppsSHA1State* pState))
428IPP_DEPRECATED(SHA1_DEPRECATED) \
429IPPAPI(IppStatus, ippsSHA1MessageDigest,(const Ipp8u* pMsg, int len, Ipp8u* pMD))
430
431/* SHA224 Hash Primitives */
432IPP_DEPRECATED(OBSOLETE_API) \
433IPPAPI(IppStatus, ippsSHA224GetSize,(int* pSize))
434IPP_DEPRECATED(OBSOLETE_API) \
435IPPAPI(IppStatus, ippsSHA224Init,(IppsSHA224State* pState))
436IPP_DEPRECATED(OBSOLETE_API) \
437IPPAPI(IppStatus, ippsSHA224Duplicate,(const IppsSHA224State* pSrcState, IppsSHA224State* pDstState))
438
439IPP_DEPRECATED(OBSOLETE_API) \
440IPPAPI(IppStatus, ippsSHA224Pack,(const IppsSHA224State* pState, Ipp8u* pBuffer))
441IPP_DEPRECATED(OBSOLETE_API) \
442IPPAPI(IppStatus, ippsSHA224Unpack,(const Ipp8u* pBuffer, IppsSHA224State* pState))
443
444IPP_DEPRECATED(OBSOLETE_API) \
445IPPAPI(IppStatus, ippsSHA224Update,(const Ipp8u* pSrc, int len, IppsSHA224State* pState))
446IPP_DEPRECATED(OBSOLETE_API) \
447IPPAPI(IppStatus, ippsSHA224GetTag,(Ipp8u* pTag, Ipp32u tagLen, const IppsSHA224State* pState))
448IPP_DEPRECATED(OBSOLETE_API) \
449IPPAPI(IppStatus, ippsSHA224Final,(Ipp8u* pMD, IppsSHA224State* pState))
450IPP_DEPRECATED(OBSOLETE_API) \
451IPPAPI(IppStatus, ippsSHA224MessageDigest,(const Ipp8u* pMsg, int len, Ipp8u* pMD))
452
453/* SHA256 Hash Primitives */
454IPP_DEPRECATED(OBSOLETE_API) \
455IPPAPI(IppStatus, ippsSHA256GetSize,(int* pSize))
456IPP_DEPRECATED(OBSOLETE_API) \
457IPPAPI(IppStatus, ippsSHA256Init,(IppsSHA256State* pState))
458IPP_DEPRECATED(OBSOLETE_API) \
459IPPAPI(IppStatus, ippsSHA256Duplicate,(const IppsSHA256State* pSrcState, IppsSHA256State* pDstState))
460
461IPP_DEPRECATED(OBSOLETE_API) \
462IPPAPI(IppStatus, ippsSHA256Pack,(const IppsSHA256State* pState, Ipp8u* pBuffer))
463IPP_DEPRECATED(OBSOLETE_API) \
464IPPAPI(IppStatus, ippsSHA256Unpack,(const Ipp8u* pBuffer, IppsSHA256State* pState))
465
466IPP_DEPRECATED(OBSOLETE_API) \
467IPPAPI(IppStatus, ippsSHA256Update,(const Ipp8u* pSrc, int len, IppsSHA256State* pState))
468IPP_DEPRECATED(OBSOLETE_API) \
469IPPAPI(IppStatus, ippsSHA256GetTag,(Ipp8u* pTag, Ipp32u tagLen, const IppsSHA256State* pState))
470IPP_DEPRECATED(OBSOLETE_API) \
471IPPAPI(IppStatus, ippsSHA256Final,(Ipp8u* pMD, IppsSHA256State* pState))
472IPP_DEPRECATED(OBSOLETE_API) \
473IPPAPI(IppStatus, ippsSHA256MessageDigest,(const Ipp8u* pMsg, int len, Ipp8u* pMD))
474
475/* SHA384 Hash Primitives */
476IPP_DEPRECATED(OBSOLETE_API) \
477IPPAPI(IppStatus, ippsSHA384GetSize,(int* pSize))
478IPP_DEPRECATED(OBSOLETE_API) \
479IPPAPI(IppStatus, ippsSHA384Init,(IppsSHA384State* pState))
480IPP_DEPRECATED(OBSOLETE_API) \
481IPPAPI(IppStatus, ippsSHA384Duplicate,(const IppsSHA384State* pSrcState, IppsSHA384State* pDstState))
482
483IPP_DEPRECATED(OBSOLETE_API) \
484IPPAPI(IppStatus, ippsSHA384Pack,(const IppsSHA384State* pState, Ipp8u* pBuffer))
485IPP_DEPRECATED(OBSOLETE_API) \
486IPPAPI(IppStatus, ippsSHA384Unpack,(const Ipp8u* pBuffer, IppsSHA384State* pState))
487
488IPP_DEPRECATED(OBSOLETE_API) \
489IPPAPI(IppStatus, ippsSHA384Update,(const Ipp8u* pSrc, int len, IppsSHA384State* pState))
490IPP_DEPRECATED(OBSOLETE_API) \
491IPPAPI(IppStatus, ippsSHA384GetTag,(Ipp8u* pTag, Ipp32u tagLen, const IppsSHA384State* pState))
492IPP_DEPRECATED(OBSOLETE_API) \
493IPPAPI(IppStatus, ippsSHA384Final,(Ipp8u* pMD, IppsSHA384State* pState))
494IPP_DEPRECATED(OBSOLETE_API) \
495IPPAPI(IppStatus, ippsSHA384MessageDigest,(const Ipp8u* pMsg, int len, Ipp8u* pMD))
496
497/* SHA512 Hash Primitives */
498IPP_DEPRECATED(OBSOLETE_API) \
499IPPAPI(IppStatus, ippsSHA512GetSize,(int* pSize))
500IPP_DEPRECATED(OBSOLETE_API) \
501IPPAPI(IppStatus, ippsSHA512Init,(IppsSHA512State* pState))
502IPP_DEPRECATED(OBSOLETE_API) \
503IPPAPI(IppStatus, ippsSHA512Duplicate,(const IppsSHA512State* pSrcState, IppsSHA512State* pDstState))
504
505IPP_DEPRECATED(OBSOLETE_API) \
506IPPAPI(IppStatus, ippsSHA512Pack,(const IppsSHA512State* pState, Ipp8u* pBuffer))
507IPP_DEPRECATED(OBSOLETE_API) \
508IPPAPI(IppStatus, ippsSHA512Unpack,(const Ipp8u* pBuffer, IppsSHA512State* pState))
509
510IPP_DEPRECATED(OBSOLETE_API) \
511IPPAPI(IppStatus, ippsSHA512Update,(const Ipp8u* pSrc, int len, IppsSHA512State* pState))
512IPP_DEPRECATED(OBSOLETE_API) \
513IPPAPI(IppStatus, ippsSHA512GetTag,(Ipp8u* pTag, Ipp32u tagLen, const IppsSHA512State* pState))
514IPP_DEPRECATED(OBSOLETE_API) \
515IPPAPI(IppStatus, ippsSHA512Final,(Ipp8u* pMD, IppsSHA512State* pState))
516IPP_DEPRECATED(OBSOLETE_API) \
517IPPAPI(IppStatus, ippsSHA512MessageDigest,(const Ipp8u* pMsg, int len, Ipp8u* pMD))
518
519/* MD5 Hash Primitives */
520
521#define MD5_DEPRECATED "This algorithm is considered weak due to known attacks on it. \410#define MD5_DEPRECATED "This algorithm is considered weak due to known attacks on it. \
522The functionality remains in the library, but the implementation will no be longer \411The functionality remains in the library, but the implementation will no be longer \
523optimized and no security patches will be applied. A more secure alternative is available: SHA-2"412optimized and no security patches will be applied. A more secure alternative is available: SHA-2"
524413
525IPP_DEPRECATED(MD5_DEPRECATED) \
526IPPAPI(IppStatus, ippsMD5GetSize,(int* pSize))
527IPP_DEPRECATED(MD5_DEPRECATED) \
528IPPAPI(IppStatus, ippsMD5Init,(IppsMD5State* pState))
529IPP_DEPRECATED(MD5_DEPRECATED) \
530IPPAPI(IppStatus, ippsMD5Duplicate,(const IppsMD5State* pSrcState, IppsMD5State* pDstState))
531
532IPP_DEPRECATED(MD5_DEPRECATED) \
533IPPAPI(IppStatus, ippsMD5Pack,(const IppsMD5State* pState, Ipp8u* pBuffer))
534IPP_DEPRECATED(MD5_DEPRECATED) \
535IPPAPI(IppStatus, ippsMD5Unpack,(const Ipp8u* pBuffer, IppsMD5State* pState))
536
537IPP_DEPRECATED(MD5_DEPRECATED) \
538IPPAPI(IppStatus, ippsMD5Update,(const Ipp8u* pSrc, int len, IppsMD5State* pState))
539IPP_DEPRECATED(MD5_DEPRECATED) \
540IPPAPI(IppStatus, ippsMD5GetTag,(Ipp8u* pTag, Ipp32u tagLen, const IppsMD5State* pState))
541IPP_DEPRECATED(MD5_DEPRECATED) \
542IPPAPI(IppStatus, ippsMD5Final,(Ipp8u* pMD, IppsMD5State* pState))
543IPP_DEPRECATED(MD5_DEPRECATED) \
544IPPAPI(IppStatus, ippsMD5MessageDigest,(const Ipp8u* pMsg, int len, Ipp8u* pMD))
545
546/* SM3 Hash Primitives */
547IPP_DEPRECATED(OBSOLETE_API) \
548IPPAPI(IppStatus, ippsSM3GetSize,(int* pSize))
549IPP_DEPRECATED(OBSOLETE_API) \
550IPPAPI(IppStatus, ippsSM3Init,(IppsSM3State* pState))
551IPP_DEPRECATED(OBSOLETE_API) \
552IPPAPI(IppStatus, ippsSM3Duplicate,(const IppsSM3State* pSrcState, IppsSM3State* pDstState))
553
554IPP_DEPRECATED(OBSOLETE_API) \
555IPPAPI(IppStatus, ippsSM3Pack,(const IppsSM3State* pState, Ipp8u* pBuffer))
556IPP_DEPRECATED(OBSOLETE_API) \
557IPPAPI(IppStatus, ippsSM3Unpack,(const Ipp8u* pBuffer, IppsSM3State* pState))
558
559IPP_DEPRECATED(OBSOLETE_API) \
560IPPAPI(IppStatus, ippsSM3Update,(const Ipp8u* pSrc, int len, IppsSM3State* pState))
561IPP_DEPRECATED(OBSOLETE_API) \
562IPPAPI(IppStatus, ippsSM3GetTag,(Ipp8u* pTag, Ipp32u tagLen, const IppsSM3State* pState))
563IPP_DEPRECATED(OBSOLETE_API) \
564IPPAPI(IppStatus, ippsSM3Final,(Ipp8u* pMD, IppsSM3State* pState))
565IPP_DEPRECATED(OBSOLETE_API) \
566IPPAPI(IppStatus, ippsSM3MessageDigest,(const Ipp8u* pMsg, int len, Ipp8u* pMD))
567
568/* generalized Hash Primitives */414/* generalized Hash Primitives */
569IPP_DEPRECATED(OBSOLETE_API) \415IPP_DEPRECATED(OBSOLETE_API) \
570IPPAPI(IppStatus, ippsHashGetSize,(int* pSize))416IPPAPI(IppStatus, ippsHashGetSize,(int* pSize))
@@ -774,6 +620,10 @@ IPPAPI(IppStatus, ippsMontMul, (const IppsBigNumState* pA, const IppsBigNumState
774IPPAPI(IppStatus, ippsMontExp, (const IppsBigNumState* pA, const IppsBigNumState* pE, IppsMontState* m, IppsBigNumState* pR))620IPPAPI(IppStatus, ippsMontExp, (const IppsBigNumState* pA, const IppsBigNumState* pE, IppsMontState* m, IppsBigNumState* pR))
775621
776/* Pseudo-Random Number Generation */622/* Pseudo-Random Number Generation */
623#define PRNG_DEPRECATED "This algorithm is considered weak since it's based on the outdated FIPS standard(FIPS 186-2). \
624The functionality remains in the library, but its implementation is not recommended for use. \
625A more secure alternative is available: ippsPRNGenRDRAND and ippsTRNGenRDSEED."
626
777IPPAPI(IppStatus, ippsPRNGGetSize,(int* pSize))627IPPAPI(IppStatus, ippsPRNGGetSize,(int* pSize))
778IPPAPI(IppStatus, ippsPRNGInit, (int seedBits, IppsPRNGState* pCtx))628IPPAPI(IppStatus, ippsPRNGInit, (int seedBits, IppsPRNGState* pCtx))
779629
@@ -783,7 +633,9 @@ IPPAPI(IppStatus, ippsPRNGSetAugment,(const IppsBigNumState* pAug, IppsPRNGState
783IPPAPI(IppStatus, ippsPRNGSetSeed, (const IppsBigNumState* pSeed,IppsPRNGState* pCtx))633IPPAPI(IppStatus, ippsPRNGSetSeed, (const IppsBigNumState* pSeed,IppsPRNGState* pCtx))
784IPPAPI(IppStatus, ippsPRNGGetSeed, (const IppsPRNGState* pCtx,IppsBigNumState* pSeed))634IPPAPI(IppStatus, ippsPRNGGetSeed, (const IppsPRNGState* pCtx,IppsBigNumState* pSeed))
785635
636IPP_DEPRECATED(PRNG_DEPRECATED) \
786IPPAPI(IppStatus, ippsPRNGen, (Ipp32u* pRand, int nBits, void* pCtx))637IPPAPI(IppStatus, ippsPRNGen, (Ipp32u* pRand, int nBits, void* pCtx))
638IPP_DEPRECATED(PRNG_DEPRECATED) \
787IPPAPI(IppStatus, ippsPRNGen_BN, (IppsBigNumState* pRand, int nBits, void* pCtx))639IPPAPI(IppStatus, ippsPRNGen_BN, (IppsBigNumState* pRand, int nBits, void* pCtx))
788IPPAPI(IppStatus, ippsPRNGenRDRAND, (Ipp32u* pRand, int nBits, void* pCtx))640IPPAPI(IppStatus, ippsPRNGenRDRAND, (Ipp32u* pRand, int nBits, void* pCtx))
789IPPAPI(IppStatus, ippsPRNGenRDRAND_BN,(IppsBigNumState* pRand, int nBits, void* pCtx))641IPPAPI(IppStatus, ippsPRNGenRDRAND_BN,(IppsBigNumState* pRand, int nBits, void* pCtx))
@@ -1079,201 +931,6 @@ IPPAPI(IppStatus, ippsDLPValidateDH,(int nTrials, IppDLResult* pResult, IppsDLPS
1079IPPAPI( const char*, ippsECCGetResultString, (IppECResult code))931IPPAPI( const char*, ippsECCGetResultString, (IppECResult code))
1080932
1081/*933/*
1082// EC over Prime Fields
1083*/
1084/* general EC initialization */
1085IPP_DEPRECATED(OBSOLETE_API) \
1086IPPAPI(IppStatus, ippsECCPGetSize,(int feBitSize, int* pSize))
1087IPP_DEPRECATED(OBSOLETE_API) \
1088IPPAPI(IppStatus, ippsECCPGetSizeStd128r1,(int* pSize))
1089IPP_DEPRECATED(OBSOLETE_API) \
1090IPPAPI(IppStatus, ippsECCPGetSizeStd128r2,(int* pSize))
1091IPP_DEPRECATED(OBSOLETE_API) \
1092IPPAPI(IppStatus, ippsECCPGetSizeStd192r1,(int* pSize))
1093IPP_DEPRECATED(OBSOLETE_API) \
1094IPPAPI(IppStatus, ippsECCPGetSizeStd224r1,(int* pSize))
1095IPP_DEPRECATED(OBSOLETE_API) \
1096IPPAPI(IppStatus, ippsECCPGetSizeStd256r1,(int* pSize))
1097IPP_DEPRECATED(OBSOLETE_API) \
1098IPPAPI(IppStatus, ippsECCPGetSizeStd384r1,(int* pSize))
1099IPP_DEPRECATED(OBSOLETE_API) \
1100IPPAPI(IppStatus, ippsECCPGetSizeStd521r1,(int* pSize))
1101IPP_DEPRECATED(OBSOLETE_API) \
1102IPPAPI(IppStatus, ippsECCPGetSizeStdSM2, (int* pSize))
1103
1104IPP_DEPRECATED(OBSOLETE_API) \
1105IPPAPI(IppStatus, ippsECCPInit,(int feBitSize, IppsECCPState* pEC))
1106IPP_DEPRECATED(OBSOLETE_API) \
1107IPPAPI(IppStatus, ippsECCPInitStd128r1,(IppsECCPState* pEC))
1108IPP_DEPRECATED(OBSOLETE_API) \
1109IPPAPI(IppStatus, ippsECCPInitStd128r2,(IppsECCPState* pEC))
1110IPP_DEPRECATED(OBSOLETE_API) \
1111IPPAPI(IppStatus, ippsECCPInitStd192r1,(IppsECCPState* pEC))
1112IPP_DEPRECATED(OBSOLETE_API) \
1113IPPAPI(IppStatus, ippsECCPInitStd224r1,(IppsECCPState* pEC))
1114IPP_DEPRECATED(OBSOLETE_API) \
1115IPPAPI(IppStatus, ippsECCPInitStd256r1,(IppsECCPState* pEC))
1116IPP_DEPRECATED(OBSOLETE_API) \
1117IPPAPI(IppStatus, ippsECCPInitStd384r1,(IppsECCPState* pEC))
1118IPP_DEPRECATED(OBSOLETE_API) \
1119IPPAPI(IppStatus, ippsECCPInitStd521r1,(IppsECCPState* pEC))
1120IPP_DEPRECATED(OBSOLETE_API) \
1121IPPAPI(IppStatus, ippsECCPInitStdSM2, (IppsECCPState* pEC))
1122
1123IPP_DEPRECATED(OBSOLETE_API) \
1124IPPAPI(IppStatus, ippsECCPSet,(const IppsBigNumState* pPrime,
1125 const IppsBigNumState* pA, const IppsBigNumState* pB,
1126 const IppsBigNumState* pGX,const IppsBigNumState* pGY,const IppsBigNumState* pOrder,
1127 int cofactor,
1128 IppsECCPState* pEC))
1129IPP_DEPRECATED(OBSOLETE_API) \
1130IPPAPI(IppStatus, ippsECCPSetStd,(IppECCType flag, IppsECCPState* pEC))
1131IPP_DEPRECATED(OBSOLETE_API) \
1132IPPAPI(IppStatus, ippsECCPSetStd128r1,(IppsECCPState* pEC))
1133IPP_DEPRECATED(OBSOLETE_API) \
1134IPPAPI(IppStatus, ippsECCPSetStd128r2,(IppsECCPState* pEC))
1135IPP_DEPRECATED(OBSOLETE_API) \
1136IPPAPI(IppStatus, ippsECCPSetStd192r1,(IppsECCPState* pEC))
1137IPP_DEPRECATED(OBSOLETE_API) \
1138IPPAPI(IppStatus, ippsECCPSetStd224r1,(IppsECCPState* pEC))
1139IPP_DEPRECATED(OBSOLETE_API) \
1140IPPAPI(IppStatus, ippsECCPSetStd256r1,(IppsECCPState* pEC))
1141IPP_DEPRECATED(OBSOLETE_API) \
1142IPPAPI(IppStatus, ippsECCPSetStd384r1,(IppsECCPState* pEC))
1143IPP_DEPRECATED(OBSOLETE_API) \
1144IPPAPI(IppStatus, ippsECCPSetStd521r1,(IppsECCPState* pEC))
1145IPP_DEPRECATED(OBSOLETE_API) \
1146IPPAPI(IppStatus, ippsECCPSetStdSM2, (IppsECCPState* pEC))
1147
1148IPP_DEPRECATED(OBSOLETE_API) \
1149IPPAPI(IppStatus, ippsECCPBindGxyTblStd192r1,(IppsECCPState* pEC))
1150IPP_DEPRECATED(OBSOLETE_API) \
1151IPPAPI(IppStatus, ippsECCPBindGxyTblStd224r1,(IppsECCPState* pEC))
1152IPP_DEPRECATED(OBSOLETE_API) \
1153IPPAPI(IppStatus, ippsECCPBindGxyTblStd256r1,(IppsECCPState* pEC))
1154IPP_DEPRECATED(OBSOLETE_API) \
1155IPPAPI(IppStatus, ippsECCPBindGxyTblStd384r1,(IppsECCPState* pEC))
1156IPP_DEPRECATED(OBSOLETE_API) \
1157IPPAPI(IppStatus, ippsECCPBindGxyTblStd521r1,(IppsECCPState* pEC))
1158IPP_DEPRECATED(OBSOLETE_API) \
1159IPPAPI(IppStatus, ippsECCPBindGxyTblStdSM2, (IppsECCPState* pEC))
1160
1161IPP_DEPRECATED(OBSOLETE_API) \
1162IPPAPI(IppStatus, ippsECCPGet,(IppsBigNumState* pPrime,
1163 IppsBigNumState* pA, IppsBigNumState* pB,
1164 IppsBigNumState* pGX,IppsBigNumState* pGY,IppsBigNumState* pOrder,
1165 int* cofactor,
1166 IppsECCPState* pEC))
1167IPP_DEPRECATED(OBSOLETE_API) \
1168IPPAPI(IppStatus, ippsECCPGetOrderBitSize,(int* pBitSize, IppsECCPState* pEC))
1169
1170IPP_DEPRECATED(OBSOLETE_API) \
1171IPPAPI(IppStatus, ippsECCPValidate,(int nTrials, IppECResult* pResult, IppsECCPState* pEC,
1172 IppBitSupplier rndFunc, void* pRndParam))
1173
1174/* EC Point */
1175IPP_DEPRECATED(OBSOLETE_API) \
1176IPPAPI(IppStatus, ippsECCPPointGetSize,(int feBitSize, int* pSize))
1177
1178IPP_DEPRECATED(OBSOLETE_API) \
1179IPPAPI(IppStatus, ippsECCPPointInit,(int feBitSize, IppsECCPPointState* pPoint))
1180
1181/* Setup/retrieve point's coordinates */
1182IPP_DEPRECATED(OBSOLETE_API) \
1183IPPAPI(IppStatus, ippsECCPSetPoint,(const IppsBigNumState* pX, const IppsBigNumState* pY,
1184 IppsECCPPointState* pPoint, IppsECCPState* pEC))
1185
1186IPP_DEPRECATED(OBSOLETE_API) \
1187IPPAPI(IppStatus, ippsECCPSetPointAtInfinity,(IppsECCPPointState* pPoint, IppsECCPState* pEC))
1188
1189IPP_DEPRECATED(OBSOLETE_API) \
1190IPPAPI(IppStatus, ippsECCPGetPoint,(IppsBigNumState* pX, IppsBigNumState* pY,
1191 const IppsECCPPointState* pPoint, IppsECCPState* pEC))
1192
1193/* EC Point Operations */
1194IPP_DEPRECATED(OBSOLETE_API) \
1195IPPAPI(IppStatus, ippsECCPCheckPoint,(const IppsECCPPointState* pP,
1196 IppECResult* pResult, IppsECCPState* pEC))
1197IPP_DEPRECATED(OBSOLETE_API) \
1198IPPAPI(IppStatus, ippsECCPComparePoint,(const IppsECCPPointState* pP, const IppsECCPPointState* pQ,
1199 IppECResult* pResult, IppsECCPState* pEC))
1200IPP_DEPRECATED(OBSOLETE_API) \
1201IPPAPI(IppStatus, ippsECCPNegativePoint,(const IppsECCPPointState* pP,
1202 IppsECCPPointState* pR, IppsECCPState* pEC))
1203IPP_DEPRECATED(OBSOLETE_API) \
1204IPPAPI(IppStatus, ippsECCPAddPoint,(const IppsECCPPointState* pP, const IppsECCPPointState* pQ,
1205 IppsECCPPointState* pR, IppsECCPState* pEC))
1206IPP_DEPRECATED(OBSOLETE_API) \
1207IPPAPI(IppStatus, ippsECCPMulPointScalar,(const IppsECCPPointState* pP, const IppsBigNumState* pK,
1208 IppsECCPPointState* pR, IppsECCPState* pEC))
1209
1210/* Key Generation, Setup and Validation */
1211IPP_DEPRECATED(OBSOLETE_API) \
1212IPPAPI(IppStatus, ippsECCPGenKeyPair,(IppsBigNumState* pPrivate, IppsECCPPointState* pPublic,
1213 IppsECCPState* pEC,
1214 IppBitSupplier rndFunc, void* pRndParam))
1215IPP_DEPRECATED(OBSOLETE_API) \
1216IPPAPI(IppStatus, ippsECCPPublicKey,(const IppsBigNumState* pPrivate,
1217 IppsECCPPointState* pPublic,
1218 IppsECCPState* pEC))
1219IPP_DEPRECATED(OBSOLETE_API) \
1220IPPAPI(IppStatus, ippsECCPValidateKeyPair,(const IppsBigNumState* pPrivate, const IppsECCPPointState* pPublic,
1221 IppECResult* pResult,
1222 IppsECCPState* pEC))
1223IPP_DEPRECATED(OBSOLETE_API) \
1224IPPAPI(IppStatus, ippsECCPSetKeyPair,(const IppsBigNumState* pPrivate, const IppsECCPPointState* pPublic,
1225 IppBool regular,
1226 IppsECCPState* pEC))
1227
1228/* Shared Secret (DH scheme ) */
1229IPP_DEPRECATED(OBSOLETE_API) \
1230IPPAPI(IppStatus, ippsECCPSharedSecretDH,(const IppsBigNumState* pPrivateA,
1231 const IppsECCPPointState* pPublicB,
1232 IppsBigNumState* pShare,
1233 IppsECCPState* pEC))
1234IPP_DEPRECATED(OBSOLETE_API) \
1235IPPAPI(IppStatus, ippsECCPSharedSecretDHC,(const IppsBigNumState* pPrivateA,
1236 const IppsECCPPointState* pPublicB,
1237 IppsBigNumState* pShare,
1238 IppsECCPState* pEC))
1239
1240/* Sign/Verify */
1241IPP_DEPRECATED(OBSOLETE_API) \
1242IPPAPI(IppStatus, ippsECCPSignDSA,(const IppsBigNumState* pMsgDigest,
1243 const IppsBigNumState* pPrivate,
1244 IppsBigNumState* pSignX, IppsBigNumState* pSignY,
1245 IppsECCPState* pEC))
1246IPP_DEPRECATED(OBSOLETE_API) \
1247IPPAPI(IppStatus, ippsECCPVerifyDSA,(const IppsBigNumState* pMsgDigest,
1248 const IppsBigNumState* pSignX, const IppsBigNumState* pSignY,
1249 IppECResult* pResult,
1250 IppsECCPState* pEC))
1251
1252IPP_DEPRECATED(OBSOLETE_API) \
1253IPPAPI(IppStatus, ippsECCPSignNR,(const IppsBigNumState* pMsgDigest,
1254 const IppsBigNumState* pPrivate,
1255 IppsBigNumState* pSignX, IppsBigNumState* pSignY,
1256 IppsECCPState* pEC))
1257IPP_DEPRECATED(OBSOLETE_API) \
1258IPPAPI(IppStatus, ippsECCPVerifyNR,(const IppsBigNumState* pMsgDigest,
1259 const IppsBigNumState* pSignX, const IppsBigNumState* pSignY,
1260 IppECResult* pResult,
1261 IppsECCPState* pEC))
1262
1263IPP_DEPRECATED(OBSOLETE_API) \
1264IPPAPI(IppStatus, ippsECCPSignSM2,(const IppsBigNumState* pMsgDigest,
1265 const IppsBigNumState* pRegPrivate,
1266 IppsBigNumState* pEphPrivate,
1267 IppsBigNumState* pSignR, IppsBigNumState* pSignS,
1268 IppsECCPState* pEC))
1269IPP_DEPRECATED(OBSOLETE_API) \
1270IPPAPI(IppStatus, ippsECCPVerifySM2,(const IppsBigNumState* pMsgDigest,
1271 const IppsECCPPointState* pRegPublic,
1272 const IppsBigNumState* pSignR, const IppsBigNumState* pSignS,
1273 IppECResult* pResult,
1274 IppsECCPState* pEC))
1275
1276/*
1277// GF over prime and its extension934// GF over prime and its extension
1278*/935*/
1279IPPAPI(IppStatus, ippsGFpGetSize, (int feBitSize, int* pSize))936IPPAPI(IppStatus, ippsGFpGetSize, (int feBitSize, int* pSize))
diff --git a/include/ippcp/fips_cert.h b/include/ippcp/fips_cert.h
index 4feef86..92d3544 100644
--- a/include/ippcp/fips_cert.h
+++ b/include/ippcp/fips_cert.h
@@ -105,6 +105,10 @@ IPPAPI(fips_test_status, fips_selftest_ippsGFpECPublicKey, (Ipp8u *pGFpBuff, Ipp
105IPPAPI(fips_test_status, fips_selftest_ippsGFpECPrivateKey, (Ipp8u *pGFpBuff, Ipp8u *pGFpECBuff, Ipp8u *pDataBuff))105IPPAPI(fips_test_status, fips_selftest_ippsGFpECPrivateKey, (Ipp8u *pGFpBuff, Ipp8u *pGFpECBuff, Ipp8u *pDataBuff))
106IPPAPI(fips_test_status, fips_selftest_ippsGFpECSharedSecretDH, (Ipp8u *pGFpBuff, Ipp8u *pGFpECBuff, Ipp8u *pDataBuff))106IPPAPI(fips_test_status, fips_selftest_ippsGFpECSharedSecretDH, (Ipp8u *pGFpBuff, Ipp8u *pGFpECBuff, Ipp8u *pDataBuff))
107107
108/* LMS */
109IPPAPI(fips_test_status, fips_selftest_ippsLMSVerify_get_size, (int *pBufferSize))
110IPPAPI(fips_test_status, fips_selftest_ippsLMSVerify, (Ipp8u *pDataBuff))
111
108/*112/*
109// Enumerator that contains information about FIPS-approved113// Enumerator that contains information about FIPS-approved
110// functions inside the ippcp cryptographic boundary114// functions inside the ippcp cryptographic boundary
@@ -158,6 +162,7 @@ enum FIPS_IPPCP_FUNC {
158 HMACMessage_rmf,162 HMACMessage_rmf,
159 RSAEncrypt_OAEP_rmf,163 RSAEncrypt_OAEP_rmf,
160 RSADecrypt_OAEP_rmf,164 RSADecrypt_OAEP_rmf,
165 LMSVerify,
161166
162 /* Not approved functions or167 /* Not approved functions or
163 * FIPS-mode is not yet implemented, < 0168 * FIPS-mode is not yet implemented, < 0
@@ -222,8 +227,7 @@ enum FIPS_IPPCP_FUNC {
222 GFpECESEncrypt_SM2,227 GFpECESEncrypt_SM2,
223 GFpECESDecrypt_SM2,228 GFpECESDecrypt_SM2,
224 GFpECESFinal_SM2,229 GFpECESFinal_SM2,
225 XMSSVerify,230 XMSSVerify
226 LMSVerify
227};231};
228232
229/**233/**
diff --git a/include/ippcpdefs.h b/include/ippcpdefs.h
index a1c4155..baee0ca 100644
--- a/include/ippcpdefs.h
+++ b/include/ippcpdefs.h
@@ -16,7 +16,7 @@
1616
17/*17/*
18//18//
19// Intel® Integrated Performance Primitives Cryptography (Intel® IPP Cryptography)19// Intel® Cryptography Primitives Library
20//20//
21// Purpose: Basic Types and Macro Definitions21// Purpose: Basic Types and Macro Definitions
22//22//
@@ -68,6 +68,9 @@ extern "C" {
68# define COMPILER_SUPPORT_SHORT_FLOAT _NO_FLOAT_1668# define COMPILER_SUPPORT_SHORT_FLOAT _NO_FLOAT_16
69#endif69#endif
7070
71#define OBSOLETE_API "is deprecated. This API is considered obsolete and will be removed in one of future Intel® Cryptography Primitives Library releases. \
72Use the following link for opening a ticket and providing feedback: https://supporttickets.intel.com/ if you have concerns."
73
71#if !defined(_NO_IPP_DEPRECATED)74#if !defined(_NO_IPP_DEPRECATED)
72 #if (defined( __ICL ) || defined( __ECL ) || defined(_MSC_VER)) && !defined( _PCS ) && !defined( _PCS_GENSTUBS )75 #if (defined( __ICL ) || defined( __ECL ) || defined(_MSC_VER)) && !defined( _PCS ) && !defined( _PCS_GENSTUBS )
73 #if( __INTEL_COMPILER >= 1100 ) /* icl 11.0 supports additional comment */76 #if( __INTEL_COMPILER >= 1100 ) /* icl 11.0 supports additional comment */
@@ -194,6 +197,7 @@ extern "C" {
194197
195#define IPP_ABS( a ) ( ((a) < 0) ? (-(a)) : (a) )198#define IPP_ABS( a ) ( ((a) < 0) ? (-(a)) : (a) )
196199
200/* IppLibraryVersion is deprecated, please use CryptoLibraryVersion instead */
197typedef struct {201typedef struct {
198 int major; /* e.g. 1 */202 int major; /* e.g. 1 */
199 int minor; /* e.g. 2 */203 int minor; /* e.g. 2 */
@@ -205,6 +209,16 @@ typedef struct {
205 const char* BuildDate; /* e.g. "Jul 20 99" */209 const char* BuildDate; /* e.g. "Jul 20 99" */
206} IppLibraryVersion;210} IppLibraryVersion;
207211
212typedef struct {
213 int major; /* e.g. 1 */
214 int minor; /* e.g. 2 */
215 int patch; /* e.g. 3 */
216 char targetCpu[4]; /* corresponding to Intel® processor */
217 const char* name; /* e.g. "ippsw7" */
218 const char* buildDate; /* e.g. "Jul 20 99" */
219 const char* strVersion; /* e.g. "v1.2 Beta" */
220} CryptoLibraryVersion;
221
208typedef unsigned char Ipp8u;222typedef unsigned char Ipp8u;
209typedef unsigned short Ipp16u;223typedef unsigned short Ipp16u;
210typedef unsigned int Ipp32u;224typedef unsigned int Ipp32u;
@@ -354,12 +368,14 @@ typedef enum {
354 #define ippCPUID_AVX512VBMI2 INT64_SUFFIX(0x2000000000) /* Intel® Advanced Vector Extensions 512 Bit Manipulation instructions 2 */368 #define ippCPUID_AVX512VBMI2 INT64_SUFFIX(0x2000000000) /* Intel® Advanced Vector Extensions 512 Bit Manipulation instructions 2 */
355 #define ippCPUID_AVX512_FP16 INT64_SUFFIX(0x1000000000) /* Intel(R) Advanced Vector Extensions 512 16-bit floating point (FP16) instruction set */369 #define ippCPUID_AVX512_FP16 INT64_SUFFIX(0x1000000000) /* Intel(R) Advanced Vector Extensions 512 16-bit floating point (FP16) instruction set */
356370
357 #define ippCPUID_AVX2VAES INT64_SUFFIX(0x4000000000) /* Intel® Advanced Vector Extensions 256 Bit Vector AES instructions */371 #define ippCPUID_AVX2VAES INT64_SUFFIX(0x4000000000) /* Intel® Advanced Vector Extensions 256 Bit Vector AES instructions */
358 #define ippCPUID_AVX2VCLMUL INT64_SUFFIX(0x8000000000) /* Intel® instruction VPCLMULQDQ */372 #define ippCPUID_AVX2VCLMUL INT64_SUFFIX(0x8000000000) /* Intel® instruction VPCLMULQDQ */
359373 #define ippCPUID_AVX2SM3 INT64_SUFFIX(0x10000000000) /* Intel® Advanced Vector Extensions 256 Bit SM3_NI instructions */
374 #define ippCPUID_AVX2SM4 INT64_SUFFIX(0x20000000000) /* Intel® Advanced Vector Extensions 256 Bit SM4_NI instructions */
375 #define ippCPUID_AVX2SHA512 INT64_SUFFIX(0x40000000000) /* Intel® Advanced Vector Extensions 256 Bit SHA512_NI instructions */
360#endif /* IPP_CPU_FEATURES__ */376#endif /* IPP_CPU_FEATURES__ */
361377
362/* Macros are necessary to build custom Intel® IPP Cryptography static 1cpu library (enable specific features at compile-time) */378/* Macros are necessary to build custom Intel® Cryptography Primitives Library static 1cpu library (enable specific features at compile-time) */
363#if (!defined(_MERGED_BLD) && defined(IPPCP_CUSTOM_BUILD))379#if (!defined(_MERGED_BLD) && defined(IPPCP_CUSTOM_BUILD))
364380
365#ifndef IPP_CUSTOM_CPU_FEATURES__381#ifndef IPP_CUSTOM_CPU_FEATURES__
@@ -391,7 +407,6 @@ extern "C" {
391#endif407#endif
392typedef signed int IppStatus;408typedef signed int IppStatus;
393409
394 /* start of common with ippCrypto part - any changes MUST be done in both repositories - IPP & ippCrypto */
395#define ippStsCpuNotSupportedErr -9999 /* The target CPU is not supported. */410#define ippStsCpuNotSupportedErr -9999 /* The target CPU is not supported. */
396#define ippStsUnknownStatusCodeErr -216 /* Unknown status code. */411#define ippStsUnknownStatusCodeErr -216 /* Unknown status code. */
397#define ippStsLoadDynErr -221 /* Error when loading the dynamic library. */412#define ippStsLoadDynErr -221 /* Error when loading the dynamic library. */
@@ -415,7 +430,6 @@ typedef signed int IppStatus;
415#define ippStsDivByZero 2 /* Zero value(s) for the divisor in the Div function. */430#define ippStsDivByZero 2 /* Zero value(s) for the divisor in the Div function. */
416#define ippStsWaterfall 43 /* Cannot load required library, waterfall is used. */431#define ippStsWaterfall 43 /* Cannot load required library, waterfall is used. */
417#define ippStsFeaturesCombination 51 /* Wrong combination of features. */432#define ippStsFeaturesCombination 51 /* Wrong combination of features. */
418 /* end of common with ippCrypto part */
419433
420#ifdef __cplusplus434#ifdef __cplusplus
421}435}
@@ -423,13 +437,12 @@ typedef signed int IppStatus;
423437
424#endif /* IPPSTATUS_H__ */438#endif /* IPPSTATUS_H__ */
425439
426 /* ippCrypto specific statuses - any changes MUST be done in both repositories - IPP & ippCrypto */
427#define ippStsInvalidPoint -1017 /* ippStsInvalidPoint ECC: Invalid point (out of EC).*/440#define ippStsInvalidPoint -1017 /* ippStsInvalidPoint ECC: Invalid point (out of EC).*/
428#define ippStsQuadraticNonResidueErr -1016 /* SQRT operation on quadratic non-residue value. */441#define ippStsQuadraticNonResidueErr -1016 /* SQRT operation on quadratic non-residue value. */
429#define ippStsPointAtInfinity -1015 /* Point at infinity is detected. */442#define ippStsPointAtInfinity -1015 /* Point at infinity is detected. */
430#define ippStsOFBSizeErr -1014 /* Incorrect value for crypto OFB block size. */443#define ippStsOFBSizeErr -1014 /* Incorrect value for cryptography OFB block size. */
431#define ippStsIncompleteContextErr -1013 /* Crypto: set up of context is not complete. */444#define ippStsIncompleteContextErr -1013 /* Set up of context is not complete. */
432#define ippStsCTRSizeErr -1012 /* Incorrect value for crypto CTR block size. */445#define ippStsCTRSizeErr -1012 /* Incorrect value for cryptography CTR block size. */
433#define ippStsEphemeralKeyErr -1011 /* ECC: Invalid ephemeral key. */446#define ippStsEphemeralKeyErr -1011 /* ECC: Invalid ephemeral key. */
434#define ippStsMessageErr -1010 /* ECC: Invalid message digest. */447#define ippStsMessageErr -1010 /* ECC: Invalid message digest. */
435#define ippStsShareKeyErr -1009 /* ECC: Invalid share key. */448#define ippStsShareKeyErr -1009 /* ECC: Invalid share key. */
@@ -438,13 +451,12 @@ typedef signed int IppStatus;
438#define ippStsECCInvalidFlagErr -1006 /* ECC: Invalid Flag. */451#define ippStsECCInvalidFlagErr -1006 /* ECC: Invalid Flag. */
439#define ippStsUnderRunErr -1005 /* Error in data under run. */452#define ippStsUnderRunErr -1005 /* Error in data under run. */
440#define ippStsPaddingErr -1004 /* Detected padding error indicates the possible data corruption. */453#define ippStsPaddingErr -1004 /* Detected padding error indicates the possible data corruption. */
441#define ippStsCFBSizeErr -1003 /* Incorrect value for crypto CFB block size. */454#define ippStsCFBSizeErr -1003 /* Incorrect value for cryptography CFB block size. */
442#define ippStsPaddingSchemeErr -1002 /* Invalid padding scheme. */455#define ippStsPaddingSchemeErr -1002 /* Invalid padding scheme. */
443#define ippStsBadModulusErr -1001 /* Bad modulus caused a failure in module inversion. */456#define ippStsBadModulusErr -1001 /* Bad modulus caused a failure in module inversion. */
444#define ippStsInsufficientEntropy 25 /* Generation of the prime/key failed due to insufficient entropy in the random seed and stimulus bit string. */457#define ippStsInsufficientEntropy 25 /* Generation of the prime/key failed due to insufficient entropy in the random seed and stimulus bit string. */
445#define ippStsNotSupportedCpu 36 /* The CPU is not supported. */458#define ippStsNotSupportedCpu 36 /* The CPU is not supported. */
446#define ippStsMbWarning 53 /* Error(s) in statuses array. */459#define ippStsMbWarning 53 /* Error(s) in statuses array. */
447 /* end of ippCrypto specific statuses - any changes MUST be done in both repositories - IPP & ippCrypto */
448460
449#if (!defined IPPCPDEFS_H__) || defined( _OWN_BLDPCS )461#if (!defined IPPCPDEFS_H__) || defined( _OWN_BLDPCS )
450#define IPPCPDEFS_H__462#define IPPCPDEFS_H__
@@ -846,13 +858,19 @@ typedef struct _GFpECKeyExchangeSM2 IppsGFpECKeyExchangeSM2State;
846IPPAPI( IppStatus, ippcpGetCpuFeatures, ( Ipp64u* pFeaturesMask ))858IPPAPI( IppStatus, ippcpGetCpuFeatures, ( Ipp64u* pFeaturesMask ))
847IPPAPI( IppStatus, ippcpSetCpuFeatures, ( Ipp64u features ))859IPPAPI( IppStatus, ippcpSetCpuFeatures, ( Ipp64u features ))
848IPPAPI( Ipp64u, ippcpGetEnabledCpuFeatures, ( void ) )860IPPAPI( Ipp64u, ippcpGetEnabledCpuFeatures, ( void ) )
849IPPAPI( IppStatus, ippcpSetNumThreads, ( int numThr ))861
850IPPAPI( IppStatus, ippcpInit,( void ))862IPPAPI( IppStatus, ippcpInit,( void ))
851IPPAPI( IppStatus, ippcpGetNumThreads, (int* pNumThr) )
852IPPAPI( const char*, ippcpGetStatusString, ( IppStatus StsCode ))863IPPAPI( const char*, ippcpGetStatusString, ( IppStatus StsCode ))
853IPPAPI( int, ippcpGetEnabledNumThreads, ( void ) )
854IPPAPI( Ipp64u, ippcpGetCpuClocks, (void) )864IPPAPI( Ipp64u, ippcpGetCpuClocks, (void) )
855865
866/* Threading functions are deprecated in the library */
867IPP_DEPRECATED(OBSOLETE_API) \
868IPPAPI( IppStatus, ippcpSetNumThreads, ( int numThr ))
869IPP_DEPRECATED(OBSOLETE_API) \
870IPPAPI( IppStatus, ippcpGetNumThreads, (int* pNumThr) )
871IPP_DEPRECATED(OBSOLETE_API) \
872IPPAPI( int, ippcpGetEnabledNumThreads, ( void ) )
873
856/* Defines related to experimental features enabling */874/* Defines related to experimental features enabling */
857#ifdef IPPCP_PREVIEW_ALL875#ifdef IPPCP_PREVIEW_ALL
858 #ifndef IPPCP_PREVIEW_XMSS876 #ifndef IPPCP_PREVIEW_XMSS
diff --git a/include/ippcpversion.h b/include/ippcpversion.h
859new file mode 100755877new file mode 100755
index 0000000..3e98d16
--- /dev/null
+++ b/include/ippcpversion.h
@@ -0,0 +1,41 @@
1/*************************************************************************
2* Copyright (C) 2024 Intel Corporation
3*
4* Licensed under the Apache License, Version 2.0 (the "License");
5* you may not use this file except in compliance with the License.
6* You may obtain a copy of the License at
7*
8* http://www.apache.org/licenses/LICENSE-2.0
9*
10* Unless required by applicable law or agreed to in writing, software
11* distributed under the License is distributed on an "AS IS" BASIS,
12* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13* See the License for the specific language governing permissions and
14* limitations under the License.
15*************************************************************************/
16
17/*
18//
19// Intel® Cryptography Primitives Library
20//
21// Purpose: Describes the Intel® Cryptography Primitives Library version
22//
23*/
24
25
26#if !defined( CRYPTOLIBVERSION_H__ )
27#define CRYPTOLIBVERSION_H__
28
29#define CRYPTO_LIB_VERSION_MAJOR 1
30#define CRYPTO_LIB_VERSION_MINOR 0
31#define CRYPTO_LIB_VERSION_PATCH 0
32
33// Major interface version
34#define CRYPTO_LIB_INTERFACE_VERSION_MAJOR 12
35// Minor interface version
36#define CRYPTO_LIB_INTERFACE_VERSION_MINOR 0
37
38#define CRYPTO_LIB_VERSION_STR STR(CRYPTO_LIB_VERSION_MAJOR) "." STR(CRYPTO_LIB_VERSION_MINOR) "." STR(CRYPTO_LIB_VERSION_PATCH) \
39 " (" STR(CRYPTO_LIB_INTERFACE_VERSION_MAJOR) "." STR(CRYPTO_LIB_INTERFACE_VERSION_MINOR) ")"
40
41#endif /* CRYPTOLIBVERSION_H__ */
diff --git a/include/ippversion.h b/include/ippversion.h
index a6459e8..7aa393f 100644
--- a/include/ippversion.h
+++ b/include/ippversion.h
@@ -15,25 +15,30 @@
15*************************************************************************/15*************************************************************************/
1616
17/*17/*
18//
19// Intel® Integrated Performance Primitives Cryptography (Intel® IPP Cryptography)
20//18//
21// Purpose: Describes the Intel IPP Cryptography version19// Intel® Cryptography Primitives Library
20//
21// Purpose: Describes the Intel® Cryptography Primitives Library version
22//22//
23*/23*/
2424
2525
26#if !defined( IPPVERSION_H__ )26#if !defined( IPPVERSION_H__ )
27
28#if !defined(_NO_IPP_DEPRECATED)
29#pragma message("Header `ippversion.h` is deprecated and will be removed in one of future Intel® Cryptography Primitives Library releases. Please use `ippcpversion.h` instead.")
30#endif /* !defined(_NO_IPP_DEPRECATED) */
31
27#define IPPVERSION_H__32#define IPPVERSION_H__
2833
29#define IPP_VERSION_MAJOR 202134#define IPP_VERSION_MAJOR 1
30#define IPP_VERSION_MINOR 1235#define IPP_VERSION_MINOR 0
31#define IPP_VERSION_UPDATE 136#define IPP_VERSION_UPDATE 0
3237
33// Major interface version38// Major interface version
34#define IPP_INTERFACE_VERSION_MAJOR 1139#define IPP_INTERFACE_VERSION_MAJOR 12
35// Minor interface version40// Minor interface version
36#define IPP_INTERFACE_VERSION_MINOR 1541#define IPP_INTERFACE_VERSION_MINOR 0
3742
38#define IPP_VERSION_STR STR(IPP_VERSION_MAJOR) "." STR(IPP_VERSION_MINOR) "." STR(IPP_VERSION_UPDATE) " (" STR(IPP_INTERFACE_VERSION_MAJOR) "." STR(IPP_INTERFACE_VERSION_MINOR) " )"43#define IPP_VERSION_STR STR(IPP_VERSION_MAJOR) "." STR(IPP_VERSION_MINOR) "." STR(IPP_VERSION_UPDATE) " (" STR(IPP_INTERFACE_VERSION_MAJOR) "." STR(IPP_INTERFACE_VERSION_MINOR) " )"
3944
diff --git a/sources/cmake/CMakeASM_NASMOptions.txt b/sources/cmake/CMakeASM_NASMOptions.txt
index f33025e..ab001c4 100644
--- a/sources/cmake/CMakeASM_NASMOptions.txt
+++ b/sources/cmake/CMakeASM_NASMOptions.txt
@@ -15,7 +15,7 @@
15#=========================================================================15#=========================================================================
1616
17#17#
18# Intel® Integrated Performance Primitives Cryptography (Intel® IPP Cryptography)18# Intel® Cryptography Primitives Library
19#19#
2020
21if (UNIX)21if (UNIX)
diff --git a/sources/cmake/ippcp-config-version.cmake.in b/sources/cmake/ippcp-config-version.cmake.in
index 1065a9d..0b12305 100644
--- a/sources/cmake/ippcp-config-version.cmake.in
+++ b/sources/cmake/ippcp-config-version.cmake.in
@@ -15,7 +15,7 @@
15#=========================================================================15#=========================================================================
1616
17#17#
18# Intel® Integrated Performance Primitives Cryptography (Intel® IPP Cryptography)18# Intel® Cryptography Primitives Library
19# library detection routine (version compatibility rules).19# library detection routine (version compatibility rules).
20#20#
2121
diff --git a/sources/cmake/ippcp-config.cmake.in b/sources/cmake/ippcp-config.cmake.in
index 520d9b9..1a4a3cc 100644
--- a/sources/cmake/ippcp-config.cmake.in
+++ b/sources/cmake/ippcp-config.cmake.in
@@ -15,8 +15,7 @@
15#=========================================================================15#=========================================================================
1616
17#17#
18# Intel® Integrated Performance Primitives Cryptography (Intel® IPP Cryptography)18# Intel® Cryptography Primitives Library detection routine.
19# library detection routine.
20#19#
21# To use it, add the lines below to your CMakeLists.txt:20# To use it, add the lines below to your CMakeLists.txt:
22# find_package(IPPCP REQUIRED)21# find_package(IPPCP REQUIRED)
@@ -50,7 +49,7 @@ endif()
5049
51if (NOT IPPCP_FIND_COMPONENTS)50if (NOT IPPCP_FIND_COMPONENTS)
52 set(IPPCP_FIND_COMPONENTS "ippcp")51 set(IPPCP_FIND_COMPONENTS "ippcp")
53 52
54 # crypto_mb library is only for intel6453 # crypto_mb library is only for intel64
55 if(${IPPCP_ARCH} MATCHES "intel64")54 if(${IPPCP_ARCH} MATCHES "intel64")
56 set(IPPCP_BIN_REL_PATH @IPPCP_BIN64_REL_PATH@)55 set(IPPCP_BIN_REL_PATH @IPPCP_BIN64_REL_PATH@)
@@ -99,14 +98,14 @@ macro(add_imported_library_target PATH_TO_LIBRARY PATH_TO_IMPORT_LIB LINKAGE_TYP
99 set_target_properties(IPPCP::${_component} PROPERTIES IMPORTED_IMPLIB "${PATH_TO_IMPORT_LIB}")98 set_target_properties(IPPCP::${_component} PROPERTIES IMPORTED_IMPLIB "${PATH_TO_IMPORT_LIB}")
100 endif()99 endif()
101 else()100 else()
102 message(WARNING "IPPCP: Include directory does not exist: '${_include_dir}'. Intel IPP Cryptography installation might be broken.")101 message(WARNING "Include directory does not exist: '${_include_dir}'. Intel Cryptography Primitives Library installation might be broken.")
103 endif()102 endif()
104 unset(_include_dir)103 unset(_include_dir)
105 endif()104 endif()
106 list(APPEND IPPCP_LIBRARIES IPPCP::${_component})105 list(APPEND IPPCP_LIBRARIES IPPCP::${_component})
107 set(IPPCP_${_component}_FOUND 1)106 set(IPPCP_${_component}_FOUND 1)
108 elseif (IPPCP_FIND_REQUIRED AND IPPCP_FIND_REQUIRED_${_component})107 elseif (IPPCP_FIND_REQUIRED AND IPPCP_FIND_REQUIRED_${_component})
109 message(STATUS "Missed required Intel IPP Cryptography component: ${_component}")108 message(STATUS "Missed required Intel Cryptography Primitives Library component: ${_component}")
110 message(STATUS " library not found:\n ${PATH_TO_LIBRARY}")109 message(STATUS " library not found:\n ${PATH_TO_LIBRARY}")
111 if (${LINKAGE_TYPE} MATCHES "SHARED")110 if (${LINKAGE_TYPE} MATCHES "SHARED")
112 message(STATUS "You may try to search for static library by unsetting IPPCP_SHARED variable.")111 message(STATUS "You may try to search for static library by unsetting IPPCP_SHARED variable.")
diff --git a/sources/cmake/ippcp-utils.cmake b/sources/cmake/ippcp-utils.cmake
index 1af45bb..b2eb2df 100644
--- a/sources/cmake/ippcp-utils.cmake
+++ b/sources/cmake/ippcp-utils.cmake
@@ -23,20 +23,20 @@ macro(ippcp_getlibversion VERSION_FILE)
23 unset(IPPCP_INTERFACE_VERSION_MINOR)23 unset(IPPCP_INTERFACE_VERSION_MINOR)
24 file(STRINGS "${VERSION_FILE}" FILE_CONTENTS)24 file(STRINGS "${VERSION_FILE}" FILE_CONTENTS)
25 foreach(LINE ${FILE_CONTENTS})25 foreach(LINE ${FILE_CONTENTS})
26 if ("${LINE}" MATCHES "#define IPP_VERSION_MAJOR")26 if ("${LINE}" MATCHES "#define CRYPTO_LIB_VERSION_MAJOR")
27 string(REGEX REPLACE "^#define +IPP_VERSION_MAJOR +\([0-9]+\).*$" "\\1" IPPCP_VERSION_MAJOR ${LINE})27 string(REGEX REPLACE "^#define +CRYPTO_LIB_VERSION_MAJOR +\([0-9]+\).*$" "\\1" IPPCP_VERSION_MAJOR ${LINE})
28 endif()28 endif()
29 if ("${LINE}" MATCHES "#define IPP_VERSION_MINOR")29 if ("${LINE}" MATCHES "#define CRYPTO_LIB_VERSION_MINOR")
30 string(REGEX REPLACE "^#define +IPP_VERSION_MINOR +\([0-9]+\).*$" "\\1" IPPCP_VERSION_MINOR ${LINE})30 string(REGEX REPLACE "^#define +CRYPTO_LIB_VERSION_MINOR +\([0-9]+\).*$" "\\1" IPPCP_VERSION_MINOR ${LINE})
31 endif()31 endif()
32 if ("${LINE}" MATCHES "#define IPP_VERSION_UPDATE")32 if ("${LINE}" MATCHES "#define CRYPTO_LIB_VERSION_PATCH")
33 string(REGEX REPLACE "^#define +IPP_VERSION_UPDATE +\([0-9]+\).*$" "\\1" IPPCP_VERSION_UPDATE ${LINE})33 string(REGEX REPLACE "^#define +CRYPTO_LIB_VERSION_PATCH +\([0-9]+\).*$" "\\1" IPPCP_VERSION_UPDATE ${LINE})
34 endif()34 endif()
35 if ("${LINE}" MATCHES "#define IPP_INTERFACE_VERSION_MAJOR")35 if ("${LINE}" MATCHES "#define CRYPTO_LIB_INTERFACE_VERSION_MAJOR")
36 string(REGEX REPLACE "^#define +IPP_INTERFACE_VERSION_MAJOR +\([0-9]+\).*$" "\\1" IPPCP_INTERFACE_VERSION_MAJOR ${LINE})36 string(REGEX REPLACE "^#define +CRYPTO_LIB_INTERFACE_VERSION_MAJOR +\([0-9]+\).*$" "\\1" IPPCP_INTERFACE_VERSION_MAJOR ${LINE})
37 endif()37 endif()
38 if ("${LINE}" MATCHES "#define IPP_INTERFACE_VERSION_MINOR")38 if ("${LINE}" MATCHES "#define CRYPTO_LIB_INTERFACE_VERSION_MINOR")
39 string(REGEX REPLACE "^#define +IPP_INTERFACE_VERSION_MINOR +\([0-9]+\).*$" "\\1" IPPCP_INTERFACE_VERSION_MINOR ${LINE})39 string(REGEX REPLACE "^#define +CRYPTO_LIB_INTERFACE_VERSION_MINOR +\([0-9]+\).*$" "\\1" IPPCP_INTERFACE_VERSION_MINOR ${LINE})
40 endif()40 endif()
41 endforeach()41 endforeach()
42 set(IPPCP_VERSION "${IPPCP_VERSION_MAJOR}.${IPPCP_VERSION_MINOR}.${IPPCP_VERSION_UPDATE}")42 set(IPPCP_VERSION "${IPPCP_VERSION_MAJOR}.${IPPCP_VERSION_MINOR}.${IPPCP_VERSION_UPDATE}")
diff --git a/sources/cmake/linux/Clang9.0.0.cmake b/sources/cmake/linux/Clang9.0.0.cmake
index 18e5182..4bb0746 100644
--- a/sources/cmake/linux/Clang9.0.0.cmake
+++ b/sources/cmake/linux/Clang9.0.0.cmake
@@ -15,7 +15,7 @@
15#=========================================================================15#=========================================================================
1616
17#17#
18# Intel® Integrated Performance Primitives Cryptography (Intel® IPP Cryptography)18# Intel® Cryptography Primitives Library
19#19#
2020
21# Security Linker flags21# Security Linker flags
@@ -77,9 +77,6 @@ endif()
77# Enable Intel® Control-Flow Enforcement Technology (Intel® CET) protection77# Enable Intel® Control-Flow Enforcement Technology (Intel® CET) protection
78set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fcf-protection=full")78set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fcf-protection=full")
7979
80# Security flag that adds compile-time and run-time checks
81set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_FORTIFY_SOURCE=2")
82
83if(NOT NONPIC_LIB)80if(NOT NONPIC_LIB)
84 # Position Independent Execution (PIE)81 # Position Independent Execution (PIE)
85 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fpic -fPIC")82 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fpic -fPIC")
@@ -106,7 +103,9 @@ if(SANITIZERS)
106endif(SANITIZERS)103endif(SANITIZERS)
107104
108# Optimization level = 3, no-debug definition (turns off asserts), warnings=errors105# Optimization level = 3, no-debug definition (turns off asserts), warnings=errors
109set (CMAKE_C_FLAGS_RELEASE " -O3 -DNDEBUG -Werror")106set(CMAKE_C_FLAGS_RELEASE " -O3 -DNDEBUG -Werror")
107# Security flag that adds compile-time and run-time checks
108set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -D_FORTIFY_SOURCE=2")
110109
111# DEBUG flags - optimization level = 0, generation GDB information (-g)110# DEBUG flags - optimization level = 0, generation GDB information (-g)
112set (CMAKE_C_FLAGS_DEBUG " -O0 -g")111set (CMAKE_C_FLAGS_DEBUG " -O0 -g")
diff --git a/sources/cmake/linux/GNU8.2.0.cmake b/sources/cmake/linux/GNU8.2.0.cmake
index 96658a8..55e60ae 100644
--- a/sources/cmake/linux/GNU8.2.0.cmake
+++ b/sources/cmake/linux/GNU8.2.0.cmake
@@ -15,7 +15,7 @@
15#=========================================================================15#=========================================================================
1616
17#17#
18# Intel® Integrated Performance Primitives Cryptography (Intel® IPP Cryptography)18# Intel® Cryptography Primitives Library
19#19#
2020
21# Security Linker flags21# Security Linker flags
@@ -51,7 +51,7 @@ set(CC_FLAGS_INLINE_ASM_UNIX_IA32 "${CC_FLAGS_INLINE_ASM_UNIX_IA32} -m32")
51# EBP is used as a general-purpose register in optimizations51# EBP is used as a general-purpose register in optimizations
52set(CC_FLAGS_INLINE_ASM_UNIX_IA32 "${CC_FLAGS_INLINE_ASM_UNIX_IA32} -fomit-frame-pointer")52set(CC_FLAGS_INLINE_ASM_UNIX_IA32 "${CC_FLAGS_INLINE_ASM_UNIX_IA32} -fomit-frame-pointer")
5353
54# Do not use the specified registres in dispatcher compilation54# Do not use the specified registers in dispatcher compilation
55set(CC_FLAGS_INLINE_ASM_UNIX_INTEL64 "${CC_FLAGS_INLINE_ASM_UNIX} -ffixed-rdi -ffixed-rsi -ffixed-rbx -ffixed-rcx -ffixed-rdx -ffixed-rbp -ffixed-r8 -ffixed-r9 -ffixed-r12 -ffixed-r13 -ffixed-r14 -ffixed-r15")55set(CC_FLAGS_INLINE_ASM_UNIX_INTEL64 "${CC_FLAGS_INLINE_ASM_UNIX} -ffixed-rdi -ffixed-rsi -ffixed-rbx -ffixed-rcx -ffixed-rdx -ffixed-rbp -ffixed-r8 -ffixed-r9 -ffixed-r12 -ffixed-r13 -ffixed-r14 -ffixed-r15")
5656
57set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${LIBRARY_DEFINES}")57set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${LIBRARY_DEFINES}")
@@ -73,9 +73,6 @@ if ((${ARCH} MATCHES "ia32") OR (NOT NONPIC_LIB))
73 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstack-protector")73 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstack-protector")
74endif()74endif()
7575
76# Security flag that adds compile-time and run-time checks
77set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_FORTIFY_SOURCE=2")
78
79if(NOT NONPIC_LIB)76if(NOT NONPIC_LIB)
80 # Position Independent Execution (PIE)77 # Position Independent Execution (PIE)
81 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fpic -fPIC")78 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fpic -fPIC")
@@ -96,7 +93,9 @@ if(${ARCH} MATCHES "ia32")
96endif(${ARCH} MATCHES "ia32")93endif(${ARCH} MATCHES "ia32")
9794
98# Optimization level = 3, no-debug definition (turns off asserts), warnings=errors95# Optimization level = 3, no-debug definition (turns off asserts), warnings=errors
99set (CMAKE_C_FLAGS_RELEASE " -O3 -DNDEBUG -Werror")96set(CMAKE_C_FLAGS_RELEASE " -O3 -DNDEBUG -Werror")
97# Security flag that adds compile-time and run-time checks
98set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -D_FORTIFY_SOURCE=2")
10099
101set(w7_opt "${w7_opt} -march=pentium4 -msse2")100set(w7_opt "${w7_opt} -march=pentium4 -msse2")
102set(s8_opt "${s8_opt} -march=core2 -mssse3")101set(s8_opt "${s8_opt} -march=core2 -mssse3")
diff --git a/sources/cmake/linux/Intel19.0.0.cmake b/sources/cmake/linux/Intel19.0.0.cmake
index c1d4850..8f0c3ae 100644
--- a/sources/cmake/linux/Intel19.0.0.cmake
+++ b/sources/cmake/linux/Intel19.0.0.cmake
@@ -15,13 +15,13 @@
15#=========================================================================15#=========================================================================
1616
17#17#
18# Intel® Integrated Performance Primitives Cryptography (Intel® IPP Cryptography)18# Intel® Cryptography Primitives Library
19#19#
2020
21# Linker flags21# Linker flags
2222
23# Security Linker flags23# Security Linker flags
24set(LINK_FLAG_SECURITY "") 24set(LINK_FLAG_SECURITY "")
25# Disallows undefined symbols in object files. Undefined symbols in shared libraries are still allowed25# Disallows undefined symbols in object files. Undefined symbols in shared libraries are still allowed
26set(LINK_FLAG_SECURITY "${LINK_FLAG_SECURITY} -Wl,-z,defs")26set(LINK_FLAG_SECURITY "${LINK_FLAG_SECURITY} -Wl,-z,defs")
27# Stack execution protection27# Stack execution protection
@@ -54,7 +54,7 @@ set(CC_FLAGS_INLINE_ASM_UNIX_IA32 "${CC_FLAGS_INLINE_ASM_UNIX_IA32} -m32")
54# EBP is used as a general-purpose register in optimizations54# EBP is used as a general-purpose register in optimizations
55set(CC_FLAGS_INLINE_ASM_UNIX_IA32 "${CC_FLAGS_INLINE_ASM_UNIX_IA32} -fomit-frame-pointer")55set(CC_FLAGS_INLINE_ASM_UNIX_IA32 "${CC_FLAGS_INLINE_ASM_UNIX_IA32} -fomit-frame-pointer")
5656
57# Do not use the specified registres in dispatcher compilation57# Do not use the specified registers in dispatcher compilation
58set(CC_FLAGS_INLINE_ASM_UNIX_INTEL64 "${CC_FLAGS_INLINE_ASM_UNIX} -ffixed-rdi -ffixed-rsi -ffixed-rbx -ffixed-rcx -ffixed-rdx -ffixed-rbp -ffixed-r8 -ffixed-r9 -ffixed-r12 -ffixed-r13 -ffixed-r14 -ffixed-r15")58set(CC_FLAGS_INLINE_ASM_UNIX_INTEL64 "${CC_FLAGS_INLINE_ASM_UNIX} -ffixed-rdi -ffixed-rsi -ffixed-rbx -ffixed-rcx -ffixed-rdx -ffixed-rbp -ffixed-r8 -ffixed-r9 -ffixed-r12 -ffixed-r13 -ffixed-r14 -ffixed-r15")
5959
60set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${LIBRARY_DEFINES}")60set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${LIBRARY_DEFINES}")
@@ -77,9 +77,6 @@ if ((${ARCH} MATCHES "ia32") OR (NOT NONPIC_LIB))
77 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstack-protector")77 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstack-protector")
78endif()78endif()
7979
80# Security flag that adds compile-time and run-time checks
81set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_FORTIFY_SOURCE=2")
82
83# Format string vulnerabilities80# Format string vulnerabilities
84set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wformat -Wformat-security")81set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wformat -Wformat-security")
8582
@@ -99,7 +96,10 @@ if(CODE_COVERAGE)
99endif()96endif()
10097
101# Optimization level = 3, no-debug definition (turns off asserts), warning level = 3, treat warnings as errors98# Optimization level = 3, no-debug definition (turns off asserts), warning level = 3, treat warnings as errors
102set (CMAKE_C_FLAGS_RELEASE " -O3 -DNDEBUG -w3 -Werror")99set(CMAKE_C_FLAGS_RELEASE " -O3 -DNDEBUG -w3 -Werror")
100# Security flag that adds compile-time and run-time checks
101set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -D_FORTIFY_SOURCE=2")
102
103# DEBUG flags Optimization level = 0, generation maximum GDB information (-g3)103# DEBUG flags Optimization level = 0, generation maximum GDB information (-g3)
104set (CMAKE_C_FLAGS_DEBUG " -O0 -g3")104set (CMAKE_C_FLAGS_DEBUG " -O0 -g3")
105105
diff --git a/sources/cmake/linux/IntelLLVM2023.1.0.cmake b/sources/cmake/linux/IntelLLVM2023.1.0.cmake
index babc289..2b26334 100644
--- a/sources/cmake/linux/IntelLLVM2023.1.0.cmake
+++ b/sources/cmake/linux/IntelLLVM2023.1.0.cmake
@@ -15,13 +15,13 @@
15#=========================================================================15#=========================================================================
1616
17#17#
18# Intel® Integrated Performance Primitives Cryptography (Intel® IPP Cryptography)18# Intel® Cryptography Primitives Library
19#19#
2020
21# Linker flags21# Linker flags
2222
23# Security Linker flags23# Security Linker flags
24set(LINK_FLAG_SECURITY "") 24set(LINK_FLAG_SECURITY "")
25# Disallows undefined symbols in object files. Undefined symbols in shared libraries are still allowed25# Disallows undefined symbols in object files. Undefined symbols in shared libraries are still allowed
26set(LINK_FLAG_SECURITY "${LINK_FLAG_SECURITY} -Wl,-z,defs")26set(LINK_FLAG_SECURITY "${LINK_FLAG_SECURITY} -Wl,-z,defs")
27# Stack execution protection27# Stack execution protection
@@ -54,7 +54,7 @@ set(CC_FLAGS_INLINE_ASM_UNIX_IA32 "${CC_FLAGS_INLINE_ASM_UNIX_IA32} -m32")
54# EBP is used as a general-purpose register in optimizations54# EBP is used as a general-purpose register in optimizations
55set(CC_FLAGS_INLINE_ASM_UNIX_IA32 "${CC_FLAGS_INLINE_ASM_UNIX_IA32} -fomit-frame-pointer")55set(CC_FLAGS_INLINE_ASM_UNIX_IA32 "${CC_FLAGS_INLINE_ASM_UNIX_IA32} -fomit-frame-pointer")
5656
57# Do not use the specified registres in dispatcher compilation57# Do not use the specified registers in dispatcher compilation
58set(CC_FLAGS_INLINE_ASM_UNIX_INTEL64 "${CC_FLAGS_INLINE_ASM_UNIX} -ffixed-rdi -ffixed-rsi -ffixed-rbx -ffixed-rcx -ffixed-rdx -ffixed-rbp -ffixed-r8 -ffixed-r9 -ffixed-r12 -ffixed-r13 -ffixed-r14 -ffixed-r15")58set(CC_FLAGS_INLINE_ASM_UNIX_INTEL64 "${CC_FLAGS_INLINE_ASM_UNIX} -ffixed-rdi -ffixed-rsi -ffixed-rbx -ffixed-rcx -ffixed-rdx -ffixed-rbp -ffixed-r8 -ffixed-r9 -ffixed-r12 -ffixed-r13 -ffixed-r14 -ffixed-r15")
5959
60set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${LIBRARY_DEFINES}")60set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${LIBRARY_DEFINES}")
@@ -73,9 +73,6 @@ if ((${ARCH} MATCHES "ia32") OR (NOT NONPIC_LIB))
73 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstack-protector")73 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstack-protector")
74endif()74endif()
7575
76# Security flag that adds compile-time and run-time checks
77set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_FORTIFY_SOURCE=2")
78
79# Format string vulnerabilities76# Format string vulnerabilities
80set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wformat -Wformat-security -Wunknown-pragmas")77set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wformat -Wformat-security -Wunknown-pragmas")
8178
@@ -95,7 +92,9 @@ if(CODE_COVERAGE)
95endif()92endif()
9693
97# Optimization level = 3, no-debug definition (turns off asserts), warning level = 3, treat warnings as errors94# Optimization level = 3, no-debug definition (turns off asserts), warning level = 3, treat warnings as errors
98set (CMAKE_C_FLAGS_RELEASE " -Ofast -DNDEBUG -Wall -Wno-unused-function -Wno-missing-braces -Werror")95set(CMAKE_C_FLAGS_RELEASE " -Ofast -DNDEBUG -Wall -Wno-unused-function -Werror")
96# Security flag that adds compile-time and run-time checks
97set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -D_FORTIFY_SOURCE=2")
9998
100# Alignment for structures on byte boundaries (= 16)99# Alignment for structures on byte boundaries (= 16)
101set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Zp16")100set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Zp16")
@@ -104,13 +103,13 @@ if(${ARCH} MATCHES "ia32")
104 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32")103 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32")
105endif(${ARCH} MATCHES "ia32")104endif(${ARCH} MATCHES "ia32")
106105
107set(px_opt "${px_opt} -mia32")106set(px_opt "${px_opt} ") # note: no flags for the default version
108set(w7_opt "${w7_opt} -march=pentium4 -msse2")107set(w7_opt "${w7_opt} -msse2")
109set(s8_opt "${s8_opt} -march=core2 -mssse3")108set(s8_opt "${s8_opt} -march=core2 -mssse3")
110set(p8_opt "${p8_opt} -march=nehalem -msse4.2 -maes -mpclmul -msha")109set(p8_opt "${p8_opt} -march=nehalem -msse4.2 -maes -mpclmul -msha")
111set(g9_opt "${g9_opt} -march=sandybridge -mavx -maes -mpclmul -msha -mrdrnd -mrdseed")110set(g9_opt "${g9_opt} -march=sandybridge -mavx -maes -mpclmul -msha -mrdrnd -mrdseed")
112set(h9_opt "${h9_opt} -march=haswell -mavx2 -maes -mvaes -mpclmul -mvpclmulqdq -msha -mrdrnd -mrdseed")111set(h9_opt "${h9_opt} -march=haswell -mavx2 -maes -mvaes -mpclmul -mvpclmulqdq -msha -mrdrnd -mrdseed")
113set(mx_opt "${mx_opt} -march=pentium")112set(mx_opt "${mx_opt} ") # note: no flags for the default version
114set(m7_opt "${m7_opt} -march=nocona -msse3")113set(m7_opt "${m7_opt} -march=nocona -msse3")
115set(n8_opt "${n8_opt} -march=core2 -mssse3")114set(n8_opt "${n8_opt} -march=core2 -mssse3")
116set(y8_opt "${y8_opt} -march=nehalem -msse4.2 -maes -mpclmul -msha")115set(y8_opt "${y8_opt} -march=nehalem -msse4.2 -maes -mpclmul -msha")
diff --git a/sources/cmake/linux/common.cmake b/sources/cmake/linux/common.cmake
index c0c5fd8..4b47261 100644
--- a/sources/cmake/linux/common.cmake
+++ b/sources/cmake/linux/common.cmake
@@ -15,7 +15,7 @@
15#=========================================================================15#=========================================================================
1616
17#17#
18# Intel® Integrated Performance Primitives Cryptography (Intel® IPP Cryptography)18# Intel® Cryptography Primitives Library
19#19#
2020
21set(OS_DEFAULT_COMPILER Intel19.0.0)21set(OS_DEFAULT_COMPILER Intel19.0.0)
diff --git a/sources/cmake/macosx/AppleClang11.0.0.cmake b/sources/cmake/macosx/AppleClang11.0.0.cmake
index 5f2ad63..2d5ec67 100644
--- a/sources/cmake/macosx/AppleClang11.0.0.cmake
+++ b/sources/cmake/macosx/AppleClang11.0.0.cmake
@@ -15,7 +15,7 @@
15#=========================================================================15#=========================================================================
1616
17#17#
18# Intel® Integrated Performance Primitives Cryptography (Intel® IPP Cryptography)18# Intel® Cryptography Primitives Library
19#19#
2020
21# Security Linker flags21# Security Linker flags
@@ -78,9 +78,6 @@ if ((${ARCH} MATCHES "ia32") OR (NOT NONPIC_LIB))
78 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstack-protector")78 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstack-protector")
79endif()79endif()
8080
81# Security flag that adds compile-time and run-time checks
82set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_FORTIFY_SOURCE=2")
83
84if(NOT NONPIC_LIB)81if(NOT NONPIC_LIB)
85 # Position Independent Execution (PIE)82 # Position Independent Execution (PIE)
86 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fpic -fPIC")83 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fpic -fPIC")
@@ -99,7 +96,9 @@ if(${ARCH} MATCHES "ia32")
99endif(${ARCH} MATCHES "ia32")96endif(${ARCH} MATCHES "ia32")
10097
101# Optimization level = 3, no-debug definition (turns off asserts), warnings=errors98# Optimization level = 3, no-debug definition (turns off asserts), warnings=errors
102set (CMAKE_C_FLAGS_RELEASE " -O3 -DNDEBUG -Werror")99set(CMAKE_C_FLAGS_RELEASE " -O3 -DNDEBUG -Werror")
100# Security flag that adds compile-time and run-time checks
101set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -D_FORTIFY_SOURCE=2")
103102
104set(w7_opt "${w7_opt} -march=pentium4 -msse2")103set(w7_opt "${w7_opt} -march=pentium4 -msse2")
105set(s8_opt "${s8_opt} -march=core2 -mssse3")104set(s8_opt "${s8_opt} -march=core2 -mssse3")
diff --git a/sources/cmake/macosx/Intel19.0.0.cmake b/sources/cmake/macosx/Intel19.0.0.cmake
index b5456a1..bf1ea47 100644
--- a/sources/cmake/macosx/Intel19.0.0.cmake
+++ b/sources/cmake/macosx/Intel19.0.0.cmake
@@ -15,7 +15,7 @@
15#=========================================================================15#=========================================================================
1616
17#17#
18# Intel® Integrated Performance Primitives Cryptography (Intel® IPP Cryptography)18# Intel® Cryptography Primitives Library
19#19#
2020
21# linker21# linker
@@ -47,7 +47,7 @@ set(CC_FLAGS_INLINE_ASM_UNIX_IA32 "${CC_FLAGS_INLINE_ASM_UNIX_IA32} -m32")
47# EBP is used as a general-purpose register in optimizations47# EBP is used as a general-purpose register in optimizations
48set(CC_FLAGS_INLINE_ASM_UNIX_IA32 "${CC_FLAGS_INLINE_ASM_UNIX_IA32} -fomit-frame-pointer")48set(CC_FLAGS_INLINE_ASM_UNIX_IA32 "${CC_FLAGS_INLINE_ASM_UNIX_IA32} -fomit-frame-pointer")
4949
50# Do not use the specified registres in dispatcher compilation50# Do not use the specified registers in dispatcher compilation
51set(CC_FLAGS_INLINE_ASM_UNIX_INTEL64 "${CC_FLAGS_INLINE_ASM_UNIX} -ffixed-rdi -ffixed-rsi -ffixed-rbx -ffixed-rcx -ffixed-rdx -ffixed-rbp -ffixed-r8 -ffixed-r9 -ffixed-r12 -ffixed-r13 -ffixed-r14 -ffixed-r15")51set(CC_FLAGS_INLINE_ASM_UNIX_INTEL64 "${CC_FLAGS_INLINE_ASM_UNIX} -ffixed-rdi -ffixed-rsi -ffixed-rbx -ffixed-rcx -ffixed-rdx -ffixed-rbp -ffixed-r8 -ffixed-r9 -ffixed-r12 -ffixed-r13 -ffixed-r14 -ffixed-r15")
5252
53set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${LIBRARY_DEFINES}")53set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${LIBRARY_DEFINES}")
@@ -68,9 +68,6 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -diag-error 266 -diag-disable 13366
68# Stack-based Buffer Overrun Detection68# Stack-based Buffer Overrun Detection
69set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstack-protector")69set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstack-protector")
7070
71# Security flag that adds compile-time and run-time checks
72set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_FORTIFY_SOURCE=2")
73
74# Format string vulnerabilities71# Format string vulnerabilities
75set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wformat -Wformat-security")72set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wformat -Wformat-security")
7673
@@ -86,7 +83,9 @@ if(CODE_COVERAGE)
86endif()83endif()
8784
88# Optimization level = 3, no-debug definition (turns off asserts), warning level = 3, treat warnings as errors85# Optimization level = 3, no-debug definition (turns off asserts), warning level = 3, treat warnings as errors
89set (CMAKE_C_FLAGS_RELEASE " -O3 -DNDEBUG -w3 -Werror")86set(CMAKE_C_FLAGS_RELEASE " -O3 -DNDEBUG -w3 -Werror")
87# Security flag that adds compile-time and run-time checks
88set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -D_FORTIFY_SOURCE=2")
9089
91# Compile for x6490# Compile for x64
92set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -arch_only x86_64")91set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -arch_only x86_64")
diff --git a/sources/cmake/macosx/common.cmake b/sources/cmake/macosx/common.cmake
index 874b01b..74e8b4b 100644
--- a/sources/cmake/macosx/common.cmake
+++ b/sources/cmake/macosx/common.cmake
@@ -15,7 +15,7 @@
15#=========================================================================15#=========================================================================
1616
17#17#
18# Intel® Integrated Performance Primitives Cryptography (Intel® IPP Cryptography)18# Intel® Cryptography Primitives Library
19#19#
2020
21set(OS_DEFAULT_COMPILER Intel19.0.0)21set(OS_DEFAULT_COMPILER Intel19.0.0)
diff --git a/sources/cmake/os_common.cmake b/sources/cmake/os_common.cmake
index 65f95ac..6379c94 100644
--- a/sources/cmake/os_common.cmake
+++ b/sources/cmake/os_common.cmake
@@ -15,10 +15,10 @@
15#=========================================================================15#=========================================================================
1616
17#17#
18# Intel® Integrated Performance Primitives Cryptography (Intel® IPP Cryptography)18# Intel® Cryptography Primitives Library
19#19#
2020
21# The ability to build custom Intel® IPP Cryptography library - enable specific CPU features at compile time21# The ability to build custom Intel® Cryptography Primitives Library - enable specific CPU features at compile time
22if((NOT MERGED_BLD) AND (NOT "${IPPCP_CUSTOM_BUILD}" STREQUAL ""))22if((NOT MERGED_BLD) AND (NOT "${IPPCP_CUSTOM_BUILD}" STREQUAL ""))
23 set(LIBRARY_DEFINES "${LIBRARY_DEFINES} -DIPPCP_CUSTOM_BUILD")23 set(LIBRARY_DEFINES "${LIBRARY_DEFINES} -DIPPCP_CUSTOM_BUILD")
24 foreach(feature ${IPPCP_CUSTOM_BUILD})24 foreach(feature ${IPPCP_CUSTOM_BUILD})
diff --git a/sources/cmake/pkg-config/crypto_mb-dynamic.pc.in b/sources/cmake/pkg-config/crypto_mb-dynamic.pc.in
index 7b7b3d6..5ba9464 100644
--- a/sources/cmake/pkg-config/crypto_mb-dynamic.pc.in
+++ b/sources/cmake/pkg-config/crypto_mb-dynamic.pc.in
@@ -18,7 +18,7 @@ prefix=@PREFIX_FOR_PC_FILE@
18libdir=@LIBDIR_FOR_PC_FILE@18libdir=@LIBDIR_FOR_PC_FILE@
19includedir=@INCDIR_FOR_PC_FILE@19includedir=@INCDIR_FOR_PC_FILE@
2020
21Name: Intel® Integrated Performance Primitives (Intel® IPP) Cryptography Crypto Multi-Buffer Library21Name: Intel® Cryptography Primitives Library Crypto Multi-Buffer Library
22Description: This library consists of highly-optimized kernels taking advantage of Intel’s multi-buffer processing and Intel® AVX-512 instruction set.22Description: This library consists of highly-optimized kernels taking advantage of Intel’s multi-buffer processing and Intel® AVX-512 instruction set.
23URL: https://github.com/intel/ipp-crypto23URL: https://github.com/intel/ipp-crypto
24Version: @IPPCP_VERSION@24Version: @IPPCP_VERSION@
diff --git a/sources/cmake/pkg-config/crypto_mb-static.pc.in b/sources/cmake/pkg-config/crypto_mb-static.pc.in
index 3101b2f..2a99e34 100644
--- a/sources/cmake/pkg-config/crypto_mb-static.pc.in
+++ b/sources/cmake/pkg-config/crypto_mb-static.pc.in
@@ -18,7 +18,7 @@ prefix=@PREFIX_FOR_PC_FILE@
18libdir=@LIBDIR_FOR_PC_FILE@18libdir=@LIBDIR_FOR_PC_FILE@
19includedir=@INCDIR_FOR_PC_FILE@19includedir=@INCDIR_FOR_PC_FILE@
2020
21Name: Intel® Integrated Performance Primitives (Intel® IPP) Cryptography Crypto Multi-Buffer Library21Name: Intel® Cryptography Primitives Library Crypto Multi-Buffer Library
22Description: This library consists of highly-optimized kernels taking advantage of Intel’s multi-buffer processing and Intel® AVX-512 instruction set.22Description: This library consists of highly-optimized kernels taking advantage of Intel’s multi-buffer processing and Intel® AVX-512 instruction set.
23URL: https://github.com/intel/ipp-crypto23URL: https://github.com/intel/ipp-crypto
24Version: @IPPCP_VERSION@24Version: @IPPCP_VERSION@
diff --git a/sources/cmake/pkg-config/ippcp-dynamic.pc.in b/sources/cmake/pkg-config/ippcp-dynamic.pc.in
index 0067324..c154fdb 100644
--- a/sources/cmake/pkg-config/ippcp-dynamic.pc.in
+++ b/sources/cmake/pkg-config/ippcp-dynamic.pc.in
@@ -18,7 +18,7 @@ prefix=@PREFIX_FOR_PC_FILE@
18libdir=@LIBDIR_FOR_PC_FILE@18libdir=@LIBDIR_FOR_PC_FILE@
19includedir=@INCDIR_FOR_PC_FILE@19includedir=@INCDIR_FOR_PC_FILE@
2020
21Name: Intel® Integrated Performance Primitives (Intel® IPP) Cryptography Library21Name: Intel® Cryptography Primitives Library
22Description: Secure, fast and lightweight library of building blocks for cryptography, highly-optimized for various Intel® CPUs.22Description: Secure, fast and lightweight library of building blocks for cryptography, highly-optimized for various Intel® CPUs.
23URL: https://github.com/intel/ipp-crypto23URL: https://github.com/intel/ipp-crypto
24Version: @IPPCP_VERSION@24Version: @IPPCP_VERSION@
diff --git a/sources/cmake/pkg-config/ippcp-static.pc.in b/sources/cmake/pkg-config/ippcp-static.pc.in
index 3cc69f4..b66e0e1 100644
--- a/sources/cmake/pkg-config/ippcp-static.pc.in
+++ b/sources/cmake/pkg-config/ippcp-static.pc.in
@@ -18,7 +18,7 @@ prefix=@PREFIX_FOR_PC_FILE@
18libdir=@LIBDIR_FOR_PC_FILE@18libdir=@LIBDIR_FOR_PC_FILE@
19includedir=@INCDIR_FOR_PC_FILE@19includedir=@INCDIR_FOR_PC_FILE@
2020
21Name: Intel® Integrated Performance Primitives (Intel® IPP) Cryptography Library21Name: Intel® Cryptography Primitives Library
22Description: Secure, fast and lightweight library of building blocks for cryptography, highly-optimized for various Intel® CPUs.22Description: Secure, fast and lightweight library of building blocks for cryptography, highly-optimized for various Intel® CPUs.
23URL: https://github.com/intel/ipp-crypto23URL: https://github.com/intel/ipp-crypto
24Version: @IPPCP_VERSION@24Version: @IPPCP_VERSION@
diff --git a/sources/cmake/windows/Intel19.0.0.cmake b/sources/cmake/windows/Intel19.0.0.cmake
index cdfdbeb..87b03db 100644
--- a/sources/cmake/windows/Intel19.0.0.cmake
+++ b/sources/cmake/windows/Intel19.0.0.cmake
@@ -15,7 +15,7 @@
15#=========================================================================15#=========================================================================
1616
17#17#
18# Intel® Integrated Performance Primitives Cryptography (Intel® IPP Cryptography)18# Intel® Cryptography Primitives Library
19#19#
2020
21# linker21# linker
@@ -36,11 +36,13 @@ if(${ARCH} MATCHES "ia32")
36 # When /SAFESEH is specified, the linker will only produce an image if it can also produce a table of the image's safe exception handlers.36 # When /SAFESEH is specified, the linker will only produce an image if it can also produce a table of the image's safe exception handlers.
37 set(LINK_FLAG_DYNAMIC_WINDOWS "${LINK_FLAG_DYNAMIC_WINDOWS} /SAFESEH")37 set(LINK_FLAG_DYNAMIC_WINDOWS "${LINK_FLAG_DYNAMIC_WINDOWS} /SAFESEH")
38else()38else()
39 # The /LARGEADDRESSAWARE option tells the linker that the application can handle addresses larger than 2 gigabytes. 39 # The /LARGEADDRESSAWARE option tells the linker that the application can handle addresses larger than 2 gigabytes.
40 set(LINK_FLAG_DYNAMIC_WINDOWS "${LINK_FLAG_DYNAMIC_WINDOWS} /LARGEADDRESSAWARE")40 set(LINK_FLAG_DYNAMIC_WINDOWS "${LINK_FLAG_DYNAMIC_WINDOWS} /LARGEADDRESSAWARE")
41 # This option modifies the header of an executable image, a .dll file or .exe file, to indicate whether ASLR with 64-bit addresses is supported.41 # This option modifies the header of an executable image, a .dll file or .exe file, to indicate whether ASLR with 64-bit addresses is supported.
42 set(LINK_FLAG_DYNAMIC_WINDOWS "${LINK_FLAG_DYNAMIC_WINDOWS} /HIGHENTROPYVA")42 set(LINK_FLAG_DYNAMIC_WINDOWS "${LINK_FLAG_DYNAMIC_WINDOWS} /HIGHENTROPYVA")
43endif(${ARCH} MATCHES "ia32")43endif(${ARCH} MATCHES "ia32")
44# Linker option to mitigate DLL hijacking vulnerability - removes CWD from the DLL search order
45set(LINK_FLAG_DYNAMIC_WINDOWS "${LINK_FLAG_DYNAMIC_WINDOWS} /DEPENDENTLOADFLAG:0x2000")
4446
45# suppress warning LNK4221:47# suppress warning LNK4221:
46# "This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library"48# "This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library"
@@ -93,8 +95,6 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Qsox-")
93set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Gy")95set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Gy")
94# C std96# C std
95set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Qstd=c99")97set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Qstd=c99")
96# Security flag that adds compile-time and run-time checks
97set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /D_FORTIFY_SOURCE=2")
98# Enable Intel® Control-Flow Enforcement Technology (Intel® CET) protection98# Enable Intel® Control-Flow Enforcement Technology (Intel® CET) protection
99set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Qcf-protection:full")99set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Qcf-protection:full")
100100
@@ -113,6 +113,8 @@ set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /DDEBUG")
113113
114# Causes the application to use the multithread, static version of the run-time library.114# Causes the application to use the multithread, static version of the run-time library.
115set(CMAKE_C_FLAGS_RELEASE "/MT")115set(CMAKE_C_FLAGS_RELEASE "/MT")
116# Security flag that adds compile-time and run-time checks
117set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /D_FORTIFY_SOURCE=2")
116# Omits the default C runtime library name from the .obj file.118# Omits the default C runtime library name from the .obj file.
117set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /Zl")119set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /Zl")
118# "Maximize Speed". Selects a predefined set of options that affect the size and speed of generated code.120# "Maximize Speed". Selects a predefined set of options that affect the size and speed of generated code.
@@ -120,7 +122,7 @@ set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /O3") # /Ob2 is included in
120# No-debug macro122# No-debug macro
121set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /DNDEBUG")123set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /DNDEBUG")
122124
123# suppress warning #10120: overriding '/O2' with '/O3' 125# suppress warning #10120: overriding '/O2' with '/O3'
124# CMake bug: cmake cannot change the property "Optimization" to /O3 in MSVC project126# CMake bug: cmake cannot change the property "Optimization" to /O3 in MSVC project
125set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -wd10120")127set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -wd10120")
126128
diff --git a/sources/cmake/windows/IntelLLVM2023.1.0.cmake b/sources/cmake/windows/IntelLLVM2023.1.0.cmake
index dd570ed..e8210d6 100644
--- a/sources/cmake/windows/IntelLLVM2023.1.0.cmake
+++ b/sources/cmake/windows/IntelLLVM2023.1.0.cmake
@@ -15,7 +15,7 @@
15#===============================================================================15#===============================================================================
1616
17#17#
18# Intel® Integrated Performance Primitives Cryptography (Intel® IPP Cryptography)18# Intel® Cryptography Primitives Library
19#19#
2020
21# linker21# linker
@@ -34,6 +34,8 @@ set(LINK_FLAG_DYNAMIC_WINDOWS "${LINK_FLAG_DYNAMIC_WINDOWS} /NXCOMPAT")
34set(LINK_FLAG_DYNAMIC_WINDOWS "${LINK_FLAG_DYNAMIC_WINDOWS} /DYNAMICBASE")34set(LINK_FLAG_DYNAMIC_WINDOWS "${LINK_FLAG_DYNAMIC_WINDOWS} /DYNAMICBASE")
35# Enable Intel® Control-Flow Enforcement Technology (Intel® CET) protection35# Enable Intel® Control-Flow Enforcement Technology (Intel® CET) protection
36set(LINK_FLAG_DYNAMIC_WINDOWS "${LINK_FLAG_DYNAMIC_WINDOWS} /CETCOMPAT")36set(LINK_FLAG_DYNAMIC_WINDOWS "${LINK_FLAG_DYNAMIC_WINDOWS} /CETCOMPAT")
37# Linker option to mitigate DLL hijacking vulnerability - removes CWD from the DLL search order
38set(LINK_FLAG_DYNAMIC_WINDOWS "${LINK_FLAG_DYNAMIC_WINDOWS} /DEPENDENTLOADFLAG:0x2000")
3739
38if(${ARCH} MATCHES "ia32")40if(${ARCH} MATCHES "ia32")
39 # When /SAFESEH is specified, the linker will only produce an image if it can also produce a table of the image's safe exception handlers.41 # When /SAFESEH is specified, the linker will only produce an image if it can also produce a table of the image's safe exception handlers.
@@ -45,9 +47,6 @@ else()
45 set(LINK_FLAG_DYNAMIC_WINDOWS "${LINK_FLAG_DYNAMIC_WINDOWS} /HIGHENTROPYVA")47 set(LINK_FLAG_DYNAMIC_WINDOWS "${LINK_FLAG_DYNAMIC_WINDOWS} /HIGHENTROPYVA")
46endif(${ARCH} MATCHES "ia32")48endif(${ARCH} MATCHES "ia32")
4749
48# Disables linking to Intel® libraries
49set(LINK_FLAG_DYNAMIC_WINDOWS "${LINK_FLAG_DYNAMIC_WINDOWS} /Qno-intel-lib")
50
51# Link to universal C runtime and MSVC runtime. Used in dlls.50# Link to universal C runtime and MSVC runtime. Used in dlls.
52set(LINK_LIB_STATIC_RELEASE libcmt libucrt libvcruntime)51set(LINK_LIB_STATIC_RELEASE libcmt libucrt libvcruntime)
53set(LINK_LIB_STATIC_DEBUG libcmtd libucrtd libvcruntime)52set(LINK_LIB_STATIC_DEBUG libcmtd libucrtd libvcruntime)
@@ -58,10 +57,10 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${LIBRARY_DEFINES}")
58# Suppresses the display of the copyright banner when the compiler starts up and display of informational messages during compiling.57# Suppresses the display of the copyright banner when the compiler starts up and display of informational messages during compiling.
59set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /nologo")58set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /nologo")
60# Warning level = 459# Warning level = 4
61set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4")60set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4 -Wall -Wformat -Wformat-security -Werror=format-security")
62# Changes all warnings to errors.61# Changes all warnings to errors.
63#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX")62#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX")
64# Detects some buffer overruns that overwrite a function's return address, exception handler address, or certain types of parameters. 63# Detects some buffer overruns that overwrite a function's return address, exception handler address, or certain types of parameters.
65set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /GS")64set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /GS")
66# Controls how the members of a structure are packed into memory and specifies the same packing for all structures in a module.65# Controls how the members of a structure are packed into memory and specifies the same packing for all structures in a module.
67set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Zp16")66set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Zp16")
@@ -72,7 +71,7 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Qstd=c99")
72# Enable Intel® Control-Flow Enforcement Technology (Intel® CET) protection71# Enable Intel® Control-Flow Enforcement Technology (Intel® CET) protection
73set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fcf-protection:full")72set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fcf-protection:full")
74# Suppress some warnings73# Suppress some warnings
75set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Wno-missing-braces /Wno-null-pointer-arithmetic /Wno-unused-function /Wno-static-in-inline /Qno-intel-lib")74set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Wno-null-pointer-arithmetic /Wno-unused-function /Wno-static-in-inline /Qno-intel-lib")
7675
77# Causes the application to use the multithread, static version of the run-time library (debug version).76# Causes the application to use the multithread, static version of the run-time library (debug version).
78set(CMAKE_C_FLAGS_DEBUG "/MTd")77set(CMAKE_C_FLAGS_DEBUG "/MTd")
diff --git a/sources/cmake/windows/MSVC19.14.cmake b/sources/cmake/windows/MSVC19.14.cmake
index cee806f..fe19a9c 100644
--- a/sources/cmake/windows/MSVC19.14.cmake
+++ b/sources/cmake/windows/MSVC19.14.cmake
@@ -15,7 +15,7 @@
15#=========================================================================15#=========================================================================
1616
17#17#
18# Intel® Integrated Performance Primitives Cryptography (Intel® IPP Cryptography)18# Intel® Cryptography Primitives Library
19#19#
2020
21# linker21# linker
@@ -43,6 +43,8 @@ else()
43 # This option modifies the header of an executable image, a .dll file or .exe file, to indicate whether ASLR with 64-bit addresses is supported.43 # This option modifies the header of an executable image, a .dll file or .exe file, to indicate whether ASLR with 64-bit addresses is supported.
44 set(LINK_FLAG_DYNAMIC_WINDOWS "${LINK_FLAG_DYNAMIC_WINDOWS} /HIGHENTROPYVA")44 set(LINK_FLAG_DYNAMIC_WINDOWS "${LINK_FLAG_DYNAMIC_WINDOWS} /HIGHENTROPYVA")
45endif(${ARCH} MATCHES "ia32")45endif(${ARCH} MATCHES "ia32")
46# Linker option to mitigate DLL hijacking vulnerability - removes CWD from the DLL search order
47set(LINK_FLAG_DYNAMIC_WINDOWS "${LINK_FLAG_DYNAMIC_WINDOWS} /DEPENDENTLOADFLAG:0x2000")
4648
47if (MSVC_VERSION LESS_EQUAL 1800) # VS201349if (MSVC_VERSION LESS_EQUAL 1800) # VS2013
48 # Link to C runtime, used in dlls50 # Link to C runtime, used in dlls
@@ -65,7 +67,7 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /X")
65set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4")67set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4")
66# Changes all warnings to errors.68# Changes all warnings to errors.
67set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX")69set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX")
68# Detects some buffer overruns that overwrite a function's return address, exception handler address, or certain types of parameters. 70# Detects some buffer overruns that overwrite a function's return address, exception handler address, or certain types of parameters.
69set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /GS")71set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /GS")
70# Controls how the members of a structure are packed into memory and specifies the same packing for all structures in a module.72# Controls how the members of a structure are packed into memory and specifies the same packing for all structures in a module.
71set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Zp16")73set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Zp16")
diff --git a/sources/cmake/windows/common.cmake b/sources/cmake/windows/common.cmake
index baac529..ea8e282 100644
--- a/sources/cmake/windows/common.cmake
+++ b/sources/cmake/windows/common.cmake
@@ -15,7 +15,7 @@
15#=========================================================================15#=========================================================================
1616
17#17#
18# Intel® Integrated Performance Primitives Cryptography (Intel® IPP Cryptography)18# Intel® Cryptography Primitives Library
19#19#
2020
21set(OS_DEFAULT_COMPILER Intel19.0.0)21set(OS_DEFAULT_COMPILER Intel19.0.0)
diff --git a/sources/dispatcher/gen_disp_common.py b/sources/dispatcher/gen_disp_common.py
index 7950045..b99408a 100644
--- a/sources/dispatcher/gen_disp_common.py
+++ b/sources/dispatcher/gen_disp_common.py
@@ -15,7 +15,7 @@
15#=========================================================================15#=========================================================================
1616
17#17#
18# Intel(R) Integrated Performance Primitives Cryptography (Intel(R) IPP Cryptography)18# Intel(R) Cryptography Primitives Library
19#19#
2020
21import re21import re
@@ -34,28 +34,28 @@ def readNextFunction(header, curLine, headerID): ## read next function with a
34 headerID= re.sub( '.*__IPP', '__IPP', header[curLine] )34 headerID= re.sub( '.*__IPP', '__IPP', header[curLine] )
35 headerID= re.sub( "\)", '', headerID)35 headerID= re.sub( "\)", '', headerID)
36 headerID= re.sub( '[\n\s]', '', headerID )36 headerID= re.sub( '[\n\s]', '', headerID )
37 37
38 if re.match( '^\s*IPPAPI\s*\(.*', header[curLine] ) :38 if re.match( '^\s*IPPAPI\s*\(.*', header[curLine] ) :
39 FunStr= header[curLine];39 FunStr= header[curLine];
40 FunStr= re.sub('\n','',FunStr) ## remove EOL symbols40 FunStr= re.sub('\n','',FunStr) ## remove EOL symbols
41 41
42 while not re.match('.*\)\s*\)\s*$', FunStr): ## concatenate string if string is not completed42 while not re.match('.*\)\s*\)\s*$', FunStr): ## concatenate string if string is not completed
43 curLine= curLine+143 curLine= curLine+1
44 FunStr= FunStr+header[curLine]44 FunStr= FunStr+header[curLine]
45 FunStr= re.sub('\n','',FunStr) ## remove EOL symbols45 FunStr= re.sub('\n','',FunStr) ## remove EOL symbols
46 46
47 FunStr= re.sub('\s+', ' ', FunStr)47 FunStr= re.sub('\s+', ' ', FunStr)
48 48
49 s= FunStr.split(',')49 s= FunStr.split(',')
50 50
51 ## Extract function name51 ## Extract function name
52 FunName= s[1]52 FunName= s[1]
53 FunName= re.sub('\s', '', FunName)53 FunName= re.sub('\s', '', FunName)
54 54
55 ## Extract function type55 ## Extract function type
56 FunType= re.sub( '.*\(', '', s[0] )56 FunType= re.sub( '.*\(', '', s[0] )
57 #FunType= re.sub(' ', '', FunType )57 #FunType= re.sub(' ', '', FunType )
58 58
59 ## Extract function arguments59 ## Extract function arguments
60 FunArg= re.sub('.*\(.*,.+,\s*\(', '(', FunStr)60 FunArg= re.sub('.*\(.*,.+,\s*\(', '(', FunStr)
61 FunArg= re.sub('\)\s*\)', ')', FunArg)61 FunArg= re.sub('\)\s*\)', ')', FunArg)
diff --git a/sources/dispatcher/gen_disp_lin32.nonpic.py b/sources/dispatcher/gen_disp_lin32.nonpic.py
index 457dceb..5e14c2c 100644
--- a/sources/dispatcher/gen_disp_lin32.nonpic.py
+++ b/sources/dispatcher/gen_disp_lin32.nonpic.py
@@ -15,7 +15,7 @@
15#=========================================================================15#=========================================================================
1616
17#17#
18# Intel(R) Integrated Performance Primitives Cryptography (Intel(R) IPP Cryptography)18# Intel(R) Cryptography Primitives Library
19#19#
2020
21import re21import re
@@ -25,7 +25,7 @@ import hashlib
25import argparse25import argparse
2626
27parser = argparse.ArgumentParser()27parser = argparse.ArgumentParser()
28parser.add_argument('-i', '--header', action='store', required=True, help='Intel IPP Cryptography dispatcher will be generated for functions in Header')28parser.add_argument('-i', '--header', action='store', required=True, help='Intel Cryptography Primitives Library dispatcher will be generated for functions in Header')
29parser.add_argument('-o', '--out-directory', action='store', required=True, help='Output folder for generated files')29parser.add_argument('-o', '--out-directory', action='store', required=True, help='Output folder for generated files')
30parser.add_argument('-l', '--cpu-list', action='store', required=True, help='Actual CPU list: semicolon separated string')30parser.add_argument('-l', '--cpu-list', action='store', required=True, help='Actual CPU list: semicolon separated string')
31parser.add_argument('-c', '--compiler', action='store', required=True, help='Compiler')31parser.add_argument('-c', '--compiler', action='store', required=True, help='Compiler')
@@ -107,7 +107,7 @@ in_{FunName}:
107{FunName}:107{FunName}:
108 {endbr32}108 {endbr32}
109 mov eax, dword [ippcpJumpIndexForMergedLibs]109 mov eax, dword [ippcpJumpIndexForMergedLibs]
110 jmp dword [rel arraddr_{FunName} + eax*4]110 jmp dword [arraddr_{FunName} + eax*4]
111.LEnd{FunName}:111.LEnd{FunName}:
112""".format(FunName=FunName, size=size, endbr32='db 0xf3, 0x0f, 0x1e, 0xfb'))112""".format(FunName=FunName, size=size, endbr32='db 0xf3, 0x0f, 0x1e, 0xfb'))
113 ASMDISP.close()113 ASMDISP.close()
diff --git a/sources/dispatcher/gen_disp_lin32.py b/sources/dispatcher/gen_disp_lin32.py
index ca0e34a..d75a32d 100644
--- a/sources/dispatcher/gen_disp_lin32.py
+++ b/sources/dispatcher/gen_disp_lin32.py
@@ -15,7 +15,7 @@
15#=========================================================================15#=========================================================================
1616
17#17#
18# Intel(R) Integrated Performance Primitives Cryptography (Intel(R) IPP Cryptography)18# Intel(R) Cryptography Primitives Library
19#19#
2020
21import re21import re
@@ -25,7 +25,7 @@ import hashlib
25import argparse25import argparse
2626
27parser = argparse.ArgumentParser()27parser = argparse.ArgumentParser()
28parser.add_argument('-i', '--header', action='store', required=True, help='Intel IPP Cryptography dispatcher will be generated for functions in Header')28parser.add_argument('-i', '--header', action='store', required=True, help='Intel Cryptography Primitives Library dispatcher will be generated for functions in Header')
29parser.add_argument('-o', '--out-directory', action='store', required=True, help='Output folder for generated files')29parser.add_argument('-o', '--out-directory', action='store', required=True, help='Output folder for generated files')
30parser.add_argument('-l', '--cpu-list', action='store', required=True, help='Actual CPU list: semicolon separated string')30parser.add_argument('-l', '--cpu-list', action='store', required=True, help='Actual CPU list: semicolon separated string')
31parser.add_argument('-c', '--compiler', action='store', required=True, help='Compiler')31parser.add_argument('-c', '--compiler', action='store', required=True, help='Compiler')
diff --git a/sources/dispatcher/gen_disp_lin64.nonpic.py b/sources/dispatcher/gen_disp_lin64.nonpic.py
index 151390c..adfc3f1 100644
--- a/sources/dispatcher/gen_disp_lin64.nonpic.py
+++ b/sources/dispatcher/gen_disp_lin64.nonpic.py
@@ -15,7 +15,7 @@
15#=========================================================================15#=========================================================================
1616
17#17#
18# Intel(R) Integrated Performance Primitives Cryptography (Intel(R) IPP Cryptography)18# Intel(R) Cryptography Primitives Library
19#19#
2020
21import re21import re
@@ -25,7 +25,7 @@ import hashlib
25import argparse25import argparse
2626
27parser = argparse.ArgumentParser()27parser = argparse.ArgumentParser()
28parser.add_argument('-i', '--header', action='store', required=True, help='Intel IPP Cryptography dispatcher will be generated for functions in Header')28parser.add_argument('-i', '--header', action='store', required=True, help='Intel Cryptography Primitives Library dispatcher will be generated for functions in Header')
29parser.add_argument('-o', '--out-directory', action='store', required=True, help='Output folder for generated files')29parser.add_argument('-o', '--out-directory', action='store', required=True, help='Output folder for generated files')
30parser.add_argument('-l', '--cpu-list', action='store', required=True, help='Actual CPU list: semicolon separated string')30parser.add_argument('-l', '--cpu-list', action='store', required=True, help='Actual CPU list: semicolon separated string')
31parser.add_argument('-c', '--compiler', action='store', required=True, help='Compiler')31parser.add_argument('-c', '--compiler', action='store', required=True, help='Compiler')
diff --git a/sources/dispatcher/gen_disp_lin64.py b/sources/dispatcher/gen_disp_lin64.py
index 787a604..0e6fa66 100644
--- a/sources/dispatcher/gen_disp_lin64.py
+++ b/sources/dispatcher/gen_disp_lin64.py
@@ -15,7 +15,7 @@
15#=========================================================================15#=========================================================================
1616
17#17#
18# Intel(R) Integrated Performance Primitives Cryptography (Intel(R) IPP Cryptography)18# Intel(R) Cryptography Primitives Library
19#19#
2020
21import re21import re
@@ -25,7 +25,7 @@ import hashlib
25import argparse25import argparse
2626
27parser = argparse.ArgumentParser()27parser = argparse.ArgumentParser()
28parser.add_argument('-i', '--header', action='store', required=True, help='Intel IPP Cryptography dispatcher will be generated for functions in Header')28parser.add_argument('-i', '--header', action='store', required=True, help='Intel Cryptography Primitives Library dispatcher will be generated for functions in Header')
29parser.add_argument('-o', '--out-directory', action='store', required=True, help='Output folder for generated files')29parser.add_argument('-o', '--out-directory', action='store', required=True, help='Output folder for generated files')
30parser.add_argument('-l', '--cpu-list', action='store', required=True, help='Actual CPU list: semicolon separated string')30parser.add_argument('-l', '--cpu-list', action='store', required=True, help='Actual CPU list: semicolon separated string')
31parser.add_argument('-c', '--compiler', action='store', required=True, help='Compiler')31parser.add_argument('-c', '--compiler', action='store', required=True, help='Compiler')
@@ -75,6 +75,8 @@ if(compiler == "GNU" or compiler == "Clang" or compiler == "IntelLLVM"):
75 ##################################################75 ##################################################
76 ASMDISP= open( os.sep.join([OutDir, "jmp_" + FunName+"_" + hashlib.sha512(FunName.encode('utf-8')).hexdigest()[:8] +".asm"]), 'w' )76 ASMDISP= open( os.sep.join([OutDir, "jmp_" + FunName+"_" + hashlib.sha512(FunName.encode('utf-8')).hexdigest()[:8] +".asm"]), 'w' )
7777
78 ASMDISP.write('%include "noexec_stack.inc"\n\n');
79
78 # Symbol type setting for extern functions initially appeared in version 2.1580 # Symbol type setting for extern functions initially appeared in version 2.15
79 ASMDISP.write("%if ((__NASM_MAJOR__ > 2) || ((__NASM_MAJOR__ == 2) && (__NASM_MINOR__ > 14)))\n");81 ASMDISP.write("%if ((__NASM_MAJOR__ > 2) || ((__NASM_MAJOR__ == 2) && (__NASM_MINOR__ > 14)))\n");
80 ASMDISP.write(" %xdefine elf_symbol_type :function\n");82 ASMDISP.write(" %xdefine elf_symbol_type :function\n");
diff --git a/sources/dispatcher/gen_disp_mac64.py b/sources/dispatcher/gen_disp_mac64.py
index f3851a7..72441b3 100644
--- a/sources/dispatcher/gen_disp_mac64.py
+++ b/sources/dispatcher/gen_disp_mac64.py
@@ -15,7 +15,7 @@
15#=========================================================================15#=========================================================================
1616
17#17#
18# Intel(R) Integrated Performance Primitives Cryptography (Intel(R) IPP Cryptography)18# Intel(R) Cryptography Primitives Library
19#19#
2020
21import re21import re
@@ -25,7 +25,7 @@ import hashlib
25import argparse25import argparse
2626
27parser = argparse.ArgumentParser()27parser = argparse.ArgumentParser()
28parser.add_argument('-i', '--header', action='store', required=True, help='Intel IPP Cryptography dispatcher will be generated for functions in Header')28parser.add_argument('-i', '--header', action='store', required=True, help='Intel Cryptography Primitives Library dispatcher will be generated for functions in Header')
29parser.add_argument('-o', '--out-directory', action='store', required=True, help='Output folder for generated files')29parser.add_argument('-o', '--out-directory', action='store