Demo: Advantage of Westmere Crypto Acceleration Engine

Download demo package

IA32

Intel64

Use of the Intel IPP samples is subject to the terms and conditions of the Intel End User License Agreement (EULA).


Introduction

Purpose of this demo is to show an advantage of Westmere Crypto Acceleration Engine. 

For visualization of cipher functions, speedup the rotating box was used. The source of encrypted and decrypted image is mapped on box faces. The revolution of the rotating box is being changed according to the performance of Intel® Advanced Encryption Standard New Instructions(AES-NI) optimized Intel IPP crypto functions and internal threading. The revolution is directly proportional to performance and number of threads used.

When demo is running on "Intel® Xeon® Processor 56xx Series (code-named "Westmere"), because of AES NI optimization, the box revolution is faster compare to other CPU types.

crypto_demo_1.jpg

To view a scene

Click on the ‘OpenFile' button on the toolbar and select the JPEG file to view. At this stage the scene is created (it is the box) based on JPEG picture.

To run/stop a ray tracing of current scene

By clicking  ‘Play' button on the toolbar. You will see the rotated box. This will rotate with the revo (revolutions per minute) in directly proportion to IPP AES functionality performance on current CPU and number of threads being used(see the field "Revo").

To stop click on ‘Pause' button on the toolbar.

As in the above picture, following information fields are there in the main toolbar (that can be changed through ‘Control’ button):

- The first filed is ‘CPU type', this demo will automatically detect runtime processor and dispatches automatically the optimal version of IPP function. For more information refer to IPP Dispatcher Control article. To understand CPU bit name like ippCpuAES or ippCpuSSE42, refer to IPP user manual or Knowledge base article.

- Second filed is ‘crypto function name’ used for benchmarking, e.g. ippsRijndael128EncryptECB. See next section to get more information on crypto functions.

MaxNumThreads

Maximum number of threads available on the machine (equal to the number of physical or logical cores)

NumThreads

Current number of threads. It should be ≤ MaxNumThreads. Intel IPP is threaded using OpenMP API, the OpenMP run time will create number of threads equal to number of cores on your system

Revo

Revolutions per minute of rotating box

EncrCpe

Performance of the current Encrypt functions

DecrCpe

Performance of the current Decrypt functions

FPS

Frame per second, this is performance of Ray Tracing


By selecting 'Control' button, you will get following selection options

crypto_demo_3.jpg

Cipher Functions

Function Name

Description

Rijndael128EncryptECB

Encrypts plaintext message using Rijndael128 algorithm in the ECB encryption mode

Rijndael128DecryptECB

Decrypts byte data stream using Rijndael128 algorithm in the ECB mode

Rijndael128EncryptCBC

Encrypts byte data stream according to Rijndael128 in the CBC mode

Rijndael128DecryptCBC

Decrypts byte data stream according to Rijndael128 in the CBC mode

Rijndael128EncryptCFB

Encrypts byte data stream according to Rijndael128 in the CFB mode

Rijndael128DecryptCFB

Decrypts byte data stream according to Rijndael128 in the CFB mode

Rijndael128EncryptOFB

Encrypts byte data stream according to Rijndael128 in the OFB mode

Rijndael128DecryptOFB

Decrypts byte data stream according to Rijndael128 in the OFB mode

Rijndael128EncryptCTR

Encrypts a variable length data stream according to Rijndael128 in the CTR mode

Rijndael128DecryptCTR

Decrypts a variable length data stream according to Rijndael128 in the CTR mode


Affinity Settings


This will set the parameter for functions ippSetAffinity(IppAffinityType aType, int offset); This functions basically binds OpenMP* threads to OS processors. This function use Intel OpenMP low-level affinity API, and it takes effect if OMP_AFFINITY environment variable is not set to disabled.

In accordance with the values of the parameter aType, the following thread affinity types are possible:

ippAffinityCompactFineCore

If HT is enabled, and OMP parallel regions don't use all available OpenMP threads, the adjacent threads use the shared cache on two cores and do not compete for resources on the same core leaving other core not used. This is equal to the following OpenMP settings: KMP_AFFINITY=granularity=fine,compact,1,offset [ICCC]. If HT is disabled, two adjacent threads are bound to cores with shared cache

ippAffinityCompactFineHT

OpenMP thread <n>+1 is assigned to the free thread from the OS thread context closest to those OS thread context, where the OpenMP thread <n> is assigned. This is equal to the following OpenMP settings: KMP_AFFINITY=granularity=fine,compact,0,offset [ICCC].

ippAffinityAllEnabled

all OpenMP threads have access to all OS processors. This is equal to the following OpenMP settings: KMP_AFFINITY=respect [ICCC].

ippAffinityRestore

sets thread affinity, which is set before machine topology initialization.


When you click 'About', following information will be get displayed(as in the below picture)

crypto_demo_2.jpg

For more information, refer to AES-NI support in Intel® IPP.
For more complete information about compiler optimizations, see our Optimization Notice.