Skip to main content

Smart card encyclopedia API client — look up EMV, Java Card, MULTOS, SIM, JCOP chip platforms, ISO 7816 standards, and specifications from SmartCardFYI.

Project description

smartcardfyi

PyPI version Python License: MIT

Smart card encyclopedia API client for Python. Look up card types (contact, contactless, dual-interface), chip platforms (Java Card, MULTOS, JCOP, BasicCard), ISO 7816 standards, EMV payment specifications, GlobalPlatform card management, manufacturers, form factors from ID-1 to iSIM, and security certifications from SmartCardFYI -- the comprehensive smart card reference with 280 records covering every major smart card technology in commercial and government use.

Extracted from SmartCardFYI, a smart card technology platform with 280 records spanning chip platforms, international standards, security certifications, form factor specifications, and deployment guides used by payment system architects, telecom engineers, government ID program managers, and security researchers worldwide.

Explore smart cards at smartcardfyi.com -- Card Type Explorer | Standards Reference | Platform Guide | Glossary

smartcardfyi demo -- smart card type lookup, platform comparison, and standard reference in Python

Table of Contents

Install

pip install smartcardfyi[api]     # API client (httpx)
pip install smartcardfyi[cli]     # + CLI (typer, rich)
pip install smartcardfyi[mcp]     # + MCP server
pip install smartcardfyi[all]     # Everything

Quick Start

from smartcardfyi.api import SmartCardFYI

with SmartCardFYI() as api:
    # Search card types, platforms, standards, glossary
    results = api.search("emv")
    print(results)

    # Look up a specific card type
    emv = api.card("emv-contact")
    print(emv["name"], emv["interface"])  # EMV Contact Card

    # Compare two card platforms
    diff = api.compare("java-card", "multos")
    print(diff)

    # Discover a random card type
    surprise = api.random()
    print(surprise["name"])

What You'll Find on SmartCardFYI

SmartCardFYI is a comprehensive smart card encyclopedia covering card types, chip platforms, international standards, manufacturers, applications, form factors, and security certifications. Smart cards are tamper-resistant integrated circuit cards that provide secure data storage, cryptographic processing, and authenticated access -- the foundation of payment systems (5+ billion EMV cards active), telecommunications (8+ billion SIM cards), government identity, physical access control, and healthcare worldwide.

Contact vs Contactless Interface

Smart cards communicate through two primary interfaces. Contact cards (ISO 7816-3) use an 8-pin gold pad that makes physical contact with a card reader, operating at 3.3V or 5V with clock speeds from 1 MHz to 20 MHz, using T=0 (byte-oriented) or T=1 (block-oriented) transmission protocols. Contactless cards (ISO 14443 Type A/B) use radio frequency at 13.56 MHz with read ranges of 4-10 cm, employing either Type A (ASK modulation, Miller encoding -- MIFARE, NTAG) or Type B (ASK modulation, NRZ-L encoding -- Calypso, CIV).

Dual-interface cards combine both interfaces sharing a single chip die with separate I/O paths. This is now the standard for modern EMV payment cards -- the same chip handles contact transactions at POS terminals and contactless tap-to-pay, with the card selecting the appropriate interface automatically based on the reader's field.

Learn more: Card Type Explorer | Glossary

Chip Platforms

Smart card chip platforms provide the operating system and execution environment for card applications:

Platform Developer Language Multi-App Cumulative Shipments Key Feature
Java Card Oracle Java (subset) Yes 30+ billion Open ecosystem, applet isolation, firewall
MULTOS MULTOS Consortium MEL, C, Java Yes 500+ million Certified secure loading, no vendor lock-in
JCOP NXP Java Card Yes Billions NXP hardware optimization, DESFire integration
BasicCard ZeitControl ZC-Basic Limited Millions Rapid prototyping, free dev tools
Native OS Various Assembly/C No Billions Maximum performance, proprietary

Java Card dominates with over 30 billion cumulative shipments. It runs a stripped-down JVM (JCVM) supporting a subset of Java -- no floats, no threads, no garbage collection, no multi-dimensional arrays, no String class. Applets are isolated via the Java Card firewall, and inter-applet communication uses Shareable Interface Objects (SIOs). Memory is persistent by default (EEPROM/Flash), and objects survive card power cycles without explicit serialization.

Learn more: Platform Guide | Standards

EMV Payment Standards

EMV (Europay, Mastercard, Visa) defines the global standard for chip-based payment cards. The EMV specification suite includes:

Specification Scope Key Concepts
EMV 4.3 Book 1 Application-independent ICC to terminal ATR parsing, application selection (AID)
EMV 4.3 Book 2 Security and key management SDA, DDA, CDA offline authentication
EMV 4.3 Book 3 Application specification Transaction flow, card risk management
EMV 4.3 Book 4 Cardholder, attendant, acquirer PIN entry, receipt, online authorization
EMV Contactless Books A-D Tap-to-pay specifications Per-kernel specs (Visa qVSDC, Mastercard PayPass, Amex ExpressPay)
EMV 3-D Secure 2.0 Online authentication Risk-based authentication, SCA compliance
EMV Payment Tokenisation Token lifecycle Device tokens for Apple Pay, Google Pay

Offline Data Authentication (ODA): EMV cards prove their authenticity without online connectivity using three mechanisms -- Static Data Authentication (SDA, RSA signature on static data, no cloning protection), Dynamic Data Authentication (DDA, card generates unique RSA signature per transaction), and Combined DDA/Application Cryptogram (CDA, strongest -- dynamic signature covers the transaction cryptogram).

ISO 7816 Standard Series

The ISO 7816 series defines the complete smart card communication stack from physical dimensions to application protocols:

Part Title Key Content
7816-1 Physical characteristics 85.6 x 53.98 x 0.76 mm, bending (10 N), UV, X-ray resistance
7816-2 Contacts 8-pin pad (C1-C8): VCC, RST, CLK, GND, VPP, I/O
7816-3 Electrical interface ATR (Answer to Reset), PPS negotiation, T=0/T=1 protocols
7816-4 Commands (APDU) CLA/INS/P1/P2/Lc/Le structure, response SW1-SW2
7816-5 AID registration RID (5 bytes, registered) + PIX (up to 11 bytes, proprietary)
7816-6 Data elements BER-TLV encoding, interindustry data objects
7816-8 Security commands VERIFY, INTERNAL AUTHENTICATE, EXTERNAL AUTHENTICATE, key management
7816-9 Card management Life cycle states, file creation/deletion, application management
7816-15 Crypto information PKCS#15-compatible on-card certificate/key structure

APDU Communication

All smart card communication follows the APDU (Application Protocol Data Unit) structure defined in ISO 7816-4:

Command APDU: CLA | INS | P1 | P2 | Lc | Data | Le

Field Size Description
CLA 1 byte Class byte (0x00=ISO, 0x80-0x8F=proprietary)
INS 1 byte Instruction (0xA4=SELECT, 0xB0=READ BINARY, 0x20=VERIFY)
P1-P2 2 bytes Parameters (file ID, record number, key reference)
Lc 0-3 bytes Length of command data (absent if no data)
Data Lc bytes Command data payload
Le 0-3 bytes Expected response data length

Response APDU: Data | SW1 | SW2

Status Word Meaning
90 00 Success
61 XX SW2 bytes of response data available (use GET RESPONSE)
6A 82 File or application not found
69 82 Security condition not satisfied
6A 86 Incorrect parameters P1-P2

Learn more: Standards Reference | Glossary

GlobalPlatform Card Management

GlobalPlatform specifications define how applications are loaded, installed, and managed on multi-application smart cards:

Component Role Key Function
Issuer Security Domain (ISD) Card-level authority Key management, secure channel, app lifecycle
Supplementary Security Domain (SSD) Delegated authority Third-party application management
OPEN (GP Environment) Runtime API dispatch, inter-applet firewall, registry
Secure Channel Protocol (SCP02/SCP03) Session security Mutual authentication, session keys, encrypted APDUs
DAP Verification Code integrity Data Authentication Pattern for applet loading

SCP03 (Secure Channel Protocol 03) provides AES-based session key derivation, mutual authentication, and command/response encryption with C-MAC/R-MAC integrity protection. It supersedes SCP02 (3DES-based) for new deployments and is mandatory for EMVCo-certified cards.

Form Factors

Form Factor Dimensions (mm) Primary Use
Full-size (ID-1) 85.6 x 53.98 x 0.76 Payment, identity, access
ID-000 (Plug-in) 25 x 15 x 0.76 Legacy SIM cards
Mini SIM (2FF) 25 x 15 GSM/3G phones
Micro SIM (3FF) 15 x 12 4G smartphones
Nano SIM (4FF) 12.3 x 8.8 Modern smartphones
Embedded SIM (MFF2) 6 x 5 (soldered) IoT, M2M, wearables
iSIM Integrated in SoC Next-gen IoT (in silicon)

Modern SIM cards ship as multi-cut ("tri-cut" or "quad-cut") carriers that snap to Mini, Micro, or Nano sizes from a single ID-1 card blank. eSIM (GSMA Remote SIM Provisioning) enables over-the-air profile download without physical SIM swap -- now standard in iPhone 14+ (US), Apple Watch, and Samsung Galaxy flagship devices.

Security Certifications

Certification Scope Typical Level Evaluation Time
Common Criteria (ISO 15408) IC + OS + applets EAL5+ (smart cards) 12-18 months
FIPS 140-2/140-3 Cryptographic modules Level 2-3 6-12 months
EMVCo Security Evaluation Payment card ICs IC, Platform, Application 6-9 months
PCI PTS Payment terminals POI v6 3-6 months
ANSSI CSPN French fast-track Binary pass/fail 2-3 months

Learn more: Card Type Explorer | Platform Guide

API Endpoints

Free, no authentication required. JSON responses with CORS enabled.

Method Endpoint Description
GET /api/card/{slug}/ Card type detail with specs
GET /api/platform/{slug}/ Chip platform with features
GET /api/standard/{slug}/ Standard detail with linked cards
GET /api/manufacturer/{slug}/ Manufacturer with product lines
GET /api/application/{slug}/ Application with card types
GET /api/form-factor/{slug}/ Form factor with dimensions
GET /api/certification/{slug}/ Certification with requirements
GET /api/term/{slug}/ Glossary term definition
GET /api/search/?q={query} Search across all content types
GET /api/compare/?a={slug}&b={slug} Compare two card types
GET /api/random/ Random card type discovery
GET /api/openapi.json OpenAPI 3.1.0 specification

Example

# Search for EMV card types
curl -s "https://smartcardfyi.com/api/search/?q=emv" | python -m json.tool

Full API documentation at smartcardfyi.com/api/. OpenAPI 3.1.0 spec: smartcardfyi.com/api/openapi.json.

Command-Line Interface

smartcardfyi search "java card"         # Search all content
smartcardfyi card emv-contact           # Card type detail
smartcardfyi compare java-card multos   # Side-by-side comparison
smartcardfyi random                     # Discover a random card type

MCP Server (Claude, Cursor, Windsurf)

{
    "mcpServers": {
        "smartcardfyi": {
            "command": "uvx",
            "args": ["--from", "smartcardfyi[mcp]", "python", "-m", "smartcardfyi.mcp_server"]
        }
    }
}

Tools: smartcard_search, smartcard_lookup, smartcard_compare

REST API Client

from smartcardfyi.api import SmartCardFYI

with SmartCardFYI() as api:
    api.search("emv")                          # Full-text search
    api.card("emv-contact")                    # Card type detail
    api.platform("java-card")                  # Chip platform
    api.standard("iso-7816")                   # Standard detail
    api.manufacturer("nxp")                    # Manufacturer
    api.application("payment")                 # Application
    api.form_factor("id-1")                    # Form factor
    api.certification("common-criteria")       # Certification
    api.glossary_term("apdu")                  # Glossary term
    api.compare("java-card", "multos")         # Compare two cards
    api.random()                               # Random discovery
    api.openapi()                              # OpenAPI 3.1.0 spec

Learn More About Smart Cards

Also Available

Platform Install Link
npm npm install smartcardfyi npm
Go go get github.com/fyipedia/smartcardfyi-go pkg.go.dev
Rust cargo add smartcardfyi crates.io
Ruby gem install smartcardfyi rubygems.org
MCP uvx --from "smartcardfyi[mcp]" python -m smartcardfyi.mcp_server Config

Tag FYI Family

Part of the FYIPedia open-source developer tools ecosystem -- automatic identification and data capture technologies.

Site Domain Focus
BarcodeFYI barcodefyi.com 518 records -- barcode symbologies, standards, GS1 prefixes
QRCodeFYI qrcodefyi.com 425 records -- QR code types, versions, encoding modes
NFCFYI nfcfyi.com 288 records -- NFC chips, NDEF records, standards
BLEFYI blefyi.com 261 records -- BLE chips, GATT profiles, beacons
RFIDFYI rfidfyi.com 318 records -- RFID tags, frequency bands, EPC schemes
SmartCardFYI smartcardfyi.com 280 records -- smart cards, EMV, Java Card, platforms

FYIPedia Developer Tools

Package PyPI npm Description
barcodefyi PyPI npm Barcode symbologies, standards -- barcodefyi.com
qrcodefyi PyPI npm QR code types, versions, encoding -- qrcodefyi.com
nfcfyi PyPI npm NFC chips, NDEF, standards -- nfcfyi.com
blefyi PyPI npm BLE profiles, beacons, chips -- blefyi.com
rfidfyi PyPI npm RFID tags, readers, frequencies -- rfidfyi.com
smartcardfyi PyPI npm Smart cards, EMV, platforms -- smartcardfyi.com

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

smartcardfyi-0.1.1.tar.gz (726.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

smartcardfyi-0.1.1-py3-none-any.whl (13.4 kB view details)

Uploaded Python 3

File details

Details for the file smartcardfyi-0.1.1.tar.gz.

File metadata

  • Download URL: smartcardfyi-0.1.1.tar.gz
  • Upload date:
  • Size: 726.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for smartcardfyi-0.1.1.tar.gz
Algorithm Hash digest
SHA256 63d3fecc6ffe2cf8dcb3d2d8fa48a70ee28831a3586e355b4fdd080088dab8e8
MD5 fce3b34b892aeb5eaa33b49f9f1a1625
BLAKE2b-256 73b657845ecce3da68119b409805539201132d82d661b530ee2b88a3f2de71bc

See more details on using hashes here.

File details

Details for the file smartcardfyi-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: smartcardfyi-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 13.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for smartcardfyi-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7afa8e531f48ba2a79fb7557a7d8d0d1dbfe90167c3e46a8aaa123e18fe8b5c0
MD5 036b7bf3a5f78f307bf19fa453106c54
BLAKE2b-256 5456f57b6863462f4e0ca1de0e05b95b29176fdaa3dc2d741af7700ede00acb1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page