Python API to OpenPACE

pace Module

This is the native python wrapper generated by SWIG. It includes all exported functions and identifiers from OpenPACE. See the SWIG interface files (*.i) in the bindings directory for details.

Below you can find the documentation for two wrappers based on the eac module.

pace_entity Module

Object oriented wrapper for PACE entities, the PICC and the PCD structure and related methods from OpenPACE

Author:Dominik Oepen
Date:23.02.2012
License:GPL
class pace_entity.PACEEntity(pin)

Base class for all class implementing the PACE protocol

EAC_CTX_set_encryption_ctx()
EAC_Comp()
authenticate(data)

Compute a MAC for block of data using the secret established by the PACE protocol. This method can only be used after a successful run of eac.

compute_shared_secret(pubkey)
decrypt(data)

Decrypt a block of data using the secret established by the PACE protocol. This method can only be used after a successful run of eac.

derive_keys()
encrypt(data)

Encrypt a block of data using the secret established by the PACE protocol. This method can only be used after a successful run of eac.

generate_ephemeral_pubkey()
get_static_pubkey()
perform_mapping(pubkey)
exception pace_entity.PACEException(reason, protocol_step=None, role=None)
class pace_entity.PCD(pin)

Proximity coupling device

decrypt_nonce(enc_nonce)
get_authentication_token()
class pace_entity.PICC(pin)

This class implements the PACE protocol stepts that are only needed for the Proximity integrated circuit card

generate_nonce()
verify_authentication_token(token)
pace_entity.hexdump(data, indent=0, short=False, linelen=16, offset=0)

Generates a nice hexdump of data and returns it. Consecutive lines will be indented with indent spaces. When short is true, will instead generate hexdump without adresses and on one line.

Examples: hexdump(‘A’) -> ‘0000: 00 41 .A ‘ hexdump(‘A’, short=True) -> ‘00 41 (.A)’

chat Module

Object oriented wrapper for the CVC_CHAT structure and related methods from OpenPACE

Author:Dominik Oepen
Date:04.12.2011
License:GPL
class chat.CHAT(chat)
get_relative_authorizations()
get_role()
get_terminal_type()
class chat.CVC(asn1_string)
get_car()
get_chr()
get_effective_date()
get_expiration_date()
get_profile_identifier()
class chat.EAC_CTX
exception chat.OpenPACEException(value)
class chat.PACE_SEC(secret, secret_type)