From nobody Wed May 26 18:48:31 2021 X-Original-To: freebsd-fs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id AC8DEC78557 for ; Wed, 26 May 2021 18:48:32 +0000 (UTC) (envelope-from mike@sentex.net) Received: from pyroxene2a.sentex.ca (pyroxene19.sentex.ca [IPv6:2607:f3e0:0:3::19]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "pyroxene.sentex.ca", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Fr0Mg4frzz4SK6 for ; Wed, 26 May 2021 18:48:31 +0000 (UTC) (envelope-from mike@sentex.net) Received: from [IPv6:2607:f3e0:0:4:d0cf:df57:8914:ba74] ([IPv6:2607:f3e0:0:4:d0cf:df57:8914:ba74]) by pyroxene2a.sentex.ca (8.16.1/8.15.2) with ESMTPS id 14QImUI5045047 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO) for ; Wed, 26 May 2021 14:48:30 -0400 (EDT) (envelope-from mike@sentex.net) To: freebsd-fs From: mike tancsa Subject: zfs load-key Message-ID: <886642a6-7b00-9dd7-6f81-e5c18bd9385b@sentex.net> Date: Wed, 26 May 2021 14:48:31 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.2 List-Id: Filesystems List-Archive: https://lists.freebsd.org/archives/freebsd-fs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-fs@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-Language: en-US X-Rspamd-Queue-Id: 4Fr0Mg4frzz4SK6 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of mike@sentex.net designates 2607:f3e0:0:3::19 as permitted sender) smtp.mailfrom=mike@sentex.net X-Spamd-Result: default: False [-1.94 / 15.00]; R_SPF_ALLOW(-0.20)[+ip6:2607:f3e0::/32]; HFILTER_HELO_IP_A(1.00)[pyroxene2a.sentex.ca]; HFILTER_HELO_NORES_A_OR_MX(0.30)[pyroxene2a.sentex.ca]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_DBL_DONT_QUERY_IPS(0.00)[2607:f3e0:0:3::19:from]; ASN(0.00)[asn:11647, ipnet:2607:f3e0::/32, country:CA]; R_DKIM_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.94)[-0.940]; FREEFALL_USER(0.00)[mike]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-fs@freebsd.org]; DMARC_NA(0.00)[sentex.net]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[2607:f3e0:0:3::19:from:127.0.2.255]; RCVD_IN_DNSWL_NONE(0.00)[2607:f3e0:0:3::19:from]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-fs] X-ThisMailContainsUnwantedMimeParts: N On my offsite backups, I generate a random 256bit key for my encrypted pools.=C2=A0 At bootup time, I have a key.bin.asc file on the unencrypted= data set which is gpg encrypted.=C2=A0 I grab that file, decode it on a different server and then scp it back to the machine so I can do a zfs load-key . If I store the unencrypted file on tmpfs, is it "safe"ish after I delete the unencrypted key file off the tmpfs mount ? I guess if the box is low on ram, it might move the contents to swap, but I can keep that off until I am done.=C2=A0 Are there any other angles= or is there a better way to do this if no one is physically on site at the time post reboot other than using a passphrase ? =C2=A0=C2=A0=C2=A0 ---Mike