mirror of https://github.com/wolfSSL/wolfssl.git
Add XTS API's required for VeraCrypt
parent
210fff5569
commit
a27b49882d
|
@ -11441,6 +11441,80 @@ int wc_AesXtsDecrypt(XtsAes* xaes, byte* out, const byte* in, word32 sz,
|
|||
}
|
||||
#endif /* !WOLFSSL_ARMASM || WOLFSSL_ARMASM_NO_HW_CRYPTO */
|
||||
|
||||
/* Same as wc_AesXtsEncryptSector but the sector gets incremented by the
|
||||
* sectorSz every 32 blocks
|
||||
*
|
||||
* xaes AES keys to use for block encrypt
|
||||
* out output buffer to hold cipher text
|
||||
* in input plain text buffer to encrypt
|
||||
* sz size of both out and in buffers
|
||||
* sector value to use for tweak
|
||||
* sectorSz size of the sector
|
||||
*
|
||||
* returns 0 on success
|
||||
*/
|
||||
int wc_AesXtsEncryptConsecutiveSectors(XtsAes* aes, byte* out, const byte* in,
|
||||
word32 sz, word64 sector, word32 sectorSz)
|
||||
{
|
||||
int ret = 0;
|
||||
int iter = 0;
|
||||
int sectorCount = sz / sectorSz;
|
||||
int remainder = sz % sectorSz;
|
||||
|
||||
while (sectorCount) {
|
||||
ret = wc_AesXtsEncryptSector(aes, out + (iter * sectorSz),
|
||||
in + (iter * sectorSz), sectorSz, sector);
|
||||
if (ret != 0)
|
||||
break;
|
||||
|
||||
sectorCount--;
|
||||
iter++;
|
||||
sector++;
|
||||
}
|
||||
|
||||
if (remainder && ret == 0)
|
||||
ret = wc_AesXtsEncryptSector(aes, out + (iter * sectorSz),
|
||||
in + (iter * sectorSz), remainder, sector);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Same as wc_AesXtsEncryptConsecutiveSectors but Aes key is AES_DECRYPTION type
|
||||
*
|
||||
* xaes AES keys to use for block decrypt
|
||||
* out output buffer to hold cipher text
|
||||
* in input plain text buffer to encrypt
|
||||
* sz size of both out and in buffers
|
||||
* sector value to use for tweak
|
||||
* sectorSz size of the sector
|
||||
*
|
||||
* returns 0 on success
|
||||
*/
|
||||
int wc_AesXtsDecryptConsecutiveSectors(XtsAes* aes, byte* out, const byte* in,
|
||||
word32 sz, word64 sector, word32 sectorSz)
|
||||
{
|
||||
int ret = 0;
|
||||
int iter = 0;
|
||||
int sectorCount = sz / sectorSz;
|
||||
int remainder = sz % sectorSz;
|
||||
|
||||
while (sectorCount) {
|
||||
ret = wc_AesXtsDecryptSector(aes, out + (iter * sectorSz),
|
||||
in + (iter * sectorSz), sectorSz, sector);
|
||||
if (ret != 0)
|
||||
break;
|
||||
|
||||
sectorCount--;
|
||||
iter++;
|
||||
sector++;
|
||||
}
|
||||
|
||||
if (remainder && ret == 0)
|
||||
ret = wc_AesXtsDecryptSector(aes, out + (iter * sectorSz),
|
||||
in + (iter * sectorSz), remainder, sector);
|
||||
|
||||
return ret;
|
||||
}
|
||||
#endif /* WOLFSSL_AES_XTS */
|
||||
|
||||
#ifdef WOLFSSL_AES_SIV
|
||||
|
|
|
@ -9820,6 +9820,10 @@ static wc_test_ret_t aes_xts_sector_test(void)
|
|||
int aes_inited = 0;
|
||||
wc_test_ret_t ret = 0;
|
||||
unsigned char buf[AES_BLOCK_SIZE * 2];
|
||||
#ifndef BENCH_EMBEDDED
|
||||
/* Sector size for encrypt/decrypt consecutive sectors testcase */
|
||||
word32 sectorSz = 512;
|
||||
#endif
|
||||
|
||||
/* 128 key tests */
|
||||
WOLFSSL_SMALL_STACK_STATIC unsigned char k1[] = {
|
||||
|
@ -9867,6 +9871,120 @@ static wc_test_ret_t aes_xts_sector_test(void)
|
|||
};
|
||||
word64 s2 = 187;
|
||||
|
||||
#ifndef BENCH_EMBEDDED
|
||||
unsigned char data[550];
|
||||
|
||||
WOLFSSL_SMALL_STACK_STATIC unsigned char k3[] = {
|
||||
0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
|
||||
0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
|
||||
0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22,
|
||||
0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22
|
||||
};
|
||||
|
||||
WOLFSSL_SMALL_STACK_STATIC unsigned char p3[] = {
|
||||
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b,
|
||||
0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
|
||||
0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23,
|
||||
0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
|
||||
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b,
|
||||
0x3c, 0x3d, 0x3e, 0x3f, 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
|
||||
0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52, 0x53,
|
||||
0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
|
||||
0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b,
|
||||
0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
|
||||
0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, 0x80, 0x81, 0x82, 0x83,
|
||||
0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
|
||||
0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b,
|
||||
0x9c, 0x9d, 0x9e, 0x9f, 0xa0, 0xa1, 0xa2, 0x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xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb,
|
||||
0xfc, 0xfd, 0xfe, 0xff,
|
||||
|
||||
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b,
|
||||
0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
|
||||
0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f
|
||||
};
|
||||
|
||||
WOLFSSL_SMALL_STACK_STATIC unsigned char c3[] = {
|
||||
0xb9, 0x6b, 0x2b, 0xfd, 0x61, 0x87, 0x84, 0xd5, 0x26, 0xd2, 0x8c, 0x62,
|
||||
0x63, 0x01, 0xca, 0x46, 0xb1, 0x82, 0xfa, 0xdc, 0xbc, 0x32, 0x18, 0xe9,
|
||||
0xda, 0xe6, 0xda, 0xd1, 0x1a, 0x52, 0x77, 0xca, 0xdb, 0x0e, 0xbe, 0x37,
|
||||
0x88, 0x36, 0x1c, 0x87, 0x16, 0x60, 0xfe, 0xa8, 0x9e, 0xf6, 0x48, 0x64,
|
||||
0x94, 0x34, 0x64, 0xed, 0xf6, 0x9a, 0xc5, 0x28, 0xc9, 0xed, 0x64, 0x80,
|
||||
0x85, 0xd8, 0x93, 0xa7, 0x50, 0xb1, 0x9d, 0x2f, 0x1e, 0x34, 0xcc, 0xb4,
|
||||
0x03, 0xfb, 0x6b, 0x43, 0x21, 0xa8, 0x5b, 0xc6, 0x59, 0x13, 0xd2, 0xb5,
|
||||
0xf5, 0x7b, 0xf6, 0xb2, 0xa4, 0x7a, 0xd2, 0x50, 0x26, 0xcb, 0xa4, 0x83,
|
||||
0xc3, 0x56, 0xb0, 0xb1, 0x14, 0x34, 0x12, 0x1b, 0xea, 0x26, 0x97, 0x24,
|
||||
0x54, 0xcc, 0x32, 0x4c, 0xa4, 0xc2, 0xa3, 0x07, 0xfa, 0x30, 0xa9, 0xf0,
|
||||
0x91, 0x17, 0x60, 0x68, 0x88, 0x7f, 0x34, 0x7e, 0xbd, 0x20, 0x33, 0x95,
|
||||
0x6e, 0xc0, 0xb6, 0x2b, 0xff, 0x7e, 0x61, 0x35, 0x9a, 0x88, 0xff, 0xd9,
|
||||
0x69, 0x21, 0xe7, 0x8f, 0x45, 0x02, 0xf9, 0xd7, 0xeb, 0xa6, 0x53, 0xf1,
|
||||
0x73, 0x04, 0xf1, 0x0b, 0x85, 0xc6, 0x1f, 0x4a, 0x51, 0x2f, 0x95, 0x87,
|
||||
0x5a, 0x67, 0x37, 0xb2, 0x87, 0xf7, 0xbe, 0x2a, 0x17, 0x57, 0xca, 0xfc,
|
||||
0xdd, 0x5f, 0x37, 0x48, 0x78, 0xbd, 0xfa, 0x75, 0xc9, 0xfa, 0x86, 0x7e,
|
||||
0xc4, 0x0f, 0x60, 0x85, 0xce, 0x12, 0x44, 0x7c, 0xd9, 0xb2, 0x50, 0xd9,
|
||||
0x57, 0x85, 0xa5, 0xd7, 0x68, 0x59, 0x03, 0x09, 0x97, 0x2e, 0x8e, 0xa5,
|
||||
0xe3, 0x98, 0xac, 0x16, 0xfb, 0x6d, 0x54, 0xc5, 0x5d, 0x7a, 0x33, 0x44,
|
||||
0x0a, 0x39, 0x91, 0xcc, 0x9f, 0x67, 0xf9, 0x89, 0xbb, 0x62, 0x02, 0xc4,
|
||||
0x22, 0xec, 0xcf, 0x97, 0x69, 0x81, 0x3d, 0x00, 0xfd, 0xeb, 0x55, 0x08,
|
||||
0xa2, 0xff, 0x97, 0xaa, 0x79, 0xde, 0x3c, 0x8a, 0x78, 0x71, 0x73, 0xa2,
|
||||
0x98, 0x2f, 0xd8, 0x5c, 0x62, 0x1c, 0x5c, 0x23, 0x0a, 0xd1, 0xf1, 0x81,
|
||||
0x8a, 0x12, 0xe7, 0x4d, 0xdd, 0x4f, 0xd4, 0xf1, 0xe8, 0x0f, 0x25, 0x79,
|
||||
0x45, 0x4a, 0x49, 0x49, 0x7e, 0x56, 0x91, 0x4e, 0xaa, 0xba, 0x18, 0xe1,
|
||||
0xe4, 0xbe, 0x21, 0xdc, 0x58, 0x60, 0x6f, 0x6a, 0x7f, 0xdc, 0x5e, 0x74,
|
||||
0x47, 0xbf, 0xeb, 0x84, 0xc4, 0x1e, 0x5a, 0x61, 0x64, 0xc8, 0x63, 0x68,
|
||||
0xfa, 0x17, 0x9c, 0xac, 0x60, 0x1c, 0xa5, 0x6e, 0x00, 0x21, 0x93, 0x3c,
|
||||
0xd7, 0xbb, 0x73, 0x45, 0xf7, 0x34, 0x81, 0x6c, 0xfa, 0xf2, 0x33, 0xfd,
|
||||
0xb1, 0x40, 0x30, 0x6b, 0x30, 0xd1, 0x83, 0x5e, 0x2e, 0x7a, 0xce, 0xa6,
|
||||
0x12, 0x2a, 0x15, 0x03, 0x78, 0x29, 0xb9, 0x07, 0xae, 0xe7, 0xc2, 0x78,
|
||||
0x74, 0x72, 0xa5, 0x0e, 0x6b, 0x1f, 0x78, 0xf2, 0x5a, 0x69, 0xb6, 0x2b,
|
||||
0x99, 0x94, 0x1f, 0x89, 0xd1, 0x21, 0x14, 0x4a, 0x54, 0xab, 0x5a, 0x9f,
|
||||
0xaa, 0xa7, 0x96, 0x0a, 0x21, 0xce, 0x30, 0xb6, 0x70, 0x81, 0xe9, 0xd3,
|
||||
0x71, 0xc0, 0xf1, 0x15, 0xe2, 0xf6, 0xd3, 0xcc, 0x41, 0x15, 0x9d, 0xd5,
|
||||
0xa3, 0xa4, 0xe0, 0xf8, 0x62, 0xc4, 0x76, 0x65, 0x63, 0x89, 0xa7, 0xe2,
|
||||
0xfb, 0xf5, 0xc9, 0x80, 0x15, 0x5b, 0xc1, 0x59, 0xb2, 0xd0, 0x01, 0x3a,
|
||||
0xf9, 0xab, 0x5b, 0x79, 0x54, 0xed, 0x6b, 0xf9, 0x1d, 0x9d, 0x87, 0x63,
|
||||
0x80, 0x4f, 0xec, 0x9c, 0x4f, 0xad, 0x97, 0x04, 0xff, 0x62, 0x4a, 0x17,
|
||||
0xc0, 0x09, 0x2a, 0x2c, 0x23, 0x4b, 0xc3, 0xb6, 0x6d, 0xed, 0xdb, 0x1a,
|
||||
0x6f, 0x56, 0x2b, 0x78, 0x92, 0x3a, 0x5c, 0x7f, 0xb2, 0x63, 0xd3, 0xd5,
|
||||
0x1a, 0xbe, 0xc2, 0x34, 0xc8, 0xad, 0x36, 0xb7, 0x12, 0xb8, 0xe1, 0xb7,
|
||||
0x52, 0x7f, 0x16, 0x84, 0x2c, 0x47, 0x7e, 0xf2, 0xa5, 0x36, 0x2e, 0xad,
|
||||
0xe7, 0xbb, 0xc0, 0x6f, 0x27, 0x8e, 0x41, 0x08, 0x75, 0xe5, 0xff, 0xde,
|
||||
0x08, 0x9f, 0x8c, 0x91, 0xba, 0xc9, 0x9d, 0x9f, 0x27, 0x90, 0x50, 0x44,
|
||||
0x24, 0xe7, 0x3d, 0x6f
|
||||
};
|
||||
|
||||
word64 s3 = 0x000000ffffffffff;
|
||||
#endif
|
||||
|
||||
#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_NO_MALLOC)
|
||||
if ((aes = (XtsAes *)XMALLOC(sizeof *aes, HEAP_HINT, DYNAMIC_TYPE_AES)) == NULL)
|
||||
ERROR_OUT(WC_TEST_RET_ENC_ERRNO, out);
|
||||
|
@ -9935,8 +10053,46 @@ static wc_test_ret_t aes_xts_sector_test(void)
|
|||
ERROR_OUT(WC_TEST_RET_ENC_EC(ret), out);
|
||||
if (XMEMCMP(p2, buf, sizeof(p2)))
|
||||
ERROR_OUT(WC_TEST_RET_ENC_NC, out);
|
||||
wc_AesXtsFree(aes);
|
||||
|
||||
out:
|
||||
#ifndef BENCH_EMBEDDED
|
||||
/* encrypt consecutive sectors test */
|
||||
XMEMSET(data, 0, sizeof(buf));
|
||||
ret = wc_AesXtsSetKey(aes, k3, sizeof(k3), AES_ENCRYPTION,
|
||||
HEAP_HINT, devId);
|
||||
if (ret != 0)
|
||||
ERROR_OUT(WC_TEST_RET_ENC_EC(ret), out);
|
||||
ret = wc_AesXtsEncryptConsecutiveSectors(aes, data, p3,
|
||||
sizeof(p3), s3, sectorSz);
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT)
|
||||
ret = wc_AsyncWait(ret, &aes->aes.asyncDev, WC_ASYNC_FLAG_NONE);
|
||||
#endif
|
||||
if (ret != 0)
|
||||
ERROR_OUT(WC_TEST_RET_ENC_EC(ret), out);
|
||||
if (XMEMCMP(c3, data, sizeof(c3)))
|
||||
ERROR_OUT(WC_TEST_RET_ENC_NC, out);
|
||||
wc_AesXtsFree(aes);
|
||||
|
||||
/* decrypt consecutive sectors test */
|
||||
XMEMSET(data, 0, sizeof(buf));
|
||||
ret = wc_AesXtsSetKey(aes, k3, sizeof(k3), AES_DECRYPTION,
|
||||
HEAP_HINT, devId);
|
||||
if (ret != 0)
|
||||
ERROR_OUT(WC_TEST_RET_ENC_EC(ret), out);
|
||||
ret = wc_AesXtsDecryptConsecutiveSectors(aes, data, c3,
|
||||
sizeof(c3), s3, sectorSz);
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT)
|
||||
ret = wc_AsyncWait(ret, &aes->aes.asyncDev, WC_ASYNC_FLAG_NONE);
|
||||
#endif
|
||||
if (ret != 0)
|
||||
ERROR_OUT(WC_TEST_RET_ENC_EC(ret), out);
|
||||
if (XMEMCMP(p3, data, sizeof(p3)))
|
||||
ERROR_OUT(WC_TEST_RET_ENC_NC, out);
|
||||
wc_AesXtsFree(aes);
|
||||
|
||||
#endif
|
||||
|
||||
out:
|
||||
|
||||
if (aes_inited)
|
||||
wc_AesXtsFree(aes);
|
||||
|
|
|
@ -567,6 +567,14 @@ WOLFSSL_API int wc_AesXtsEncrypt(XtsAes* aes, byte* out,
|
|||
WOLFSSL_API int wc_AesXtsDecrypt(XtsAes* aes, byte* out,
|
||||
const byte* in, word32 sz, const byte* i, word32 iSz);
|
||||
|
||||
WOLFSSL_API int wc_AesXtsEncryptConsecutiveSectors(XtsAes* aes,
|
||||
byte* out, const byte* in, word32 sz, word64 sector,
|
||||
word32 sectorSz);
|
||||
|
||||
WOLFSSL_API int wc_AesXtsDecryptConsecutiveSectors(XtsAes* aes,
|
||||
byte* out, const byte* in, word32 sz, word64 sector,
|
||||
word32 sectorSz);
|
||||
|
||||
WOLFSSL_API int wc_AesXtsFree(XtsAes* aes);
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue