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

Edit Scope flow (P1=0x04, struct type 0x32) 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_scope.c:

Go to the source code of this file.

Detailed Description

Edit Scope flow (P1=0x04, struct type 0x32)

Allows changing the SCOPE of an existing Identity contact while keeping the same contact_name and identifier.

Flow:

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

Active under HAVE_ADDRESS_BOOK.

Definition in file identity_edit_scope.c.