Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F110704595
D33486.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D33486.diff
View Options
diff --git a/sys/netipsec/key.c b/sys/netipsec/key.c
--- a/sys/netipsec/key.c
+++ b/sys/netipsec/key.c
@@ -590,7 +590,7 @@
int sadb_alg;
const struct enc_xform *xform;
} supported_ealgs[] = {
- { SADB_X_EALG_AES, &enc_xform_rijndael128 },
+ { SADB_X_EALG_AES, &enc_xform_aes_cbc },
{ SADB_EALG_NULL, &enc_xform_null },
{ SADB_X_EALG_AESCTR, &enc_xform_aes_icm },
{ SADB_X_EALG_AESGCM16, &enc_xform_aes_nist_gcm },
diff --git a/sys/opencrypto/crypto.c b/sys/opencrypto/crypto.c
--- a/sys/opencrypto/crypto.c
+++ b/sys/opencrypto/crypto.c
@@ -559,8 +559,8 @@
{
switch (csp->csp_cipher_alg) {
- case CRYPTO_RIJNDAEL128_CBC:
- return (&enc_xform_rijndael128);
+ case CRYPTO_AES_CBC:
+ return (&enc_xform_aes_cbc);
case CRYPTO_AES_XTS:
return (&enc_xform_aes_xts);
case CRYPTO_AES_ICM:
diff --git a/sys/opencrypto/cryptodev.c b/sys/opencrypto/cryptodev.c
--- a/sys/opencrypto/cryptodev.c
+++ b/sys/opencrypto/cryptodev.c
@@ -346,7 +346,7 @@
txform = NULL;
break;
case CRYPTO_AES_CBC:
- txform = &enc_xform_rijndael128;
+ txform = &enc_xform_aes_cbc;
break;
case CRYPTO_AES_XTS:
txform = &enc_xform_aes_xts;
diff --git a/sys/opencrypto/xform.c b/sys/opencrypto/xform.c
--- a/sys/opencrypto/xform.c
+++ b/sys/opencrypto/xform.c
@@ -73,7 +73,7 @@
/* Include the encryption algorithms */
#include "xform_null.c"
-#include "xform_rijndael.c"
+#include "xform_aes_cbc.c"
#include "xform_aes_icm.c"
#include "xform_aes_xts.c"
#include "xform_cml.c"
diff --git a/sys/opencrypto/xform_rijndael.c b/sys/opencrypto/xform_aes_cbc.c
rename from sys/opencrypto/xform_rijndael.c
rename to sys/opencrypto/xform_aes_cbc.c
--- a/sys/opencrypto/xform_rijndael.c
+++ b/sys/opencrypto/xform_aes_cbc.c
@@ -53,41 +53,41 @@
#include <crypto/rijndael/rijndael.h>
#include <opencrypto/xform_enc.h>
-static int rijndael128_setkey(void *, const uint8_t *, int);
-static void rijndael128_encrypt(void *, const uint8_t *, uint8_t *);
-static void rijndael128_decrypt(void *, const uint8_t *, uint8_t *);
+static int aes_cbc_setkey(void *, const uint8_t *, int);
+static void aes_cbc_encrypt(void *, const uint8_t *, uint8_t *);
+static void aes_cbc_decrypt(void *, const uint8_t *, uint8_t *);
/* Encryption instances */
-const struct enc_xform enc_xform_rijndael128 = {
- .type = CRYPTO_RIJNDAEL128_CBC,
- .name = "Rijndael-128/AES",
+const struct enc_xform enc_xform_aes_cbc = {
+ .type = CRYPTO_AES_CBC,
+ .name = "AES-CBC",
.ctxsize = sizeof(rijndael_ctx),
- .blocksize = RIJNDAEL128_BLOCK_LEN,
- .ivsize = RIJNDAEL128_BLOCK_LEN,
- .minkey = RIJNDAEL_MIN_KEY,
- .maxkey = RIJNDAEL_MAX_KEY,
- .encrypt = rijndael128_encrypt,
- .decrypt = rijndael128_decrypt,
- .setkey = rijndael128_setkey,
+ .blocksize = AES_BLOCK_LEN,
+ .ivsize = AES_BLOCK_LEN,
+ .minkey = AES_MIN_KEY,
+ .maxkey = AES_MAX_KEY,
+ .encrypt = aes_cbc_encrypt,
+ .decrypt = aes_cbc_decrypt,
+ .setkey = aes_cbc_setkey,
};
/*
* Encryption wrapper routines.
*/
static void
-rijndael128_encrypt(void *key, const uint8_t *in, uint8_t *out)
+aes_cbc_encrypt(void *key, const uint8_t *in, uint8_t *out)
{
rijndael_encrypt(key, in, out);
}
static void
-rijndael128_decrypt(void *key, const uint8_t *in, uint8_t *out)
+aes_cbc_decrypt(void *key, const uint8_t *in, uint8_t *out)
{
rijndael_decrypt(key, in, out);
}
static int
-rijndael128_setkey(void *sched, const uint8_t *key, int len)
+aes_cbc_setkey(void *sched, const uint8_t *key, int len)
{
if (len != 16 && len != 24 && len != 32)
diff --git a/sys/opencrypto/xform_enc.h b/sys/opencrypto/xform_enc.h
--- a/sys/opencrypto/xform_enc.h
+++ b/sys/opencrypto/xform_enc.h
@@ -81,7 +81,7 @@
extern const struct enc_xform enc_xform_null;
-extern const struct enc_xform enc_xform_rijndael128;
+extern const struct enc_xform enc_xform_aes_cbc;
extern const struct enc_xform enc_xform_aes_icm;
extern const struct enc_xform enc_xform_aes_nist_gcm;
extern const struct enc_xform enc_xform_aes_nist_gmac;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Feb 23, 2:46 AM (7 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16786361
Default Alt Text
D33486.diff (3 KB)
Attached To
Mode
D33486: crypto: Consistently use AES instead of Rijndael128 for the AES-CBC cipher.
Attached
Detach File
Event Timeline
Log In to Comment