From fd3b7413c3633654fa66d18f686d5ea9f5844128 Mon Sep 17 00:00:00 2001 From: merlokk <807634+merlokk@users.noreply.github.com> Date: Fri, 4 Feb 2022 01:15:40 +0200 Subject: [PATCH] some info --- client/src/cipurse/cipursecore.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/client/src/cipurse/cipursecore.c b/client/src/cipurse/cipursecore.c index 61851505e..fe790602c 100644 --- a/client/src/cipurse/cipursecore.c +++ b/client/src/cipurse/cipursecore.c @@ -352,12 +352,20 @@ void CIPURSEPrintFileDescriptor(uint8_t desc) { PrintAndLogEx(INFO, "Unknown file 0x%02x", desc); } +static void CIPURSEPrintKeySecurityAttributes(uint8_t attr) { + PrintAndLogEx(INFO, "Update right: %s", (attr & 0x01) ? "self" : "any"); + PrintAndLogEx(INFO, "Change key and rights: %s", (attr & 0x02) ? "ok" : "frozen"); + PrintAndLogEx(INFO, "Use as key encryption key: %s", (attr & 0x04) ? "blocked" : "ok"); + PrintAndLogEx(INFO, "Key validity: %s", (attr & 0x80) ? "invalid" : "valid"); +} + static void CIPURSEPrintKeyAttrib(uint8_t *attr) { PrintAndLogEx(INFO, "--- " _CYAN_("Key Attributes") "---------------------"); PrintAndLogEx(INFO, "Additional info... 0x%02x", attr[0]); PrintAndLogEx(INFO, "Key length........ %d", attr[1]); - PrintAndLogEx(INFO, "Algorithm ID...... 0x%02x", attr[2]); + PrintAndLogEx(INFO, "Algorithm ID...... 0x%02x (%s)", attr[2], (attr[2] == 0x09) ? "AES" : "unknown"); PrintAndLogEx(INFO, "Security attr..... 0x%02x", attr[3]); + CIPURSEPrintKeySecurityAttributes(attr[3]); PrintAndLogEx(INFO, "KVV............... 0x%02x%02x%02x", attr[4], attr[5], attr[6]); PrintAndLogEx(NORMAL, ""); }