Get Started with Intel® Cryptography Primitives Library for Linux
Get Started with Intel® Cryptography Primitives Library for Intel® oneAPI Toolkit for Linux*
Intel® Cryptography Primitives Library is a software library that provides a broad range of secure and efficient cryptographic algorithm implementations.
The library is delivered as a part of Intel® oneAPI Toolkit. Alternatively, you may install a specific library version by downloading binaries from Intel or install from your preferred repository
Prerequisites (Linux* OS)
Set Environment Variables
The Unified Directory Layout was implemented in 2024.0. If you have multiple toolkit versions installed, the Unified layout adds the ability to ensure your development environment contains the component versions that were released as part of that specific toolkit version. The directory layout that was used prior to 2024.0 is still supported on new and existing installations. This prior layout is called the Component Directory Layout. Now you have the option to use the Component Directory Layout or the Unified Directory Layout.
To learn more about the two directory layouts, see Use the setvars Script with Linux* or Windows*.
After installing Intel® Cryptography Primitives Library, set the IPPCRYPTOROOT, LD_LIBRARY_PATH, and NLSPATH environment variables by running the script appropriate to your target platform architecture. The scripts are available in <install dir>/ippcp/bin for Component Directory Layout, or <install dir>/etc/ippcp for Unified Directory Layout.
By default, the <install dir> is located at:
Component Directory Layout
For admin: /opt/intel/oneapi
For user: ~/intel/oneapi
Unified Directory Layout
For admin: /opt/intel/oneapi/<toolkit-version>
For user: ~/intel/oneapi/<toolkit-version>
See Intel® Cryptography Primitives Library high-level directories structure.
Build and Run Your First Intel® Cryptography Primitives Library Application (Linux* OS)
The library_get_started example helps you to check that the library is installed correctly. The application consists of two sections:
Get the library layer name and version.
Show the hardware optimizations used by the selected library layer and supported by CPU.
Its source code, along with examples for other algorithms, is available in the Intel® Cryptography Primitives Library open-source repository.
To build and run the example, follow the steps:
Make sure the compiler and Intel® Cryptography Primitives Library variables are set in your shell.
Get the examples sources:
git clone https://github.com/intel/cryptography-primitives.git cd cryptography-primitives/examplesConfigure the build. The build system locates the installed library using the IPPCRYPTOROOT environment variable, for both the Component and the Unified Directory Layout:
cmake CMakeLists.txt -B_build -DCMAKE_BUILD_TYPE=ReleaseIf the library is not found automatically, specify its root directory (the one that contains the include/ and lib/ folders) explicitly:
cmake CMakeLists.txt -B_build -DCMAKE_BUILD_TYPE=Release -DIPPCRYPTO_ROOT_DIR=<path>Build the example:
cmake --build _build --target example_library_get_startedRun the application:
./_build/.build/RELEASE/examples/example_library_get_started
For other build options, including building the examples together with the library sources, see README.md in the examples folder.
Training and Documentation
Document |
Description |
|---|---|
Developer Guide and Reference for Intel® Cryptography Primitives Library To find a downloadable version of this document, go to the Downloadable Documentation page. |
Provides detailed guidance on Intel® Cryptography Primitives Library configuration, development environment, and linkage modes as well as detailed descriptions of the Intel® Cryptography Primitives Library functions. |
Intel® Cryptography Primitives Library product page. See this page for support and online documentation. |
Notices and Disclaimers
Intel, the Intel logo, Intel Atom, Intel Core, Intel Xeon Phi, VTune and Xeon are trademarks of Intel Corporation in the U.S. and/or other countries.
*Other names and brands may be claimed as the property of others.
© Intel Corporation.
This software and the related documents are Intel copyrighted materials, and your use of them is governed by the express license under which they were provided to you (License). Unless the License provides otherwise, you may not use, modify, copy, publish, distribute, disclose or transmit this software or the related documents without Intel’s prior written permission.
This software and the related documents are provided as is, with no express or implied warranties, other than those that are expressly stated in the License.
Product and Performance Information |
|---|
Performance varies by use, configuration and other factors. Learn more in the Performance Index. Notice revision #20201201 |