# Developer identity backups

**URL:** <https://forum.dfinity.org/t/developer-identity-backups/14846>\
**Category:** Command Line Tools\
**Created:** [August 13, 2022, 6:15am UTC](https://forum.dfinity.org/t/developer-identity-backups/14846 "2022-08-13T06:15:31Z")\
**Posts on this page:** 8\
**Page:** 2

<div class="post-metadata">

**Author:** ![Vivienne](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/vivienne/32/29170_2.png) [@Vivienne](https://forum.dfinity.org/u/Vivienne)\
**Post date:** [February 21, 2023, 9:13am UTC](https://forum.dfinity.org/t/developer-identity-backups/14846/21 "2023-02-21T09:13:13Z")

</div>

Documenting it properly is scheduled for this sprint and I’ll add to the ticket to update this thread. Please ping me again if there’s no activity for a week on this.

---

<div class="post-metadata">

**Author:** ![muharem](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/muharem/32/6577_2.png) [@muharem](https://forum.dfinity.org/u/muharem)\
**Post date:** [February 21, 2023, 9:29am UTC](https://forum.dfinity.org/t/developer-identity-backups/14846/22 "2023-02-21T09:29:46Z")

</div>

Thank you! That’s great 🙂

---

<div class="post-metadata">

**Author:** ![muharem](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/muharem/32/6577_2.png) [@muharem](https://forum.dfinity.org/u/muharem)\
**Post date:** [April 19, 2023, 10:58am UTC](https://forum.dfinity.org/t/developer-identity-backups/14846/23 "2023-04-19T10:58:08Z")

</div>

Hello! Any news on this?

---

<div class="post-metadata">

**Author:** ![Vivienne](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/vivienne/32/29170_2.png) [@Vivienne](https://forum.dfinity.org/u/Vivienne)\
**Post date:** [April 19, 2023, 12:29pm UTC](https://forum.dfinity.org/t/developer-identity-backups/14846/24 "2023-04-19T12:29:03Z")

</div>

Hey! I see there was some work done in that regard, but I can’t find the results. Let me ping some folks…

---

<div class="post-metadata">

**Author:** ![AdamS](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/adams/32/5248_2.png) [@AdamS](https://forum.dfinity.org/u/AdamS)\
**Post date:** [April 19, 2023, 6:22pm UTC](https://forum.dfinity.org/t/developer-identity-backups/14846/25 "2023-04-19T18:22:41Z")

</div>

There was a mixup with the ticket - what was documented was the HSM support in _quill_, rather than dfx. I will try to rectify that, but in the meantime, the short version is that dfx supports P-256 keys on PIV HSMs, for which you’d have to configure the key ahead of time through a different application (e.g. Yubikey Manager) and install a PKCS#11 module such as OpenSC or Yubikey’s YKCS11. The two HSM parameters to `dfx identity new` are the path to the module, and the ID of the key (Yubico documents their key IDs [here](https://developers.yubico.com/yubico-piv-tool/YKCS11/#_key_mapping)); then commands passed `--identity <hsm identity>` receive the HSM’s PIN via the `DFX_HSM_PIN` environment variable.

So you might say

```sh
yubico-piv-tool -a generate -a verify-pin -a selfsign -a import-certificate -s 9c -k -A ECCP256 -S /CN=muharem/
dfx identity new hsm --hsm-key-id 02 --hsm-pkcs11-lib-path /usr/local/lib/libykcs11.so
DFX_HSM_PIN=123456 dfx identity get-principal --identity hsm

```

(the GUI is a lot simpler than the first command)

---

<div class="post-metadata">

**Author:** ![muharem](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/muharem/32/6577_2.png) [@muharem](https://forum.dfinity.org/u/muharem)\
**Post date:** [June 19, 2023, 12:42pm UTC](https://forum.dfinity.org/t/developer-identity-backups/14846/26 "2023-06-19T12:42:51Z")

</div>

Thank you! Please let me know if there is more documentation that was added somewhere.

---

<div class="post-metadata">

**Author:** ![let4be](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/let4be/32/25128_2.png) [@let4be](https://forum.dfinity.org/u/let4be)\
**Post date:** [September 19, 2025, 10:09am UTC](https://forum.dfinity.org/t/developer-identity-backups/14846/27 "2025-09-19T10:09:07Z")

</div>

> [@AdamS](#):
>
> `/usr/local/lib/libykcs11.so`

Hey, sorry for bothering

I installed yubico-piv-tool but cannot find /usr/local/lib/libykcs11.so anywhere on my system

How do I use yubikey with dfx?

---

<div class="post-metadata">

**Author:** ![AdamS](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/adams/32/5248_2.png) [@AdamS](https://forum.dfinity.org/u/AdamS)\
**Post date:** [October 6, 2025, 1:32pm UTC](https://forum.dfinity.org/t/developer-identity-backups/14846/28 "2025-10-06T13:32:53Z")

</div>

This was written for x64 macs. On my M4, it is now `/opt/homebrew/lib/libykcs11.dylib`, and it may be a third different thing on your particular OS / package manager combination.

[Previous page](https://forum.dfinity.org/t/developer-identity-backups/14846.md?page=1)
