Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
crypto-native: rename crypto_ia32 to crypto_native
[vpp.git]
/
src
/
plugins
/
crypto_native
/
aes.h
diff --git
a/src/plugins/crypto_ia32/aesni.h
b/src/plugins/crypto_native/aes.h
similarity index 94%
rename from
src/plugins/crypto_ia32/aesni.h
rename to
src/plugins/crypto_native/aes.h
index
ece61c1
..
d092391
100644
(file)
--- a/
src/plugins/crypto_ia32/aesni.h
+++ b/
src/plugins/crypto_native/aes.h
@@
-20,13
+20,13
@@
typedef enum
{
typedef enum
{
- AES
NI
_KEY_128 = 0,
- AES
NI
_KEY_192 = 1,
- AES
NI
_KEY_256 = 2,
-} aes
ni
_key_size_t;
+ AES_KEY_128 = 0,
+ AES_KEY_192 = 1,
+ AES_KEY_256 = 2,
+} aes_key_size_t;
-#define AES
NI_KEY_ROUNDS(x) (10 + x *
2)
-#define AES
NI_KEY_BYTES(x)
(16 + x * 8)
+#define AES
_KEY_ROUNDS(x) (10 + x *
2)
+#define AES
_KEY_BYTES(x)
(16 + x * 8)
/* AES-NI based AES key expansion based on code samples from
/* AES-NI based AES key expansion based on code samples from
@@
-178,17
+178,17
@@
aes256_key_expand (__m128i * k, u8 * key)
}
static_always_inline void
}
static_always_inline void
-aes_key_expand (__m128i * k, u8 * key, aes
ni
_key_size_t ks)
+aes_key_expand (__m128i * k, u8 * key, aes_key_size_t ks)
{
switch (ks)
{
{
switch (ks)
{
- case AES
NI
_KEY_128:
+ case AES_KEY_128:
aes128_key_expand (k, key);
break;
aes128_key_expand (k, key);
break;
- case AES
NI
_KEY_192:
+ case AES_KEY_192:
aes192_key_expand (k, key);
break;
aes192_key_expand (k, key);
break;
- case AES
NI
_KEY_256:
+ case AES_KEY_256:
aes256_key_expand (k, key);
break;
}
aes256_key_expand (k, key);
break;
}
@@
-196,9
+196,9
@@
aes_key_expand (__m128i * k, u8 * key, aesni_key_size_t ks)
static_always_inline void
static_always_inline void
-aes_key_enc_to_dec (__m128i * k, aes
ni
_key_size_t ks)
+aes_key_enc_to_dec (__m128i * k, aes_key_size_t ks)
{
{
- int rounds = AES
NI
_KEY_ROUNDS (ks);
+ int rounds = AES_KEY_ROUNDS (ks);
__m128i r;
r = k[rounds];
__m128i r;
r = k[rounds];