Go to the documentation of this file.
57 #include <openssl/buffer.h>
64 #define CA_FLAG_DISABLE_PASSIVE_AUTH 1
93 const unsigned char *ef_cardsecurity,
94 size_t ef_cardsecurity_len);
111 const unsigned char *priv,
size_t priv_len,
112 const unsigned char *pub,
size_t pub_len);
154 const BUF_MEM *comp_pubkey,
const BUF_MEM *pubkey);
185 BUF_MEM **nonce, BUF_MEM **token);
Interface for Extended Access Control.
BUF_MEM * CA_STEP2_get_eph_pubkey(const EAC_CTX *ctx)
Get the PCD's ephemeral public key (generated in TA step 3)
int CA_set_key(const EAC_CTX *ctx, const unsigned char *priv, size_t priv_len, const unsigned char *pub, size_t pub_len)
Initialize the CA context with keys.
void CA_disable_passive_authentication(EAC_CTX *ctx)
Disable passive authentication for this EAC_CTX.
int CA_STEP4_compute_shared_secret(const EAC_CTX *ctx, const BUF_MEM *pubkey)
Compute the shared secret using the PICC's static key pair and the PCD's ephemeral key pair.
Context for the Extended Access Control protocol.
BUF_MEM * CA_STEP1_get_pubkey(const EAC_CTX *ctx)
Get the PICC's encoded public key.
BUF_MEM * CA_get_pubkey(const EAC_CTX *ctx, const unsigned char *ef_cardsecurity, size_t ef_cardsecurity_len)
Extract the public key from a EF.CardSecurity file.
int CA_STEP3_check_pcd_pubkey(const EAC_CTX *ctx, const BUF_MEM *comp_pubkey, const BUF_MEM *pubkey)
Check whether the public key matches the compressed public key previously received in TA.
int CA_STEP5_derive_keys(const EAC_CTX *ctx, const BUF_MEM *pub, BUF_MEM **nonce, BUF_MEM **token)
Derives the PICC's encryption and authentication keys.
int CA_STEP6_derive_keys(EAC_CTX *ctx, const BUF_MEM *nonce, const BUF_MEM *token)
Derives the PCD's encryption and authentication keys.