OpenSC / OpenSC

Open source smart card tools and middleware. PKCS#11/MiniDriver/Tokend
https://github.com/OpenSC/OpenSC/wiki
GNU Lesser General Public License v2.1
2.57k stars 733 forks source link

Add full ECC Support for D-Trust Card 4.1/4.4 #3248

Open hamarituc opened 3 weeks ago

hamarituc commented 3 weeks ago

This PR adds support for ECDSA signatures and ECDH key agreement for D-Trust Signatures Cards 4.1/4.4 issued by the german Bundesdruckerei.

This PR supersedes #3240. But since @frankmorgner already reviewed that PR I wouldn't like to amend it afterwards. Feel free to continue reviewing #3240 and to postpone this one or just to review this PR instead. I am unsure which way do you prefer. Sorry the noise in case you preferred just amending an already reviewed PR.

Tested on:

Checklist
frankmorgner commented 1 week ago

Also, the linter doesn't seem to like the extra empty line:

diff --git a/src/libopensc/iso7816.c b/src/libopensc/iso7816.c
index 30cebb4..e17549c 100644
--- a/src/libopensc/iso7816.c
+++ b/src/libopensc/iso7816.c
@@ -30,7 +30,6 @@
 #include "iso7816.h"
 #include "sm/sm-iso.h"

-
 void
 iso7816_fixup_transceive_length(const struct sc_card *card,
        struct sc_apdu *apdu)