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
0a8bafcd
Unverified
Commit
0a8bafcd
authored
Dec 01, 2017
by
kokke
Committed by
GitHub
Dec 01, 2017
Browse files
adding CTR-mode
parent
4b91b70c
Changes
1
Show whitespace changes
Inline
Side-by-side
aes.h
View file @
0a8bafcd
...
...
@@ -18,6 +18,11 @@
#define ECB 1
#endif
#ifndef CTR
#define CTR 1
#endif
#define AES128 1
//#define AES192 1
//#define AES256 1
...
...
@@ -38,4 +43,12 @@ void AES_CBC_decrypt_buffer(uint8_t* output, uint8_t* input, uint32_t length, co
#endif // #if defined(CBC) && (CBC == 1)
#if defined(CTR) && (CTR == 1)
/* Symmetrical operation: same function for encrypting as for decrypting */
void
AES_CTR_xcrypt_buffer
(
uint8_t
*
output
,
uint8_t
*
input
,
uint32_t
length
,
const
uint8_t
*
key
,
const
uint8_t
*
iv
);
#endif // #if defined(CTR) && (CTR == 1)
#endif //_AES_H_
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