1 /* $Id: algorithm.c,v 1.11.4.1 2005/06/28 22:38:02 manubsd Exp $ */
4 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 * 3. Neither the name of the project nor the names of its contributors
16 * may be used to endorse or promote products derived from this software
17 * without specific prior written permission.
19 * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
20 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
23 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 #include <sys/param.h>
35 #include <sys/types.h>
44 #include "crypto_openssl.h"
46 #include "algorithm.h"
48 #include "isakmp_var.h"
50 #include "ipsec_doi.h"
53 static struct hash_algorithm oakley_hashdef
[] = {
54 { "md5", algtype_md5
, OAKLEY_ATTR_HASH_ALG_MD5
,
55 eay_md5_init
, eay_md5_update
,
56 eay_md5_final
, eay_md5_hashlen
,
58 { "sha1", algtype_sha1
, OAKLEY_ATTR_HASH_ALG_SHA
,
59 eay_sha1_init
, eay_sha1_update
,
60 eay_sha1_final
, eay_sha1_hashlen
,
63 { "sha2_256", algtype_sha2_256
, OAKLEY_ATTR_HASH_ALG_SHA2_256
,
64 eay_sha2_256_init
, eay_sha2_256_update
,
65 eay_sha2_256_final
, eay_sha2_256_hashlen
,
67 { "sha2_384", algtype_sha2_384
, OAKLEY_ATTR_HASH_ALG_SHA2_384
,
68 eay_sha2_384_init
, eay_sha2_384_update
,
69 eay_sha2_384_final
, eay_sha2_384_hashlen
,
71 { "sha2_512", algtype_sha2_512
, OAKLEY_ATTR_HASH_ALG_SHA2_512
,
72 eay_sha2_512_init
, eay_sha2_512_update
,
73 eay_sha2_512_final
, eay_sha2_512_hashlen
,
79 static struct hmac_algorithm oakley_hmacdef
[] = {
80 { "hmac_md5", algtype_hmac_md5_128
, OAKLEY_ATTR_HASH_ALG_MD5
,
81 eay_hmacmd5_init
, eay_hmacmd5_update
,
82 eay_hmacmd5_final
, NULL
,
84 { "hmac_sha1", algtype_hmac_sha1_160
, OAKLEY_ATTR_HASH_ALG_SHA
,
85 eay_hmacsha1_init
, eay_hmacsha1_update
,
86 eay_hmacsha1_final
, NULL
,
89 { "hmac_sha2_256", algtype_sha2_256
, OAKLEY_ATTR_HASH_ALG_SHA2_256
,
90 eay_hmacsha2_256_init
, eay_hmacsha2_256_update
,
91 eay_hmacsha2_256_final
, NULL
,
92 eay_hmacsha2_256_one
, },
93 { "hmac_sha2_384", algtype_sha2_384
, OAKLEY_ATTR_HASH_ALG_SHA2_384
,
94 eay_hmacsha2_384_init
, eay_hmacsha2_384_update
,
95 eay_hmacsha2_384_final
, NULL
,
96 eay_hmacsha2_384_one
, },
97 { "hmac_sha2_512", algtype_sha2_512
, OAKLEY_ATTR_HASH_ALG_SHA2_512
,
98 eay_hmacsha2_512_init
, eay_hmacsha2_512_update
,
99 eay_hmacsha2_512_final
, NULL
,
100 eay_hmacsha2_512_one
, },
104 static struct enc_algorithm oakley_encdef
[] = {
105 { "des", algtype_des
, OAKLEY_ATTR_ENC_ALG_DES
,
107 eay_des_encrypt
, eay_des_decrypt
,
108 eay_des_weakkey
, eay_des_keylen
, },
109 { "3des", algtype_3des
, OAKLEY_ATTR_ENC_ALG_3DES
,
111 eay_3des_encrypt
, eay_3des_decrypt
,
112 eay_3des_weakkey
, eay_3des_keylen
, },
113 { "aes", algtype_aes
, OAKLEY_ATTR_ENC_ALG_AES
,
115 eay_aes_encrypt
, eay_aes_decrypt
,
116 eay_aes_weakkey
, eay_aes_keylen
, },
119 static struct enc_algorithm ipsec_encdef
[] = {
120 { "des-iv64", algtype_des_iv64
, IPSECDOI_ESP_DES_IV64
, 8,
122 NULL
, eay_des_keylen
, },
123 { "des", algtype_des
, IPSECDOI_ESP_DES
, 8,
125 NULL
, eay_des_keylen
, },
126 { "3des", algtype_3des
, IPSECDOI_ESP_3DES
, 8,
128 NULL
, eay_3des_keylen
, },
129 { "des-iv32", algtype_des_iv32
, IPSECDOI_ESP_DES_IV32
, 8,
131 NULL
, eay_des_keylen
, },
132 { "null", algtype_null_enc
, IPSECDOI_ESP_NULL
, 8,
134 NULL
, eay_null_keylen
, },
135 { "aes", algtype_aes
, IPSECDOI_ESP_AES
, 16,
137 NULL
, eay_aes_keylen
, },
140 static struct hmac_algorithm ipsec_hmacdef
[] = {
141 { "hmac_md5_96", algtype_hmac_md5_96
, IPSECDOI_ATTR_AUTH_HMAC_MD5_96
,
143 NULL
, eay_md5_hashlen
,
145 { "hmac_sha1_96", algtype_hmac_sha1_96
, IPSECDOI_ATTR_AUTH_HMAC_SHA1_96
,
147 NULL
, eay_sha1_hashlen
,
149 { "md5", algtype_hmac_md5_128
, IPSECDOI_ATTR_AUTH_HMAC_MD5
,
151 NULL
, eay_md5_hashlen
,
153 { "sha1", algtype_hmac_sha1_160
, IPSECDOI_ATTR_AUTH_HMAC_SHA1
,
155 NULL
, eay_sha1_hashlen
,
157 { "null", algtype_non_auth
, IPSECDOI_ATTR_AUTH_NONE
,
159 NULL
, eay_null_hashlen
,
162 { "hmac_sha2_256", algtype_hmac_sha2_256
,IPSECDOI_ATTR_AUTH_HMAC_SHA2_256
,
164 NULL
, eay_sha2_256_hashlen
,
166 { "hmac_sha2_384", algtype_hmac_sha2_384
,IPSECDOI_ATTR_AUTH_HMAC_SHA2_384
,
168 NULL
, eay_sha2_384_hashlen
,
170 { "hmac_sha2_512", algtype_hmac_sha2_512
,IPSECDOI_ATTR_AUTH_HMAC_SHA2_512
,
172 NULL
, eay_sha2_512_hashlen
,
177 static struct misc_algorithm ipsec_compdef
[] = {
178 { "oui", algtype_oui
, IPSECDOI_IPCOMP_OUI
, },
179 { "deflate", algtype_deflate
, IPSECDOI_IPCOMP_DEFLATE
, },
180 { "lzs", algtype_lzs
, IPSECDOI_IPCOMP_LZS
, },
184 * In case of asymetric modes (hybrid xauth), what's racoon mode of
185 * operations ; it seems that the proposal should always use the
186 * initiator half (unless a server initiates a connection, which is
187 * not handled, and probably not useful).
189 static struct misc_algorithm oakley_authdef
[] = {
190 { "pre_shared_key", algtype_psk
, OAKLEY_ATTR_AUTH_METHOD_PSKEY
, },
191 { "dsssig", algtype_dsssig
, OAKLEY_ATTR_AUTH_METHOD_DSSSIG
, },
192 { "rsasig", algtype_rsasig
, OAKLEY_ATTR_AUTH_METHOD_RSASIG
, },
193 { "rsaenc", algtype_rsaenc
, OAKLEY_ATTR_AUTH_METHOD_RSAENC
, },
194 { "rsarev", algtype_rsarev
, OAKLEY_ATTR_AUTH_METHOD_RSAREV
, },
196 { "gssapi_krb", algtype_gssapikrb
,
197 OAKLEY_ATTR_AUTH_METHOD_GSSAPI_KRB
, },
200 { "hybrid_rsa_server", algtype_hybrid_rsa_s
,
201 OAKLEY_ATTR_AUTH_METHOD_HYBRID_RSA_R
, },
203 { "hybrid_dss_server", algtype_hybrid_dss_s
,
204 OAKLEY_ATTR_AUTH_METHOD_HYBRID_DSS_R
, },
206 { "xauth_psk_server", algtype_xauth_psk_s
,
207 OAKLEY_ATTR_AUTH_METHOD_XAUTH_PSKEY_R
, },
209 { "xauth_rsa_server", algtype_xauth_rsa_s
,
210 OAKLEY_ATTR_AUTH_METHOD_XAUTH_RSASIG_R
, },
212 { "hybrid_rsa_client", algtype_hybrid_rsa_c
,
213 OAKLEY_ATTR_AUTH_METHOD_HYBRID_RSA_I
, },
215 { "hybrid_dss_client", algtype_hybrid_dss_c
,
216 OAKLEY_ATTR_AUTH_METHOD_HYBRID_DSS_I
, },
218 { "xauth_psk_client", algtype_xauth_psk_c
,
219 OAKLEY_ATTR_AUTH_METHOD_XAUTH_PSKEY_I
, },
221 { "xauth_rsa_client", algtype_xauth_rsa_c
,
222 OAKLEY_ATTR_AUTH_METHOD_XAUTH_RSASIG_I
, },
224 { "eap_psk_client", algtype_eap_psk_c
,
225 OAKLEY_ATTR_AUTH_METHOD_EAP_PSKEY_I
, },
227 { "eap_rsa_client", algtype_eap_rsa_c
,
228 OAKLEY_ATTR_AUTH_METHOD_EAP_RSASIG_I
, },
232 static struct dh_algorithm oakley_dhdef
[] = {
233 { "modp768", algtype_modp768
, OAKLEY_ATTR_GRP_DESC_MODP768
,
235 { "modp1024", algtype_modp1024
, OAKLEY_ATTR_GRP_DESC_MODP1024
,
237 { "modp1536", algtype_modp1536
, OAKLEY_ATTR_GRP_DESC_MODP1536
,
239 { "modp2048", algtype_modp2048
, OAKLEY_ATTR_GRP_DESC_MODP2048
,
241 { "modp3072", algtype_modp3072
, OAKLEY_ATTR_GRP_DESC_MODP3072
,
243 { "modp4096", algtype_modp4096
, OAKLEY_ATTR_GRP_DESC_MODP4096
,
245 { "modp6144", algtype_modp6144
, OAKLEY_ATTR_GRP_DESC_MODP6144
,
247 { "modp8192", algtype_modp8192
, OAKLEY_ATTR_GRP_DESC_MODP8192
,
251 static struct hash_algorithm
*alg_oakley_hashdef (int);
252 static struct hmac_algorithm
*alg_oakley_hmacdef (int);
253 static struct enc_algorithm
*alg_oakley_encdef (int);
254 static struct enc_algorithm
*alg_ipsec_encdef (int);
255 static struct hmac_algorithm
*alg_ipsec_hmacdef (int);
256 static struct dh_algorithm
*alg_oakley_dhdef (int);
258 /* oakley hash algorithm */
259 static struct hash_algorithm
*
260 alg_oakley_hashdef(doi
)
265 for (i
= 0; i
< ARRAYLEN(oakley_hashdef
); i
++)
266 if (doi
== oakley_hashdef
[i
].doi
) {
267 plog(ASL_LEVEL_DEBUG
, "hash(%s)\n",
268 oakley_hashdef
[i
].name
);
269 return &oakley_hashdef
[i
];
275 alg_oakley_hashdef_ok(doi
)
278 struct hash_algorithm
*f
;
280 f
= alg_oakley_hashdef(doi
);
288 alg_oakley_hashdef_doi(type
)
293 for (i
= 0; i
< ARRAYLEN(oakley_hashdef
); i
++)
294 if (type
== oakley_hashdef
[i
].type
) {
295 res
= oakley_hashdef
[i
].doi
;
302 alg_oakley_hashdef_hashlen(doi
)
305 struct hash_algorithm
*f
;
307 f
= alg_oakley_hashdef(doi
);
308 if (f
== NULL
|| f
->hashlen
== NULL
)
311 return (f
->hashlen
)();
315 alg_oakley_hashdef_name (doi
)
318 struct hash_algorithm
*f
;
320 f
= alg_oakley_hashdef(doi
);
328 alg_oakley_hashdef_one(doi
, buf
)
332 struct hash_algorithm
*f
;
334 f
= alg_oakley_hashdef(doi
);
335 if (f
== NULL
|| f
->hashlen
== NULL
)
338 return (f
->one
)(buf
);
341 /* oakley hmac algorithm */
342 static struct hmac_algorithm
*
343 alg_oakley_hmacdef(doi
)
348 for (i
= 0; i
< ARRAYLEN(oakley_hmacdef
); i
++)
349 if (doi
== oakley_hmacdef
[i
].doi
) {
350 plog(ASL_LEVEL_DEBUG
, "hmac(%s)\n",
351 oakley_hmacdef
[i
].name
);
352 return &oakley_hmacdef
[i
];
358 alg_oakley_hmacdef_doi(type
)
363 for (i
= 0; i
< ARRAYLEN(oakley_hmacdef
); i
++)
364 if (type
== oakley_hmacdef
[i
].type
) {
365 res
= oakley_hmacdef
[i
].doi
;
372 alg_oakley_hmacdef_one(doi
, key
, buf
)
376 struct hmac_algorithm
*f
;
379 struct timeval start
, end
;
382 f
= alg_oakley_hmacdef(doi
);
383 if (f
== NULL
|| f
->one
== NULL
)
387 gettimeofday(&start
, NULL
);
390 res
= (f
->one
)(key
, buf
);
393 gettimeofday(&end
, NULL
);
394 plog(ASL_LEVEL_NOTICE
, "%s(%s size=%zu): %8.6f", __func__
,
395 f
->name
, buf
->l
, timedelta(&start
, &end
));
401 /* oakley encryption algorithm */
402 static struct enc_algorithm
*
403 alg_oakley_encdef(doi
)
408 for (i
= 0; i
< ARRAYLEN(oakley_encdef
); i
++)
409 if (doi
== oakley_encdef
[i
].doi
) {
410 plog(ASL_LEVEL_DEBUG
, "encryption(%s)\n",
411 oakley_encdef
[i
].name
);
412 return &oakley_encdef
[i
];
418 alg_oakley_encdef_ok(doi
)
421 struct enc_algorithm
*f
;
423 f
= alg_oakley_encdef(doi
);
431 alg_oakley_encdef_doi(type
)
436 for (i
= 0; i
< ARRAYLEN(oakley_encdef
); i
++)
437 if (type
== oakley_encdef
[i
].type
) {
438 res
= oakley_encdef
[i
].doi
;
445 alg_oakley_encdef_keylen(doi
, len
)
448 struct enc_algorithm
*f
;
450 f
= alg_oakley_encdef(doi
);
451 if (f
== NULL
|| f
->keylen
== NULL
)
454 return (f
->keylen
)(len
);
458 alg_oakley_encdef_blocklen(doi
)
461 struct enc_algorithm
*f
;
463 f
= alg_oakley_encdef(doi
);
471 alg_oakley_encdef_name (doi
)
474 struct enc_algorithm
*f
;
476 f
= alg_oakley_encdef(doi
);
484 alg_oakley_encdef_decrypt(doi
, buf
, key
, iv
)
486 vchar_t
*buf
, *key
, *iv
;
489 struct enc_algorithm
*f
;
491 struct timeval start
, end
;
494 f
= alg_oakley_encdef(doi
);
495 if (f
== NULL
|| f
->decrypt
== NULL
)
499 gettimeofday(&start
, NULL
);
502 res
= (f
->decrypt
)(buf
, key
, iv
);
505 gettimeofday(&end
, NULL
);
506 plog(ASL_LEVEL_NOTICE
, "%s(%s klen=%zu size=%zu): %8.6f", __func__
,
507 f
->name
, key
->l
<< 3, buf
->l
, timedelta(&start
, &end
));
513 alg_oakley_encdef_encrypt(doi
, buf
, key
, iv
)
515 vchar_t
*buf
, *key
, *iv
;
518 struct enc_algorithm
*f
;
520 struct timeval start
, end
;
523 f
= alg_oakley_encdef(doi
);
524 if (f
== NULL
|| f
->encrypt
== NULL
)
528 gettimeofday(&start
, NULL
);
531 res
= (f
->encrypt
)(buf
, key
, iv
);
534 gettimeofday(&end
, NULL
);
535 plog(ASL_LEVEL_NOTICE
, "%s(%s klen=%zu size=%zu): %8.6f", __func__
,
536 f
->name
, key
->l
<< 3, buf
->l
, timedelta(&start
, &end
));
541 /* ipsec encryption algorithm */
542 static struct enc_algorithm
*
543 alg_ipsec_encdef(doi
)
548 for (i
= 0; i
< ARRAYLEN(ipsec_encdef
); i
++)
549 if (doi
== ipsec_encdef
[i
].doi
) {
550 plog(ASL_LEVEL_DEBUG
, "encryption(%s)\n",
551 ipsec_encdef
[i
].name
);
552 return &ipsec_encdef
[i
];
558 alg_ipsec_encdef_doi(type
)
563 for (i
= 0; i
< ARRAYLEN(ipsec_encdef
); i
++)
564 if (type
== ipsec_encdef
[i
].type
) {
565 res
= ipsec_encdef
[i
].doi
;
572 alg_ipsec_encdef_keylen(doi
, len
)
575 struct enc_algorithm
*f
;
577 f
= alg_ipsec_encdef(doi
);
578 if (f
== NULL
|| f
->keylen
== NULL
)
581 return (f
->keylen
)(len
);
584 /* ipsec hmac algorithm */
585 static struct hmac_algorithm
*
586 alg_ipsec_hmacdef(doi
)
591 for (i
= 0; i
< ARRAYLEN(ipsec_hmacdef
); i
++)
592 if (doi
== ipsec_hmacdef
[i
].doi
) {
593 plog(ASL_LEVEL_DEBUG
, "hmac(%s)\n",
594 ipsec_hmacdef
[i
].name
);
595 return &ipsec_hmacdef
[i
];
601 alg_ipsec_hmacdef_doi(type
)
606 for (i
= 0; i
< ARRAYLEN(ipsec_hmacdef
); i
++)
607 if (type
== ipsec_hmacdef
[i
].type
) {
608 res
= ipsec_hmacdef
[i
].doi
;
615 alg_ipsec_hmacdef_hashlen(doi
)
618 struct hmac_algorithm
*f
;
620 f
= alg_ipsec_hmacdef(doi
);
621 if (f
== NULL
|| f
->hashlen
== NULL
)
624 return (f
->hashlen
)();
629 alg_ipsec_compdef_doi(type
)
634 for (i
= 0; i
< ARRAYLEN(ipsec_compdef
); i
++)
635 if (type
== ipsec_compdef
[i
].type
) {
636 res
= ipsec_compdef
[i
].doi
;
643 static struct dh_algorithm
*
644 alg_oakley_dhdef(doi
)
649 for (i
= 0; i
< ARRAYLEN(oakley_dhdef
); i
++)
650 if (doi
== oakley_dhdef
[i
].doi
) {
651 plog(ASL_LEVEL_DEBUG
, "hmac(%s)\n",
652 oakley_dhdef
[i
].name
);
653 return &oakley_dhdef
[i
];
659 alg_oakley_dhdef_ok(doi
)
662 struct dh_algorithm
*f
;
664 f
= alg_oakley_dhdef(doi
);
672 alg_oakley_dhdef_doi(type
)
677 for (i
= 0; i
< ARRAYLEN(oakley_dhdef
); i
++)
678 if (type
== oakley_dhdef
[i
].type
) {
679 res
= oakley_dhdef
[i
].doi
;
686 alg_oakley_dhdef_group(doi
)
689 struct dh_algorithm
*f
;
691 f
= alg_oakley_dhdef(doi
);
692 if (f
== NULL
|| f
->dhgroup
== NULL
)
699 alg_oakley_dhdef_name (doi
)
702 struct dh_algorithm
*f
;
704 f
= alg_oakley_dhdef(doi
);
710 /* authentication method */
712 alg_oakley_authdef_doi(type
)
717 for (i
= 0; i
< ARRAYLEN(oakley_authdef
); i
++)
718 if (type
== oakley_authdef
[i
].type
) {
719 res
= oakley_authdef
[i
].doi
;
726 alg_oakley_authdef_name (doi
)
731 for (i
= 0; i
< ARRAYLEN(oakley_authdef
); i
++)
732 if (doi
== oakley_authdef
[i
].doi
) {
733 return oakley_authdef
[i
].name
;
739 * give the default key length
741 * 0: fixed key cipher, key length not allowed
742 * positive: default key length
745 default_keylen(class, type
)
750 case algclass_isakmp_enc
:
751 case algclass_ipsec_enc
:
758 case algtype_blowfish
:
760 case algtype_cast128
:
762 case algtype_twofish
:
775 check_keylen(class, type
, len
)
776 int class, type
, len
;
781 case algclass_isakmp_enc
:
782 case algclass_ipsec_enc
:
785 /* unknown class, punt */
787 "unknown algorithm class %d\n", class);
791 /* key length must be multiple of 8 bytes - RFC2451 2.2 */
793 case algtype_blowfish
:
795 case algtype_cast128
:
797 case algtype_twofish
:
800 "key length %d is not multiple of 8\n", len
);
806 /* key length range */
809 case algtype_blowfish
:
810 if (len
< 40 || 448 < len
)
814 if (len
< 40 || 2040 < len
)
817 case algtype_cast128
:
818 if (len
< 40 || 128 < len
)
822 if (!(len
== 128 || len
== 192 || len
== 256))
825 case algtype_twofish
:
826 if (len
< 40 || 256 < len
)
832 "key length is not allowed");
839 "key length out of range\n");
847 * convert algorithm type to DOI value.
852 algtype2doi(class, type
)
858 case algclass_ipsec_enc
:
859 res
= alg_ipsec_encdef_doi(type
);
861 case algclass_ipsec_auth
:
862 res
= alg_ipsec_hmacdef_doi(type
);
864 case algclass_ipsec_comp
:
865 res
= alg_ipsec_compdef_doi(type
);
867 case algclass_isakmp_enc
:
868 res
= alg_oakley_encdef_doi(type
);
870 case algclass_isakmp_hash
:
871 res
= alg_oakley_hashdef_doi(type
);
873 case algclass_isakmp_dh
:
874 res
= alg_oakley_dhdef_doi(type
);
876 case algclass_isakmp_ameth
:
877 res
= alg_oakley_authdef_doi(type
);
884 * convert algorithm class to DOI value.
893 case algclass_ipsec_enc
:
894 return IPSECDOI_PROTO_IPSEC_ESP
;
895 case algclass_ipsec_auth
:
896 return IPSECDOI_ATTR_AUTH
;
897 case algclass_ipsec_comp
:
898 return IPSECDOI_PROTO_IPCOMP
;
899 case algclass_isakmp_enc
:
900 return OAKLEY_ATTR_ENC_ALG
;
901 case algclass_isakmp_hash
:
902 return OAKLEY_ATTR_HASH_ALG
;
903 case algclass_isakmp_dh
:
904 return OAKLEY_ATTR_GRP_DESC
;
905 case algclass_isakmp_ameth
:
906 return OAKLEY_ATTR_AUTH_METHOD
;