Skip to contentSkip to conversation

tools: add decrypt-profile tool

PATCH In review James Prestwood 2 participants 3 messages Feb 16, 2022 Kbuild

lore
Share & tools
lore

James Prestwood

author
#0 lore raw

PATCH 1/2 tools: add decrypt-profile tool

This tool will decrypt an IWD network profile which was previously encrypted using a systemd provided key. Either a text passphrase can be provided (--pass) or a file containing the secret (--file).

This can be useful for debugging, or recovering an encrypted profile after enabling SystemdEncrypt.

---
 Makefile.am                 |   8 +-
 tools/iwd-decrypt-profile.c | 213 ++++++++++++++++++++++++++++++++++++
 2 files changed, 220 insertions(+), 1 deletion(-)
 create mode 100644 tools/iwd-decrypt-profile.c

Following up after the core changes were merged. The --ssid option was changed to --name to be consitent with the internal usage where either the SSID or hotspot network name can be passed.

Makefile.am +7 -1
index 35938d22..a0e54594 100644
@@ -362,7 +362,7 @@ man_MANS += wired/ead.8
 endif
 endif
 
-noinst_PROGRAMS += tools/probe-req
+noinst_PROGRAMS += tools/probe-req tools/iwd-decrypt-profile
 
 tools_probe_req_SOURCES = tools/probe-req.c src/mpdu.h src/mpdu.c \
 					src/ie.h src/ie.c \
@@ -372,6 +372,12 @@ tools_probe_req_SOURCES = tools/probe-req.c src/mpdu.h src/mpdu.c \
 					src/band.h src/band.c
 tools_probe_req_LDADD = $(ell_ldadd)
 
+tools_iwd_decrypt_profile_SOURCES = tools/iwd-decrypt-profile.c \
+					src/common.h src/common.c \
+					src/crypto.h src/crypto.c \
+					src/storage.h src/storage.c
+tools_iwd_decrypt_profile_LDADD = ${ell_ldadd}
+
 if HWSIM
 bin_PROGRAMS += tools/hwsim
 
tools/iwd-decrypt-profile.c new file +213 -0

213 lines not on this page · raw message

Signature · 1 line
2.34.1
author
#1 lore raw

PATCH 2/2 doc: Add warning to SystemdEncrypt as highly experimental

---
 src/iwd.config.rst | 2 ++
 1 file changed, 2 insertions(+)
src/iwd.config.rst +2 -0
index d64bf5c2..f0bb020d 100644
@@ -189,6 +189,8 @@ The group ``[General]`` contains general settings.
        be disabled here.
 
    * - SystemdEncrypt
+
+       **Warning: This is a highly experimental feature**
      - Value: Systemd key ID
 
        Enables network profile encryption using a systemd provided secret key.
Signature · 1 line
2.34.1
#2 lore raw
In reply to James Prestwood

Hi James,

Quoted 4 lines · James Prestwood

This tool will decrypt an IWD network profile which was previously encrypted using a systemd provided key. Either a text passphrase can be provided (--pass) or a file containing the secret (--file).

Quoted 8 lines

This can be useful for debugging, or recovering an encrypted profile after enabling SystemdEncrypt.

---
  Makefile.am                 |   8 +-
  tools/iwd-decrypt-profile.c | 213 ++++++++++++++++++++++++++++++++++++
  2 files changed, 220 insertions(+), 1 deletion(-)

create mode 100644 tools/iwd-decrypt-profile.c

Both applied, thanks.

Regards,
-Denis