OpenPACE
ta.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2010-2012 Frank Morgner and Dominik Oepen
3  *
4  * This file is part of OpenPACE.
5  *
6  * OpenPACE is free software: you can redistribute it and/or modify it under
7  * the terms of the GNU General Public License as published by the Free
8  * Software Foundation, either version 3 of the License, or (at your option)
9  * any later version.
10  *
11  * OpenPACE is distributed in the hope that it will be useful, but WITHOUT ANY
12  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
14  * details.
15  *
16  * You should have received a copy of the GNU General Public License along with
17  * OpenPACE. If not, see <http://www.gnu.org/licenses/>.
18  *
19  * Additional permission under GNU GPL version 3 section 7
20  *
21  * If you modify this Program, or any covered work, by linking or combining it
22  * with OpenSSL (or a modified version of that library), containing
23  * parts covered by the terms of OpenSSL's license, the licensors of
24  * this Program grant you additional permission to convey the resulting work.
25  * Corresponding Source for a non-source form of such a combination shall include
26  * the source code for the parts of OpenSSL used as well as that of the
27  * covered work.
28  *
29  * If you modify this Program, or any covered work, by linking or combining it
30  * with OpenSC (or a modified version of that library), containing
31  * parts covered by the terms of OpenSC's license, the licensors of
32  * this Program grant you additional permission to convey the resulting work.
33  * Corresponding Source for a non-source form of such a combination shall include
34  * the source code for the parts of OpenSC used as well as that of the
35  * covered work.
36  */
37 
58 #ifndef TA_H_
59 #define TA_H_
60 
61 #include <eac/eac.h>
62 
63 #ifdef __cplusplus
64 extern "C" {
65 #endif
66 
68 #define TA_FLAG_SKIP_TIMECHECK 1
69 
80 void
82 
101 int
103  const unsigned char *cert, size_t cert_len);
113 BUF_MEM *
126 BUF_MEM *
127 TA_STEP4_get_nonce(const EAC_CTX *ctx);
138 int
139 TA_STEP4_set_nonce(const EAC_CTX *ctx, const BUF_MEM *nonce);
152 BUF_MEM *
153 TA_STEP5_sign(const EAC_CTX *ctx, const BUF_MEM *my_ta_eph_pubkey,
154  const BUF_MEM *opp_pace_eph_pubkey, const BUF_MEM *auxdata);
168 int
169 TA_STEP6_verify(const EAC_CTX *ctx, const BUF_MEM *opp_ta_comp_eph_pubkey,
170  const BUF_MEM *my_pace_comp_eph_pubkey, const BUF_MEM *auxdata,
171  const BUF_MEM *signature);
172 
175 #ifdef __cplusplus
176 }
177 #endif
178 #endif
eac.h
Interface for Extended Access Control.
TA_STEP3_generate_ephemeral_key
BUF_MEM * TA_STEP3_generate_ephemeral_key(const EAC_CTX *ctx)
Generates ephemeral key for CA.
TA_STEP2_import_certificate
int TA_STEP2_import_certificate(const EAC_CTX *ctx, const unsigned char *cert, size_t cert_len)
Imports a CV Certificate to the EAC context.
eac_ctx
Context for the Extended Access Control protocol.
Definition: eac.h:342
TA_STEP4_get_nonce
BUF_MEM * TA_STEP4_get_nonce(const EAC_CTX *ctx)
Generates a nonce for the PCD.
TA_STEP6_verify
int TA_STEP6_verify(const EAC_CTX *ctx, const BUF_MEM *opp_ta_comp_eph_pubkey, const BUF_MEM *my_pace_comp_eph_pubkey, const BUF_MEM *auxdata, const BUF_MEM *signature)
Verifies PCD's signature from TA step 5.
TA_disable_checks
void TA_disable_checks(EAC_CTX *ctx)
Enables TA_FLAG_SKIP_TIMECHECK in the TA context.
TA_STEP5_sign
BUF_MEM * TA_STEP5_sign(const EAC_CTX *ctx, const BUF_MEM *my_ta_eph_pubkey, const BUF_MEM *opp_pace_eph_pubkey, const BUF_MEM *auxdata)
Signs data for terminal authentication.
TA_STEP4_set_nonce
int TA_STEP4_set_nonce(const EAC_CTX *ctx, const BUF_MEM *nonce)
Import the nonce from the PICC.