Linux Crypto API and linux/crypto.h - Documentation

别来无恙 提交于 2019-12-21 13:07:02

问题


I want to write a C program which makes use of the linux crypto-api for digital signatures. Unfortunately I cannot find good documentation about the linux api and the functions defined in linux/crypto.h (googling doesn't help, man pages for those functions don't exist). So now I wonder if anyone here can help me with a good link, a book would also be appreciated.

2nd short question: All the time within this crypto stuff the term "tfm" comes up, as in a struct crypto_tfm or in functions, but I can't find out what tfm actually means.


回答1:


The Linux crypto-API is an internal kernel API used for things such as IPsec and dm-crypt. It's not directly usable by user-mode applications. If you want to use it in a kernel driver, read the headers, and look at these files: http://lxr.linux.no/linux+v2.6.37/Documentation/crypto

In general, anything under the linux/ directory should not be used by ordinary applications directly. Anything in there you're allowed to use is re-exported under a sys/ include somewhere, and if it's a function it'll come with a manual page as well. Kernel functions are designed with the assumption that you will read the kernel source code (since you're working on the kernel, right?) and so the API details are documented primarily in the header and source files themselves.

Finally, "tfm" stands for "transformation".




回答2:


This might be enlightening http://thesweeheng.files.wordpress.com/2007/11/6451.pdf. It explains some of the details regarding the design of the kernel crypto api.



来源:https://stackoverflow.com/questions/5152829/linux-crypto-api-and-linux-crypto-h-documentation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!