Encrypted disks on NetBSD
Summary
At the end of 2005 an interview at ONLamp presented NetBSD's Cryptographic Device Driver, CGD for short. It creates an encrypted virtual disk that can be used like a normal file system and is aimed above all at laptop owners who fear theft. Its developer Roland Dowdeswell compared CGD with Loop-AES on Linux, GBDE on FreeBSD and svnd on OpenBSD.
What CGD does
CGD is a driver that sits between the file system and the real disk. Everything written to the virtual device ends up encrypted on the partition below it. Without the key, a thief sees only random data. To programs and users, on the other hand, the decrypted device behaves like a perfectly normal disk.
CGD thus protects the data when the computer is switched off or stolen. It does not help against attacks on the running system, because then the disk is already mounted and decrypted.
Why it mattered in 2005
Laptops were becoming a mass-market device at the time, and with them customer data, source code and credentials disappeared on trains and in hotels. Disk encryption, however, was not yet a standard feature of operating systems. Every BSD and Linux had its own solution with its own strengths, and the comparison in the interview helped to put the differences into perspective.
What became of it
On Linux, dm-crypt with the LUKS format later became established, Windows brought BitLocker and macOS FileVault. Today, disk encryption on laptops is standard in most operating systems or can be switched on with a few clicks. CGD is still part of NetBSD.
Ideas
- A virtual block device transparently encrypts everything written to it.
- Encryption below the file system protects all files without programs having to be adapted.
- Comparisons between systems make the strengths and weaknesses of individual solutions visible.
Insights
- Disk encryption protects devices that are switched off or stolen, not the running system.
- What was a special feature in 2005 is basic equipment on every laptop today.
Facts
- CGD stands for Cryptographic Device Driver and is part of NetBSD.
- The developer of CGD is Roland Dowdeswell.
- It was compared with Loop-AES (Linux), GBDE (FreeBSD) and svnd (OpenBSD).
References
Remarks
- On Linux, dm-crypt with LUKS is the usual way today; the solutions mentioned in the interview hardly play a role there any more.
Recommendations
- Switch on disk encryption on laptops and keep the recovery key separately.
- Lock or shut down the device before leaving it unattended; while it is running, the data is decrypted.
Found a mistake or have something to add? Get in touch.
Links to the original source and the Web Archive open in a new tab.