src/emv_dda.c File Reference

#include <ccid.h>
#include <list.h>
#include <emv.h>
#include <ber.h>
#include "emv-internal.h"
Include dependency graph for emv_dda.c:

Go to the source code of this file.

Data Structures

struct  dda_req

Functions

static int get_required_data (struct _emv *e, struct dda_req *req)
static RSA * get_ca_key (unsigned int idx, emv_mod_cb_t mod, emv_exp_cb_t exp, size_t *key_len, void *priv)
static int recover (uint8_t *ptr, size_t len, RSA *key)
static int check_pk_cert (struct _emv *e, struct dda_req *req)
static RSA * make_issuer_pk (struct _emv *e, struct dda_req *req)
static RSA * get_issuer_pk (struct _emv *e, struct dda_req *req, RSA *ca_key, size_t key_len)
static RSA * make_icc_pk (struct _emv *e, struct dda_req *req)
static int check_icc_cert (struct _emv *e, struct dda_req *req)
static RSA * get_icc_pk (struct _emv *e, struct dda_req *req, RSA *iss_key, size_t key_len)
static int dol_cb (uint16_t tag, uint8_t *ptr, size_t len, void *priv)
static int verify_dynamic_sig (emv_t e, size_t icc_pk_len, const uint8_t *ddol, size_t ddol_len)
int emv_authenticate_dynamic (emv_t e, emv_mod_cb_t mod, emv_exp_cb_t exp, void *priv)
int emv_dda_ok (emv_t e)

Function Documentation

static int check_icc_cert ( struct _emv e,
struct dda_req req 
) [static]
static int check_pk_cert ( struct _emv e,
struct dda_req req 
) [static]

Definition at line 172 of file emv_dda.c.

References _emsa_pss_decode(), _emv_error(), _emv_sys_error(), EMV_ERR_CERTIFICATE, dda_req::pk_cert, dda_req::pk_cert_len, dda_req::pk_exp, dda_req::pk_exp_len, dda_req::pk_r, and dda_req::pk_r_len.

Referenced by get_issuer_pk().

Here is the call graph for this function:

Here is the caller graph for this function:

static int dol_cb ( uint16_t  tag,
uint8_t *  ptr,
size_t  len,
void *  priv 
) [static]

Definition at line 412 of file emv_dda.c.

References EMV_TAG_UNPREDICTABLE_NUMBER.

int emv_authenticate_dynamic ( emv_t  e,
emv_mod_cb_t  mod,
emv_exp_cb_t  exp,
void *  priv 
)
int emv_dda_ok ( emv_t  e  ) 

Definition at line 540 of file emv_dda.c.

References _emv::e_dda_ok.

static RSA* get_ca_key ( unsigned int  idx,
emv_mod_cb_t  mod,
emv_exp_cb_t  exp,
size_t *  key_len,
void *  priv 
) [static]

Definition at line 114 of file emv_dda.c.

References exp_len, and mod_len.

Referenced by emv_authenticate_dynamic().

Here is the caller graph for this function:

static RSA* get_icc_pk ( struct _emv e,
struct dda_req req,
RSA *  iss_key,
size_t  key_len 
) [static]

Definition at line 390 of file emv_dda.c.

References _emv_error(), check_icc_cert(), EMV_ERR_KEY_SIZE_MISMATCH, EMV_ERR_RSA_RECOVERY, dda_req::icc_cert, dda_req::icc_cert_len, make_icc_pk(), and recover().

Referenced by emv_authenticate_dynamic().

Here is the call graph for this function:

Here is the caller graph for this function:

static RSA* get_issuer_pk ( struct _emv e,
struct dda_req req,
RSA *  ca_key,
size_t  key_len 
) [static]

Definition at line 258 of file emv_dda.c.

References _emv_error(), check_pk_cert(), EMV_ERR_KEY_SIZE_MISMATCH, EMV_ERR_RSA_RECOVERY, make_issuer_pk(), dda_req::pk_cert, dda_req::pk_cert_len, and recover().

Referenced by emv_authenticate_dynamic().

Here is the call graph for this function:

Here is the caller graph for this function:

static int get_required_data ( struct _emv e,
struct dda_req req 
) [static]
static RSA* make_icc_pk ( struct _emv e,
struct dda_req req 
) [static]

Definition at line 281 of file emv_dda.c.

References _emv_sys_error(), dda_req::icc_cert, dda_req::icc_cert_len, dda_req::icc_exp, dda_req::icc_exp_len, dda_req::icc_mod_len, dda_req::icc_r, and dda_req::icc_r_len.

Referenced by get_icc_pk().

Here is the call graph for this function:

Here is the caller graph for this function:

static RSA* make_issuer_pk ( struct _emv e,
struct dda_req req 
) [static]

Definition at line 219 of file emv_dda.c.

References _emv_sys_error(), dda_req::pk_cert, dda_req::pk_cert_len, dda_req::pk_exp, dda_req::pk_exp_len, dda_req::pk_r, and dda_req::pk_r_len.

Referenced by get_issuer_pk().

Here is the call graph for this function:

Here is the caller graph for this function:

static int recover ( uint8_t *  ptr,
size_t  len,
RSA *  key 
) [static]

Definition at line 151 of file emv_dda.c.

Referenced by get_icc_pk(), get_issuer_pk(), and verify_dynamic_sig().

Here is the caller graph for this function:

static int verify_dynamic_sig ( emv_t  e,
size_t  icc_pk_len,
const uint8_t *  ddol,
size_t  ddol_len 
) [static]

Definition at line 432 of file emv_dda.c.

References _emv_construct_dol(), _emv_error(), _emv_int_authenticate(), _emv::e_icc_pk, _emv::e_xfr, EMV_ERR_BER_DECODE, EMV_ERR_CERTIFICATE, recover(), and xfr_rx_data().

Referenced by emv_authenticate_dynamic().

Here is the call graph for this function:

Here is the caller graph for this function:

Generated on Sun Jan 2 08:35:31 2011 for ccid-utils by  doxygen 1.6.3