From 978dde98a976bac379b98aa21af31664da57ee52 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Tue, 31 Mar 2020 08:06:45 +0200 Subject: [PATCH 1/2] added more sigs --- client/mifare/ndef.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/client/mifare/ndef.c b/client/mifare/ndef.c index 392a550af..e359e03fa 100644 --- a/client/mifare/ndef.c +++ b/client/mifare/ndef.c @@ -32,16 +32,24 @@ static const char *TypeNameFormat_s[] = { static const char *ndefSigType_s[] = { "Not present", // No signature present - "RSASSA_PSS_SHA_1", // PKCS_1 - "RSASSA_PKCS1_v1_5_WITH_SHA_1", // PKCS_1 - "DSA", - "ECDSA", + "RSASSA_PSS_SHA_1 (1024)", // PKCS_1 + "RSASSA_PKCS1_v1_5_WITH_SHA_1 (1024)", // PKCS_1 + "DSA-1024", + "ECDSA-P192", + "RSASSA-PSS-2048", + "RSASSA-PKCS1-v1_5-2048", + "DSA-2048", + "ECDSA-P224", + "ECDSA-K233", + "ECDSA-B233", + "ECDSA-P256", "n/a" + }; static const char *ndefCertificateFormat_s[] = { "X_509", - "X9_68", + "X9_68 (M2M)", "n/a" }; From e13a25902fcb50fc7fb6e0344addde1c497981f0 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Tue, 31 Mar 2020 08:11:27 +0200 Subject: [PATCH 2/2] added more sigs --- client/mifare/ndef.c | 2 +- client/mifare/ndef.h | 17 ++++++++++++----- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/client/mifare/ndef.c b/client/mifare/ndef.c index e359e03fa..df8264330 100644 --- a/client/mifare/ndef.c +++ b/client/mifare/ndef.c @@ -177,7 +177,7 @@ static int ndefDecodeSig(uint8_t *sig, size_t siglen) { size_t intsiglen = (sig[indx + 1] << 8) + sig[indx + 2]; // ecdsa 0x04 - if (sigType == stECDSA) { + if (sigType == stECDSA_P192) { indx += 3; PrintAndLogEx(NORMAL, "\tsignature [%zu]: %s", intsiglen, sprint_hex_inrow(&sig[indx], intsiglen)); diff --git a/client/mifare/ndef.h b/client/mifare/ndef.h index 7d9ca2fbf..71afda2ee 100644 --- a/client/mifare/ndef.h +++ b/client/mifare/ndef.h @@ -24,12 +24,19 @@ typedef enum { } TypeNameFormat_t; typedef enum { - stNotPresent = 0x00, - stRSASSA_PSS_SHA_1 = 0x01, + stNotPresent = 0x00, + stRSASSA_PSS_SHA_1 = 0x01, stRSASSA_PKCS1_v1_5_WITH_SHA_1 = 0x02, - stDSA = 0x03, - stECDSA = 0x04, - stNA = 0x05 + stDSA_1024 = 0x03, + stECDSA_P192 = 0x04, + stRSASSA_PSS_2048 = 0x05, + stRSASSA_PKCS1_v1_5_2048 = 0x06, + stDSA_2048 = 0x07, + stECDSA_P224 = 0x08, + stECDSA_K233 = 0x09, + stECDSA_B233 = 0x0a, + stECDSA_P256 = 0x0b, + stNA = 0x0c } ndefSigType_t; typedef enum {