From: "Austin S. Hemmelgarn" <ahferroin7@gmail.com>
To: Leonid Bloch <lbloch@janustech.com>,
"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Cc: "bo.li.liu@oracle.com" <bo.li.liu@oracle.com>
Subject: Re: Cryptographically verifying a btrfs subvolume
Date: Mon, 8 Apr 2019 10:22:43 -0400 [thread overview]
Message-ID: <04560ed0-9c98-1e61-b8f0-d035dc4b3a0f@gmail.com> (raw)
In-Reply-To: <15a6861e-3752-3c51-5c4f-59bebf19a235@janustech.com>
On 2019-04-08 09:30, Leonid Bloch wrote:
> On 4/8/19 3:44 PM, Austin S. Hemmelgarn wrote:
>> On 2019-04-08 07:27, Leonid Bloch wrote:
>>> Hi List,
>>>
>>> Can you suggest a way of cryptographically verifying the content of a
>>> btrfs subvolume, besides the naïve approach, of running a cryptographic
>>> hash function on the output of btrfs send?
>> Running BTRFS on top of dm-integrity and dm-crypt with them set up to
>> provide AEAD-style encryption comes to mind as an option, and would
>> actually provide a much higher level of verification than just verifying
>> the content of a subvolume (it will verify the entire filesystem).
>
> Thanks! That's actually a good point, I would like to verify a specific
> subvolume(s), while on others the content can change.
>
> That's a good point cause it shows that I was wrong assuming that btrfs
> scrub would help - it will scrub the entire filesystem as well, and
> compare checksums internally, which is not what I want - I want to
> compare to some external checksum. Sorry for the confusion there.
If your primary goal is to just verify that nobody has changed the
contents of the subvolume, then even hashing the send stream may be
problematic for your use case. Certain differences in the on-disk layout
of the data (which could be caused by deduplication or defragmentation)
result in changes in the send stream, but don't actually change anything
from the perspective of userspace. Similarly, the send stream protocol
has changed slightly over time in backwards compatible ways, and such
changes may happen again in the future, so even if the on-disk layout is
identical, the hash may visibly change.
next prev parent reply other threads:[~2019-04-08 14:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-08 11:27 Cryptographically verifying a btrfs subvolume Leonid Bloch
2019-04-08 12:44 ` Austin S. Hemmelgarn
2019-04-08 13:30 ` Leonid Bloch
2019-04-08 14:22 ` Austin S. Hemmelgarn [this message]
2019-04-08 13:10 ` Johannes Thumshirn
2019-04-08 13:49 ` Leonid Bloch
2019-04-08 13:55 ` Johannes Thumshirn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=04560ed0-9c98-1e61-b8f0-d035dc4b3a0f@gmail.com \
--to=ahferroin7@gmail.com \
--cc=bo.li.liu@oracle.com \
--cc=lbloch@janustech.com \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).