aes(2): document aes_xts_encrypt() and aes_xts_decrypt() functions

This commit is contained in:
cinap_lenrek 2017-10-30 03:04:05 +01:00
parent 0e68b7551a
commit 5c1afc882c

View file

@ -1,6 +1,16 @@
.TH AES 2 .TH AES 2
.SH NAME .SH NAME
setupAESstate, aesCBCencrypt, aesCBCdecrypt, aesCFBencrypt, aesCFBdecrypt, aesOFBencrypt, setupAESXCBCstate, aesXCBCmac, setupAESGCMstate - advanced encryption standard (rijndael) setupAESstate, \
aesCBCencrypt, \
aesCBCdecrypt, \
aesCFBencrypt, \
aesCFBdecrypt, \
aesOFBencrypt, \
aes_xts_encrypt, aes_xts_decrypt, \
setupAESXCBCstate, aesXCBCmac, \
setupAESGCMstate, \
aesgcm_setiv, aesgcm_encrypt, aesgcm_decrypt \
- advanced encryption standard (rijndael)
.SH SYNOPSIS .SH SYNOPSIS
.B #include <u.h> .B #include <u.h>
.br .br
@ -37,6 +47,12 @@ void aesCFBdecrypt(uchar *p, int len, AESstate *s)
void aesOFBencrypt(uchar *p, int len, AESstate *s) void aesOFBencrypt(uchar *p, int len, AESstate *s)
.PP .PP
.B .B
void aes_xts_encrypt(AESstate *tweak, AESstate *ecb, uvlong sectorNumber, uchar *input, uchar *output, ulong len)
.PP
.B
void aes_xts_decrypt(AESstate *tweak, AESstate *ecb, uvlong sectorNumber, uchar *input, uchar *output, ulong len)
.PP
.B
void setupAESXCBCstate(AESstate *s) void setupAESXCBCstate(AESstate *s)
.PP .PP
.B .B
@ -72,6 +88,10 @@ and
.I aesOFBencrypt .I aesOFBencrypt
implement cipher-feedback- and output-feedback-mode implement cipher-feedback- and output-feedback-mode
stream cipher encryption. stream cipher encryption.
.I Aes_xts_encrypt
and
.I aes_xts_decrypt
implement the XTS-AES tweakable block cipher, per IEEE 1619-2017 (see bugs below).
.IR SetupAESstate .IR SetupAESstate
is used to initialize the state of the above encryption modes. is used to initialize the state of the above encryption modes.
.I SetupAESXCBCstate .I SetupAESXCBCstate
@ -137,3 +157,10 @@ Because of the way that non-multiple-of-16 buffers are handled,
must be fed buffers of the same size as the must be fed buffers of the same size as the
.I aesCBCencrypt .I aesCBCencrypt
calls that encrypted it. calls that encrypted it.
.PP
The functions
.I aes_xts_encrypt
an
.I aes_xts_decrypt
abort on a non-multiple-of-16 length as ciphertext stealing
is not implemented.