Correct key calculation for save as SR

This commit is contained in:
Eric Betts
2024-08-23 21:28:31 -07:00
parent fc157047e0
commit f65e802ddd
2 changed files with 7 additions and 0 deletions
+5
View File
@@ -12,6 +12,7 @@
static const char* seader_file_header = "Flipper Seader Credential";
static const uint32_t seader_file_version = 1;
extern const uint8_t picopass_iclass_key[];
SeaderCredential* seader_credential_alloc() {
SeaderCredential* seader_dev = malloc(sizeof(SeaderCredential));
@@ -394,6 +395,10 @@ bool seader_credential_save_picopass(SeaderCredential* cred, const char* name) {
bool use_load_path = true;
bool saved = false;
bool withSIO = cred->save_format == SeaderCredentialSaveFormatSR;
if(withSIO) {
loclass_iclass_calc_div_key(cred->diversifier, picopass_iclass_key, debit_key, false);
}
FlipperFormat* file = flipper_format_file_alloc(cred->storage);
FuriString* temp_str = furi_string_alloc();
+2
View File
@@ -5,6 +5,8 @@
#include <storage/storage.h>
#include <dialogs/dialogs.h>
#include "protocol/picopass_protocol.h"
#include <optimized_ikeys.h>
#include <optimized_cipher.h>
#define SEADER_CRED_NAME_MAX_LEN 22
#define SEADER_APP_EXTENSION ".credential"