summaryrefslogtreecommitdiff
path: root/include/ouroboros/crypt.h
diff options
context:
space:
mode:
authorDimitri Staessens <dmarc-noreply@freelists.org>2025-07-13 07:42:58 +0200
committerSander Vrijders <sander@ouroboros.rocks>2025-07-16 08:34:17 +0200
commit2e505c2dc7a7e849fe7a327f9cbdfc587477a3d1 (patch)
treec303098450a9a361d3d16738a78cbfdc452326f6 /include/ouroboros/crypt.h
parent589e273a446cdcec7e9c5e3a85256b7b8554e4f0 (diff)
downloadouroboros-2e505c2dc7a7e849fe7a327f9cbdfc587477a3d1.tar.gz
ouroboros-2e505c2dc7a7e849fe7a327f9cbdfc587477a3d1.zip
irmd: Initial Flow Allocation Protocol Header
This adds the initial version for the flow allocation protocol header between IRMd instances. This is a step towards flow authentication. The header supports secure and authenticated flow allocation, supporting certificate-based authentication and ephemeral key exchange for end-to-end encryption. id: 128-bit identifier for the entity. timestamp: 64-bit timestamp (replay protection). certificate: Certificate for authentication. public key: ECDHE public key for key exchange. data: Application data. signature: Signature for integrity/authenticity. Authentication and encryption require OpenSSL to be installed. The IRMd compares the allocation request delay with the MPL of the Layer over which the flow allocation was sent. MPL is now reported by the Layer in ms instead of seconds. Time functions revised for consistency and adds some tests. The TPM can now print thread running times in Debug builds (TPM_DEBUG_REPORT_INTERVAL) and abort processes with hung threads (TPM_DEBUG_ABORT_TIMEOUT). Long running threads waiting for input should call tpm_wait_work() to avoid trigger a process abort. Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
Diffstat (limited to 'include/ouroboros/crypt.h')
-rw-r--r--include/ouroboros/crypt.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/ouroboros/crypt.h b/include/ouroboros/crypt.h
index b510a3b2..a1339330 100644
--- a/include/ouroboros/crypt.h
+++ b/include/ouroboros/crypt.h
@@ -61,6 +61,9 @@ int crypt_load_crt_file(const char * path,
int crypt_load_crt_str(const char * str,
void ** crt);
+int crypt_load_crt_der(buffer_t buf,
+ void ** crt);
+
int crypt_get_pubkey_crt(void * crt,
void ** pk);
@@ -80,8 +83,11 @@ int crypt_cmp_key(const void * key1,
void crypt_free_key(void * key);
-int crypt_crt_str(void * crt,
- char * buf);
+int crypt_crt_str(const void * crt,
+ char * buf);
+
+int crypt_crt_der(const void * crt,
+ buffer_t * buf);
int crypt_check_crt_name(void * crt,
const char * name);