Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
DroidKaigi 2023
Search
ARIYAMA Keiji
September 14, 2023
Technology
0
1.5k
DroidKaigi 2023
2023/09/14開催の DroidKaigi 2023 で発表した 「Host-based Card Emulationで簡単NFC生活」の発表資料です。
ARIYAMA Keiji
September 14, 2023
Tweet
Share
More Decks by ARIYAMA Keiji
See All by ARIYAMA Keiji
Build with AI
keiji
0
140
TechFeed Conference 2022
keiji
0
220
Android Bazaar and Conference Diverse 2021 Winter
keiji
0
830
ci-cd-conference-2021
keiji
1
1.2k
Android Bazaar and Conference 2021 Spring
keiji
3
750
TFUG KANSAI 20190928
keiji
0
92
Softpia Japan Seminar 20190724
keiji
1
150
pixiv App Night 20190611
keiji
1
560
ABC2019 Spring
keiji
1
860
Other Decks in Technology
See All in Technology
リンクアンドモチベーション ソフトウェアエンジニア向け紹介資料 / Introduction to Link and Motivation for Software Engineers
lmi
4
300k
SRE×AIOpsを始めよう!GuardDutyによるお手軽脅威検出
amixedcolor
0
170
これまでの計測・開発・デプロイ方法全部見せます! / Findy ISUCON 2024-11-14
tohutohu
3
370
AWS Lambdaと歩んだ“サーバーレス”と今後 #lambda_10years
yoshidashingo
1
180
マルチプロダクトな開発組織で 「開発生産性」に向き合うために試みたこと / Improving Multi-Product Dev Productivity
sugamasao
1
310
【Startup CTO of the Year 2024 / Audience Award】アセンド取締役CTO 丹羽健
niwatakeru
0
1.3k
Zennのパフォーマンスモニタリングでやっていること
ryosukeigarashi
0
150
10XにおけるData Contractの導入について: Data Contract事例共有会
10xinc
6
660
iOSチームとAndroidチームでブランチ運用が違ったので整理してます
sansantech
PRO
0
150
マルチモーダル / AI Agent / LLMOps 3つの技術トレンドで理解するLLMの今後の展望
hirosatogamo
37
12k
EventHub Startup CTO of the year 2024 ピッチ資料
eventhub
0
120
The Rise of LLMOps
asei
7
1.7k
Featured
See All Featured
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
VelocityConf: Rendering Performance Case Studies
addyosmani
325
24k
Code Review Best Practice
trishagee
64
17k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
Embracing the Ebb and Flow
colly
84
4.5k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
6.9k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
Music & Morning Musume
bryan
46
6.2k
Transcript
C-LIS CO., LTD.
)PTUCBTFE$BSE&NVMBUJPOͰ ؆୯/'$ੜ׆ %SPJE,BJHJ ༗ࢁɹܓೋʢ"3*:".",FJKJʣ
C-LIS CO., LTD. ༗ࢁܓೋʢ"3*:".",FJKJʣ $-*4$0 -5% "OESPJEΞϓϦ։ൃνϣοτσΩϧ keiji Photo
by Koji MORIGUCHI (MORIGCHOWDER)
"HFOEB εϚʔτΧʔυͱ/'$ )PTUCBTFE$BSE&NVMBUJPOʢ)$&ʣ )$&Λ࣮͢Δ εϚʔτΧʔυΛࢧ͑Δن֨
)$&ͷམͱ݀͠ ·ͱΊ
εϚʔτΧʔυ *$νοϓΛଂͯ͠ใΛॲཧʢԋࢉʣͰ͖Δ ৮ɾඇ৮ͰϦʔμʔͱ௨৴͢Δ λϯύੑͷ͋ΔνοϓͷதʹΞϓϦέʔγϣϯͱใΛ֨ೲͰ͖Δ ʮεϚʔτΧʔυʯͷఆٛɺίϯςΩετʹΑͬͯҟͳΔ߹͕͋Γ·͢
εϚʔτΧʔυͷྫ *$0$"ʗ4VJDB ΫϨδοτΧʔυ ӡస໔ڐূ ࡏཹΧʔυ ҩࢣࢿ֨ূʢ)1,*ʣ ϚΠφϯόʔΧʔυʢ+1,*ʣ
+BWB$BSE +BWBͰϓϩάϥϜՄೳͳεϚʔτΧʔυ ॻ͖͑ՄೳͳΧʔυ͕ߪೖՄೳ
+BWB$BSEͷ੍ +BWB4&ͷίϯύΠϥ͕ඞཁ +BWBͷαϒηοτ w ͑ͳ͍Ϋϥε͕͋Δ w JOU͕͑ͳ͍͜ͱ͕͋Δ ෆشൃϝϞϦͷ༰ྔ͕খ͍͞ʢ,#ఔʣ ։ൃϊϋ͕खʹೖΓͮΒ͍
/'$ /FBS'JFME$PNNVOJDBUJPOʢۙڑແઢ௨৴ʣ ʮϦʔμʔʢಡΈऔΔଆʣʯͱʮλάɾΧʔυʢಡΈऔΒΕΔଆʣʯ͕͋Δ
"OESPJEͷ/'$ରԠ Ϧʔμʔ w 'PSFHSPVOE%JTQBUDI"OESPJE w 3FBEFSNPEF"OESPJE λάʢΧʔυΤϛϡϨʔγϣϯʣ w $BSEFNVMBUJPOXJUIBTFDVSFFMFNFOU
w )PTUCBTFE$BSE&NVMBUJPO"OESPJE w )PTUCBTFE$BSE&NVMBUJPO'FMJDB"OESPJE
"HFOEB εϚʔτΧʔυͱ/'$ )PTUCBTFE$BSE&NVMBUJPOʢ)$&ʣ )$&Λ࣮͢Δ εϚʔτΧʔυΛࢧ͑Δن֨
)$&ͷམͱ݀͠ ·ͱΊ
)PTUCBTFE$BSE&NVMBUJPOʢ)$&ʣ /'$Λ௨ͯ͡ɺ"OESPJEΛλάɾΧʔυͷΑ͏ʹৼΔΘͤΔػೳ "OESPJE )PTU$16 /'$ίϯτϩʔϥʔ /'$Ϧʔμʔ IUUQTEFWFMPQFSBOESPJEDPNHVJEFUPQJDTDPOOFDUJWJUZOGDIDF
$BSE&NVMBUJPOXJUIBTFDVSFFMFNFOU IUUQTEFWFMPQFSBOESPJEDPNHVJEFUPQJDTDPOOFDUJWJUZOGDIDF $BSE&NVMBUJPOXJUIBTFDVSFFMFNFOU "OESPJE 4FDVSF&MFNFOU )PTU$16 /'$ίϯτϩʔϥʔ /'$Ϧʔμʔ
)$&ͷར εϚʔτϑΥϯΛߴػೳͳεϚʔτΧʔυͱͯ͠ར༻Ͱ͖Δ w େ༰ྔόοςϦʔ w େ༰ྔετϨʔδ w σΟεϓϨΠ w λονύωϧ
w ωοτϫʔΫ௨৴ w ೝূʹόΠϯυ͞Εͨ҉߸ݤ
)$&ͷར༻γʔϯ ϞόΠϧӡస໔ڐূ *40*&$ 1FSTPOBMJEFOUJ fi DBUJPO*40DPNQMJBOUESJWJOHMJDFODF1BSU .PCJMFESJWJOHMJDFODF N%-
BQQMJDBUJPO (PPHMFʹΑΔN%PD͓ΑͼN%PD3FBEFSͷϦϑΝϨϯε࣮ IUUQTHJUIVCDPNHPPHMFJEFOUJUZDSFEFOUJBM
"HFOEB εϚʔτΧʔυͱ/'$ )PTUCBTFE$BSE&NVMBUJPOʢ)$&ʣ )$&Λ࣮͢Δ εϚʔτΧʔυΛࢧ͑Δن֨
)$&ͷམͱ݀͠ ·ͱΊ
खॱ )PTU"QEV4FSWJDFΛ࣮ "*%ϑΟϧλʔΛهड़ "OESPJE.BOJGFTUΛઃఆ
)PTU"QEV4FSWJDFΛ࣮ class HceService : HostApduService() { override fun processCommandApdu(commandApdu:
ByteArray, extras: Bundle?): ByteArray { Log.d(TAG, "commandApdu: ${commandApdu.toHex()}") return byteArrayOf(0x90.toByte(), 0x00) } override fun onDeactivated(reason: Int) { } companion object { private val TAG: String = HceService::class.java.simpleName } } private fun ByteArray.toHex(): String = joinToString(":") { "%02x".format(it).uppercase() } private fun Byte.toUnsignedInt(): Int = (this.toInt() and 0xFF)
"*%ϑΟϧλʔΛهड़ <host-apdu-service xmlns:android="http://schemas.android.com/apk/res/android" android:description="@string/hce_service_description" android:requireDeviceUnlock="false"> <aid-group android:category="other" android:description="@string/aid_description"> <aid-filter
android:name="F0394148148100" /> </aid-group> </host-apdu-service> SFTYNMIDFTFSWJDFYNM
"OESPJE.BOJGFTUΛઃఆ <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools"> <uses-permission android:name="android.permission.NFC"
/> <application> <!-- লུ --> <service android:name=".HceService" android:exported="true" android:permission="android.permission.BIND_NFC_SERVICE"> <intent-filter> <action android:name="android.nfc.cardemulation.action.HOST_APDU_SERVICE" /> </intent-filter> <meta-data android:name="android.nfc.cardemulation.host_apdu_service" android:resource="@xml/hceservice" /> </service> </application> </manifest>
Ϧʔμʔ͔Βͷݺͼग़͠ /'$ϦʔμʔΛ༻ҙ͢Δ w 40/:1B4P3J3$44ʢۀ༻ʣ w "EWBODFE$BSE4ZTUFNT"$36 ͳͲ ੜ࢈ऴྃ༧ఆɺݱࡏ৽ܕͷ1B4P3J3$4ʲۀ༻్ઐ༻Ϟσϧʳ͕ൢച
࣮ࡍʹݺͼग़ͯ͠ΈΔ 0QFO4$ w εϚʔτΧʔυؔͷϢʔςΟϦςΟɾϥΠϒϥϦ w NBD04ͰCSFXͰΠϯετʔϧՄೳ IUUQTHJUIVCDPN0QFO4$0QFO4$
$ opensc-tool -s 00:A4:04:00:07:F0:39:41:48:14:81:00 Using reader with a card: ACS
ACR1252 Dual Reader Sending: 00 A4 04 00 07 F0 39 41 48 14 81 00 Received (SW1=0x90, SW2=0x00) 3FDFJWFEʹଓ͍ͯɺϓϩάϥϜଆͰࢦఆͨ͠ʢY YʣΛड͚औΔ͜ͱ "OESPJE4UVEJPͷ-PH$BUʹ"͔Β࢝·ΔόΠτ͕දࣔ͞Ε͍ͯΔͷΛ֬ೝ͢Δ
)PTU"QEV4FSWJDFͷ࣮ Ϧʔμʔ͕ૹ৴ͨ͠༰processCommandApdu ͷҾcommandApdu ͱͯ͠ɺ όΠτྻͰड͚औΔ ΓͷόΠτྻɺϨεϙϯεͱͯ͠Ϧʔμʔଆʹૹ৴͞ΕΔ Ϧʔμʔ "OESPJE ιϑτΣΞ
ΞϓϦʢ)$&ʣ όΠτྻ όΠτྻ /'$
"HFOEB εϚʔτΧʔυͱ/'$ )PTUCBTFE$BSE&NVMBUJPOʢ)$&ʣ )$&Λ࣮͢Δ εϚʔτΧʔυΛࢧ͑Δن֨
)$&ͷམͱ݀͠ ·ͱΊ
$ opensc-tool -s 00:A4:04:00:07:F0:39:41:48:14:81:00 Using reader with a card: ACS
ACR1252 Dual Reader Sending: 00 A4 04 00 07 F0 39 41 48 14 81 00 Received (SW1=0x90, SW2=0x00) <host-apdu-service xmlns:android="http://schemas.android.com/apk/res/android" android:description="@string/hce_service_description" android:requireDeviceUnlock="false"> <aid-group android:category="other" android:description="@string/aid_description"> <aid-filter android:name="F0394148148100" /> </aid-group> </host-apdu-service> ૹ৴༰Λৄ͘͠ݟΔ
"1%6 "QQMJDBUJPO1SPUPDPM%BUB6OJU 00:A4:04:00:07:F0:39:41:48:14:81:00 */4USVDUJPOCZUF໋ྩ $-"TTCZUFΫϥεόΠτ 1ύϥϝʔλʔ 1ύϥϝʔλʔ -Dσʔλ %BUB
Y"ˠ4&-&$5 *40*&$ *EFOUJ fi DBUJPODBSET*OUFHSBUFEDJSDVJUDBSET1BSU 0SHBOJ[BUJPO TFDVSJUZBOEDPNNBOETGPSJOUFSDIBOHF
$PNNBOEͱ3FTQPOTF Ϧʔμʔ "OESPJE ιϑτΣΞ ΞϓϦʢ)$&ʣ SFTQPOTF"QEV DPNNBOE"QEV /'$
"*%ʹԠͯ͡ΞϓϦΛબ Ϧʔμʔ "OESPJE ιϑτΣΞ ΞϓϦʢ)$&ʣ 4&-&$5"*% ΞϓϦʢ)$&ʣ ΞϓϦʢ)$&ʣ
"OESPJE γεςϜ બ /'$
$PNNBOE"1%6 ύλʔϯ $-"]*/4]1]1 ύλʔϯ $-"]*/4]1]1]-F ύλʔϯ $-"]*/4]1]1]-D]%BUB ύλʔϯ $-"]*/4]1]1]-D]%BUB]-F 00:A4:04:00:07:F0:39:41:48:14:81:00
*/4USVDUJPOCZUF໋ྩ $-"TTCZUFΫϥεόΠτ 1ύϥϝʔλʔ 1ύϥϝʔλʔ -Dσʔλ %BUB
3FTQPOTF"1%6 <%"5">]48]48
4UBUVT8PSE IUUQTXXXFGUMBCDPNLOPXMFEHFCBTFDPNQMFUFMJTUPGBQEVSFTQPOTFT 48 48 ҙຯ 90 "00" ޭ 61
xx ޭɻΓxxόΠτͷϨεϙϯε͕͋Δ 63 Cx PINর߹ࣦഊɻΓࢼߦՄೳճxճ 69 82 PIN͕র߹͞Ε͍ͯͳ͍ 69 83 ϒϩοΫ͞Ε͍ͯΔʢPINࢼߦՄೳճΛ աͨ͠ 6A 82 αϙʔτ͍ͯ͠ͳ͍ϑΝΠϧɾΞϓϦέʔ γϣϯ
͞·͟·ͳ*OTUSVDUJPO 4&-&$5 3&"%#*/"3: (&5%"5" 165%"5" 7&3*': $0.165&%*(*5"-4*(/"563& *40*&$*EFOUJ fi DBUJPODBSET*OUFHSBUFEDJSDVJUDBSET1BSU
$PNNBOETBOENFDIBOJTNTGPSTFDVSJUZPQFSBUJPOT ͦͷଞɺΞϓϨοτݻ༗ͷ*OTUSVDUJPOଘࡏ͢Δ
3FBE#JOBSZΛ࣮͢Δ CLA: 0x00 INS: 0xB0 P1: 0x00 P2: 0x00 Le:
0x00 $ opensc-tool \ -s 00:A4:04:00:07:F0:39:41:48:14:81:00 \ -s 00:B0:00:00:00
3FBE#JOBSZΛ࣮͢Δ ύλʔϯ $-"]*/4]1]1 ύλʔϯ $-"]*/4]1]1]-F ύλʔϯ $-"]*/4]1]1]-D]%BUB ύλʔϯ $-"]*/4]1]1]-D]%BUB]-F 00:B0:00:00:00
*/4USVDUJPODPEF໋ྩ $-"TTΫϥεόΠτ 1ύϥϝʔλʔ 1ύϥϝʔλʔ -Fظ͢Δσʔλ
"1%6ͷΤϯίʔμʔɾσίʔμʔ "OESPJEϓϥοτϑΥʔϜʹ༻ҙ͞Ε͍ͯͳ͍ w 4FDVSF&MFNFOUΞϓϦͷதʹΫϥεͱͯ͠ଘࡏ͢Δ w IUUQTBOESPJEHPPHMFTPVSDFDPNQMBUGPSNQBDLBHFTBQQT4FDVSF&MFNFOU SFGTIFBET NBJOTSDDPNBOESPJETF "1%6ΛऔΓѻ͏ϥΠϒϥϦΛ࡞
IUUQTHJUIVCDPNLFJKJKBWBDBSEQSBDUJDFUSFFNBJOBOESPJEBQQBQEV
"1%6ͷύʔεͱ3FBE#JOBSZͷ࣮ val apdu = ApduCommand.readFrom(commandApdu, 0) val cla = apdu.header.cla.toUnsignedInt()
val ins = apdu.header.ins.toUnsignedInt() Log.d(TAG, "apdu: cla:$cla, ins:$ins") val response = when (ins) { 0xA4 -> STATUS_WORD_SUCCESS 0xB0 -> ByteArray(256) { it.toByte() }.also { it[it.lastIndex] = "X".toByteArray().first() } + STATUS_WORD_SUCCESS else -> STATUS_WORD_INS_NOT_SUPPORTED_OR_INVALID } return response
࣮ߦ Using reader with a card: ACS ACR1252 Dual Reader
Sending: 00 A4 04 00 07 F0 39 41 48 14 81 00 Received (SW1=0x90, SW2=0x00) Sending: 00 B0 00 00 00 Received (SW1=0x90, SW2=0x00): 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F ................ 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F ................ 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F !"#$%&'()*+,-./ 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F 0123456789:;<=>? 40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F @ABCDEFGHIJKLMNO 50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D 5E 5F PQRSTUVWXYZ[\]^_ 60 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F `abcdefghijklmno 70 71 72 73 74 75 76 77 78 79 7A 7B 7C 7D 7E 7F pqrstuvwxyz{|}~. 80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F ................ 90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F ................ A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF ................ B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF ................ C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF ................ D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF ................ E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF ................ F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 FA FB FC FD 58 ..............X $ opensc-tool \ -s 00:A4:04:00:07:F0:39:41:48:14:81:00 \ -s 00:B0:00:00:00
ඇಉظͰ݁ՌΛฦ͢ private val job = Job() private val coroutineScope =
CoroutineScope(Dispatchers.IO + job) override fun processCommandApdu(commandApdu: ByteArray, extras: Bundle?): ByteArray? { // লུ coroutineScope.launch { delay(1000) sendResponseApdu(response) } return null } override fun onDestroy() { super.onDestroy() job.cancel() }
࣮ࡍͷཧϑΝΠϧߏ ӡస໔ڐূٴͼӡస໔ڐূ࡞γεςϜ༷ॻʢ༷ॻόʔδϣϯ൪߸ɿʣ IUUQTXXXOQBHPKQMBXTOPUJ fi DBUJPOLPVUVVNFOLZPNFOLZP@QEG
࣮ࡍͷཧϑΝΠϧߏ 'VODUJPOBM4QFDJ fi DBUJPOPGUIF0QFO1(1BQQMJDBUJPOPO*404NBSU$BSE0QFSBUJOH4ZTUFNT IUUQTHOVQHPSHGUQTQFDT0QFO1(1TNBSUDBSEBQQMJDBUJPOQEG
σʔλϑΥʔϚοτʢ5-75BH-FOHUI7BMVFʣ *40*&$ *OGPSNBUJPOUFDIOPMPHZ"4/FODPEJOHSVMFT1BSU4QFDJ fi DBUJPOPG#BTJD&ODPEJOH3VMFT #&3 $BOPOJDBM&ODPEJOH3VMFT $&3 BOE%JTUJOHVJTIFE&ODPEJOH3VMFT
%&3 6E:05:00:01:02:03:04 5BH 5ZQF -FOHUI 7BMVF
5-7ͷύλʔϯ 5F:72:05:00:01:02:03:04 6E:81:C0:00:01:02:03:04 .. BF 5BHͱ-FOHIUόΠτͱݶΒͳ͍ 6E:08: 5F:72:05:00:01:02:03:04 ೖΕࢠͷߏ͕͋Γ͏Δ
5-7ͷΤϯίʔμʔɾσίʔμʔ "OESPJEϓϥοτϑΥʔϜʹ༻ҙ͞Ε͍ͯͳ͍ w "4/ͳͲҰ෦#PVODZ$BTUMFͰରԠՄೳ 5-7ΤϯίʔμʔɾσίʔμʔͷϥΠϒϥϦΛ࡞ IUUQTHJUIVCDPNLFJKJUMWLTQ
"HFOEB εϚʔτΧʔυͱ/'$ )PTUCBTFE$BSE&NVMBUJPOʢ)$&ʣ )$&Λ࣮͢Δ εϚʔτΧʔυΛࢧ͑Δن֨
)$&ͷམͱ݀͠ ·ͱΊ
ૺ۰ͨ͠ )$&ͷϨεϙϯεΛϦʔμʔଆ͕ਖ਼͘͠ॲཧ͠ͳ͍έʔε͕ൃੜ ϦʔμʔଆͷιϑτΣΞ࣮ʹৄ͘͠ͳ͍ ࠶ݱੑΛௐ͍ࠪͯ͘͠ͱɺϨεϙϯε͕CZUFTΛ͑ͨ͋ͨΓͰൃੜ͢Δ͜ͱ͕Θ ͔ͬͨ
CZUFTΛ͑Δσʔλͷૹड৴ )PTU"QEV4FSWJDFɺCZUFTΛ͑ΔσʔλΛϨεϙϯεͱͯ͠ฦ͢͜ͱ͕Ͱ͖ Δ ଞͷεϚʔτΧʔυͰͳ͘ॲཧ͍ͯ͠Δͷ͋ΔͷͰɺϦʔμʔιϑτΣ ΞɺCZUFTΛ͑ΔσʔλΛड͚औΔ͜ͱͰ͖Δ
Ϧʔμʔଆ͔Βݟͨ"OESPJE Ϧʔμʔʢ͓ΑͼιϑτΣΞʣଆ͕ɺ௨৴૬खͷ"OESPJE͕CZUFTΛ͑Δ σʔλΛૹड৴͢Δ͜ͱΛೝ͍ࣝͯ͠Δ͔ʁ Ϧʔμʔଆλονͨ͠ͱ͖ʹɺΧʔυ͕ૹ৴͢Δ"53ʢ"OTXFS5P3FTFUʣɺ 4FMFDUͨ͠ͱ͖ͷ"54ʢ"OTXFS5P4FMFDUʣΛݟ͍ͯΔՄೳੑ͕͋Δ $ opensc-tool --atr Using
reader with a card: ACS ACR1252 Dual Reader 3b:88:80:01:00:00:00:00:80:81:71:00:79
͞·͟·ͳσόΠεͷ"53 YubiKey 5 NFC 3b:8d:80:01:80:73:c0:21:c0:57:59:75:62:69:4b:65:79:f9 Pixel 6a 3b:88:80:01:00:00:00:00:80:81:71:00:79 Pixel 7a
3b:88:80:01:00:00:00:00:80:81:75:00:7d
IUUQTTNBSUDBSEBUSBQEVGSQBSTF "53CEDDCG
֦ு-D-FϑΟʔϧυ "1%6$PNNBOEͷ-D-FϑΟʔϧυόΠτͳͷͰɺCZUFT·Ͱ͔͠දݱͰ͖ ͳ͍ ֦ு-D-FͦΕͧΕΛόΠτʹ֦ு͢Δ͜ͱͰCZUFTҎ্ɺ CZUFT·Ͱ දݱͰ͖Δ 00:B0:00:00:FF -Fఆ͢Δσʔλ ''
00:B0:00:00:00:01:00 ֦ு-Fఆ͢Δσʔλ ''''
IUUQTTNBSUDBSEBUSBQEVGSQBSTF "53C
"53ʢ"54ʣมߋͰ͖ͳ͍ IUUQTEFWFMPQFSBOESPJEDPNHVJEFUPQJDTDPOOFDUJWJUZOGDIDF IMKB*TP%FQ"DU
ରࡦ )$&ΞϓϦɺCZUFTΛ͑Δ͞ͷσʔλΛૹ৴͠ͳ͍ ࠷େCZUFTͷνϟϯΫʹׂͯ͠ૹ৴͢Δ ϦʔμʔଆͷιϑτΣΞͰɺΧʔυଆ͕CZUFTΛ͑ΔσʔλΛऔΓѻ͑ͳ͍ ͜ͱΛલఏʹ։ൃ͢Δ ϦʔμʔͱΧʔυͷΈ߹Θͤجຊతʹ੍Ͱ͖ͳ͍
ड /'$ແઢ௨৴ͳͷͰडՄೳ ສԁఔͷػثͰ௨৴༰ΛडɺهͰ͖Δ ϦʔμʔɺΧʔυؒͰࣗಈతʹ҉߸Խ͞Εͳ͍ ҉߸Խͷํ๏ͱͯ͠4FDVSF.FTTBHJOH͕͋Δ 4FDVSF.FTTBHJOHݸผʹ࣮͢Δඞཁ͕͋ΓɺΧʔυଆ͚ͩͰͳ͘Ϧʔμʔ ଆରԠ͍ͯ͠Δඞཁ͕͋Δ
डͷରࡦ /'$Λ௨ͯ͡ΓͱΓ͢Δใɺͯ͢ड͞ΕΔલఏͰઃܭ͢Δ Ϧʔμʔଆ͔Β1*/ΛૹΔͱ͖ฏจͰૹ৴͠ͳ͍ ϦʔμʔଆͰ1*/Λೖྗ͠ͳ͍ʢΧʔυʹૹ৴͠ͳ͍ʣ εϚʔτϑΥϯʢΧʔυʣଆͰೝূΛٻΊΔͳͲɺεϚʔτϑΥϯͷಛੑΛ׆͔ ͨ͠ηΩϡϦςΟΛݕ౼͢Δ
ෳ डͱΈ߹ΘͤΔ͜ͱͰɺଞͷΞϓϦ͕)$&ͷԠ༰Λશʹ฿ͯ͠Ϋϩʔϯ ΧʔυʢΞϓϦʣΛ࡞͢Δ͜ͱ͕ٕज़తʹՄೳ Ϧʔμʔଆɺࣗͷ௨৴૬ख͕ෳ͞ΕͨͷͰͳ͍͔ఆ͢Δඞཁ͕͋Δ
Ϧʔμʔ "OESPJE "OESPJE,FZ4UPSF ιϑτΣΞ ిࢠॺ໊ʹΑΔෳݕ ΞϓϦʢ)$&ʣ ެ։ݤ ൿີݤ ެ։ݤ ॳظઃఆϦΫΤετ
ެ։ݤอଘ ݤϖΞੜ ݤϖΞੜϦΫΤετ /'$
Ϧʔμʔ "OESPJE "OESPJE,FZ4UPSF ιϑτΣΞ ిࢠॺ໊ʹΑΔෳݕ ΞϓϦʢ)$&ʣ ॺ໊ ൿີݤ ެ։ݤ ॺ໊ϦΫΤετ
ެ։ݤ ॺ໊ͷݕূ ిࢠॺ໊ ॺ໊ϦΫΤετ /'$
Ϧʔμʔͱͷ૬ੑ )$&ͷΞϓϦΛ1JYFM8BUDIʹΠϯετʔϧͨ͠ɻ 40/:ͷ1B4P3J3$44ʢۀ༻ʣͰಡΈऔΔ͜ͱ͕Ͱ͖Δ͕ɺ "EWBODFE$BSE4ZTUFNTͷ"$36Ͱਖ਼͘͠ಡΈऔΔ͜ͱ͕Ͱ͖ͳ͍έʔε ͕͋ͬͨʢݫີʹݴ͏ͱճʹճ͘Β͍ͷޭʣ
ϦʔμʔʹΑͬͯҟͳΔ௨৴ํࣜ ֬ೝͨ͠ͱ͜Ζɺ 40/:ͷ1B4P3J3$44ʢۀ༻ʣ/'$5ZQF"Ͱɺ "EWBODFE$BSE4ZTUFNTͷ"$36/'$5ZQF#ͰɺͦΕͧΕ௨৴͍ͯ͠ ͨʢ1JYFM8BUDIʹݶΒͣɺςετͨͯ͢͠Ͱಉ͡ʣɻ "$36ɺ1JYFMBͳͲͷܞଳͱͳ͘௨৴Ͱ͖͍ͯΔɻ 1JYFM8BUDIଆ͕ɺ5ZQF#Ͱͷ௨৴ʹ՝͕͋ΔՄೳੑ͕͋Δɻ
ΞϓϦଆ͔ΒͰ͖Δ͜ͱͳ͍ ɾϦʔμʔͷ૬ੑ͕ൃੜ͍ͯ͠Δ͜ͱɺΞϓϦ͔ΒΔ͜ͱ͕Ͱ͖ͳ͍ ͦͦ)PTU"QEV4FSWJDFʹ౸ୡ͠ͳ͍ͷͰɺϦʔμʔ͕௨৴ΛࢼΈ͍ͯΔ͜ ͱΛΞϓϦݕͰ͖ͳ͍ 5ZQF"ͰΞΫηε͢Δ͔ɺ5ZQF#ͰΞΫηε͢Δ͔Ϧʔμʔґଘ
Ϧʔμʔͱͷ૬ੑͷରԠ Λ(PPHMF1MBZͷ৴ର͔Βআ֎͢Δʁ ϦʔμʔͱͷΈ߹Θͤͷ ಈ࡞อূΛ͢ΔͱϦʔμʔͷΈ߹ΘͤΛެද͢Δʁ ύλʔϯരൃ ΞϓϦͷ࠷ॳʹνϡʔτϦΞϧΛ༻ҙɻͦͷաఔͰΛϦʔμʔͰಡΈऔͬͯΒ͏ɻ Ұఆ࣌ؒޭ͠ͳ͚Εࣦഊͱݟ၏ͯ͠૬ੑΛҊ͢Δ
ࠜຊతʹղܾ͍ͯ͠ͳ͍͚Ͳɺ͍͓͟͏ͱͯ͠μϝΑΓ͍͍
"HFOEB εϚʔτΧʔυͱ/'$ )PTUCBTFE$BSE&NVMBUJPOʢ)$&ʣ )$&Λ࣮͢Δ εϚʔτΧʔυΛࢧ͑Δن֨
)$&ͷམͱ݀͠ ·ͱΊ
)$&׆༻ͷظͱ՝ )PTUCBTFE$BSE&NVMBUJPOʢ)$&ʣΛ͏ͱɺ"OESPJEεϚʔτϑΥϯΛߴػೳͳεϚʔτ Χʔυͱͯ͠ৼΔΘͤΔ͜ͱ͕Ͱ͖Δɻ)$&ͷ׆༻ʹΑΓɺܾࡁͷΈͳΒͣɺެతͳূ໌ͱ͠ ͯͷϞόΠϧӡస໔ڐূͳͲ༻్ͷ֦େ͕ظͰ͖Δɻ ͔͠͠ͳ͕Βɺ)$&ʹগͳ͔Βͣ՝͕͋Δɻ·ͣɺ"OESPJEͷ)$&جຊతͳػೳͷΈఏڙ͠ ͍ͯΔɻͦͷͨΊଟ͘ͷ෦Λ։ൃऀ͕࣮ࣗ͢Δඞཁ͕͋Γɺ։ൃෛՙ͕ߴ͍ɻ ࣍ʹɺηΩϡϦςΟͷݕ౼͕ෆेͰ͋ͬͨ߹ɺडʹΑΔใ࿙ӮɺΫϩʔϯΧʔυͷ࡞ͳ ͲɺγεςϜͷ҆શੑʹॏେͳӨڹΛͨΒ͢Մೳੑ͕͋Δɻ·ͨɺΞϓϦ͔ΒઃఆͰ͖ͳ͍߲͕ ଟ͘ɺͱϦʔμʔͱͷΈ߹ΘͤͰಈ࡞͠ͳ͍ͳͲɺΞϓϦͰղܾ͕͍͠՝͋Δɻ)$& ͷಋೖʹ͋ͨͬͯɺϢʔβʔʹͲͷΑ͏ʹαϙʔτ͢Δ͔ेʹݕ౼ɾ४උ͢Δඞཁ͕͋Δɻ
ຊࢿྉ༗ࢁܓೋͷஶ࡞Ͱ͢ɻຊࢿྉͷશ෦ɺ·ͨҰ෦ʹ͍ͭͯɺஶ࡞ऀ͔ΒจॻʹΑΔڐΛಘͣʹෳ͢Δ͜ͱې͡ΒΕ͍ͯ·͢ɻ ໊֤ɾϒϥϯυ໊ɺձ໊ࣾͳͲɺҰൠʹ֤ࣾͷඪ·ͨొඪͰ͢ɻຊࢿྉதͰɺɺɺäΛׂѪ͍ͯ͠·͢ɻ ຊࢿྉͷ༰ɺൃදऀݸਓͷݟղͰ͋Γɺॴଐ·ͨؔ༩͢Δ৫Λද͢ΔͷͰ͋Γ·ͤΜɻ ͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠
ࢀߟ w ߞӍಡϚΠφϯόʔΧʔυͱ"1%6Ͱ௨৴ͯ͠ॺ໊σʔλ࡞ w IUUQTUFYFHJUIVCJPCMPHQSPUPDPMKQLJNZOVNCFSDBSEXJUIBQEV w 4NBSU$BSE(VZ w IUUQTTNBSUDBSEHVZIBUFOBCMPHKQ w
&5'MBC,OPXMFEHFCBTF w IUUQTXXXFGUMBCDPNLOPXMFEHFCBTF w ࡏཹΧʔυಡΈऔΓ༷ॻʢҰൠެ։༻ʣW w IUUQTXXXNPKHPKQJTBDPOUFOUQEG
ࢀߟ w ӡస໔ڐূٴͼӡస໔ڐূ࡞γεςϜ༷ॻʢ༷ॻόʔδϣϯ൪߸ɿ w IUUQTXXXOQBHPKQMBXTOPUJ fi DBUJPOLPVUVVNFOLZPNFOLZP@QEG w 'VODUJPOBM4QFDJ
fi DBUJPOPGUIF0QFO1(1BQQMJDBUJPOPO*404NBSU$BSE 0QFSBUJOH4ZTUFNT w IUUQTHOVQHPSHGUQTQFDT0QFO1(1TNBSUDBSEBQQMJDBUJPOQEG w *$"0%PD.BDIJOF3FBEBCMF5SBWFM%PDVNFOU w IUUQTXXXJDBPJOUQVCMJDBUJPOTQBHFTQVCMJDBUJPOBTQY EPDOVN