Skip to content

Commit 79af66e

Browse files
sangbidarustyrussell
authored andcommitted
common: add unified HSM secret handling module
This is a newer API to replace hsm_encryption.c and hsm_encryption.c, this tidies up the API to be used and also cleans things up to support our new formts. Our hsm_secret formats now include: - Legacy 32-byte plain format - Legacy 73-byte encrypted format - New mnemonic format without passphrase (32 zero bytes + mnemonic) - New mnemonic format with passphrase (32-byte hash + mnemonic) This commit includes support to detect the format based on the file size and content structure. The hsm will store mnemonics in the hsm_secret file as: `passphraseHash`mnemonic`
1 parent c50bd38 commit 79af66e

File tree

3 files changed

+616
-0
lines changed

3 files changed

+616
-0
lines changed

common/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ COMMON_SRC_NOGEN := \
4646
common/hmac.c \
4747
common/hsm_capable.c \
4848
common/hsm_encryption.c \
49+
common/hsm_secret.c \
4950
common/htlc_state.c \
5051
common/htlc_trim.c \
5152
common/htlc_tx.c \

0 commit comments

Comments
 (0)