3

I am working on a project where I want to modify the Linux USB storage driver to encrypt the contents that it sends over to a USB thumb drive.

Naturally, I need to find where the data is actually transferred over from the computer to the USB device.

I have been looking at the USB storage module code from the kernel source code (drivers/usb/storage), and I have a hunch that the buffers are passed through in transport.c. Is that correct?

Also, is it possible to modify the data before it is sent? How would I do that?

The kernel version I am working on is 3.12.0. My OS is Ubuntu 13.04 64-bit. Thank you.

Sefu
  • 2,404
  • 8
  • 42
  • 59
  • 1
    You could also do all this in userspace. Create a luks volume on your USB key, format it with ext4, open it with luks utils (will create a `/dev/mapper/something` node) and mount it. Now, everything you transfer back and forth is encrypted with your password. – eepp Nov 19 '13 at 16:00
  • …and it works not only with usb keys, but with everything… and it is not userspace, it is a full kernel solution, only its configuration is going in userspace. – peterh Dec 04 '13 at 21:14

0 Answers0