Add crypto support for AEAD operations
Adds a sub-provider to extend the core crypto provider to support
multi-step AEAD operations.
Signed-off-by: Julian Hall <julian.hall@arm.com>
Change-Id: I770e0cf9bea017a468bc9352ce60ce7b3ef4ee29
diff --git a/protocols/service/crypto/packed-c/opcodes.h b/protocols/service/crypto/packed-c/opcodes.h
index d9c2cc1..1890c78 100644
--- a/protocols/service/crypto/packed-c/opcodes.h
+++ b/protocols/service/crypto/packed-c/opcodes.h
@@ -68,4 +68,17 @@
#define TS_CRYPTO_OPCODE_MAC_VERIFY_FINISH (TS_CRYPTO_OPCODE_MAC_BASE + 5)
#define TS_CRYPTO_OPCODE_MAC_ABORT (TS_CRYPTO_OPCODE_MAC_BASE + 6)
+/* AEAD operations */
+#define TS_CRYPTO_OPCODE_AEAD_BASE (0x0600)
+#define TS_CRYPTO_OPCODE_AEAD_ENCRYPT_SETUP (TS_CRYPTO_OPCODE_AEAD_BASE + 1)
+#define TS_CRYPTO_OPCODE_AEAD_DECRYPT_SETUP (TS_CRYPTO_OPCODE_AEAD_BASE + 2)
+#define TS_CRYPTO_OPCODE_AEAD_GENERATE_NONCE (TS_CRYPTO_OPCODE_AEAD_BASE + 3)
+#define TS_CRYPTO_OPCODE_AEAD_SET_NONCE (TS_CRYPTO_OPCODE_AEAD_BASE + 4)
+#define TS_CRYPTO_OPCODE_AEAD_SET_LENGTHS (TS_CRYPTO_OPCODE_AEAD_BASE + 5)
+#define TS_CRYPTO_OPCODE_AEAD_UPDATE_AD (TS_CRYPTO_OPCODE_AEAD_BASE + 6)
+#define TS_CRYPTO_OPCODE_AEAD_UPDATE (TS_CRYPTO_OPCODE_AEAD_BASE + 7)
+#define TS_CRYPTO_OPCODE_AEAD_FINISH (TS_CRYPTO_OPCODE_AEAD_BASE + 8)
+#define TS_CRYPTO_OPCODE_AEAD_VERIFY (TS_CRYPTO_OPCODE_AEAD_BASE + 9)
+#define TS_CRYPTO_OPCODE_AEAD_ABORT (TS_CRYPTO_OPCODE_AEAD_BASE + 10)
+
#endif /* TS_CRYPTO_OPCODES_H */