2 * Copyright (C) 2011 Sansar Choinyambuu
3 * HSR Hochschule fuer Technik Rapperswil
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17 * @defgroup tcg_pts_attr_dh_nonce_params_req tcg_pts_attr_dh_nonce_params_req
18 * @{ @ingroup tcg_pts_attr_dh_nonce_params_req
21 #ifndef TCG_PTS_ATTR_DH_NONCE_PARAMS_REQ_H_
22 #define TCG_PTS_ATTR_DH_NONCE_PARAMS_REQ_H_
24 typedef struct tcg_pts_attr_dh_nonce_params_req_t tcg_pts_attr_dh_nonce_params_req_t
;
25 typedef enum pts_dh_group_t pts_dh_group_t
;
28 #include "pa_tnc/pa_tnc_attr.h"
31 * PTS Diffie Hellman Group Values
35 PTS_DH_GROUP_IKE2
= (1<<15),
37 PTS_DH_GROUP_IKE5
= (1<<14),
39 PTS_DH_GROUP_IKE14
= (1<<13),
40 /** IKE Group 19, Elliptic curves using NIST 256 bit prime modules */
41 PTS_DH_GROUP_IKE19
= (1<<12),
42 /** IKE Group 20, Elliptic curves using NIST 384 bit prime modules */
43 PTS_DH_GROUP_IKE20
= (1<<11),
47 * Class implementing the TCG PTS DH Nonce Parameters Request Attribute
49 struct tcg_pts_attr_dh_nonce_params_req_t
{
52 * Public PA-TNC attribute interface
54 pa_tnc_attr_t pa_tnc_attribute
;
57 * Get Minimum nonce length
59 * @return Minimum acceptable length of nonce
61 u_int8_t (*get_min_nonce_len
)(tcg_pts_attr_dh_nonce_params_req_t
*this);
64 * Get supported Diffie Hellman Groups
66 * @return Supported Diffie Hellman Groups
68 pts_dh_group_t (*get_dh_groups
)(tcg_pts_attr_dh_nonce_params_req_t
*this);
72 * Creates an tcg_pts_attr_dh_nonce_params_req_t object
74 * @param min_nonce_len Minimum acceptable length of nonce
75 * @param dh_groups Initiator's supported DH groups
77 pa_tnc_attr_t
* tcg_pts_attr_dh_nonce_params_req_create(u_int8_t min_nonce_len
,
78 pts_dh_group_t dh_groups
);
81 * Creates an tcg_pts_attr_dh_nonce_params_req_t object from received data
83 * @param value unparsed attribute value
85 pa_tnc_attr_t
* tcg_pts_attr_dh_nonce_params_req_create_from_data(chunk_t value
);
87 #endif /** TCG_PTS_ATTR_DH_NONCE_PARAMS_REQ_H_ @}*/