Embedded SDK
Embedded SDK
Loading...
Searching...
No Matches
identity_edit_identifier.c File Reference

Edit Identifier flow (P1=0x03, struct type 0x31) More...

#include <string.h>
#include "os_apdu.h"
#include "status_words.h"
#include "tlv_library.h"
#include "buffer.h"
#include "bip32.h"
#include "address_book.h"
#include "address_book_entrypoints.h"
#include "address_book_crypto.h"
#include "address_book_common.h"
#include "identity.h"
#include "io.h"
#include "nbgl_use_case.h"
Include dependency graph for identity_edit_identifier.c:

Go to the source code of this file.

Detailed Description

Edit Identifier flow (P1=0x03, struct type 0x31)

Allows changing the IDENTIFIER of an existing Identity contact while keeping the same contact_name and scope.

Flow:

  1. Receive fully assembled payload (multi-chunk reassembly handled by address_book.c)
  2. Parse TLV payload (contact_name + scope + new_identifier + old_identifier + gid + derivation_path + hmac_proof + hmac_rest)
  3. Verify HMAC_PROOF over (gid, contact_name)
  4. Verify HMAC_REST over (gid, scope, old_identifier, family[, chain_id])
  5. Coin-app notification: handle_check_edit_identifier()
  6. Display UI: contact name, old identifier → new identifier
  7. On confirm: compute new HMAC_REST over (gid, scope, new_identifier, family[, chain_id]) and send to host

Active under HAVE_ADDRESS_BOOK.

Definition in file identity_edit_identifier.c.