Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
LSH
lsh
Commits
ae65392e
Commit
ae65392e
authored
Feb 16, 2002
by
Niels Möller
Browse files
(round): Keep round index muliplied by 16, so it can be used
directly for indexing the subkeys. Rev: src/nettle/sparc/aes.asm:1.39
parent
72545c4b
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/nettle/sparc/aes.asm
View file @
ae65392e
...
...
@@ -23,7 +23,7 @@ define(src, %i4)
define
(
wtxt
,
%
l0
)
define
(
tmp
,
%
l1
)
define
(
di
ff
,
%
l2
)
define
(
nround
,
%
l3
)
define
(
nround
s
,
%
l3
)
!
Loop
variables
define
(
round
,
%
l4
)
!
Should
perhaps
be
16
*
round
...
...
@@ -46,10 +46,14 @@ _aes_crypt:
!
wtxt
add
%
fp
,
-
24
,
wtxt
add
%
fp
,
-
40
,
tmp
ld
[
ctx
+
AES_NROUNDS
],
nrounds
!
Compute
xor
,
so
that
we
can
swap
efficiently.
xor
wtxt
,
tmp
,
di
ff
ld
[
ctx
+
AES_NROUNDS
],
nround
!
The
loop
variable
will
be
multiplied
by
16
.
sll
nrounds
,
4
,
nrounds
.Lblock_loop:
!
Read
src
,
and
add
initial
subkey
...
...
@@ -102,12 +106,11 @@ _aes_crypt:
!
bleu
.Lsource_loop
!
add
%
o3
,
4
,
%
o3
mov
1
,
round
mov
1
6
,
round
!
4*
i:
i
!
This
instruction
copied
to
the
delay
slot
of
the
branch
here.
mov
0
,
i
.Lround_loop:
!
4*
i
mov
0
,
i
add
T
,
AES_SIDX3
,
idx
.Linner_loop:
!
The
comments
mark
which
j
in
T
->
table
[
j
][
Bj
(
wtxt
[
IDXi
(
i
)])
]
...
...
@@ -159,8 +162,7 @@ _aes_crypt:
add
idx
,
4
,
idx
!
Fetch
roundkey
sll
round
,
4
,
t1
add
t1
,
ctx
,
t1
add
round
,
ctx
,
t1
ld
[
t1
+
i
],
t1
xor
t0
,
t3
,
t0
!
0
,
1
,
2
,
3
...
...
@@ -173,35 +175,18 @@ _aes_crypt:
bleu
.Linner_loop
add
i
,
4
,
i
!
sll
round
,
4
,
%
g2
!
add
%
g2
,
ctx
,
%
o0
!
mov
0
,
i
!
!
.Lroundkey_loop:
!
sll
i
,
2
,
%
g2
!
ld
[
%
o0
],
%
o5
!
add
i
,
1
,
i
!
ld
[
tmp
+%
g2
],
%
g3
!
cmp
i
,
3
!
xor
%
g3
,
%
o5
,
%
g3
!
!
st
%
g3
,
[
wtxt
+%
g2
]
!
st
%
g3
,
[
tmp
+%
g2
]
!
bleu
.Lroundkey_loop
!
add
%
o0
,
4
,
%
o0
!
!
switch
roles
for
tmp
and
wtxt
xor
wtxt
,
di
ff
,
wtxt
xor
tmp
,
di
ff
,
tmp
add
round
,
1
,
round
cmp
round
,
nround
add
round
,
1
6
,
round
cmp
round
,
nround
s
blu
.Lround_loop
mov
0
,
i
xor
tmp
,
di
ff
,
tmp
sll
round
,
4
,
%
g2
!
sll
round
,
4
,
%
g2
!
final
round
add
%
g2
,
ctx
,
%
o7
add
round
,
ctx
,
%
o7
mov
0
,
i
add
T
,
288
,
%
g4
.Lfinal_loop:
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment