-
-
Notifications
You must be signed in to change notification settings - Fork 239
Open
Description
Describe the bug
The headline describes it.
Information about your card and used reader
As much information as you have:
- Card Vendor: Chinese - "Newbega RFID Technology Co. LTD"
- Card Product Name: J3R180
- Card Platform Version: 2.3
- Reader model/name: ACS ACR38U-R4
Expected behavior
Locking should work, setting enc, mac and dek keys.
Full log
Re-run your command with -d -v -i
switches and:
# gp -d -v -i --lock-enc=xxx --lock-mac=yyy --lock-dek=zzz
# GlobalPlatformPro f2af9ef
# Running on Linux 6.13.6-zen1-1.1-zen amd64, Java 23.0.2 by Arch Linux
[DEBUG] TerminalManager - Processing 1 readers with null as preferred and null as ignored
# SCardConnect("ACS ACR 38U-CCID 00 00", T=*) -> T=1, 3BD518FF8191FE1FC38073C821100A
# SCardBeginTransaction("ACS ACR 38U-CCID 00 00")
A>> T=1 (4+0000) 00A40400 00
A<< (0018+2) (18ms) 6F108408A000000151000000A5049F6501FF 9000
[DEBUG] GPSession - Auto-detected ISD: A000000151000000
A>> T=1 (4+0000) 80CA9F7F 00
A<< (0045+2) (13ms) 9F7F2A4790D32147000000000031800504742075150000000000000000031C2A35303437340000000000000000 9000
[DEBUG] GPData - 0x0000/0xFFFF does not represent a valid date
[DEBUG] GPData - 0x0000/0xFFFF does not represent a valid date
[DEBUG] GPData - 0x0000/0xFFFF does not represent a valid date
[WARN] GPData - Invalid CPLC date: 2A35
[DEBUG] GPData - 0x0000/0xFFFF does not represent a valid date
CPLC: ICFabricator=4790
ICType=D321
OperatingSystemID=4700
OperatingSystemReleaseDate=0000 (invalid date format)
OperatingSystemReleaseLevel=0000
ICFabricationDate=3180 (2023-06-29)
ICSerialNumber=05047420
ICBatchIdentifier=7515
ICModuleFabricator=0000
ICModulePackagingDate=0000 (invalid date format)
ICCManufacturer=0000
ICEmbeddingDate=0000 (invalid date format)
ICPrePersonalizer=031C
ICPrePersonalizationEquipmentDate=2A35 (invalid date format)
ICPrePersonalizationEquipmentID=30343734
ICPersonalizer=0000
ICPersonalizationDate=0000 (invalid date format)
ICPersonalizationEquipmentID=00000000
A>> T=1 (4+0000) 80CA0042 00
A<< (0000+2) (12ms) 6A88
[DEBUG] GPData - GET DATA(IIN): N/A
A>> T=1 (4+0000) 80CA0045 00
A<< (0000+2) (12ms) 6A88
[DEBUG] GPData - GET DATA(CIN): N/A
A>> T=1 (4+0000) 80CA00CF 00
A<< (0012+2) (12ms) CF0A00003180050474207515 9000
KDD: CF0A00003180050474207515
A>> T=1 (4+0000) 80CA00C1 00
A<< (0004+2) (12ms) C1020002 9000
SSC: C1020002
Card Data:
A>> T=1 (4+0000) 80CA0066 00
A<< (0079+2) (18ms) 664D734B06072A864886FC6B01600B06092A864886FC6B020203630906072A864886FC6B03640B06092A864886FC6B040255650D060B2A864886FC6B0507020000660C060A2B060104012A026E0103 9000
Tag 6: 1.2.840.114283.1
-> Global Platform card
Tag 60: 1.2.840.114283.2.2.3
-> GP Version: 2.3
Tag 63: 1.2.840.114283.3
-> GP card is uniquely identified by the Issuer Identification Number (IIN) and Card Image Number (CIN)
Tag 6: 1.2.840.114283.4.2.85
-> GP SCP02 (i=55)
Tag 66: 1.3.6.1.4.1.42.2.110.1.3
-> JavaCard v3
Card Capabilities:
A>> T=1 (4+0000) 80CA0067 00
A<< (0038+2) (15ms) 6724A0098001028104153555758103E5BEC082031E030083010284010285017B86010C87017B 9000
Supports SCP02 i=15 i=35 i=55 i=75
Supported DOM privileges: SecurityDomain, DAPVerification, DelegatedManagement, CardReset, MandatedDAPVerification, TrustedPath, TokenVerification, GlobalDelete, GlobalLock, GlobalRegistry, FinalApplication, ReceiptGeneration, CipheredLoadFileDataBlock
Supported APP privileges: CardLock, CardTerminate, CardReset, CVMManagement, FinalApplication, GlobalService
Supported LFDB hash: SHA-256
Supported Token Verification ciphers: RSA1024_SHA1, RSAPSS_SHA256, CMAC_AES128, CMAC_AES192, CMAC_AES256, ECCP256_SHA256
Supported Receipt Generation ciphers: DES_MAC, CMAC_AES128
Supported DAP Verification ciphers: RSA1024_SHA1, RSAPSS_SHA256, CMAC_AES128, CMAC_AES192, CMAC_AES256, ECCP256_SHA256
A>> T=1 (4+0000) 80CA00E0 00
A<< (0020+2) (15ms) E012C00401018010C00402018010C00403018010 9000
Version: 1 (0x01) ID: 1 (0x01) type: DES3 length: 16
Version: 1 (0x01) ID: 2 (0x02) type: DES3 length: 16
Version: 1 (0x01) ID: 3 (0x03) type: DES3 length: 16
# Warning: no keys given, defaulting to 404142434445464748494A4B4C4D4E4F
[INFO] GPSession - Using card master key(s) with version 0 for setting up session with MAC
A>> T=1 (4+0008) 80500000 08 BBC423ADD4DA51EF 00
A<< (0028+2) (45ms) 0000318005047420751501020002D9857D532F04216B21AF7993609B 9000
[DEBUG] GPSession - KDD: 00003180050474207515
[DEBUG] GPSession - SSC: 0002
[DEBUG] GPSession - Host challenge: BBC423ADD4DA51EF
[DEBUG] GPSession - Card challenge: 0002D9857D532F04
[DEBUG] GPSession - Card reports SCP02 with key version 1 (0x01)
[INFO] GPSession - Diversified card keys: ENC=404142434445464748494A4B4C4D4E4F (KCV: 8BAF47) MAC=404142434445464748494A4B4C4D4E4F (KCV: 8BAF47) DEK=404142434445464748494A4B4C4D4E4F (KCV: 8BAF47) for SCP02
[INFO] GPSession - Session keys: ENC=ADC1163BA2A147FBB84BF44C8676FB7D MAC=3E06B1C8FCFD788A573B9A9889D0CA50 RMAC=BC3FB634DEABB546AAEC2B630DF44180
[DEBUG] GPSession - Verified card cryptogram: 216B21AF7993609B
[DEBUG] GPSession - Calculated host cryptogram: 88A9A621EA87F702
A>> T=1 (4+0016) 84820100 10 88A9A621EA87F702AEDE93B751D14878 00
A<< (0000+2) (25ms) 9000
Error: Cannot invoke "String.startsWith(String)" because "s" is null
# SCardEndTransaction("ACS ACR 38U-CCID 00 00")
# SCardDisconnect("ACS ACR 38U-CCID 00 00", false) tx:81/rx:266 in 272ms
Additional context
Keys are each generated via uuidgen without dashes.
Meaning - each key is 32x [a-f0-9]
I have another card from another seller but the same ICFabricator.
They both had the same initial enc, mac and dek keys which I was provided by both seller.
Metadata
Metadata
Assignees
Labels
No labels