Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Primitives

Module

Comments

User Interface

UI primitives are limited to a few set of functions. EMV processing doesn’t require sophisticated displays. However, a minimum set of functions is required to provide a feedback to the cardholder and the merchants. Most of them are not used during transaction flow excepted:

  • gpiSwitchLED: LED #2 is switch on

  • gpiDisplayMessageByID: PROCESSING identifier

Depending on the platform, these two primitives should be managed specifically if they alter the performance.

gpiDisplayMessage

SPED

Display any string

gpiDisplayMessageByID

SPED

Display a string from the string table indexed by ID

gpiBeep

SPED

Beep

gpiSound

SPED

Generate a sound from a specific physical address

gpiSleep

SPED

Sleep. This function shall by implemented with care (no thread)

gpiSwitchLED

SPED

Switch ON/OFF a LED

gpiClearScreen

SPED

Clear display

gpiGetString

SPED

Get string from the string table indexed by ID

Platform

Platform primitives are used to support the logic of the processing flow

gpiMemSet

Platform

Equivalent to stdlib’s memset

gpiStrLen

Platform

Equivalent to string’s memset

gpiMemCpy

Platform

Equivalent to stdlib’s memcpy

gpiGetDate

Platform

Get system’s date. Careful with time format

gpiGetTimer

Platform

Get system’s time. Careful with time format

gpiSetDateTime

Platform

Set system’s time. Careful with time format

gpiStartTimer

Platform

gpiGetTimerTime

Platform

gpiGetTimerState

Platform

gpiFreeTimer

Platform

gpiGetTotalRAM

Platform

Agnos card processing uses shared RAM (no dynamic allocation) no prevent runtime issues. Static RAM is allocated from inside the GPI. This primitive returns a pointer on the toal RAM available. Similar primitives exclusively used by Agnos framework:

  • gpiGetRAMForTags

  • gpiGetRAMForUnknownTags

  • gpiGetFreeRAM

  • gpiGetPrivateScratchPAD

HSM

gpiRsaComputation

HSM

Standard EMV RSA computation primitive to support ODA

gpiShaInit

HSM

Standard EMV SHA computation primitive to support ODA

gpiShaUpdate

HSM

Standard EMV SHA computation primitive to support ODA

gpiShaFinal

HSM

Standard EMV SHA computation primitive to support ODA

gpiRandomNumber

HSM

gpiGetCheckSum

HSM

gpiGetEMVCertificate

HSM

gpiGetEMVCRL

HSM

Initialization

Primitives

Module

Comment

Initialization

gpiMain

Platform

GPI specific

gpiInitialize

Platform

Platform specific. Enable any initialization related to the plaftorm

gpiInitPolling

CAD

Platform specific. Enable any initialization realted to the contactless reader

gpiInitializeHSM

HSM

Platform specific. Enable any initialization related to the platform’s crypto

Card Processing

Primitives

Module

Comment

Card Interfaces

gpiSetTechnoToDetect

CAD

Set the type of technologies to be detected during a polling:

Technologies to detect are in:

  • TECHNO_CL_ANY

  • TECHNO_CL_TYPE_EMV

  • TECHNO_MANUAL

  • TECHNO_CONTACT

  • TECHNO_MAGSTRIPE

gpiTechnoPolling

CAD

Perform a polling on technologies previously set.

gpiError are in:

  • clcEMV_CARD

  • scrCARD_INSERTED

  • msrCARD_SWIPED

  • keyNO_ERROR

  • clcOTHER_CARD

gpiSetPollingMessage

CAD

gpiPowergpiPowerOn

CAD

gpiPolling

CAD

Poll for a contactless card. Its implementation depends on the platform. It leverages on L1 API to detect a card, to detect a collision, and to activate a card.

gpiError are in:

  • clcNO_ERROR

  • clcEMV_CARD

  • clc_COLLISION

  • polTIMEOUT

  • scrINTERRUPTED

  • scrCARD_INSERTED

  • msrCARD_SWIPED

  • clcOTHER_CARd

  • scrSYSTEM_ERROR

gpiExchangeAPDU

CAD

Send / Receive an APDU Command / Response

gpiGetLastExchangedAPDU

CAD

Provide last APDU command/response

gpiRemovalProcedure

CAD

As per EMVCo standard

gpiCardSwiped

CAD

If a card is swiped, return msrCARD_SWIPED

gpiCardInsterted

CAD

If a card is inserted, retunr scrCARD_INSERTED

gpiReadMagstripe

CAD

Provide all card’s tracks after a swipe

gpiPowerOff

CAD

gpiPowerOffAllDevices

CAD

Swirch off all devices

gpiResetContactless

CAD

Reset antenna

gpiSetContactlessTransactionInProgress

CAD

Indicates that a contactless transaction is in progress

gpiSetContactTransactionInProgress

CAD

Indicates that a contact transaction is in progress

gpiSetSwipeTransactionInProgress

CAD

Indicates that a swipe transaction is in progress

IsSetContactlessTransactionInProgress

CAD

IsSetContactTransactionInProgress

CAD

IsSwipeTransactionInProgress

CAD

PIN Management

Primitives

Module

Comment

gpiPINEnter

SPED