shithub: riscv

Download patch

ref: 2f976d8b56b77baa7a3b3ed29a56652a53c5315c
parent: 64640083dee2aaa5c407a8938cc44571333b9b6c
author: cinap_lenrek <[email protected]>
date: Sun Mar 1 11:02:56 EST 2020

libsec: move AES XTS function prototypes to AES definition section in the header file

--- a/sys/include/ape/libsec.h
+++ b/sys/include/ape/libsec.h
@@ -51,6 +51,9 @@
 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
 {
@@ -504,10 +507,6 @@
 /* readcert.c */
 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;
--- a/sys/include/libsec.h
+++ b/sys/include/libsec.h
@@ -43,6 +43,9 @@
 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
 {
@@ -496,10 +499,6 @@
 /* readcert.c */
 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;