HDD Encryption/Decryption: Difference between revisions

From PS3 Developer wiki
Jump to navigation Jump to search
Line 11: Line 11:


http://gitorious.ps3dev.net/ps3freebsd/geom-bswap16-lib
http://gitorious.ps3dev.net/ps3freebsd/geom-bswap16-lib
==Test==
<pre>
kldload geom_bswap16.ko
mdconfig -a -t vnode -f ~/test.bin -u 0
geom bswap16 create /dev/md0
hexdump -C /dev/md0
00000000  bb aa dd cc 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000020  ee ff 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000030  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00100000
hexdump -C /dev/md0.bswap16
00000000  aa bb cc dd 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000020  ff ee 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000030  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00100000
</pre>


=Links=
=Links=


* https://www.dan.me.uk/blog/2012/05/05/full-disk-encryption-in-freebsd-9-x-well-almost/
* https://www.dan.me.uk/blog/2012/05/05/full-disk-encryption-in-freebsd-9-x-well-almost/

Revision as of 20:33, 28 February 2013

Introduction

GEOM bswap16

  • Swaps bytes in every 16-bit word
  • Similar to dm-bswap16 on Linux.


http://gitorious.ps3dev.net/ps3freebsd/geom-bswap16

http://gitorious.ps3dev.net/ps3freebsd/geom-bswap16-lib

Test

kldload geom_bswap16.ko

mdconfig -a -t vnode -f ~/test.bin -u 0

geom bswap16 create /dev/md0

hexdump -C /dev/md0
00000000  bb aa dd cc 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000020  ee ff 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000030  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00100000

hexdump -C /dev/md0.bswap16
00000000  aa bb cc dd 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000020  ff ee 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000030  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00100000

Links