Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
nettle
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Brian Smith
nettle
Commits
27e90cc8
Commit
27e90cc8
authored
22 years ago
by
Niels Möller
Browse files
Options
Downloads
Patches
Plain Diff
(aes_decrypt): Use the AES_LOAD macro.
Rev: src/nettle/x86/aes-decrypt.asm:1.3
parent
934c1628
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
x86/aes-decrypt.asm
+20
-15
20 additions, 15 deletions
x86/aes-decrypt.asm
with
20 additions
and
15 deletions
x86/aes-decrypt.asm
+
20
−
15
View file @
27e90cc8
...
...
@@ -22,11 +22,12 @@ C MA 02111-1307, USA.
C
aes_decrypt
(
struct
aes_context
*
ctx
,
C
unsigned
length
,
uint8_t
*
ds
t
,
C
uint8_t
*
src
)
.text
.align
16
.globl
aes_decrypt
.globl
aes_decrypt
.type
aes_decrypt
,
@
function
aes_decrypt:
C
//
save
al
l
registers
that
need
to
be
saved
C
save
al
l
registers
that
need
to
be
saved
pushl
%
ebx
C
16
(
%
esp
)
pushl
%
ebp
C
12
(
%
esp
)
pushl
%
esi
C
8
(
%
esp
)
...
...
@@ -38,24 +39,28 @@ aes_decrypt:
C
src
=
32
(
%
esp
)
movl
24
(
%
esp
),
%
ebp
C
What
'
s
the
right
way
to
set
the
flags?
addl
$
0
,
%
ebp
testl
%
ebp
,
%
ebp
jz
.Ldecrypt_end
.Ldecrypt_block_loop:
movl
32
(
%
esp
),
%
esi
C
address
of
ciphertext
movl
(
%
esi
),
%
eax
C
load
ciphertext
into
registers
movl
4
(
%
esi
),
%
ebx
movl
8
(
%
esi
),
%
ecx
movl
12
(
%
esi
),
%
edx
movl
20
(
%
esp
),
%
esi
C
address
of
context
struct
ctx
movl
32
(
%
esp
),
%
ebp
C
address
of
plaintext
AES_LOAD
(
%
esi
,
%
ebp
)
addl
$
16
,
32
(
%
esp
)
C
Increment
src
pointer
movl
20
(
%
esp
),
%
esi
C
address
of
context
struct
ctx
xorl
(
%
esi
),
%
eax
C
add
first
key
to
ciphertext
xorl
4
(
%
esi
),
%
ebx
xorl
8
(
%
esi
),
%
ecx
xorl
12
(
%
esi
),
%
edx
C
movl
32
(
%
esp
),
%
esi
C
address
of
ciphertext
C
movl
(
%
esi
),
%
eax
C
load
ciphertext
into
registers
C
movl
4
(
%
esi
),
%
ebx
C
movl
8
(
%
esi
),
%
ecx
C
movl
12
(
%
esi
),
%
edx
C
C
addl
$
16
,
32
(
%
esp
)
C
Increment
src
pointer
C
C
movl
20
(
%
esp
),
%
esi
C
address
of
context
struct
ctx
C
xorl
(
%
esi
),
%
eax
C
add
first
key
to
ciphertext
C
xorl
4
(
%
esi
),
%
ebx
C
xorl
8
(
%
esi
),
%
ecx
C
xorl
12
(
%
esi
),
%
edx
movl
AES_NROUNDS
(
%
esi
),
%
ebp
C
get
number
of
rounds
to
do
from
struct
C
shll
$
4
,
%
ebp
C
leal
240
(
%
esi
,
%
ebp
),
%
esi
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment