Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
Tiny AES C
Commits
a5e18ec9
Commit
a5e18ec9
authored
Jan 22, 2019
by
Roy Keene
Browse files
Also only define the Inv* family of functions if InvCipher is being compiled
Since only it uses them
parent
ce24c0db
Changes
1
Hide whitespace changes
Inline
Side-by-side
aes.c
View file @
a5e18ec9
...
@@ -341,6 +341,7 @@ static uint8_t Multiply(uint8_t x, uint8_t y)
...
@@ -341,6 +341,7 @@ static uint8_t Multiply(uint8_t x, uint8_t y)
#endif
#endif
#if (defined(CBC) && CBC == 1) || (defined(ECB) && ECB == 1)
// MixColumns function mixes the columns of the state matrix.
// MixColumns function mixes the columns of the state matrix.
// The method used to multiply may be difficult to understand for the inexperienced.
// The method used to multiply may be difficult to understand for the inexperienced.
// Please use the references to gain more information.
// Please use the references to gain more information.
...
@@ -404,7 +405,7 @@ static void InvShiftRows(state_t* state)
...
@@ -404,7 +405,7 @@ static void InvShiftRows(state_t* state)
(
*
state
)[
2
][
3
]
=
(
*
state
)[
3
][
3
];
(
*
state
)[
2
][
3
]
=
(
*
state
)[
3
][
3
];
(
*
state
)[
3
][
3
]
=
temp
;
(
*
state
)[
3
][
3
]
=
temp
;
}
}
#endif // #if (defined(CBC) && CBC == 1) || (defined(ECB) && ECB == 1)
// Cipher is the main function that encrypts the PlainText.
// Cipher is the main function that encrypts the PlainText.
static
void
Cipher
(
state_t
*
state
,
uint8_t
*
RoundKey
)
static
void
Cipher
(
state_t
*
state
,
uint8_t
*
RoundKey
)
...
...
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