提交 165ecc63 编写于 作者: H Herbert Xu

xfrm: Add IV generator information to xfrm_algo_desc

This patch adds IV generator information for each AEAD and block
cipher to xfrm_algo_desc.  This will be used to access the new
AEAD interface.
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 8a525fcd
...@@ -1314,6 +1314,7 @@ static inline int xfrm_id_proto_match(u8 proto, u8 userproto) ...@@ -1314,6 +1314,7 @@ static inline int xfrm_id_proto_match(u8 proto, u8 userproto)
* xfrm algorithm information * xfrm algorithm information
*/ */
struct xfrm_algo_aead_info { struct xfrm_algo_aead_info {
char *geniv;
u16 icv_truncbits; u16 icv_truncbits;
}; };
...@@ -1323,6 +1324,7 @@ struct xfrm_algo_auth_info { ...@@ -1323,6 +1324,7 @@ struct xfrm_algo_auth_info {
}; };
struct xfrm_algo_encr_info { struct xfrm_algo_encr_info {
char *geniv;
u16 blockbits; u16 blockbits;
u16 defkeybits; u16 defkeybits;
}; };
......
...@@ -31,6 +31,7 @@ static struct xfrm_algo_desc aead_list[] = { ...@@ -31,6 +31,7 @@ static struct xfrm_algo_desc aead_list[] = {
.uinfo = { .uinfo = {
.aead = { .aead = {
.geniv = "seqniv",
.icv_truncbits = 64, .icv_truncbits = 64,
} }
}, },
...@@ -49,6 +50,7 @@ static struct xfrm_algo_desc aead_list[] = { ...@@ -49,6 +50,7 @@ static struct xfrm_algo_desc aead_list[] = {
.uinfo = { .uinfo = {
.aead = { .aead = {
.geniv = "seqniv",
.icv_truncbits = 96, .icv_truncbits = 96,
} }
}, },
...@@ -67,6 +69,7 @@ static struct xfrm_algo_desc aead_list[] = { ...@@ -67,6 +69,7 @@ static struct xfrm_algo_desc aead_list[] = {
.uinfo = { .uinfo = {
.aead = { .aead = {
.geniv = "seqniv",
.icv_truncbits = 128, .icv_truncbits = 128,
} }
}, },
...@@ -85,6 +88,7 @@ static struct xfrm_algo_desc aead_list[] = { ...@@ -85,6 +88,7 @@ static struct xfrm_algo_desc aead_list[] = {
.uinfo = { .uinfo = {
.aead = { .aead = {
.geniv = "seqniv",
.icv_truncbits = 64, .icv_truncbits = 64,
} }
}, },
...@@ -103,6 +107,7 @@ static struct xfrm_algo_desc aead_list[] = { ...@@ -103,6 +107,7 @@ static struct xfrm_algo_desc aead_list[] = {
.uinfo = { .uinfo = {
.aead = { .aead = {
.geniv = "seqniv",
.icv_truncbits = 96, .icv_truncbits = 96,
} }
}, },
...@@ -121,6 +126,7 @@ static struct xfrm_algo_desc aead_list[] = { ...@@ -121,6 +126,7 @@ static struct xfrm_algo_desc aead_list[] = {
.uinfo = { .uinfo = {
.aead = { .aead = {
.geniv = "seqniv",
.icv_truncbits = 128, .icv_truncbits = 128,
} }
}, },
...@@ -139,6 +145,7 @@ static struct xfrm_algo_desc aead_list[] = { ...@@ -139,6 +145,7 @@ static struct xfrm_algo_desc aead_list[] = {
.uinfo = { .uinfo = {
.aead = { .aead = {
.geniv = "seqiv",
.icv_truncbits = 128, .icv_truncbits = 128,
} }
}, },
...@@ -353,6 +360,7 @@ static struct xfrm_algo_desc ealg_list[] = { ...@@ -353,6 +360,7 @@ static struct xfrm_algo_desc ealg_list[] = {
.uinfo = { .uinfo = {
.encr = { .encr = {
.geniv = "echainiv",
.blockbits = 64, .blockbits = 64,
.defkeybits = 64, .defkeybits = 64,
} }
...@@ -373,6 +381,7 @@ static struct xfrm_algo_desc ealg_list[] = { ...@@ -373,6 +381,7 @@ static struct xfrm_algo_desc ealg_list[] = {
.uinfo = { .uinfo = {
.encr = { .encr = {
.geniv = "echainiv",
.blockbits = 64, .blockbits = 64,
.defkeybits = 192, .defkeybits = 192,
} }
...@@ -393,6 +402,7 @@ static struct xfrm_algo_desc ealg_list[] = { ...@@ -393,6 +402,7 @@ static struct xfrm_algo_desc ealg_list[] = {
.uinfo = { .uinfo = {
.encr = { .encr = {
.geniv = "echainiv",
.blockbits = 64, .blockbits = 64,
.defkeybits = 128, .defkeybits = 128,
} }
...@@ -413,6 +423,7 @@ static struct xfrm_algo_desc ealg_list[] = { ...@@ -413,6 +423,7 @@ static struct xfrm_algo_desc ealg_list[] = {
.uinfo = { .uinfo = {
.encr = { .encr = {
.geniv = "echainiv",
.blockbits = 64, .blockbits = 64,
.defkeybits = 128, .defkeybits = 128,
} }
...@@ -433,6 +444,7 @@ static struct xfrm_algo_desc ealg_list[] = { ...@@ -433,6 +444,7 @@ static struct xfrm_algo_desc ealg_list[] = {
.uinfo = { .uinfo = {
.encr = { .encr = {
.geniv = "echainiv",
.blockbits = 128, .blockbits = 128,
.defkeybits = 128, .defkeybits = 128,
} }
...@@ -453,6 +465,7 @@ static struct xfrm_algo_desc ealg_list[] = { ...@@ -453,6 +465,7 @@ static struct xfrm_algo_desc ealg_list[] = {
.uinfo = { .uinfo = {
.encr = { .encr = {
.geniv = "echainiv",
.blockbits = 128, .blockbits = 128,
.defkeybits = 128, .defkeybits = 128,
} }
...@@ -473,6 +486,7 @@ static struct xfrm_algo_desc ealg_list[] = { ...@@ -473,6 +486,7 @@ static struct xfrm_algo_desc ealg_list[] = {
.uinfo = { .uinfo = {
.encr = { .encr = {
.geniv = "echainiv",
.blockbits = 128, .blockbits = 128,
.defkeybits = 128, .defkeybits = 128,
} }
...@@ -493,6 +507,7 @@ static struct xfrm_algo_desc ealg_list[] = { ...@@ -493,6 +507,7 @@ static struct xfrm_algo_desc ealg_list[] = {
.uinfo = { .uinfo = {
.encr = { .encr = {
.geniv = "echainiv",
.blockbits = 128, .blockbits = 128,
.defkeybits = 128, .defkeybits = 128,
} }
...@@ -512,6 +527,7 @@ static struct xfrm_algo_desc ealg_list[] = { ...@@ -512,6 +527,7 @@ static struct xfrm_algo_desc ealg_list[] = {
.uinfo = { .uinfo = {
.encr = { .encr = {
.geniv = "seqiv",
.blockbits = 128, .blockbits = 128,
.defkeybits = 160, /* 128-bit key + 32-bit nonce */ .defkeybits = 160, /* 128-bit key + 32-bit nonce */
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册