Re: Disk/Partition level encryption.
From: Pawel Jakub Dawidek (pjd_at_FreeBSD.org)
Date: 03/31/05
- Next message: Paul Rubin: "Re: Disk/Partition level encryption."
- Previous message: Antti Louko: "Idea for a slow block cipher with adjustable block length"
- In reply to: Tom St Denis: "Re: Disk/Partition level encryption."
- Next in thread: Paul Rubin: "Re: Disk/Partition level encryption."
- Reply: Paul Rubin: "Re: Disk/Partition level encryption."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Wed, 30 Mar 2005 22:09:04 +0000 (UTC)
Tom St Denis <tomstdenis@gmail.com> wrote:
> And why must the IV be publicly available? What if each sector
> contained
>
> |start bits|sector_number|IV|writecount|MAC|data|stop_bits|
>
> Where MAC is GMAC(IV,writecount,data) [from GCM]. The write count
> would increment on each write. The "data" would be the only user
> visible part of the sector. So say somehow you disable the crypto
> engine and move a sector, well you're only moving the data. The MAC
> won't match.
This is not practical for two reasons:
1. To increase writecount you first must read it and it costs at lot.
2. This gives you sector size < 512 and probably not power of 2.
You have to be very lucky to find file system which can work on
not-power-of-2 sectors.
I'm trying to find a way which doesn't cost any additional I/O operations
and doesn't change device sector size.
In addition, when I get request to write one sector, I want to encrypt the
data and write exactly one sector. If it involves more I/O operation (more
sectors to write) we can run is nasty races (I assume that one sector
write operation is atomic).
I don't really care about data integrity checking - if an attacker cannot
put any sensible (after decrypting) data, file system is going to detect
it. The worst scenario is kernel panic, but that's ok.
My current thinking is as follows:
I've a key from the user (KUSER).
I create two random keys (KDATA, KIV), encrypt those key with KUSER and
store on my device.
Now, when I want to write a sector I do, eg.:
iv = sha256(sector_number+KIV)
encdata = encrypt(aes256-cbc, KDATA, iv, data)
write(sector_number, encdata)
Does it makes sense?
-- Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am!
- Next message: Paul Rubin: "Re: Disk/Partition level encryption."
- Previous message: Antti Louko: "Idea for a slow block cipher with adjustable block length"
- In reply to: Tom St Denis: "Re: Disk/Partition level encryption."
- Next in thread: Paul Rubin: "Re: Disk/Partition level encryption."
- Reply: Paul Rubin: "Re: Disk/Partition level encryption."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|