# Backup Feature The user can do a "full backup" of a Coldcard to external SD card. Simply choose the option from the menu and the Coldcard will pick a strong password for you and display it. The file we create is a [standard 7z archive](https://en.wikipedia.org/wiki/7z) with AES-256 encryption, in CBC mode. The 256-bit key is a SHA256 hash of a passphrase, hashed in a particular way to support 7z compatibility. We know the passphrase has at least 128-bits of entropy because the Coldcard uses its true random number generator (TRNG) to pick it. Once decrypted, which is possible using any 7z archive tool, the contents are a simple text file with everything you could need to access your funds, in an emergency, using another wallet system. Restoring the backup file onto a replacement Coldcard is a simple process that merely requires entering the 12 words. ## Is it secure? We use AES-256 encryption, wrapped in a [7z archive](https://en.wikipedia.org/wiki/7z). The passphrase is chosen at random, as 12 words from the BIP39 word list. This gives effectively 132 bits of security without any key stretching. The 7z file format adds a 16-byte salt and random 16-byte IV (initialization vector), plus a few tens of thousands of rounds of key stretching. We are not relying on that however, because of the long key itself (128-bits). ## Proving It Works Because we are using a standard file format, you can verify the process and that the data is in fact encrypted. Any 7z tool that supports AES256-SHA256 encryption should be able to read the files we make. Take the 12 words and put them together with a single space between each word (all lowercase). The decoded archive will contain a single file, which is a simple text file and easy to read. Before version 4.0.0, this text file was always called `ckcc-backup.txt`, but the filename is now picked randomly. ## BIP39 Passphrase If BIP39 passphrase is active the default behavior is to back-up main wallet - not BIP39 passphrase wallet. From version `5.2.0` users can choose to back-up also BIP39 passphrase wallet. ## Ephemeral Seeds If ephemeral seed is active the default behavior is to always back-up ephemeral wallet instead of the main wallet. ## Limitations - The archive file names are not encrypted. You can see there is a single text file `word(number).txt` in the encrypted file without decrypting it. - The device PIN code is not preserved during backup. - We produce standards-compliant files, but do not support reading any file except the ones produced by Coldcard. - Do not attempt to edit the file and restore it onto a Coldcard. - You cannot construct a file for the Coldcard to read because we implement only enough to support reading files that we know that we've produced. - There is limited plausible deniability here: if you are forced to decrypt the file, it is clearly a Coldcard backup file. ## Example File ### Encrypted File ``` % hd backup.7z 00000000 37 7a bc af 27 1c 00 03 46 de 5e ba 30 02 00 00 |7z..'...F.^.0...| 00000010 00 00 00 00 6e 00 00 00 00 00 00 00 e0 5c a0 0e |....n........\..| 00000020 68 1a 57 0a ed 5b 77 89 ea 4a 84 72 d4 75 d6 bd |h.W..[w..J.r.u..| 00000030 45 13 fc 6a 66 34 47 30 1e c8 08 8e bc 4f 4f 4d |E..jf4G0.....OOM| 00000040 1d a4 fc 93 2e 08 ff 28 a4 71 cd f7 fe 48 35 69 |.......(.q...H5i| 00000050 3a 6b c8 eb e4 90 6c f5 24 12 55 40 bb 20 59 e5 |:k....l.$.U@. Y.| 00000060 ae d5 62 7b cd 27 b6 4c 15 f5 cf 68 6c e9 30 87 |..b{.'.L...hl.0.| 00000070 96 dd 1d d1 98 e5 e3 cf ce b3 81 47 f3 7a 14 b8 |...........G.z..| 00000080 c1 f2 48 55 69 09 3f aa a5 7e 9f 3c 59 a9 c1 b6 |..HUi.?..~.