问题描述
当我检查/ proc / crypto它显示我:
When i check /proc/crypto it shows me:
abhi@ubuntu:/proc$ cat crypto
name : stdrng
driver : krng
module : kernel
priority : 200
refcnt : 1
selftest : passed
type : rng
seedsize : 0
name : md5
driver : md5-generic
module : kernel
priority : 0
refcnt : 1
selftest : passed
type : shash
blocksize : 64
digestsize : 16
我需要为我的一个项目使用aes256。
I need to use aes256 for one of my projects.
有人可以指出我如何添加这个算法加密api或有任何其他方式,我可以实现(ubuntu 10.4,2.6.32-35)。
Can someone point out how I can add this algo to crypto api or is there any other way i can achieve this in (ubuntu 10.4, 2.6.32-35).
有一个支持的(默认)算法的列表,这些算法是使用cryptoapi为内核2.6实现的? p>
Is there a list of supported (by default) algorithms that are implemented with the cryptoapi for kernel 2.6?
推荐答案
Abhi,内核crypto API 等。一些巨大的框架,如Qt,也可能包括一些流行的crypto。
So, If you are working in the user-space and has no plans to move into kernel as new FS or new part of network stack, it is easier and more portable to use user-space library for crypto. User-space lib may use or not use kernel API for some ciphers, but likely it will use user-space implementation. There are a lot of such libs, e.g. openssl, Libgcrypt etc. Some huge frameworks, like Qt may include some popular crypto too.
要使用新的算法来扩展内核中的cryptoapi,您应该为您的内核(作为模块或作为内核二进制文件的一部分)实现和编译此算法。要查找为内核编译的模块名称,请尝试 ls / lib / modules / * / * / arch / * / crypto / / lib / modules / * / * / crypto /
;那么您可以调用 modprobe aes_generic
或 modprobe aes-x86_64
在API中加载其他加密模块。
To expand cryptoapi in kernel with new algo you should have this algo implemented and compiled for your kernel (either as module or as part of kernel binary). To find name of modules compiled for your kernel, try ls /lib/modules/*/*/arch/*/crypto/ /lib/modules/*/*/crypto/
; then you can call for example modprobe aes_generic
or modprobe aes-x86_64
to load additional crypto module in API.
之后modprobe aes-x86_64
我有:
# cat /proc/crypto |grep aes
name : aes
driver : aes-asm
module : aes_x86_64
name : aes
driver : aes-generic
module : aes_generic
这篇关于如何在cryptoAPI中添加更多的算法在linux的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!