From 2f976d8b56b77baa7a3b3ed29a56652a53c5315c Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Sun, 1 Mar 2020 16:02:56 +0100 Subject: [PATCH] libsec: move AES XTS function prototypes to AES definition section in the header file --- sys/include/ape/libsec.h | 7 +++---- sys/include/libsec.h | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/sys/include/ape/libsec.h b/sys/include/ape/libsec.h index 167bcbb70..6f44db92d 100644 --- a/sys/include/ape/libsec.h +++ b/sys/include/ape/libsec.h @@ -51,6 +51,9 @@ void aesCFBencrypt(uchar *p, int len, AESstate *s); void aesCFBdecrypt(uchar *p, int len, AESstate *s); void aesOFBencrypt(uchar *p, int len, AESstate *s); +void aes_xts_encrypt(AESstate *tweak, AESstate *ecb, uvlong sectorNumber, uchar *input, uchar *output, ulong len); +void aes_xts_decrypt(AESstate *tweak, AESstate *ecb, uvlong sectorNumber, uchar *input, uchar *output, ulong len); + typedef struct AESGCMstate AESGCMstate; struct AESGCMstate { @@ -505,10 +508,6 @@ int okCertificate(uchar *cert, int len, Thumbprint *ok); uchar *readcert(char *filename, int *pcertlen); PEMChain*readcertchain(char *filename); -/* aes_xts.c */ -void aes_xts_encrypt(AESstate *tweak, AESstate *ecb, uvlong sectorNumber, uchar *input, uchar *output, ulong len); -void aes_xts_decrypt(AESstate *tweak, AESstate *ecb, uvlong sectorNumber, uchar *input, uchar *output, ulong len); - typedef struct ECpoint{ int inf; mpint *x; diff --git a/sys/include/libsec.h b/sys/include/libsec.h index 1fa37a621..b19d18a76 100644 --- a/sys/include/libsec.h +++ b/sys/include/libsec.h @@ -43,6 +43,9 @@ void aesCFBencrypt(uchar *p, int len, AESstate *s); void aesCFBdecrypt(uchar *p, int len, AESstate *s); void aesOFBencrypt(uchar *p, int len, AESstate *s); +void aes_xts_encrypt(AESstate *tweak, AESstate *ecb, uvlong sectorNumber, uchar *input, uchar *output, ulong len); +void aes_xts_decrypt(AESstate *tweak, AESstate *ecb, uvlong sectorNumber, uchar *input, uchar *output, ulong len); + typedef struct AESGCMstate AESGCMstate; struct AESGCMstate { @@ -497,10 +500,6 @@ int okCertificate(uchar *cert, int len, Thumbprint *ok); uchar *readcert(char *filename, int *pcertlen); PEMChain*readcertchain(char *filename); -/* aes_xts.c */ -void aes_xts_encrypt(AESstate *tweak, AESstate *ecb, uvlong sectorNumber, uchar *input, uchar *output, ulong len); -void aes_xts_decrypt(AESstate *tweak, AESstate *ecb, uvlong sectorNumber, uchar *input, uchar *output, ulong len); - typedef struct ECpoint{ int inf; mpint *x;