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 
40 #ifndef TA_H_
41 #define TA_H_
42 
43 #include <eac/eac.h>
44 
45 #ifdef __cplusplus
46 extern "C" {
47 #endif
48 
50 #define TA_FLAG_SKIP_TIMECHECK 1
51 
62 void
64 
83 int
85  const unsigned char *cert, size_t cert_len);
95 BUF_MEM *
108 BUF_MEM *
109 TA_STEP4_get_nonce(const EAC_CTX *ctx);
120 int
121 TA_STEP4_set_nonce(const EAC_CTX *ctx, const BUF_MEM *nonce);
134 BUF_MEM *
135 TA_STEP5_sign(const EAC_CTX *ctx, const BUF_MEM *my_ta_eph_pubkey,
136  const BUF_MEM *opp_pace_eph_pubkey, const BUF_MEM *auxdata);
150 int
151 TA_STEP6_verify(const EAC_CTX *ctx, const BUF_MEM *opp_ta_comp_eph_pubkey,
152  const BUF_MEM *my_pace_comp_eph_pubkey, const BUF_MEM *auxdata,
153  const BUF_MEM *signature);
154 
157 #ifdef __cplusplus
158 }
159 #endif
160 #endif
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&#39;s signature from TA step 5.
Interface for Extended Access Control.
int TA_STEP4_set_nonce(const EAC_CTX *ctx, const BUF_MEM *nonce)
Import the nonce from the PICC.
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.
BUF_MEM * TA_STEP4_get_nonce(const EAC_CTX *ctx)
Generates a nonce for the PCD.
void TA_disable_checks(EAC_CTX *ctx)
Enables TA_FLAG_SKIP_TIMECHECK in the TA context.
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.
Context for the Extended Access Control protocol.
Definition: eac.h:324
BUF_MEM * TA_STEP3_generate_ephemeral_key(const EAC_CTX *ctx)
Generates ephemeral key for CA.