diff options
author | Martin Schiller <mschiller@tdt.de> | 2016-08-18 12:03:15 +0200 |
---|---|---|
committer | John Crispin <john@phrozen.org> | 2016-08-20 05:32:44 +0200 |
commit | 8dba24cfc2de8303da436a6ec19d3eb0314d1ca1 (patch) | |
tree | c5279be41f6cf715e12c6419e055ea3feb4d2f78 /package/kernel/lantiq/ltq-deu | |
parent | c08651226f5645204f91f79d247801033f6015d1 (diff) | |
download | mtk-20170518-8dba24cfc2de8303da436a6ec19d3eb0314d1ca1.zip mtk-20170518-8dba24cfc2de8303da436a6ec19d3eb0314d1ca1.tar.gz mtk-20170518-8dba24cfc2de8303da436a6ec19d3eb0314d1ca1.tar.bz2 |
ltq-deu: fix aes initialization vector handling
This fix is a backport from the lantiq UGW-6.1.1-MR1
Signed-off-by: Martin Schiller <mschiller@tdt.de>
Diffstat (limited to 'package/kernel/lantiq/ltq-deu')
-rw-r--r-- | package/kernel/lantiq/ltq-deu/src/ifxmips_aes.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/package/kernel/lantiq/ltq-deu/src/ifxmips_aes.c b/package/kernel/lantiq/ltq-deu/src/ifxmips_aes.c index bf77537..fe888b8 100644 --- a/package/kernel/lantiq/ltq-deu/src/ifxmips_aes.c +++ b/package/kernel/lantiq/ltq-deu/src/ifxmips_aes.c @@ -252,10 +252,10 @@ void ifx_deu_aes (void *ctx_arg, u8 *out_arg, const u8 *in_arg, //tc.chen : copy iv_arg back if (mode > 0) { - *((u32 *) iv_arg) = DEU_ENDIAN_SWAP(*((u32 *) iv_arg)); - *((u32 *) iv_arg + 1) = DEU_ENDIAN_SWAP(*((u32 *) iv_arg + 1)); - *((u32 *) iv_arg + 2) = DEU_ENDIAN_SWAP(*((u32 *) iv_arg + 2)); - *((u32 *) iv_arg + 3) = DEU_ENDIAN_SWAP(*((u32 *) iv_arg + 3)); + *((u32 *) iv_arg) = DEU_ENDIAN_SWAP(aes->IV3R); + *((u32 *) iv_arg + 1) = DEU_ENDIAN_SWAP(aes->IV2R); + *((u32 *) iv_arg + 2) = DEU_ENDIAN_SWAP(aes->IV1R); + *((u32 *) iv_arg + 3) = DEU_ENDIAN_SWAP(aes->IV0R); } CRTCL_SECT_END; |