Get Started with Intel® Cryptography Primitives Library for Windows*
Get Started with Intel® Cryptography Primitives Library for Intel® oneAPI Toolkit for Windows*
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.
Prerequisites (Windows* OS)
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
C:\Program files (x86)\Intel\oneAPI
Unified Directory Layout
C:\Program files (x86)\Intel\oneAPI\<toolkit-version>
To configure your Microsoft* Visual Studio* development system for linking with the Intel® Cryptography Primitives Library, follow the steps below. Though some versions of the Visual Studio* IDE may vary slightly in the menu items mentioned below, the fundamental configuring steps are applicable to all these versions.
In Solution Explorer, right-click your project and click Properties.
Select Configuration Properties > VC++ Directories and set the following from the Select directories for drop down menu:
Include Files menu item, and then type in the directory for the Intel® Cryptography Primitives Library include files (default is <install_dir>\ippcp\include)
Library Files menu item, and then type in the directory for the Intel® Cryptography Primitives Library files (default is <install_dir>\ippcp\lib\<arch>)
Executable Files menu item, and then type in the directory for the Intel® Cryptography Primitives Library executable files (default is <install_dir>\redist\<arch>\ippcp)
Build and Run Your First Intel® Cryptography Primitives Library Application (Windows* 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.
On Windows* OS, Intel® Cryptography Primitives Library applications are significantly easier to build with Microsoft* Visual Studio*. To build and run the example, follow the steps:
Make sure the compiler and Intel® Cryptography Primitives Library variables are set in your environment.
Get the examples sources:
git clone https://github.com/intel/cryptography-primitives.git cd cryptography-primitives\examplesRun the cmake command to generate a Microsoft* Visual Studio* solution. On Windows* OS it is required to specify a generator (-G option) and optionally a toolchain (-T option) to build with Intel® oneAPI DPC++/C++ Compiler. Example:
cmake CMakeLists.txt -B_build -G<vs_generator> [-T"Intel C++ Compiler <version>"]For the Visual Studio* generators options, please refer to the CMake help.
The build system will scan the system for the Intel® Cryptography Primitives Library, using the IPPCRYPTOROOT environment variable among other locations, so it works for both the Component and the Unified Directory Layout. If the library is found, you will see the following message:
-- Found Intel® Cryptography Primitives Library at: C:/Program Files (x86)/Intel/oneAPI/ippcp/latest -- Configuring doneIf the library is not found automatically, you can specify the path to the library root folder (where the include\ and lib\ directories are located) using the -DIPPCRYPTO_ROOT_DIR option:
cmake CMakeLists.txt -B_build -G<vs_generator> -DIPPCRYPTO_ROOT_DIR=<path>Open the generated Visual Studio* solution in the IDE, select the (example) library_get_started project in the examples folder of project structure in IDE and run Build. You can also select a project that builds all examples by category (ippcp_examples_<category>) or the whole set of examples (ippcp_examples_all).
To run the build from the command line, open “Developer Command Prompt for VS <version>” console and run the cmake command:
cmake --build _build --target example_library_get_started --config Releasewhere _build is the path to CMake build directory.
Run the application:
_build\.build\RELEASE\examples\example_library_get_started.exe
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, functions, and linkage modes. |
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 |