From wully at bluewin.ch Mon Nov 3 09:35:19 2025 From: wully at bluewin.ch (wully) Date: Mon, 3 Nov 2025 18:35:19 +0100 Subject: [Pcsclite-muscle] Fwd: Question about RSA and ECC on smart cards In-Reply-To: <69acb85a-0a20-c227-b511-f14ad44935e9@bluewin.ch> References: <69acb85a-0a20-c227-b511-f14ad44935e9@bluewin.ch> Message-ID: Hi all I was in the muscle at lists.musclecard.com last time asking questions around 2017. So, I was sending my new request to the wrong list-address I hope, that I am now at the right address again. Thank you best regards wully -------- Forwarded Message -------- Subject: Question about RSA and ECC on smart cards Date: Mon, 3 Nov 2025 16:16:23 +0100 From: wully To: muscle at lists.musclecard.com Hi all Currently, I am working with ATOS-Cards cardosV5.3 which support ECDH-derivation. Since these cards have "plenty" of memory (about 90kByte), it would be interesting, to store not only keys, certificates etc. on the card, but also store somewhat larger data (e.g. 10 or more kB) on the card. But to transfer the data between the card and the host, it would be good to use an AES-Encryption where the key ist derived by ECDH-Method on the card. The generation of an AES-Key on my PC by using ECDH from the card works perfectly (using pkcs#11). I can encrypt testdata in PC-Memory by using C_Encrypt with the derived AES-Key and then decrypt the encrypteddata by using the AES-Key on the PC. So the basic mechanism works. But now I would like to use this secure "channel" between the card and the PC to transfer secret data stored on the Smartcard to the PC, so an eavesdropper on the USB can not decode the exchanged data. As far as I understand, the current PKCS#11-standard does not allow to encrypt a data object (CKA_VALUE) on the card directly by using a *handle* to this data. Since the ATOS-Cards are not Java-Cards, one can not use a Java-Applet on this card. Is there a possibility, to do this? The other direction would be similar: after establishing the secure "channel", secret data from the PC could be AES-ecrypted and sent over the channel to the card. But then, the data should be decrypted INSIDE the smartcard and then stored in a CKA_VALUE. That would be a wonderfull possibility. Any suggestions are welcome. wully From andreas.schwier at cardcontact.de Tue Nov 4 00:47:54 2025 From: andreas.schwier at cardcontact.de (Andreas Schwier) Date: Tue, 4 Nov 2025 09:47:54 +0100 Subject: [Pcsclite-muscle] Fwd: Question about RSA and ECC on smart cards In-Reply-To: References: <69acb85a-0a20-c227-b511-f14ad44935e9@bluewin.ch> Message-ID: <0d8f0265-83cd-4a06-84e1-f3d8939f202f@cardcontact.de> Hi Wully, I guess you are looking for the Chip Authentication protocol defined in BSI TR-03110. That does ECDH between the PC and the card to establish AES keys for secure messaging. It is the protocol used by passports and eID cards to protect data exchanged between the card and the terminal. I would assume that ATOS-Cards (CardOS) support that protocol, as they are used in some eID systems. But of course you will need some supporting PKI to perform Chip Authentication. The SmartCard-HSM has all this on-board already, as it is part of a larger Scheme-PKI. Andreas On 11/3/25 18:35, wully wrote: > Hi all > > I was in the muscle at lists.musclecard.com last time asking questions > around 2017. So, I was sending my new request to the wrong list-address > > I hope, that I am now at the right address again. > > Thank you > > best regards > wully > > > -------- Forwarded Message -------- > Subject: Question about RSA and ECC on smart cards > Date: Mon, 3 Nov 2025 16:16:23 +0100 > From: wully > To: muscle at lists.musclecard.com > > Hi all > > Currently, I am working with ATOS-Cards cardosV5.3 which support > ECDH-derivation. > > Since these cards have "plenty" of memory (about 90kByte), it would be > interesting, to store not only keys, certificates etc. on the card, but > also store somewhat larger data (e.g. 10 or more kB) on the card. But > to transfer the data between the card and the host, it would be good to > use an AES-Encryption where the key ist derived by ECDH-Method on the card. > > The generation of an AES-Key on my PC by using ECDH from the card works > perfectly (using pkcs#11). I can encrypt testdata in PC-Memory by using > C_Encrypt with the derived AES-Key and then decrypt the encrypteddata by > using the AES-Key on the PC. So the basic mechanism works. > > But now I would like to use this secure "channel" between the card and > the PC to transfer secret data stored on the Smartcard to the PC, so an > eavesdropper on the USB can not decode the exchanged data. > > As far as I understand, the current PKCS#11-standard does not allow to > encrypt a data object (CKA_VALUE) on the card directly by using a > *handle* to this data. Since the ATOS-Cards are not Java-Cards, one can > not use a Java-Applet on this card. > > Is there a possibility, to do this? > > The other direction would be similar: after establishing the secure > "channel", secret data from the PC could be AES-ecrypted and sent over > the channel to the card. But then, the data should be decrypted INSIDE > the smartcard and then stored in a CKA_VALUE. > > That would be a wonderfull possibility. > > Any suggestions are welcome. > > wully > > _______________________________________________ > pcsclite-muscle mailing list > pcsclite-muscle at lists.infradead.org > http://lists.infradead.org/mailman/listinfo/pcsclite-muscle -- --------- CardContact Systems GmbH |.##> <##.| Sch?lerweg 38 |# #| D-32429 Minden, Germany |# #| Phone +49 571 56149 |'##> <##'| http://www.cardcontact.de --------- Registergericht Bad Oeynhausen HRB 14880 Gesch?ftsf?hrer Andreas Schwier From godfreyhkchung at gmail.com Thu Nov 20 01:34:27 2025 From: godfreyhkchung at gmail.com (Godfrey Chung) Date: Thu, 20 Nov 2025 17:34:27 +0800 Subject: [Pcsclite-muscle] acsccid 1.1.13 Released Message-ID: Dear All I would like to inform you that acsccid 1.1.13 had been released. v1.1.13 (13/11/2025) - Add the following readers support: ACR1255U-J1 BL - Fix a status change issue for the first SAM slot on ACR1281U-C6. - Fix the incorrect bMaxSlotIndex value for ACR1255U-J1 BL. - Simplify comments related to the fix for incorrect bMaxSlotIndex value. - Merge with ccid 1.5.3. - Disable USB-persist for CCID devices. - Merge with ccid 1.7.0. - Give pcscd group permission to CCID devices in udev rule. - Add STATUS_INSUFFICIENT_BUFFER to status_t in defs.h. - Return IFD_ERROR_INSUFFICIENT_BUFFER from CHECK_STATUS(). - Save Bulk IN endpoint's wMaxPacketSize in get_end_points(). - Avoid USB overflow by using a multiple of the packet size in ReadUSB(). - Allow IFD_ERROR_INSUFFICIENT_BUFFER in CreateChannelByNameOrChannel(). - Enable SAM slot with ICC absent for ACR39 FW_Upgrade. - Rename _usbDevice.bulkOutMaxPacketSize to bulk_out_max_packet_size. Please download it from https://acsccid.sourceforge.io/. Regards Godfrey