Add hash operation support to Crypto service provider

Adds support for multi-step hash operations.  Only includes
protocol support for packed-c serialization at the moment.
Protobuf serialization still needs to be added.  Includes
crypto context management that can be used for any multi-
step operations such as MAC and symmetric encrypt/decrypt.

Signed-off-by: Julian Hall <julian.hall@arm.com>
Change-Id: Ib51a9737f1987e1e7531da7edb38d9dc4095cc7e
diff --git a/protocols/service/crypto/packed-c/opcodes.h b/protocols/service/crypto/packed-c/opcodes.h
index f0102b0..54ee9e9 100644
--- a/protocols/service/crypto/packed-c/opcodes.h
+++ b/protocols/service/crypto/packed-c/opcodes.h
@@ -9,16 +9,20 @@
 
 /* C/C++ definition of crypto service opcodes
  */
+#define TS_CRYPTO_OPCODE_BASE                   (0x0100)
 #define TS_CRYPTO_OPCODE_NOP                    (0x0000)
-#define TS_CRYPTO_OPCODE_GENERATE_KEY           (0x0101)
-#define TS_CRYPTO_OPCODE_DESTROY_KEY            (0x0102)
-#define TS_CRYPTO_OPCODE_EXPORT_KEY             (0x0105)
-#define TS_CRYPTO_OPCODE_EXPORT_PUBLIC_KEY      (0x0106)
-#define TS_CRYPTO_OPCODE_IMPORT_KEY             (0x0107)
-#define TS_CRYPTO_OPCODE_SIGN_HASH              (0x0108)
-#define TS_CRYPTO_OPCODE_VERIFY_HASH            (0x0109)
-#define TS_CRYPTO_OPCODE_ASYMMETRIC_DECRYPT     (0x010a)
-#define TS_CRYPTO_OPCODE_ASYMMETRIC_ENCRYPT     (0x010b)
-#define TS_CRYPTO_OPCODE_GENERATE_RANDOM        (0x010c)
+#define TS_CRYPTO_OPCODE_GENERATE_KEY           (TS_CRYPTO_OPCODE_BASE + 1)
+#define TS_CRYPTO_OPCODE_DESTROY_KEY            (TS_CRYPTO_OPCODE_BASE + 2)
+#define TS_CRYPTO_OPCODE_EXPORT_KEY             (TS_CRYPTO_OPCODE_BASE + 5)
+#define TS_CRYPTO_OPCODE_EXPORT_PUBLIC_KEY      (TS_CRYPTO_OPCODE_BASE + 6)
+#define TS_CRYPTO_OPCODE_IMPORT_KEY             (TS_CRYPTO_OPCODE_BASE + 7)
+#define TS_CRYPTO_OPCODE_SIGN_HASH              (TS_CRYPTO_OPCODE_BASE + 8)
+#define TS_CRYPTO_OPCODE_VERIFY_HASH            (TS_CRYPTO_OPCODE_BASE + 9)
+#define TS_CRYPTO_OPCODE_ASYMMETRIC_DECRYPT     (TS_CRYPTO_OPCODE_BASE + 10)
+#define TS_CRYPTO_OPCODE_ASYMMETRIC_ENCRYPT     (TS_CRYPTO_OPCODE_BASE + 11)
+#define TS_CRYPTO_OPCODE_GENERATE_RANDOM        (TS_CRYPTO_OPCODE_BASE + 12)
+#define TS_CRYPTO_OPCODE_HASH_SETUP             (TS_CRYPTO_OPCODE_BASE + 13)
+#define TS_CRYPTO_OPCODE_HASH_UPDATE            (TS_CRYPTO_OPCODE_BASE + 14)
+#define TS_CRYPTO_OPCODE_HASH_FINISH            (TS_CRYPTO_OPCODE_BASE + 15)
 
 #endif /* TS_CRYPTO_OPCODES_H */