Hi @kerti1
1. When generating a key, NVM key slot must be empty. The generation will not be successful, if the key was already generated in the slot.
If you want to update internally generated key, it can be done via the key import service.
2. There are two options:
a) Use some communication interface in production to provide the keys for import.
b) Force the keys to some separate segment in flash memory. Once the keys are imported, erase the memory segment.
Regards,
Lukas