Skip to content

Commit

Permalink
use high level PSA API
Browse files Browse the repository at this point in the history
  • Loading branch information
huitema committed Sep 13, 2023
1 parent e922949 commit 943c8a9
Show file tree
Hide file tree
Showing 2 changed files with 341 additions and 278 deletions.
33 changes: 14 additions & 19 deletions include/picotls/ptls_mbedtls.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,30 +27,25 @@ extern "C" {
#endif
#include "picotls.h"

extern ptls_hash_algorithm_t ptls_mbedtls_sha256;
extern ptls_hash_algorithm_t ptls_mbedtls_sha512;
extern ptls_hash_algorithm_t ptls_mbedtls_sha256;
extern ptls_hash_algorithm_t ptls_mbedtls_sha512;
#if defined(MBEDTLS_SHA384_C)
extern ptls_hash_algorithm_t ptls_mbedtls_sha384;
extern ptls_hash_algorithm_t ptls_mbedtls_sha384;
#endif

extern ptls_cipher_algorithm_t ptls_mbedtls_aes128ecb;
extern ptls_cipher_algorithm_t ptls_mbedtls_aes256ecb;
extern ptls_cipher_algorithm_t ptls_mbedtls_aes128ctr;
extern ptls_cipher_algorithm_t ptls_mbedtls_aes256ctr;
extern ptls_cipher_algorithm_t ptls_mbedtls_chacha20;
extern ptls_cipher_algorithm_t ptls_mbedtls_aes128ecb;
extern ptls_cipher_algorithm_t ptls_mbedtls_aes256ecb;
extern ptls_cipher_algorithm_t ptls_mbedtls_aes128ctr;
extern ptls_cipher_algorithm_t ptls_mbedtls_aes256ctr;
extern ptls_cipher_algorithm_t ptls_mbedtls_chacha20;

extern ptls_aead_algorithm_t ptls_mbedtls_aes128gcm;
extern ptls_aead_algorithm_t ptls_mbedtls_aes256gcm;
extern ptls_aead_algorithm_t ptls_mbedtls_chacha20poly1305;
extern ptls_aead_algorithm_t ptls_mbedtls_aes128gcm;
extern ptls_aead_algorithm_t ptls_mbedtls_aes256gcm;
extern ptls_aead_algorithm_t ptls_mbedtls_chacha20poly1305;


extern ptls_cipher_suite_t ptls_mbedtls_aes128gcmsha256;
#if defined(MBEDTLS_SHA384_C)
extern ptls_cipher_suite_t ptls_mbedtls_aes256gcmsha384;
#endif
extern ptls_cipher_suite_t ptls_mbedtls_chacha20poly1305sha256;

void ptls_mbedtls_random_bytes(void* buf, size_t len);
int ptls_mbedtls_init();
void ptls_mbedtls_free();
void ptls_mbedtls_random_bytes(void* buf, size_t len);

#ifdef __cplusplus
}
Expand Down
Loading

0 comments on commit 943c8a9

Please sign in to comment.