Skip to content

Architecture Decisions Record (ADR)

This section documents decisions about architecture and decision to help readers understand how switstack moka is built.

Decision #1 EMV Level 2 Certifications
Context EMVCo Books follow a writing pattern that helps to normalized EMV Level 2 implementations. But for a given brand, a C-x book diverges from the payment network's specification which imposes a dual reference complicating code documentation, design, and test plan realization.
Decision switstack moka targets payment networks certifications, excepted for EMVCo contact and EMVCo Book C-8.
Consequences No impact on EMVCo Book C-2 as the payment network aligned their specifications already. For other networks, code documentation will refer to requirements coming from the payment networks specifications if they diverge from corresponding EMVCo Book C-x.
Decision #2 Performance
Context Contactless EMV Level 2 certification tests include performance tests. Given the total time allocated to a transaction (100 ms for EMV mode, and 500 ms for magstripe mode), 80% is dedicated to the card. Remains 20% during which a terminal shall execute card processing logic.
Decision switstack moka prioritizes timing over memory allocation. The project mainly targets Android platforms. If needed, specific refactoring will be done if a highly constrained device is met.
Consequences Architecture will leverage on a complex structure avoiding look-ups on tags. All tags shall be directly accessible to read/write operations considering that a kernel spends its times to do such operations.