Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
97f6d154
Commit
97f6d154
authored
Jan 16, 2007
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix CONFIG_SMALL again
Originally committed as revision 7554 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
5d1b5393
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
18 deletions
+8
-18
aes.c
libavutil/aes.c
+8
-18
No files found.
libavutil/aes.c
View file @
97f6d154
...
...
@@ -59,30 +59,20 @@ static void subshift(uint8_t s0[2][16], int s, uint8_t *box){
s3
[
0
][
1
]
=
box
[
s3
[
1
][
13
]];
s3
[
0
][
13
]
=
box
[
s3
[
1
][
9
]];
s3
[
0
][
9
]
=
box
[
s3
[
1
][
5
]];
s3
[
0
][
5
]
=
box
[
s3
[
1
][
1
]];
}
#define ROT(x,s) ((x<<s)|(x>>(32-s)))
#if 0
static inline void mix(uint8_t state[4][4], uint32_t multbl[4][256]){
int i;
for(i=0; i<4; i++)
static
inline
int
mix_core
(
uint32_t
multbl
[
4
][
256
],
int
a
,
int
b
,
int
c
,
int
d
){
#ifdef CONFIG_SMALL
((uint32_t *)(state))[i] = multbl[0][state[i][0]] ^ ROT(multbl[0][state[i][1]], 8
)
^ROT(multbl[0][state[i][2]],16) ^ ROT(multbl[0][state[i][3]],
24);
#define ROT(x,s) ((x<<s)|(x>>(32-s))
)
return
multbl
[
0
][
a
]
^
ROT
(
multbl
[
0
][
b
],
8
)
^
ROT
(
multbl
[
0
][
c
],
16
)
^
ROT
(
multbl
[
0
][
d
],
24
);
#else
((uint32_t *)(state))[i] = multbl[0][state[i][0]] ^ multbl[1][state[i][1]]
^multbl[2][state[i][2]] ^ multbl[3][state[i][3]];
return
multbl
[
0
][
a
]
^
multbl
[
1
][
b
]
^
multbl
[
2
][
c
]
^
multbl
[
3
][
d
];
#endif
}
#endif
static
inline
void
mix
(
uint8_t
state
[
2
][
4
][
4
],
uint32_t
multbl
[
4
][
256
],
int
s1
,
int
s3
){
((
uint32_t
*
)(
state
))[
0
]
=
multbl
[
0
][
state
[
1
][
0
][
0
]]
^
multbl
[
1
][
state
[
1
][
s1
][
1
]]
^
multbl
[
2
][
state
[
1
][
2
][
2
]]
^
multbl
[
3
][
state
[
1
][
s3
][
3
]];
((
uint32_t
*
)(
state
))[
1
]
=
multbl
[
0
][
state
[
1
][
1
][
0
]]
^
multbl
[
1
][
state
[
1
][
s3
-
1
][
1
]]
^
multbl
[
2
][
state
[
1
][
3
][
2
]]
^
multbl
[
3
][
state
[
1
][
s1
-
1
][
3
]];
((
uint32_t
*
)(
state
))[
2
]
=
multbl
[
0
][
state
[
1
][
2
][
0
]]
^
multbl
[
1
][
state
[
1
][
s3
][
1
]]
^
multbl
[
2
][
state
[
1
][
0
][
2
]]
^
multbl
[
3
][
state
[
1
][
s1
][
3
]];
((
uint32_t
*
)(
state
))[
3
]
=
multbl
[
0
][
state
[
1
][
3
][
0
]]
^
multbl
[
1
][
state
[
1
][
s1
-
1
][
1
]]
^
multbl
[
2
][
state
[
1
][
1
][
2
]]
^
multbl
[
3
][
state
[
1
][
s3
-
1
][
3
]];
((
uint32_t
*
)(
state
))[
0
]
=
mix_core
(
multbl
,
state
[
1
][
0
][
0
],
state
[
1
][
s1
][
1
],
state
[
1
][
2
][
2
],
state
[
1
][
s3
][
3
]);
((
uint32_t
*
)(
state
))[
1
]
=
mix_core
(
multbl
,
state
[
1
][
1
][
0
],
state
[
1
][
s3
-
1
][
1
],
state
[
1
][
3
][
2
],
state
[
1
][
s1
-
1
][
3
]);
((
uint32_t
*
)(
state
))[
2
]
=
mix_core
(
multbl
,
state
[
1
][
2
][
0
],
state
[
1
][
s3
][
1
],
state
[
1
][
0
][
2
],
state
[
1
][
s1
][
3
]);
((
uint32_t
*
)(
state
))[
3
]
=
mix_core
(
multbl
,
state
[
1
][
3
][
0
],
state
[
1
][
s1
-
1
][
1
],
state
[
1
][
1
][
2
],
state
[
1
][
s3
-
1
][
3
]);
}
static
inline
void
crypt
(
AVAES
*
a
,
int
s
,
uint8_t
*
sbox
,
uint32_t
*
multbl
){
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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