xtea: fix decryption with --enable-small
iv decrypt handling code needs to be executed regardless of CONFIG_SMALL Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
178ecfc257
commit
a8cb21fd62
@ -94,12 +94,12 @@ static void xtea_crypt_ecb(AVXTEA *ctx, uint8_t *dst, const uint8_t *src,
|
|||||||
DSTEP(0xDAA66D2BU, k1, k2);
|
DSTEP(0xDAA66D2BU, k1, k2);
|
||||||
DSTEP(0x3C6EF372U, k2, k1);
|
DSTEP(0x3C6EF372U, k2, k1);
|
||||||
DSTEP(0x9E3779B9U, k3, k0);
|
DSTEP(0x9E3779B9U, k3, k0);
|
||||||
if(iv){
|
#endif
|
||||||
|
if (iv) {
|
||||||
v0 ^= AV_RB32(iv );
|
v0 ^= AV_RB32(iv );
|
||||||
v1 ^= AV_RB32(iv+4);
|
v1 ^= AV_RB32(iv+4);
|
||||||
memcpy(iv, src, 8);
|
memcpy(iv, src, 8);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
} else {
|
} else {
|
||||||
#if CONFIG_SMALL
|
#if CONFIG_SMALL
|
||||||
int i;
|
int i;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user