Skip to content

Commit

Permalink
Fix key number error when diversifying
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaspre authored Nov 22, 2022
1 parent 0e036a6 commit 727a363
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ bool CreateGallagherAppWithAID(uint32_t cardId, uint16_t facilityId, uint8_t iss

uint8_t nextKeyVersion = ReadKeyVersion(SelectedApp.Slot, 2) + 1;
WriteAppKey(SelectedApp.Slot, 2, GallAppKeyTwo, CRYPTO_AES_KEY_SIZE);
WriteKeyVersion(SelectedApp.Slot, 0, nextKeyVersion);
WriteKeyCryptoType(SelectedApp.Slot, 0, CRYPTO_TYPE_AES128);
WriteKeyVersion(SelectedApp.Slot, 2, nextKeyVersion);
WriteKeyCryptoType(SelectedApp.Slot, 2, CRYPTO_TYPE_AES128);

//Diversify and change key 0
uint8_t GallAppKeyZero[CRYPTO_AES_KEY_SIZE];
Expand Down

0 comments on commit 727a363

Please sign in to comment.