From 9f917865c4a64b99f6ad43fd4832fa4ae28e9129 Mon Sep 17 00:00:00 2001 From: Charles-Edouard de la Vergne Date: Fri, 1 Mar 2024 18:39:40 +0100 Subject: [PATCH] Add curve secp256K1 --- README.md | 4 ++-- doc/user/app-openpgp.pdf | Bin 1217826 -> 1217897 bytes doc/user/app-openpgp.rst | 5 +++-- src/gpg_init.c | 37 +++++++++++++++---------------------- 4 files changed, 20 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 7e348e7..5c5a959 100644 --- a/README.md +++ b/README.md @@ -12,9 +12,9 @@ This specification is available in *doc* directory and at Ol;e>ZQJ<%x4y;Q+^SorepSz+7ri)j zy8G!5$zo z(mdL~VSLtvMt)&KVnQ#B`rDSCoaMa4Lyc0a1UFV8b}2OQjZbDoiZwm-H(`)vz&DC8 ztsT6(gERqBpRr*X<-^{Pl3yKfXSF3WxPOr3Yd1uYJXSI0`0wj?en$9!pS{5Qn-+JW zrS<%WHPIxa;3qlS;XD~|C!n#Rt)F;OK==_qen(_w&WQP^*u|#IVIacBa~;&zm;c}= zGTj@F-)ABGkzpL#nIf0NkL-gKiITqhyni0z%?&&odvi8bXoB&$7vpg+*ktx&T;`%k zvr-G!O3s)4Ev_DwF+s&_J0_|-*|XN@`l37r0Wga*i{XCZKxL>s6ez{5RF#GO4LL}z zJV#6r7( z54;B{e@Sd~YL@%ELxkWeD8sx=0h)*-t^~s6d!I=E$k07gXYZwN4sM%9DlRV6`^L{Z zD}02vANxEM_g2zbC!qQdlHcSdHwi5EUrrE;s5-cmA!o7@<9#AZ=S#_nsp1tTPRN z9wlIw=!+dT7?2h@pK|FaH6`=(W~K7croMK|CnXbZ+_`hdw-a7TAID*GDl_^Q!%wO@ zXP@Su<;J_3EAY=iTA>e<3Zgk_Cz?FkY$xWyy{D~TA*%f0d5}e#{KGL3^Tq(G6Zqku zoHH9UcKE2cLr$I-h$g! zV9w@QlF4P~e9^ZJK~IM691dd0ZBtq=#s!L%m}WV_D8SIh%2?=~G4C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U9Z^DCVW=Yd50o@8 zqFj}}PZJiL(i?H}cU9IoD3k&YS9yZ*RA`K9G9Xnp-Uc9B{rQL=ol*VyVJ|*e<#1F} zaIEpN-5RY^)l;ahT)8aBS!NZs4Cqpsm$Ak17gx??kL5QY_^~q$8gGS{%cWy_kPY(9 zrDj^y*z4bfB+Q_?9rJ~(38<*Qr^b>``Zb)4A$dt&KhK@-YJlMD9Bs^vc3PHM=nz-O z%{Xvkl~HINm&NUJLiM-MEH09p^yCakrXT0Vy>KiAWNZjO6{N=MxD$ItUIY><0|isj Rh~Zc{IpHWM#1$pr{y%AxYO4SM diff --git a/doc/user/app-openpgp.rst b/doc/user/app-openpgp.rst index b1a5f13..d665220 100644 --- a/doc/user/app-openpgp.rst +++ b/doc/user/app-openpgp.rst @@ -51,9 +51,9 @@ This specification is available in doc directory at [G10CODE]_. The application supports: - RSA with key up to 3072 bits -- ECDSA with secp256R1 +- ECDSA with secp256R1 and secp256K1 - EDDSA with Ed25519 curve -- ECDH with secp256R1 and curve25519 curves +- ECDH with secp256R1, secp256K1 and curve25519 curves This release has known missing parts (see also [GPGADD]_): @@ -290,6 +290,7 @@ This 3 commands fix, in that order, the template for Signature, Decryption, Auth Supported curve name are: - secp256k1 with tag 19 +- secp256r1 with tag 19 - nistp256 with tag 19 - cv25519 (only for key 2) - ed25519 with tag 22 (only for key 1 and 3) diff --git a/src/gpg_init.c b/src/gpg_init.c index 1cd4185..45b3482 100644 --- a/src/gpg_init.c +++ b/src/gpg_init.c @@ -40,12 +40,9 @@ const unsigned char C_OID_SECP384R1[5] = { const unsigned char C_OID_SECP521R1[5] = { 0x2B, 0x81, 0x04, 0x00, 0x23 }; - -//secp256k1: 1.3.132.0.10 -const unsigned char C_OID_SECP256K1[5] = { - 0x2B, 0x81, 0x04, 0x00, 0x0A -}; */ +// secp256k1: 1.3.132.0.10 +const unsigned char C_OID_SECP256K1[5] = {0x2B, 0x81, 0x04, 0x00, 0x0A}; /* //brainpool 256t1: 1.3.36.3.3.2.8.1.1.8 @@ -97,20 +94,23 @@ unsigned int gpg_oid2curve(unsigned char *oid, unsigned int len) { if ((len == sizeof(C_OID_SECP256R1)) && (memcmp(oid, C_OID_SECP256R1, len) == 0)) { return CX_CURVE_SECP256R1; } - /* - if ( (len == sizeof(C_OID_SECP256K1)) && (memcmp(oid, C_OID_SECP256K1, len)==0) ) { - return CX_CURVE_SECP256K1; - } + if ((len == sizeof(C_OID_SECP256K1)) && (memcmp(oid, C_OID_SECP256K1, len) == 0)) { + return CX_CURVE_SECP256K1; + } + /* if ( (len == sizeof(C_OID_SECP384R1)) && (memcmp(oid, C_OID_SECP384R1, len)==0) ) { return CX_CURVE_SECP384R1; } if ( (len == sizeof(C_OID_SECP521R1)) && (memcmp(oid, C_OID_SECP521R1, len)==0) ) { return CX_CURVE_SECP521R1; } - */ + */ /* + if ( (len == sizeof(C_OID_BRAINPOOL256T1)) && (memcmp(oid, C_OID_BRAINPOOL256T1, len)==0) ) { + return CX_CURVE_BrainPoolP256T1; + } if ( (len == sizeof(C_OID_BRAINPOOL256R1)) && (memcmp(oid, C_OID_BRAINPOOL256R1, len)==0) ) { return CX_CURVE_BrainPoolP256R1; } @@ -120,7 +120,7 @@ unsigned int gpg_oid2curve(unsigned char *oid, unsigned int len) { if ( (len == sizeof(C_OID_BRAINPOOL512R1)) && (memcmp(oid, C_OID_BRAINPOOL512R1, len)==0) ) { return CX_CURVE_BrainPoolP512R1; } - */ + */ if ((len == sizeof(C_OID_Ed25519)) && (memcmp(oid, C_OID_Ed25519, len) == 0)) { return CX_CURVE_Ed25519; } @@ -129,14 +129,6 @@ unsigned int gpg_oid2curve(unsigned char *oid, unsigned int len) { return CX_CURVE_Curve25519; } - /* - if ( (len == sizeof(C_OID_SECP256K1)) && (memcmp(oid, C_OID_SECP256K1, len)==0) ) { - return CX_CURVE_256K1; - } - if ( (len == sizeof(C_OID_BRAINPOOL256T1)) && (memcmp(oid, C_OID_BRAINPOOL256T1, len)==0) ) { - return CX_CURVE_BrainPoolP256T1; - } - */ return CX_CURVE_NONE; } @@ -146,11 +138,11 @@ unsigned char *gpg_curve2oid(unsigned int cv, unsigned int *len) { *len = sizeof(C_OID_SECP256R1); return (unsigned char *) PIC(C_OID_SECP256R1); - /* case CX_CURVE_SECP256K1: - *len = sizeof(C_OID_SECP256K1); - return (unsigned char*)PIC(C_OID_SECP256K1); + *len = sizeof(C_OID_SECP256K1); + return (unsigned char *) PIC(C_OID_SECP256K1); + /* case CX_CURVE_SECP384R1: *len = sizeof(C_OID_SECP384R1); return (unsigned char*)PIC(C_OID_SECP384R1); @@ -188,6 +180,7 @@ unsigned char *gpg_curve2oid(unsigned int cv, unsigned int *len) { unsigned int gpg_curve2domainlen(unsigned int cv) { switch (cv) { + case CX_CURVE_SECP256K1: case CX_CURVE_SECP256R1: case CX_CURVE_Ed25519: case CX_CURVE_Curve25519: