ta.h
Go to the documentation of this file.
/*
* Copyright (c) 2010-2012 Frank Morgner and Dominik Oepen
*
* This file is part of OpenPACE.
*
* OpenPACE is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free
* Software Foundation, either version 3 of the License, or (at your option)
* any later version.
*
* OpenPACE is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* OpenPACE. If not, see <http://www.gnu.org/licenses/>.
*
* Additional permission under GNU GPL version 3 section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with OpenSSL (or a modified version of that library), containing
* parts covered by the terms of OpenSSL's license, the licensors of
* this Program grant you additional permission to convey the resulting work.
* Corresponding Source for a non-source form of such a combination shall include
* the source code for the parts of OpenSSL used as well as that of the
* covered work.
*
* If you modify this Program, or any covered work, by linking or combining it
* with OpenSC (or a modified version of that library), containing
* parts covered by the terms of OpenSC's license, the licensors of
* this Program grant you additional permission to convey the resulting work.
* Corresponding Source for a non-source form of such a combination shall include
* the source code for the parts of OpenSC used as well as that of the
* covered work.
*/
#ifndef TA_H_
#define TA_H_
#include <eac/eac.h>
#ifdef __cplusplus
extern "C" {
#endif
#define TA_FLAG_SKIP_TIMECHECK 1
void
TA_disable_checks(EAC_CTX *ctx);
int
TA_STEP2_import_certificate(const EAC_CTX *ctx,
const unsigned char *cert, size_t cert_len);
BUF_MEM *
TA_STEP3_generate_ephemeral_key(const EAC_CTX *ctx);
BUF_MEM *
TA_STEP4_get_nonce(const EAC_CTX *ctx);
int
TA_STEP4_set_nonce(const EAC_CTX *ctx, const BUF_MEM *nonce);
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);
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);
#ifdef __cplusplus
}
#endif
#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.