~/talk

Easy NFC Life with Host-based Card Emulation

TalkinJapaneseat DroidKaigi 2023 · 2023-09-14..09-16· [android, security]
links:none on file
slides:none on file

Shows how to build a real Host-based Card Emulation (HCE) NFC card on Android by implementing HostApduService, registering AID filters, and testing with PC/SC readers (Sony PaSoRi, ACS) using OpenSC to send APDUs. Describes creating TLV/APDU encoder/decoder and an asynchronous response pattern (return null then push response), reports a practical bug where some readers break on responses larger than 255 bytes (ATR issue) and notes Pixel/watch differences between Type A/B, and recommends on-device authentication (fingerprint) plus signature challenges to prevent cloning.

AI-written summary · about

  1. 0:00Introduction
  2. 0:41Smart card basics and types
  3. 3:34Java Card constraints today
  4. 5:42NFC basics and Android
  5. 6:46Host-based card emulation
  6. 7:07HCE mechanism and benefits
  7. 9:40HCE use cases and steps
  8. 11:28HCE app implementation
  9. 12:30NFC reader testing
  10. 14:59APDU commands and responses
  11. 16:26APDU processing details
  12. 20:23APDU status words and errors
  13. 21:49Instruction sets and use
  14. 23:14APDU encoder/decoder
  15. 24:38Read binary implementation
  16. 26:06File structure and access
  17. 27:58TLV format explained
  18. 30:15TLV encoder/decoder
  19. 30:58HCE response issues
  20. 34:10NFC security and cloning
  21. 36:37Reader compatibility issues
  22. 38:24HCE future outlook
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.