Skip to content

Commit

Permalink
crypto: arm64/aes-xts-ce: fix for big endian
Browse files Browse the repository at this point in the history
Emit the XTS tweak literal constants in the appropriate order for a
single 128-bit scalar literal load.

Fixes: 49788fe ("arm64/crypto: AES-ECB/CBC/CTR/XTS using ARMv8 NEON and Crypto Extensions")
Signed-off-by: Ard Biesheuvel <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
Ard Biesheuvel authored and herbertx committed Oct 21, 2016
1 parent a2c435c commit caf4b9e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions arch/arm64/crypto/aes-ce.S
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
*/

#include <linux/linkage.h>
#include <asm/assembler.h>

#define AES_ENTRY(func) ENTRY(ce_ ## func)
#define AES_ENDPROC(func) ENDPROC(ce_ ## func)
Expand Down
3 changes: 2 additions & 1 deletion arch/arm64/crypto/aes-modes.S
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,8 @@ AES_ENDPROC(aes_ctr_encrypt)
.endm

.Lxts_mul_x:
.word 1, 0, 0x87, 0
CPU_LE( .quad 1, 0x87 )
CPU_BE( .quad 0x87, 1 )

AES_ENTRY(aes_xts_encrypt)
FRAME_PUSH
Expand Down

0 comments on commit caf4b9e

Please sign in to comment.