[dpdk-dev] cryptodev: enable BPI for Cablelabs DOCSIS security spec

Message ID 1484751890-9716-1-git-send-email-fiona.trahe@intel.com
State Superseded, archived
Delegated to: Pablo de Lara Guarch
Headers show


Context Check Description
ci/Intel compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Trahe, Fiona Jan. 18, 2017, 3:04 p.m.
Extend the DPDK cryptodev API to enable processing of packets according
to the Baseline Privacy Interface Plus (BPI+) Specification described in
the security specification of the Cablelabs Data-over-Cable Service 
Interface Specification (DOCSIS).

Brief summary of BPI+ symmetric cryptography requirements:
BPI+ cryptography uses a block cipher (AES-CBC/DES-CBC) to encrypt/decrypt
all the whole blocks in the packet. However the data length is not always
a block-multiple, so where there is a final block less than the full block
size this residual block requires special handling using AES-CFB/DES-CFB
mode. Similar special handling is specified where there is only one block,
smaller than the block size for the cipher. See spec for further details.

Two new elements are added to the enum rte_crypto_cipher_algorithm.
Note elements of this enum are actually a combination of an algorithm (AES,
3DES, etc) and mode (CBC, CTR, etc). The new DOCSISBPI mode is used to
convey to the PMD that the mode applied should be the specific combination
of CBC and CFB required by the DOCSIS Baseline Privacy Plus Spec.

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
This patch is targeted at dpdk 17.05 release - pushing API early to give 
people a chance to comment. PMD patches implementing this are expected
later in the 17.05 release cycle. 

 lib/librte_cryptodev/rte_crypto_sym.h | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)


diff --git a/lib/librte_cryptodev/rte_crypto_sym.h b/lib/librte_cryptodev/rte_crypto_sym.h
index 0e20b30..c25c09c 100644
--- a/lib/librte_cryptodev/rte_crypto_sym.h
+++ b/lib/librte_cryptodev/rte_crypto_sym.h
@@ -108,7 +108,17 @@  enum rte_crypto_cipher_algorithm {
 	/**< DES algorithm in CBC mode */
+	/**< DES algorithm using modes required by
+	 * DOCSIS Baseline Privacy Plus Spec.
+	 */
+	/**< AES algorithm using modes required by
+	 * DOCSIS Baseline Privacy Plus Spec.
+	 */