Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
libremedia
Tethys
FFmpeg
Commits
95d1236b
Commit
95d1236b
authored
18 years ago
by
Michael Niedermayer
Browse files
Options
Downloads
Patches
Plain Diff
fix CONFIG_SMALL case
Originally committed as revision 7482 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
388b5e69
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libavutil/aes.c
+6
-2
6 additions, 2 deletions
libavutil/aes.c
with
6 additions
and
2 deletions
libavutil/aes.c
+
6
−
2
View file @
95d1236b
...
@@ -52,7 +52,7 @@ static inline void addkey(uint64_t state[2], uint64_t round_key[2]){
...
@@ -52,7 +52,7 @@ static inline void addkey(uint64_t state[2], uint64_t round_key[2]){
#define SUBSHIFT2(s, box) t=s[0]; s[0]=box[s[ 8]]; s[ 8]=box[ t]; t=s[ 4]; s[ 4]=box[s[12]]; s[12]=box[t];
#define SUBSHIFT2(s, box) t=s[0]; s[0]=box[s[ 8]]; s[ 8]=box[ t]; t=s[ 4]; s[ 4]=box[s[12]]; s[12]=box[t];
#define SUBSHIFT3(s, box) t=s[0]; s[0]=box[s[12]]; s[12]=box[s[ 8]]; s[ 8]=box[s[ 4]]; s[ 4]=box[t];
#define SUBSHIFT3(s, box) t=s[0]; s[0]=box[s[12]]; s[12]=box[s[ 8]]; s[ 8]=box[s[ 4]]; s[ 4]=box[t];
#define ROT(x,s) ((x
>>
s)|(x
<<
(32-s))
#define ROT(x,s) ((x
<<
s)|(x
>>
(32-s))
)
static
inline
void
mix
(
uint8_t
state
[
4
][
4
],
uint32_t
multbl
[
4
][
256
]){
static
inline
void
mix
(
uint8_t
state
[
4
][
4
],
uint32_t
multbl
[
4
][
256
]){
int
i
;
int
i
;
...
@@ -97,7 +97,7 @@ void av_aes_encrypt(AVAES *a){
...
@@ -97,7 +97,7 @@ void av_aes_encrypt(AVAES *a){
addkey
(
a
->
state
,
a
->
round_key
[
r
]);
addkey
(
a
->
state
,
a
->
round_key
[
r
]);
}
}
static
init_multbl
(
uint8_t
tbl
[
256
],
int
c
[
4
],
uint8_t
*
log8
,
uint8_t
*
alog8
){
static
init_multbl
(
uint8_t
tbl
[
1024
],
int
c
[
4
],
uint8_t
*
log8
,
uint8_t
*
alog8
){
int
i
;
int
i
;
for
(
i
=
4
;
i
<
1024
;
i
++
)
for
(
i
=
4
;
i
<
1024
;
i
++
)
tbl
[
i
]
=
alog8
[
log8
[
i
/
4
]
+
log8
[
c
[
i
&
3
]]
];
tbl
[
i
]
=
alog8
[
log8
[
i
/
4
]
+
log8
[
c
[
i
&
3
]]
];
...
@@ -132,13 +132,17 @@ AVAES *av_aes_init(uint8_t *key, int key_bits) {
...
@@ -132,13 +132,17 @@ AVAES *av_aes_init(uint8_t *key, int key_bits) {
// av_log(NULL, AV_LOG_ERROR, "%d, ", log8[i]);
// av_log(NULL, AV_LOG_ERROR, "%d, ", log8[i]);
}
}
init_multbl
(
dec_multbl
[
0
],
(
int
[
4
]){
0xe
,
0x9
,
0xd
,
0xb
},
log8
,
alog8
);
init_multbl
(
dec_multbl
[
0
],
(
int
[
4
]){
0xe
,
0x9
,
0xd
,
0xb
},
log8
,
alog8
);
#ifndef CONFIG_SMALL
init_multbl
(
dec_multbl
[
1
],
(
int
[
4
]){
0xb
,
0xe
,
0x9
,
0xd
},
log8
,
alog8
);
init_multbl
(
dec_multbl
[
1
],
(
int
[
4
]){
0xb
,
0xe
,
0x9
,
0xd
},
log8
,
alog8
);
init_multbl
(
dec_multbl
[
2
],
(
int
[
4
]){
0xd
,
0xb
,
0xe
,
0x9
},
log8
,
alog8
);
init_multbl
(
dec_multbl
[
2
],
(
int
[
4
]){
0xd
,
0xb
,
0xe
,
0x9
},
log8
,
alog8
);
init_multbl
(
dec_multbl
[
3
],
(
int
[
4
]){
0x9
,
0xd
,
0xb
,
0xe
},
log8
,
alog8
);
init_multbl
(
dec_multbl
[
3
],
(
int
[
4
]){
0x9
,
0xd
,
0xb
,
0xe
},
log8
,
alog8
);
#endif
init_multbl
(
enc_multbl
[
0
],
(
int
[
4
]){
0x2
,
0x1
,
0x1
,
0x3
},
log8
,
alog8
);
init_multbl
(
enc_multbl
[
0
],
(
int
[
4
]){
0x2
,
0x1
,
0x1
,
0x3
},
log8
,
alog8
);
#ifndef CONFIG_SMALL
init_multbl
(
enc_multbl
[
1
],
(
int
[
4
]){
0x3
,
0x2
,
0x1
,
0x1
},
log8
,
alog8
);
init_multbl
(
enc_multbl
[
1
],
(
int
[
4
]){
0x3
,
0x2
,
0x1
,
0x1
},
log8
,
alog8
);
init_multbl
(
enc_multbl
[
2
],
(
int
[
4
]){
0x1
,
0x3
,
0x2
,
0x1
},
log8
,
alog8
);
init_multbl
(
enc_multbl
[
2
],
(
int
[
4
]){
0x1
,
0x3
,
0x2
,
0x1
},
log8
,
alog8
);
init_multbl
(
enc_multbl
[
3
],
(
int
[
4
]){
0x1
,
0x1
,
0x3
,
0x2
},
log8
,
alog8
);
init_multbl
(
enc_multbl
[
3
],
(
int
[
4
]){
0x1
,
0x1
,
0x3
,
0x2
},
log8
,
alog8
);
#endif
}
}
if
(
key_bits
!=
128
&&
key_bits
!=
192
&&
key_bits
!=
256
)
if
(
key_bits
!=
128
&&
key_bits
!=
192
&&
key_bits
!=
256
)
...
...
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