[crypto] Create templates for cryptolib API files.
In preparation for splitting the API into multiple files, this commit
creates small stubs for each header so that the following diffs will be
easier to read.
Signed-off-by: Jade Philipoom <jadep@google.com>
diff --git a/sw/device/lib/crypto/include/aes.h b/sw/device/lib/crypto/include/aes.h
new file mode 100644
index 0000000..97ec566
--- /dev/null
+++ b/sw/device/lib/crypto/include/aes.h
@@ -0,0 +1,21 @@
+// Copyright lowRISC contributors.
+// Licensed under the Apache License, Version 2.0, see LICENSE for details.
+// SPDX-License-Identifier: Apache-2.0
+
+#ifndef OPENTITAN_SW_DEVICE_LIB_CRYPTO_INCLUDE_AES_H_
+#define OPENTITAN_SW_DEVICE_LIB_CRYPTO_INCLUDE_AES_H_
+
+/**
+ * @file
+ * @brief AES operations for the OpenTitan cryptography library.
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif // __cplusplus
+
+#ifdef __cplusplus
+} // extern "C"
+#endif // __cplusplus
+
+#endif // OPENTITAN_SW_DEVICE_LIB_CRYPTO_INCLUDE_AES_H_
diff --git a/sw/device/lib/crypto/include/datatypes.h b/sw/device/lib/crypto/include/datatypes.h
new file mode 100644
index 0000000..c8e8314
--- /dev/null
+++ b/sw/device/lib/crypto/include/datatypes.h
@@ -0,0 +1,25 @@
+// Copyright lowRISC contributors.
+// Licensed under the Apache License, Version 2.0, see LICENSE for details.
+// SPDX-License-Identifier: Apache-2.0
+
+#ifndef OPENTITAN_SW_DEVICE_LIB_CRYPTO_INCLUDE_DATATYPES_H_
+#define OPENTITAN_SW_DEVICE_LIB_CRYPTO_INCLUDE_DATATYPES_H_
+
+/**
+ * @file
+ * @brief Shared datatypes for the OpenTitan cryptography library.
+ *
+ * This header defines status codes, byte buffer representations, and key
+ * representations that are shared between different algorithms within the
+ * library.
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif // __cplusplus
+
+#ifdef __cplusplus
+} // extern "C"
+#endif // __cplusplus
+
+#endif // OPENTITAN_SW_DEVICE_LIB_CRYPTO_INCLUDE_DATATYPES_H_
diff --git a/sw/device/lib/crypto/include/drbg.h b/sw/device/lib/crypto/include/drbg.h
new file mode 100644
index 0000000..1a49bef
--- /dev/null
+++ b/sw/device/lib/crypto/include/drbg.h
@@ -0,0 +1,21 @@
+// Copyright lowRISC contributors.
+// Licensed under the Apache License, Version 2.0, see LICENSE for details.
+// SPDX-License-Identifier: Apache-2.0
+
+#ifndef OPENTITAN_SW_DEVICE_LIB_CRYPTO_INCLUDE_DRBG_H_
+#define OPENTITAN_SW_DEVICE_LIB_CRYPTO_INCLUDE_DRBG_H_
+
+/**
+ * @file
+ * @brief DRBG for the OpenTitan cryptography library.
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif // __cplusplus
+
+#ifdef __cplusplus
+} // extern "C"
+#endif // __cplusplus
+
+#endif // OPENTITAN_SW_DEVICE_LIB_CRYPTO_INCLUDE_DRBG_H_
diff --git a/sw/device/lib/crypto/include/ecc.h b/sw/device/lib/crypto/include/ecc.h
new file mode 100644
index 0000000..cba0b00
--- /dev/null
+++ b/sw/device/lib/crypto/include/ecc.h
@@ -0,0 +1,23 @@
+// Copyright lowRISC contributors.
+// Licensed under the Apache License, Version 2.0, see LICENSE for details.
+// SPDX-License-Identifier: Apache-2.0
+
+#ifndef OPENTITAN_SW_DEVICE_LIB_CRYPTO_INCLUDE_ECC_H_
+#define OPENTITAN_SW_DEVICE_LIB_CRYPTO_INCLUDE_ECC_H_
+
+/**
+ * @file
+ * @brief Elliptic curve operations for OpenTitan cryptography library.
+ *
+ * Includes ECDSA, ECDH, Ed25519, and X25519.
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif // __cplusplus
+
+#ifdef __cplusplus
+} // extern "C"
+#endif // __cplusplus
+
+#endif // OPENTITAN_SW_DEVICE_LIB_CRYPTO_INCLUDE_ECC_H_
diff --git a/sw/device/lib/crypto/include/hash.h b/sw/device/lib/crypto/include/hash.h
new file mode 100644
index 0000000..732152b
--- /dev/null
+++ b/sw/device/lib/crypto/include/hash.h
@@ -0,0 +1,24 @@
+// Copyright lowRISC contributors.
+// Licensed under the Apache License, Version 2.0, see LICENSE for details.
+// SPDX-License-Identifier: Apache-2.0
+
+#ifndef OPENTITAN_SW_DEVICE_LIB_CRYPTO_INCLUDE_HASH_H_
+#define OPENTITAN_SW_DEVICE_LIB_CRYPTO_INCLUDE_HASH_H_
+
+/**
+ * @file
+ * @brief Hash functions for the OpenTitan cryptography library.
+ *
+ * Supports both SHA2 and SHA3 hash functions, plus the additional Keccak-based
+ * hash functions SHAKE and cSHAKE.
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif // __cplusplus
+
+#ifdef __cplusplus
+} // extern "C"
+#endif // __cplusplus
+
+#endif // OPENTITAN_SW_DEVICE_LIB_CRYPTO_INCLUDE_HASH_H_
diff --git a/sw/device/lib/crypto/include/kdf.h b/sw/device/lib/crypto/include/kdf.h
new file mode 100644
index 0000000..2213880
--- /dev/null
+++ b/sw/device/lib/crypto/include/kdf.h
@@ -0,0 +1,23 @@
+// Copyright lowRISC contributors.
+// Licensed under the Apache License, Version 2.0, see LICENSE for details.
+// SPDX-License-Identifier: Apache-2.0
+
+#ifndef OPENTITAN_SW_DEVICE_LIB_CRYPTO_INCLUDE_KDF_H_
+#define OPENTITAN_SW_DEVICE_LIB_CRYPTO_INCLUDE_KDF_H_
+
+/**
+ * @file
+ * @brief Key derivation functions for the OpenTitan cryptography library.
+ *
+ * Includes HMAC- and KMAC-based KDFs.
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif // __cplusplus
+
+#ifdef __cplusplus
+} // extern "C"
+#endif // __cplusplus
+
+#endif // OPENTITAN_SW_DEVICE_LIB_CRYPTO_INCLUDE_KDF_H_
diff --git a/sw/device/lib/crypto/include/key_transport.h b/sw/device/lib/crypto/include/key_transport.h
new file mode 100644
index 0000000..62ac600
--- /dev/null
+++ b/sw/device/lib/crypto/include/key_transport.h
@@ -0,0 +1,24 @@
+// Copyright lowRISC contributors.
+// Licensed under the Apache License, Version 2.0, see LICENSE for details.
+// SPDX-License-Identifier: Apache-2.0
+
+#ifndef OPENTITAN_SW_DEVICE_LIB_CRYPTO_INCLUDE_KEY_TRANSPORT_H_
+#define OPENTITAN_SW_DEVICE_LIB_CRYPTO_INCLUDE_KEY_TRANSPORT_H_
+
+/**
+ * @file
+ * @brief Key import/export for the OpenTitan cryptography library.
+ *
+ * These functions allow library users to translate to and from the crypto
+ * library's key representations.
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif // __cplusplus
+
+#ifdef __cplusplus
+} // extern "C"
+#endif // __cplusplus
+
+#endif // OPENTITAN_SW_DEVICE_LIB_CRYPTO_INCLUDE_KEY_TRANSPORT_H_
diff --git a/sw/device/lib/crypto/include/mac.h b/sw/device/lib/crypto/include/mac.h
new file mode 100644
index 0000000..7071fe8
--- /dev/null
+++ b/sw/device/lib/crypto/include/mac.h
@@ -0,0 +1,23 @@
+// Copyright lowRISC contributors.
+// Licensed under the Apache License, Version 2.0, see LICENSE for details.
+// SPDX-License-Identifier: Apache-2.0
+
+#ifndef OPENTITAN_SW_DEVICE_LIB_CRYPTO_INCLUDE_MAC_H_
+#define OPENTITAN_SW_DEVICE_LIB_CRYPTO_INCLUDE_MAC_H_
+
+/**
+ * @file
+ * @brief Message authentication codes for the OpenTitan cryptography library.
+ *
+ * Supports message authentication based on either HMAC or KMAC.
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif // __cplusplus
+
+#ifdef __cplusplus
+} // extern "C"
+#endif // __cplusplus
+
+#endif // OPENTITAN_SW_DEVICE_LIB_CRYPTO_INCLUDE_MAC_H_
diff --git a/sw/device/lib/crypto/include/rsa.h b/sw/device/lib/crypto/include/rsa.h
new file mode 100644
index 0000000..5c7690a
--- /dev/null
+++ b/sw/device/lib/crypto/include/rsa.h
@@ -0,0 +1,21 @@
+// Copyright lowRISC contributors.
+// Licensed under the Apache License, Version 2.0, see LICENSE for details.
+// SPDX-License-Identifier: Apache-2.0
+
+#ifndef OPENTITAN_SW_DEVICE_LIB_CRYPTO_INCLUDE_RSA_H_
+#define OPENTITAN_SW_DEVICE_LIB_CRYPTO_INCLUDE_RSA_H_
+
+/**
+ * @file
+ * @brief RSA signature operations for the OpenTitan cryptography library.
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif // __cplusplus
+
+#ifdef __cplusplus
+} // extern "C"
+#endif // __cplusplus
+
+#endif // OPENTITAN_SW_DEVICE_LIB_CRYPTO_INCLUDE_RSA_H_