2 Copyright(c) 2016 Intel Corporation. All rights reserved.
4 Redistribution and use in source and binary forms, with or without
5 modification, are permitted provided that the following conditions
8 * Redistributions of source code must retain the above copyright
9 notice, this list of conditions and the following disclaimer.
10 * Redistributions in binary form must reproduce the above copyright
11 notice, this list of conditions and the following disclaimer in
12 the documentation and/or other materials provided with the
14 * Neither the name of Intel Corporation nor the names of its
15 contributors may be used to endorse or promote products derived
16 from this software without specific prior written permission.
18 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 LibCrypto Crypto Poll Mode Driver
32 This code provides the initial implementation of the libcrypto poll mode
33 driver. All cryptography operations are using Openssl library crypto API.
34 Each algorithm uses EVP interface from openssl API - which is recommended
35 by Openssl maintainers.
37 For more details about openssl library please visit openssl webpage:
38 https://www.openssl.org/
43 LibCrypto PMD has support for:
45 Supported cipher algorithms:
46 * ``RTE_CRYPTO_CIPHER_3DES_CBC``
47 * ``RTE_CRYPTO_CIPHER_AES_CBC``
48 * ``RTE_CRYPTO_CIPHER_AES_CTR``
49 * ``RTE_CRYPTO_CIPHER_3DES_CTR``
50 * ``RTE_CRYPTO_CIPHER_AES_GCM``
52 Supported authentication algorithms:
53 * ``RTE_CRYPTO_AUTH_AES_GMAC``
54 * ``RTE_CRYPTO_AUTH_MD5``
55 * ``RTE_CRYPTO_AUTH_SHA1``
56 * ``RTE_CRYPTO_AUTH_SHA224``
57 * ``RTE_CRYPTO_AUTH_SHA256``
58 * ``RTE_CRYPTO_AUTH_SHA384``
59 * ``RTE_CRYPTO_AUTH_SHA512``
60 * ``RTE_CRYPTO_AUTH_MD5_HMAC``
61 * ``RTE_CRYPTO_AUTH_SHA1_HMAC``
62 * ``RTE_CRYPTO_AUTH_SHA224_HMAC``
63 * ``RTE_CRYPTO_AUTH_SHA256_HMAC``
64 * ``RTE_CRYPTO_AUTH_SHA384_HMAC``
65 * ``RTE_CRYPTO_AUTH_SHA512_HMAC``
71 To compile libcrypto PMD, it has to be enabled in the config/common_base file
72 and appropriate openssl packages have to be installed in the build environment.
74 The newest openssl library version is supported:
75 * 1.0.2h-fips 3 May 2016.
76 Older versions that were also verified:
80 For Ubuntu 14.04 LTS these packages have to be installed in the build system:
81 sudo apt-get install openssl
82 sudo apt-get install libc6-dev-i386 (for i686-native-linuxapp-gcc target)
84 This code was also verified on Fedora 24.
85 This code was NOT yet verified on FreeBSD.
90 User can use app/test application to check how to use this pmd and to verify
93 Test name is cryptodev_libcrypto_autotest.
94 For performance test cryptodev_libcrypto_perftest can be used.
96 To verify real traffic l2fwd-crypto example can be used with this command:
98 .. code-block:: console
100 sudo ./build/l2fwd-crypto -c 0x3 -n 4 --vdev "cryptodev_libcrypto_pmd"
101 --vdev "cryptodev_libcrypto_pmd"-- -p 0x3 --chain CIPHER_HASH
102 --cipher_op ENCRYPT --cipher_algo AES_CBC
103 --cipher_key 00:01:02:03:04:05:06:07:08:09:0a:0b:0c:0d:0e:0f
104 --iv 00:01:02:03:04:05:06:07:08:09:0a:0b:0c:0d:0e:ff
105 --auth_op GENERATE --auth_algo SHA1_HMAC
106 --auth_key 11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11
107 :11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11
108 :11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11
113 * Maximum number of sessions is 2048.
114 * Chained mbufs are not supported.
115 * Hash only is not supported for GCM and GMAC.
116 * Cipher only is not supported for GCM and GMAC.