Skip to content

Commit

Permalink
aes: rename internal key expansion symbols
Browse files Browse the repository at this point in the history
Signed-off-by: Marcel Cornu <[email protected]>
  • Loading branch information
mdcornu authored and pablodelara committed May 14, 2024
1 parent 72e7873 commit e7d829c
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 30 deletions.
18 changes: 9 additions & 9 deletions aes/keyexp_128.asm
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ section .text
; arg 2: rdx: pointer to expanded key array for encrypt
; arg 3: r8: pointer to expanded key array for decrypt
;
mk_global aes_keyexp_128_sse, function, internal
aes_keyexp_128_sse:
mk_global _aes_keyexp_128_sse, function, internal
_aes_keyexp_128_sse:
endbranch
movdqu xmm1, [KEY] ; loading the AES key
movdqu [EXP_ENC_KEYS + 16*0], xmm1
Expand Down Expand Up @@ -148,8 +148,8 @@ aes_keyexp_128_sse:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

mk_global aes_keyexp_128_avx, function, internal
aes_keyexp_128_avx:
mk_global _aes_keyexp_128_avx, function, internal
_aes_keyexp_128_avx:
endbranch
vmovdqu xmm1, [KEY] ; loading the AES key
vmovdqu [EXP_ENC_KEYS + 16*0], xmm1
Expand Down Expand Up @@ -222,14 +222,14 @@ aes_keyexp_128_avx:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; void aes_keyexp_128_enc_sse(UINT8 *key,
; void _aes_keyexp_128_enc_sse(UINT8 *key,
; UINT8 *enc_exp_keys);
;
; arg 1: rcx: pointer to key
; arg 2: rdx: pointer to expanded key array for encrypt
;
mk_global aes_keyexp_128_enc_sse, function, internal
aes_keyexp_128_enc_sse:
mk_global _aes_keyexp_128_enc_sse, function, internal
_aes_keyexp_128_enc_sse:
endbranch
movdqu xmm1, [KEY] ; loading the AES key
movdqu [EXP_ENC_KEYS + 16*0], xmm1
Expand Down Expand Up @@ -277,8 +277,8 @@ aes_keyexp_128_enc_sse:

ret

mk_global aes_keyexp_128_enc_avx, function, internal
aes_keyexp_128_enc_avx:
mk_global _aes_keyexp_128_enc_avx, function, internal
_aes_keyexp_128_enc_avx:
endbranch
vmovdqu xmm1, [KEY] ; loading the AES key
vmovdqu [EXP_ENC_KEYS + 16*0], xmm1
Expand Down
8 changes: 4 additions & 4 deletions aes/keyexp_192.asm
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ section .text
; arg 2: rdx: pointer to expanded key array for encrypt
; arg 3: r8: pointer to expanded key array for decrypt
;
mk_global aes_keyexp_192_sse, function, internal
aes_keyexp_192_sse:
mk_global _aes_keyexp_192_sse, function, internal
_aes_keyexp_192_sse:
endbranch

%ifnidn __OUTPUT_FORMAT__, elf64
Expand Down Expand Up @@ -196,8 +196,8 @@ aes_keyexp_192_sse:



mk_global aes_keyexp_192_avx, function, internal
aes_keyexp_192_avx:
mk_global _aes_keyexp_192_avx, function, internal
_aes_keyexp_192_avx:
endbranch

%ifnidn __OUTPUT_FORMAT__, elf64
Expand Down
8 changes: 4 additions & 4 deletions aes/keyexp_256.asm
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ section .text
; arg 2: rdx: pointer to expanded key array for encrypt
; arg 3: r8: pointer to expanded key array for decrypt
;
mk_global aes_keyexp_256_sse, function, internal
aes_keyexp_256_sse:
mk_global _aes_keyexp_256_sse, function, internal
_aes_keyexp_256_sse:
endbranch
movdqu xmm1, [KEY] ; loading the AES key
movdqu [EXP_ENC_KEYS + 16*0], xmm1
Expand Down Expand Up @@ -192,8 +192,8 @@ aes_keyexp_256_sse:
ret


mk_global aes_keyexp_256_avx, function, internal
aes_keyexp_256_avx:
mk_global _aes_keyexp_256_avx, function, internal
_aes_keyexp_256_avx:
endbranch
vmovdqu xmm1, [KEY] ; loading the AES key
vmovdqu [EXP_ENC_KEYS + 16*0], xmm1
Expand Down
26 changes: 13 additions & 13 deletions aes/keyexp_multibinary.asm
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@ default rel

%include "reg_sizes.asm"

extern aes_keyexp_128_sse
extern aes_keyexp_128_avx
extern aes_keyexp_128_enc_sse
extern aes_keyexp_128_enc_avx
extern _aes_keyexp_128_sse
extern _aes_keyexp_128_avx
extern _aes_keyexp_128_enc_sse
extern _aes_keyexp_128_enc_avx

extern aes_keyexp_192_sse
extern aes_keyexp_192_avx
extern _aes_keyexp_192_sse
extern _aes_keyexp_192_avx

extern aes_keyexp_256_sse
extern aes_keyexp_256_avx
extern _aes_keyexp_256_sse
extern _aes_keyexp_256_avx

%include "multibinary.asm"

Expand All @@ -50,16 +50,16 @@ extern aes_keyexp_256_avx
; instantiate aes_keyexp_128 interfaces
;;;;
mbin_interface _aes_keyexp_128
mbin_dispatch_init _aes_keyexp_128, aes_keyexp_128_sse, aes_keyexp_128_avx, aes_keyexp_128_avx
mbin_dispatch_init _aes_keyexp_128, _aes_keyexp_128_sse, _aes_keyexp_128_avx, _aes_keyexp_128_avx

mbin_interface aes_keyexp_128_enc
mbin_dispatch_init aes_keyexp_128_enc, aes_keyexp_128_enc_sse, aes_keyexp_128_enc_avx, aes_keyexp_128_enc_avx
mbin_interface _aes_keyexp_128_enc
mbin_dispatch_init _aes_keyexp_128_enc, _aes_keyexp_128_enc_sse, _aes_keyexp_128_enc_avx, _aes_keyexp_128_enc_avx

mbin_interface _aes_keyexp_192
mbin_dispatch_init _aes_keyexp_192, aes_keyexp_192_sse, aes_keyexp_192_avx, aes_keyexp_192_avx
mbin_dispatch_init _aes_keyexp_192, _aes_keyexp_192_sse, _aes_keyexp_192_avx, _aes_keyexp_192_avx

mbin_interface _aes_keyexp_256
mbin_dispatch_init _aes_keyexp_256, aes_keyexp_256_sse, aes_keyexp_256_avx, aes_keyexp_256_avx
mbin_dispatch_init _aes_keyexp_256, _aes_keyexp_256_sse, _aes_keyexp_256_avx, _aes_keyexp_256_avx

section .text
;;; func core, ver, snum
Expand Down

0 comments on commit e7d829c

Please sign in to comment.