Tutorial for writing cypher kernel module
I've been looking for a tutorial for writing a cipher kernel module for a little while. I'm pretty sure it needs to be a block device driver, but I'm not sure if it should also be a character device driver. Has anyone seen a tutorial specifically for a cypher module? Thanks.
ta0kira |
If you're talking about the kernel crypto API drivers, I don't believe they are block or character drivers, but a category entirely unto themselves.
|
Yes, I think that's what I'm talking about. Is that what they are called? I'll try a search for that. If anything I'll just look at the sources for des.o and figure something out that way. Hopefully it's got lots of comments. Thanks.
ta0kira |
twofish.c and crypto.h have a lot of useful info. More than enough to model something off of. It took a little while to find those (names especially) since I'm not on my Linux box.
http://fxr.watson.org/fxr/source/cry...v=linux-2.4.22 http://fxr.watson.org/fxr/source/inc...v=linux-2.4.22 ta0kira |
I'm also kinda curious what you're looking to implement, for my own personal info. :)
|
I looked in the kernel source directory in the crypto folder and modeled something after twofish.c. I also looked at crypto.h. All I really wanted out of it was the module structure and the registering process for a cipher. I have my own encryption algorithm that I always wanted to use to encrypt an entire device or a mountable disk image, so I decided to make a module out of it. I am currently trying to get losetup to work (doesn't work with any of the standard ciphers either), but once I test the module and get it working I'll post it on my SourceForge page. As of now I have a command line tool I am very happy with (was posted, but I took it off for now until I restructure how I do my releases). I'll let you know when I post the module.
ta0kira |
Cipher module
CAn you post your cipher module to help me understand how to write one to be included as kernel module to allow my network data to be encrypted using the custom cipher algo. i am in great urgency.. as i am doing my master thesis and wanted to do something similar
Quote:
|
Quote:
|
All times are GMT -5. The time now is 03:38 AM. |