From b7e9ae6e9f8b1683774e2a69b943cec31c94f5a2 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Wed, 18 Jan 2017 17:20:27 +0100 Subject: tls: added AES code and made it compile. not used yet Signed-off-by: Denys Vlasenko --- networking/tls_aes.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 networking/tls_aes.h (limited to 'networking/tls_aes.h') diff --git a/networking/tls_aes.h b/networking/tls_aes.h new file mode 100644 index 000000000..ea8ed7ea9 --- /dev/null +++ b/networking/tls_aes.h @@ -0,0 +1,20 @@ +/* + * Copyright (C) 2017 Denys Vlasenko + * + * Licensed under GPLv2, see file LICENSE in this source tree. + * + * Selected few declarations for AES. + */ + +int32 psAesInitKey(const unsigned char *key, uint32 keylen, psAesKey_t *skey); +void psAesEncryptBlock(const unsigned char *pt, unsigned char *ct, + psAesKey_t *skey); +void psAesDecryptBlock(const unsigned char *ct, unsigned char *pt, + psAesKey_t *skey); + +int32 psAesInit(psCipherContext_t *ctx, unsigned char *IV, + unsigned char *key, uint32 keylen); +int32 psAesEncrypt(psCipherContext_t *ctx, unsigned char *pt, + unsigned char *ct, uint32 len); +int32 psAesDecrypt(psCipherContext_t *ctx, unsigned char *ct, + unsigned char *pt, uint32 len); -- cgit v1.2.3