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
6dfe50fd
Unverified
Commit
6dfe50fd
authored
Dec 13, 2017
by
kokke
Committed by
GitHub
Dec 13, 2017
Browse files
Update aes.c
parent
d574614f
Changes
1
Show whitespace changes
Inline
Side-by-side
aes.c
View file @
6dfe50fd
...
@@ -155,8 +155,6 @@ static void KeyExpansion(uint8_t* RoundKey, const uint8_t* Key)
...
@@ -155,8 +155,6 @@ static void KeyExpansion(uint8_t* RoundKey, const uint8_t* Key)
uint8_t
tempa
[
4
];
// Used for the column/row operations
uint8_t
tempa
[
4
];
// Used for the column/row operations
// The first round key is the key itself.
// The first round key is the key itself.
memcpy
(
RoundKey
,
Key
,
AES_keyExpSize
);
/*
for
(
i
=
0
;
i
<
Nk
;
++
i
)
for
(
i
=
0
;
i
<
Nk
;
++
i
)
{
{
RoundKey
[(
i
*
4
)
+
0
]
=
Key
[(
i
*
4
)
+
0
];
RoundKey
[(
i
*
4
)
+
0
]
=
Key
[(
i
*
4
)
+
0
];
...
@@ -164,7 +162,6 @@ static void KeyExpansion(uint8_t* RoundKey, const uint8_t* Key)
...
@@ -164,7 +162,6 @@ static void KeyExpansion(uint8_t* RoundKey, const uint8_t* Key)
RoundKey
[(
i
*
4
)
+
2
]
=
Key
[(
i
*
4
)
+
2
];
RoundKey
[(
i
*
4
)
+
2
]
=
Key
[(
i
*
4
)
+
2
];
RoundKey
[(
i
*
4
)
+
3
]
=
Key
[(
i
*
4
)
+
3
];
RoundKey
[(
i
*
4
)
+
3
]
=
Key
[(
i
*
4
)
+
3
];
}
}
*/
// All other round keys are found from the previous round keys.
// All other round keys are found from the previous round keys.
for
(
i
=
Nk
;
i
<
Nb
*
(
Nr
+
1
);
++
i
)
for
(
i
=
Nk
;
i
<
Nb
*
(
Nr
+
1
);
++
i
)
...
...
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