Encrypt Wallet to Namespace Key
Procedure for importing an arbitrary secret (raw key, mnemonic, state secrets) into a Namespace.
Requirements
-
- It can be on an SD card or accessed online
Procedure
-
Access machine which has the secret that should be encrypted available
- If not on a computer, but a hardware wallet or otherwise, perform the steps on a air-gapped machine
-
Encrypt the secret to certificate:
sq encrypt --without-signature --for-file <certificate> <file_to_encrypt> --output encrypted.asc
-
Once encrypted, name the file appropriately and add it to an
artifacts/directory in the appropriate namespace subdirectory in thevaultsrepository -
Connect SD card to online linux workstation
-
Look for the SD card device name (
<device_name>) in the output of thelsblkcommand. It will typically be listed as/dev/sdXor/dev/mmcblk<num>, where X is a letter (e.g.,/dev/sdb,/dev/sdc). You can identify it by its size or by checking if it has a partition (like/dev/sdX1)- Mount the device using:
sudo mount /dev/<device_name> /media
- Mount the device using:
-
If the
~/trove/repository already exists, ensure it doesn't have any changes that haven't been committed, then remove it usingsudo rm -rf ~/trovebefore re-running the previous step -
Copy the repository with updated files to an online linux workstation, sign, commit and push to the
vaultsrepository:$ cp -r /media/trove ~/trove/ $ cd ~/trove $ git add . $ git commit -S -m "<message>" $ git push origin HEAD