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
88c9cdb3
Commit
88c9cdb3
authored
22 years ago
by
Niels Möller
Browse files
Options
Downloads
Patches
Plain Diff
(AES_SUBST_BYTE): New macro.
Rev: src/nettle/x86/machine.m4:1.6
parent
93476994
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/machine.m4
+26
-0
26 additions, 0 deletions
x86/machine.m4
with
26 additions
and
0 deletions
x86/machine.m4
+
26
−
0
View file @
88c9cdb3
...
...
@@ -54,6 +54,8 @@ dnl AES_LAST_ROUND(a, b, c, d)
dnl Computes one word of the final round. Leaves result in %edi.
dnl Note that we have to quote $ in constants.
define(<AES_LAST_ROUND>, <
C FIXME: Perform substitution on least significant byte here,
C to save work later.
movl %e<>$1<>x,%edi
andl <$>0x000000ff,%edi
movl %e<>$2<>x,%ebp
...
...
@@ -66,3 +68,27 @@ define(<AES_LAST_ROUND>, <
andl <$>0xff000000,%ebp
orl %ebp,%edi>)dnl
dnl AES_SUBST_BYTE(table)
dnl Substitutes the least significant byte of
dnl each of eax, ebx, ecx and edx, and also rotates
dnl the words one byte to the left.
define(<AES_SUBST_BYTE>, <
movl %eax,%ebp
andl <$>0x000000ff,%ebp
movb AES_SBOX + $1 (%ebp),%al
roll <$>8,%eax
movl %ebx,%ebp
andl <$>0x000000ff,%ebp
movb AES_SBOX + $1 (%ebp),%bl
roll <$>8,%ebx
movl %ecx,%ebp
andl <$>0x000000ff,%ebp
movb AES_SBOX + $1 (%ebp),%cl
roll <$>8,%ecx
movl %edx,%ebp
andl <$>0x000000ff,%ebp
movb AES_SBOX + $1 (%ebp),%dl
roll <$>8,%edx>)dnl
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