- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, it need to install IPP first.Here is steps to install the latestIPP 6.1 udpate 4 versionfor your reference
$tar xzvf l_ipp_em64t_p_6.1.4.059.tar.gz
$./l_ipp_em64t_p_6.1.4.059/install.sh
(may require root passwd if install library to default directory /opt/intel/ipp)
$ tar xzvf l_crypto_ipp_em64t_p_6.1.4.059.tar.gz
$./l_crypto_ipp_em64t_p_6.1.4.059/install.sh
For how to download the two packages (the version number must be exactly same, i.e _6.1.4.059) , please see IPP Downloads, Registration and Licensing
Once you install them sucessfully, you will see some c example code in ippcp manualippcpman.pdf under
For example Example 2-1 DES/TDES Encryption and Decryption
// use of the ECB mode
void DES_sample(void)
{
// size of the DES algorithm block is equal to 8
const int desBlkSize = 8;
// get size of the context needed for the encryption/decryption operation
int ctxSize;
ippsDESGetSize(&ctxSize);
// and allocate one
IppsDESSpec* pCtx = (IppsDESSpec*)( new Ipp8u [ctxSize] );
// define the key
Ipp8u key[] = {0x01,0x2,0x3,0x4,0x5,0x6,0x7,0x8};
// and prepare the context for the DES usage
ippsDESInit(key, pCtx);
// define the message to be encrypted
Ipp8u ptext[] = {"quick brown fox jupm over lazy dog"};
// allocate enough memory for the ciphertext,
// note thatthe size of ciphertext is always multiple of cipher block size
Ipp8u ctext[(sizeof(ptext)+desBlkSize-1) &~(desBlkSize-1)];
// encrypt (ECB mode) ptext message pay attention to the 'length' parameter
// it defines the number of bytes to be encrypted
ippsDESEncryptECB(ptext, ctext, sizeof(ctext),
pCtx,
IppsCPPaddingNONE);
// allocate memory for the decrypted message
Ipp8u rtext[sizeof(ctext)];
// decrypt (ECB mode) ctext message
// pay attention to the 'length' parameter
// it defines the number of bytes to be decrypted
ippsDESDecryptECB(ctext, rtext, sizeof(ctext),
pCtx,
IppsCPPaddingNONE);
delete (Ipp8u*)pCtx;
}
Then build it, for example,
>gcc main.cpp -L/opt/intel/ipp/6.1.4.xxx/em64t/sharedlib -lippcp -lippcore -liomp5 -lpthread.
See more from How to build IPP application in Linux environment
orHow to Build an Intel IPP Application
Hope it helps
Best Regards,
Ying
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page