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
Snippets
Deploy
Releases
Container Registry
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
Dmitry Baryshkov
nettle
Commits
b7d37c3f
Commit
b7d37c3f
authored
22 years ago
by
Niels Möller
Browse files
Options
Downloads
Patches
Plain Diff
(aes_decrypt): Use AES_STORE.
Rev: src/nettle/x86/aes-decrypt.asm:1.11
parent
a7f3f302
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
+10
-18
10 additions, 18 deletions
x86/aes-decrypt.asm
with
10 additions
and
18 deletions
x86/aes-decrypt.asm
+
10
−
18
View file @
b7d37c3f
...
@@ -40,9 +40,9 @@ aes_decrypt:
...
@@ -40,9 +40,9 @@ aes_decrypt:
movl
24
(
%
esp
),
%
ebp
movl
24
(
%
esp
),
%
ebp
testl
%
ebp
,
%
ebp
testl
%
ebp
,
%
ebp
jz
.L
decrypt_
end
jz
.Lend
.L
decrypt_
block_loop:
.Lblock_loop:
movl
20
(
%
esp
),
%
esi
C
address
of
context
struct
ctx
movl
20
(
%
esp
),
%
esi
C
address
of
context
struct
ctx
movl
32
(
%
esp
),
%
ebp
C
address
of
plaintext
movl
32
(
%
esp
),
%
ebp
C
address
of
plaintext
AES_LOAD
(
%
esi
,
%
ebp
)
AES_LOAD
(
%
esi
,
%
ebp
)
...
@@ -53,7 +53,7 @@ aes_decrypt:
...
@@ -53,7 +53,7 @@ aes_decrypt:
subl
$
1
,
%
ebp
C
one
round
is
complete
subl
$
1
,
%
ebp
C
one
round
is
complete
addl
$
16
,
%
esi
C
point
to
next
key
addl
$
16
,
%
esi
C
point
to
next
key
.L
decrypt
_loop:
.L
round
_loop:
pushl
%
esi
C
save
this
first
:
we
'
ll
cl
obber
it
later
pushl
%
esi
C
save
this
first
:
we
'
ll
cl
obber
it
later
C
Why???
C
Why???
...
@@ -83,7 +83,7 @@ aes_decrypt:
...
@@ -83,7 +83,7 @@ aes_decrypt:
xorl
12
(
%
esi
),
%
edx
xorl
12
(
%
esi
),
%
edx
addl
$
16
,
%
esi
C
point
to
next
key
addl
$
16
,
%
esi
C
point
to
next
key
decl
%
ebp
decl
%
ebp
jnz
.L
decrypt
_loop
jnz
.L
round
_loop
C
Foo?
C
Foo?
xchgl
%
ebx
,
%
edx
xchgl
%
ebx
,
%
edx
...
@@ -109,29 +109,21 @@ aes_decrypt:
...
@@ -109,29 +109,21 @@ aes_decrypt:
C
inverse
S
-
box
substitution
C
inverse
S
-
box
substitution
mov
$
4
,
%
edi
mov
$
4
,
%
edi
.L
i
subst:
.Lsubst:
AES_SUBST_BYTE
(
_aes_decrypt_table
)
AES_SUBST_BYTE
(
_aes_decrypt_table
)
decl
%
edi
decl
%
edi
jnz
.L
i
subst
jnz
.Lsubst
xorl
(
%
esi
),
%
eax
C
add
last
key
to
plaintext
C
Add
last
subkey
,
and
store
encrypted
data
xorl
4
(
%
esi
),
%
ebx
xorl
8
(
%
esi
),
%
ecx
xorl
12
(
%
esi
),
%
edx
C
//
store
decrypted
data
back
to
caller
'
s
buffer
movl
28
(
%
esp
),
%
edi
movl
28
(
%
esp
),
%
edi
movl
%
eax
,(
%
edi
)
AES_STORE
(
%
esi
,
%
edi
)
movl
%
ebx
,
4
(
%
edi
)
movl
%
ecx
,
8
(
%
edi
)
movl
%
edx
,
12
(
%
edi
)
addl
$
16
,
28
(
%
esp
)
C
Increment
destination
pointer
addl
$
16
,
28
(
%
esp
)
C
Increment
destination
pointer
subl
$
16
,
24
(
%
esp
)
subl
$
16
,
24
(
%
esp
)
jnz
.L
decrypt_
block_loop
jnz
.Lblock_loop
.L
decrypt_
end:
.Lend:
popl
%
edi
popl
%
edi
popl
%
esi
popl
%
esi
popl
%
ebp
popl
%
ebp
...
...
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