crypto/armv8: do not append digest
[dpdk.git] / drivers / crypto / armv8 / rte_armv8_pmd_private.h
index 679a71a..fa31f0a 100644 (file)
@@ -69,6 +69,9 @@ do {                                                          \
 #define NBBY           8               /* Number of bits in a byte */
 #define BYTE_LENGTH(x) ((x) / NBBY)    /* Number of bytes in x (round down) */
 
+/* Maximum length for digest (SHA-256 needs 32 bytes) */
+#define DIGEST_LENGTH_MAX 32
+
 /** ARMv8 operation order mode enumerator */
 enum armv8_crypto_chain_order {
        ARMV8_CRYPTO_CHAIN_CIPHER_AUTH,
@@ -147,6 +150,11 @@ struct armv8_crypto_qp {
        /**< Queue pair statistics */
        char name[RTE_CRYPTODEV_NAME_LEN];
        /**< Unique Queue Pair Name */
+       uint8_t temp_digest[DIGEST_LENGTH_MAX];
+       /**< Buffer used to store the digest generated
+        * by the driver when verifying a digest provided
+        * by the user (using authentication verify operation)
+        */
 } __rte_cache_aligned;
 
 /** ARMv8 crypto private session structure */
@@ -198,8 +206,8 @@ struct armv8_crypto_session {
                                uint8_t o_key_pad[SHA_BLOCK_MAX]
                                                        __rte_cache_aligned;
                                /**< outer pad (max supported block length) */
-                               uint8_t key[SHA_AUTH_KEY_MAX];
-                               /**< HMAC key (max supported length)*/
+                               uint8_t key[SHA_BLOCK_MAX];
+                               /**< HMAC key (max supported block length)*/
                        } hmac;
                };
                uint16_t digest_length;