update some of the static functions

This commit is contained in:
Steffen Jaeckel
2017-06-20 19:58:13 +02:00
parent 8f433f1a36
commit 1bf42ea99a
13 changed files with 72 additions and 72 deletions
+4 -4
View File
@@ -14,7 +14,7 @@
#ifdef LTC_XTS_MODE
static int tweak_uncrypt(const unsigned char *C, unsigned char *P, unsigned char *T, symmetric_xts *xts)
static int _tweak_uncrypt(const unsigned char *C, unsigned char *P, unsigned char *T, symmetric_xts *xts)
{
unsigned long x;
int err;
@@ -108,7 +108,7 @@ int xts_decrypt(const unsigned char *ct, unsigned long ptlen, unsigned char *pt,
}
for (i = 0; i < lim; i++) {
if ((err = tweak_uncrypt(ct, pt, T, xts)) != CRYPT_OK) {
if ((err = _tweak_uncrypt(ct, pt, T, xts)) != CRYPT_OK) {
return err;
}
ct += 16;
@@ -122,7 +122,7 @@ int xts_decrypt(const unsigned char *ct, unsigned long ptlen, unsigned char *pt,
xts_mult_x(CC);
/* PP = tweak decrypt block m-1 */
if ((err = tweak_uncrypt(ct, PP, CC, xts)) != CRYPT_OK) {
if ((err = _tweak_uncrypt(ct, PP, CC, xts)) != CRYPT_OK) {
return err;
}
@@ -136,7 +136,7 @@ int xts_decrypt(const unsigned char *ct, unsigned long ptlen, unsigned char *pt,
}
/* Pm-1 = Tweak uncrypt CC */
if ((err = tweak_uncrypt(CC, pt, T, xts)) != CRYPT_OK) {
if ((err = _tweak_uncrypt(CC, pt, T, xts)) != CRYPT_OK) {
return err;
}
}
+4 -4
View File
@@ -14,7 +14,7 @@
#ifdef LTC_XTS_MODE
static int tweak_crypt(const unsigned char *P, unsigned char *C, unsigned char *T, symmetric_xts *xts)
static int _tweak_crypt(const unsigned char *P, unsigned char *C, unsigned char *T, symmetric_xts *xts)
{
unsigned long x;
int err;
@@ -111,7 +111,7 @@ int xts_encrypt(const unsigned char *pt, unsigned long ptlen, unsigned char *ct,
}
for (i = 0; i < lim; i++) {
if ((err = tweak_crypt(pt, ct, T, xts)) != CRYPT_OK) {
if ((err = _tweak_crypt(pt, ct, T, xts)) != CRYPT_OK) {
return err;
}
ct += 16;
@@ -122,7 +122,7 @@ int xts_encrypt(const unsigned char *pt, unsigned long ptlen, unsigned char *ct,
/* if ptlen not divide 16 then */
if (mo > 0) {
/* CC = tweak encrypt block m-1 */
if ((err = tweak_crypt(pt, CC, T, xts)) != CRYPT_OK) {
if ((err = _tweak_crypt(pt, CC, T, xts)) != CRYPT_OK) {
return err;
}
@@ -137,7 +137,7 @@ int xts_encrypt(const unsigned char *pt, unsigned long ptlen, unsigned char *ct,
}
/* Cm-1 = Tweak encrypt PP */
if ((err = tweak_crypt(PP, ct, T, xts)) != CRYPT_OK) {
if ((err = _tweak_crypt(PP, ct, T, xts)) != CRYPT_OK) {
return err;
}
}