Hello. I'm an undergraduate student studying electrical and computer engineering at the NTUA. As part of an Operating Systems course, I worked a bit on the cryptodev module, and needed it to use it in a Pyhton project. After searching a bit on the Internet I couldn't find any cryptodev bindings, so I decided to develop them myself. I was encouraged by my instructor (Vangelis Koukis, Cc:ed) to develop the bindings to something more general, that supports the whole cryprtodev module.

I have created two types of bindings. Static bindings and semi automated bindings. Static bindings are created based on cryptodev.h and ioctl.h (from my Linux system). Semi automated bindings are created using ctypesgen for python. I have created a simple makefile in which ctypesgen is used to create ioctl.py and cryptodev.py automatically into a Python module. The reason that I could not build fully automated bindings is because of a bug in ctypesgen, in which it cannot parse "sizeof" if the argument is defined in a different header file. You can see a more detailed explanation in README.md of the ctypesgen branch on my repository under "Why not fully automated way?" (links provided at the end). Also I have implemented some of your tests into Python that use the bindings.

If you are interested, I would like to get this code included in mainline cryptodev. All my changes currently live at https://github.com/tchar/cryptodev-python/. Also the link for README.md, which explains the ctypesgen bug I mentioned is https://github.com/tchar/cryptodev-python/blob/ctypesgen/README.md
The link for the ctypesgen module is https://code.google.com/p/ctypesgen/

Looking forward to your comments,
Tilemachos Charalampous
Undergraduate Student
School of Electrical and Computer Engineering
National Technical University of Athens

Cryptodev-linux-devel mailing list

Reply via email to