diff options
-rw-r--r-- | sbin/iked/dh.c | 19 | ||||
-rw-r--r-- | sbin/iked/dh.h | 17 | ||||
-rw-r--r-- | sbin/iked/iked.conf.5 | 18 | ||||
-rw-r--r-- | sbin/iked/ikev2.h | 16 | ||||
-rw-r--r-- | sbin/iked/parse.y | 30 |
5 files changed, 51 insertions, 49 deletions
diff --git a/sbin/iked/dh.c b/sbin/iked/dh.c index 11bf6733b50..ddb91bb6789 100644 --- a/sbin/iked/dh.c +++ b/sbin/iked/dh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dh.c,v 1.2 2010/06/23 10:49:37 reyk Exp $ */ +/* $OpenBSD: dh.c,v 1.3 2010/06/23 11:26:13 reyk Exp $ */ /* $vantronix: dh.c,v 1.13 2010/05/28 15:34:35 reyk Exp $ */ /* @@ -60,8 +60,8 @@ struct group_id ike_groups[] = { "FFFFFFFFFFFFFFFF", "02" }, - { GROUP_EC, 3, 155, NULL, NULL, NID_ipsec3 }, - { GROUP_EC, 4, 185, NULL, NULL, NID_ipsec4 }, + { GROUP_EC2N, 3, 155, NULL, NULL, NID_ipsec3 }, + { GROUP_EC2N, 4, 185, NULL, NULL, NID_ipsec4 }, { GROUP_MODP, 5, 1536, "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD1" "29024E088A67CC74020BBEA63B139B22514A08798E3404DD" @@ -212,9 +212,9 @@ struct group_id ike_groups[] = { "60C980DD98EDD3DFFFFFFFFFFFFFFFFF", "02" }, - { GROUP_EC, 19, 256, NULL, NULL, NID_X9_62_prime256v1 }, - { GROUP_EC, 20, 384, NULL, NULL, NID_secp384r1 }, - { GROUP_EC, 21, 521, NULL, NULL, NID_secp521r1 }, + { GROUP_ECP, 19, 256, NULL, NULL, NID_X9_62_prime256v1 }, + { GROUP_ECP, 20, 384, NULL, NULL, NID_secp384r1 }, + { GROUP_ECP, 21, 521, NULL, NULL, NID_secp521r1 }, { GROUP_MODP, 22, 1024, "B10B8F96A080E01DDE92DE5EAE5D54EC52C99FBCFB06A3C6" "9A6A9DCA52D23B616073E28675A23D189838EF1E2EE652C0" @@ -277,8 +277,8 @@ struct group_id ike_groups[] = { "184B523D1DB246C32F63078490F00EF8D647D148D4795451" "5E2327CFEF98C582664B4C0F6CC41659" }, - { GROUP_EC, 25, 192, NULL, NULL, NID_X9_62_prime192v1 }, - { GROUP_EC, 26, 224, NULL, NULL, NID_secp224r1 } + { GROUP_ECP, 25, 192, NULL, NULL, NID_X9_62_prime192v1 }, + { GROUP_ECP, 26, 224, NULL, NULL, NID_secp224r1 } }; void @@ -330,7 +330,8 @@ group_get(u_int32_t id) group->exchange = modp_create_exchange; group->shared = modp_create_shared; break; - case GROUP_EC: + case GROUP_EC2N: + case GROUP_ECP: group->init = ec_init; group->getlen = ec_getlen; group->exchange = ec_create_exchange; diff --git a/sbin/iked/dh.h b/sbin/iked/dh.h index 4d5492ed9a9..efec0afc5dc 100644 --- a/sbin/iked/dh.h +++ b/sbin/iked/dh.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dh.h,v 1.2 2010/06/23 10:49:37 reyk Exp $ */ +/* $OpenBSD: dh.h,v 1.3 2010/06/23 11:26:13 reyk Exp $ */ /* $vantronix: dh.h,v 1.8 2010/06/02 12:22:58 reyk Exp $ */ /* @@ -22,7 +22,8 @@ enum group_type { GROUP_MODP = 0, - GROUP_EC = 1 + GROUP_EC2N = 1, + GROUP_ECP = 2 }; struct group_id { @@ -49,12 +50,12 @@ struct group { #define DH_MAXSZ 1024 /* 8192 bits */ -void group_init(void); -void group_free(struct group *); -struct group *group_get(u_int32_t); +void group_init(void); +void group_free(struct group *); +struct group *group_get(u_int32_t); -int dh_getlen(struct group *); -int dh_create_exchange(struct group *, u_int8_t *); -int dh_create_shared(struct group *, u_int8_t *, u_int8_t *); +int dh_getlen(struct group *); +int dh_create_exchange(struct group *, u_int8_t *); +int dh_create_shared(struct group *, u_int8_t *, u_int8_t *); #endif /* _DH_H_ */ diff --git a/sbin/iked/iked.conf.5 b/sbin/iked/iked.conf.5 index fc627290ecd..8d89f0f6799 100644 --- a/sbin/iked/iked.conf.5 +++ b/sbin/iked/iked.conf.5 @@ -1,4 +1,4 @@ -.\" $OpenBSD: iked.conf.5,v 1.5 2010/06/10 14:24:03 reyk Exp $ +.\" $OpenBSD: iked.conf.5,v 1.6 2010/06/23 11:26:13 reyk Exp $ .\" $vantronix: iked.conf.5,v 1.10 2010/06/03 16:13:40 reyk Exp $ .\" .\" Copyright (c) 2010 Reyk Floeter <reyk@vantronix.net> @@ -16,7 +16,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: June 10 2010 $ +.Dd $Mdocdate: June 23 2010 $ .Dt IKED.CONF 5 .Os .Sh NAME @@ -659,22 +659,22 @@ keyword: .It Em Name Group Size Type .It Li modp768 Ta grp1 Ta 768 Ta "MODP" .It Li modp1024 Ta grp2 Ta 1024 Ta "MODP" -.It Li ec155 Ta grp3 Ta 155 Ta "EC2N [insecure]" -.It Li ec185 Ta grp4 Ta 185 Ta "EC2N [insecure]" +.It Li ec2n155 Ta grp3 Ta 155 Ta "EC2N [insecure]" +.It Li ec2n185 Ta grp4 Ta 185 Ta "EC2N [insecure]" .It Li modp1536 Ta grp5 Ta 1536 Ta "MODP" .It Li modp2048 Ta grp14 Ta 2048 Ta "MODP" .It Li modp3072 Ta grp15 Ta 3072 Ta "MODP" .It Li modp4096 Ta grp16 Ta 4096 Ta "MODP" .It Li modp6144 Ta grp17 Ta 6144 Ta "MODP" .It Li modp8192 Ta grp18 Ta 8192 Ta "MODP" -.It Li ec256 Ta grp19 Ta 256 Ta "ECP" -.It Li ec384 Ta grp20 Ta 384 Ta "ECP" -.It Li ec521 Ta grp21 Ta 521 Ta "ECP" +.It Li ecp256 Ta grp19 Ta 256 Ta "ECP" +.It Li ecp384 Ta grp20 Ta 384 Ta "ECP" +.It Li ecp521 Ta grp21 Ta 521 Ta "ECP" .It Li modp1024-160 Ta grp22 Ta 2048 Ta "MODP, 160 bit Prime Order Subgroup" .It Li modp2048-224 Ta grp23 Ta 2048 Ta "MODP, 224 bit Prime Order Subgroup" .It Li modp2048-256 Ta grp24 Ta 2048 Ta "MODP, 256 bit Prime Order Subgroup" -.It Li ec192 Ta grp25 Ta 192 Ta "ECP" -.It Li ec224 Ta grp26 Ta 224 Ta "ECP" +.It Li ecp192 Ta grp25 Ta 192 Ta "ECP" +.It Li ecp224 Ta grp26 Ta 224 Ta "ECP" .El .Pp The currently supported group types are either diff --git a/sbin/iked/ikev2.h b/sbin/iked/ikev2.h index b3e35b2491b..89df4b99da1 100644 --- a/sbin/iked/ikev2.h +++ b/sbin/iked/ikev2.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ikev2.h,v 1.3 2010/06/14 08:32:45 reyk Exp $ */ +/* $OpenBSD: ikev2.h,v 1.4 2010/06/23 11:26:13 reyk Exp $ */ /* $vantronix: ikev2.h,v 1.27 2010/05/19 12:20:30 reyk Exp $ */ /* @@ -236,22 +236,22 @@ extern struct iked_constmap ikev2_xformauth_map[]; #define IKEV2_XFORMDH_NONE 0 /* No DH */ #define IKEV2_XFORMDH_MODP_768 1 /* DH Group 1 */ #define IKEV2_XFORMDH_MODP_1024 2 /* DH Group 2 */ -#define IKEV2_XFORMDH_EC_155 3 /* DH Group 3 */ -#define IKEV2_XFORMDH_EC_185 4 /* DH Group 3 */ +#define IKEV2_XFORMDH_EC2N_155 3 /* DH Group 3 */ +#define IKEV2_XFORMDH_EC2N_185 4 /* DH Group 3 */ #define IKEV2_XFORMDH_MODP_1536 5 /* DH Group 5 */ #define IKEV2_XFORMDH_MODP_2048 14 /* DH Group 14 */ #define IKEV2_XFORMDH_MODP_3072 15 /* DH Group 15 */ #define IKEV2_XFORMDH_MODP_4096 16 /* DH Group 16 */ #define IKEV2_XFORMDH_MODP_6144 17 /* DH Group 17 */ #define IKEV2_XFORMDH_MODP_8192 18 /* DH Group 18 */ -#define IKEV2_XFORMDH_EC_256 19 /* DH Group 19 */ -#define IKEV2_XFORMDH_EC_384 20 /* DH Group 20 */ -#define IKEV2_XFORMDH_EC_521 21 /* DH Group 21 */ +#define IKEV2_XFORMDH_ECP_256 19 /* DH Group 19 */ +#define IKEV2_XFORMDH_ECP_384 20 /* DH Group 20 */ +#define IKEV2_XFORMDH_ECP_521 21 /* DH Group 21 */ #define IKEV2_XFORMDH_MODP_1024_160 22 /* DH Group 22 */ #define IKEV2_XFORMDH_MODP_2048_224 23 /* DH Group 23 */ #define IKEV2_XFORMDH_MODP_2048_256 24 /* DH Group 24 */ -#define IKEV2_XFORMDH_EC_192 25 /* DH Group 25 */ -#define IKEV2_XFORMDH_EC_224 26 /* DH Group 26 */ +#define IKEV2_XFORMDH_ECP_192 25 /* DH Group 25 */ +#define IKEV2_XFORMDH_ECP_224 26 /* DH Group 26 */ #define IKEV2_XFORMDH_MAX 27 extern struct iked_constmap ikev2_xformdh_map[]; diff --git a/sbin/iked/parse.y b/sbin/iked/parse.y index 5d4084249ba..0666e249071 100644 --- a/sbin/iked/parse.y +++ b/sbin/iked/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.5 2010/06/15 00:41:04 reyk Exp $ */ +/* $OpenBSD: parse.y,v 1.6 2010/06/23 11:26:13 reyk Exp $ */ /* $vantronix: parse.y,v 1.22 2010/06/03 11:08:34 reyk Exp $ */ /* @@ -162,10 +162,10 @@ const struct ipsec_xf groupxfs[] = { { "grp1", IKEV2_XFORMDH_MODP_768 }, { "modp1024", IKEV2_XFORMDH_MODP_1024 }, { "grp2", IKEV2_XFORMDH_MODP_1024 }, - { "ec155", IKEV2_XFORMDH_EC_155 }, - { "grp3", IKEV2_XFORMDH_EC_155 }, - { "ec185", IKEV2_XFORMDH_EC_185 }, - { "grp4", IKEV2_XFORMDH_EC_185 }, + { "ec2n155", IKEV2_XFORMDH_EC2N_155 }, + { "grp3", IKEV2_XFORMDH_EC2N_155 }, + { "ec2n185", IKEV2_XFORMDH_EC2N_185 }, + { "grp4", IKEV2_XFORMDH_EC2N_185 }, { "modp1536", IKEV2_XFORMDH_MODP_1536 }, { "grp5", IKEV2_XFORMDH_MODP_1536 }, { "modp2048", IKEV2_XFORMDH_MODP_2048 }, @@ -178,22 +178,22 @@ const struct ipsec_xf groupxfs[] = { { "grp17", IKEV2_XFORMDH_MODP_6144 }, { "modp8192", IKEV2_XFORMDH_MODP_8192 }, { "grp18", IKEV2_XFORMDH_MODP_8192 }, - { "ec256", IKEV2_XFORMDH_EC_256 }, - { "grp19", IKEV2_XFORMDH_EC_256 }, - { "ec384", IKEV2_XFORMDH_EC_384 }, - { "grp20", IKEV2_XFORMDH_EC_384 }, - { "ec521", IKEV2_XFORMDH_EC_521 }, - { "grp21", IKEV2_XFORMDH_EC_521 }, + { "ecp256", IKEV2_XFORMDH_ECP_256 }, + { "grp19", IKEV2_XFORMDH_ECP_256 }, + { "ecp384", IKEV2_XFORMDH_ECP_384 }, + { "grp20", IKEV2_XFORMDH_ECP_384 }, + { "ecp521", IKEV2_XFORMDH_ECP_521 }, + { "grp21", IKEV2_XFORMDH_ECP_521 }, { "modp1024-160", IKEV2_XFORMDH_MODP_1024_160 }, { "grp22", IKEV2_XFORMDH_MODP_1024_160 }, { "modp2048-224", IKEV2_XFORMDH_MODP_2048_224 }, { "grp23", IKEV2_XFORMDH_MODP_2048_224 }, { "modp2048-256", IKEV2_XFORMDH_MODP_2048_256 }, { "grp24", IKEV2_XFORMDH_MODP_2048_256 }, - { "ec192", IKEV2_XFORMDH_EC_192 }, - { "grp25", IKEV2_XFORMDH_EC_192 }, - { "ec224", IKEV2_XFORMDH_EC_224 }, - { "grp26", IKEV2_XFORMDH_EC_224 }, + { "ecp192", IKEV2_XFORMDH_ECP_192 }, + { "grp25", IKEV2_XFORMDH_ECP_192 }, + { "ecp224", IKEV2_XFORMDH_ECP_224 }, + { "grp26", IKEV2_XFORMDH_ECP_224 }, { NULL } }; |