Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dmitry Baryshkov
nettle
Commits
4261eecf
Commit
4261eecf
authored
Apr 07, 2004
by
Niels Möller
Browse files
(gf2_log, gf2_exp, mult): Renamed tables,
were log and ilog. Rev: src/nettle/aes-set-decrypt-key.c:1.3
parent
87310cad
Changes
1
Show whitespace changes
Inline
Side-by-side
aes-set-decrypt-key.c
View file @
4261eecf
...
...
@@ -32,7 +32,7 @@
#include
"aes-internal.h"
/* Tables for computations in the AES GF2 field. */
static
const
uint8_t
log
[
0x100
]
=
static
const
uint8_t
gf2_
log
[
0x100
]
=
{
0x00
,
0x00
,
0x19
,
0x01
,
0x32
,
0x02
,
0x1a
,
0xc6
,
0x4b
,
0xc7
,
0x1b
,
0x68
,
0x33
,
0xee
,
0xdf
,
0x03
,
...
...
@@ -68,7 +68,7 @@ static const uint8_t log[0x100] =
0x0d
,
0x63
,
0x8c
,
0x80
,
0xc0
,
0xf7
,
0x70
,
0x07
,
};
static
const
uint8_t
ilog
[
0x100
]
=
static
const
uint8_t
gf2_exp
[
0x100
]
=
{
0x01
,
0x03
,
0x05
,
0x0f
,
0x11
,
0x33
,
0x55
,
0xff
,
0x1a
,
0x2e
,
0x72
,
0x96
,
0xa1
,
0xf8
,
0x13
,
0x35
,
...
...
@@ -107,7 +107,7 @@ static const uint8_t ilog[0x100] =
static
unsigned
mult
(
unsigned
a
,
unsigned
b
)
{
return
(
a
&&
b
)
?
ilog
[
(
log
[
a
]
+
log
[
b
])
%
255
]
:
0
;
return
(
a
&&
b
)
?
gf2_exp
[
(
gf2_
log
[
a
]
+
gf2_
log
[
b
])
%
255
]
:
0
;
}
static
void
...
...
Write
Preview
Supports
Markdown
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