Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add x86 SIMD optimizations to crypto datatypes #507

Merged
merged 1 commit into from
Mar 14, 2023

Commits on Mar 5, 2023

  1. Added x86 SIMD optimizations to crypto datatypes.

    - The v128 operations are optimized for SSE2/SSSE3.
    - srtp_octet_string_is_eq is optimized for SSE2. When SSE2 is not
      available, use a pair of 32-bit accumulators to speed up the
      bulk of the operation. We use two accumulators to leverage
      instruction-level parallelism supported by most modern CPUs.
    - In srtp_cleanse, use memset and ensure it is not optimized away
      with a dummy asm statement, which can potentially consume the
      contents of the memory.
    - Endian conversion functions use gcc-style intrinsics, when possible.
    
    The SIMD code uses intrinsics, which are available on all modern compilers.
    For MSVC, config_in_cmake.h is modified to define gcc/clang-style SSE macros
    based on MSVC predefined macros. We enable all SSE versions when it
    indicates that AVX is enabled. SSE2 is always enabled for x86-64 or for x86
    when SSE2 FP math is enabled.
    Lastique committed Mar 5, 2023
    Configuration menu
    Copy the full SHA
    faa7998 View commit details
    Browse the repository at this point in the history