免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12
最近访问板块 发新帖
楼主: richardhesidu
打印 上一主题 下一主题

Linux内核的加密函数框架 [复制链接]

论坛徽章:
0
11 [报告]
发表于 2009-08-20 11:52 |只看该作者

digest算法(sha1)

不知大家有没有试过digest算法(sha1)这个算法,我试了算出的result1 result2 都是乱码。

不知大家会不会出现这种情况?

论坛徽章:
0
12 [报告]
发表于 2009-08-20 11:54 |只看该作者

回复 #11 incle 的帖子

不用装openssl,
这些接口是内核自带的!

论坛徽章:
0
13 [报告]
发表于 2009-08-20 11:56 |只看该作者

回复 #11 incle 的帖子

给你个Makefile 文件。注:我将sha1这部分代码写到hash.c 文件。

obj-m := hash.o

KERNELDIR ?= /lib/modules/$(shell uname -r)/build
PWD       := $(shell pwd)

all:
        $(MAKE) -C $(KERNELDIR) M=$(PWD)

clean:
        rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions

论坛徽章:
0
14 [报告]
发表于 2011-03-21 14:54 |只看该作者
谢谢分享阿!

论坛徽章:
0
15 [报告]
发表于 2011-03-21 22:52 |只看该作者
内核加密框架绝对我看得我最头晕的子系统,花了好大的劲才将其拿下,我太佩服作者超始的抽像能力了。肯定是一个oop框架的设计高手。

论坛徽章:
0
16 [报告]
发表于 2012-02-24 16:51 |只看该作者
怎么对文本进行加密呢

论坛徽章:
0
17 [报告]
发表于 2012-02-29 23:38 来自手机 |只看该作者
请问这个框架普通的应用程序能直接调用吗?还是只能内核调用?

论坛徽章:
0
18 [报告]
发表于 2012-08-04 16:23 |只看该作者
richardhesidu 您好 我是四川大学一名计算机研一的学生,首先感谢您抽出时间阅读我的信件!我阅读了您的博客,受益匪浅!很感谢您的分享!我把你的compress那一个编成了模块,在编译时候出现如下错误信息:/usr/src/linux-3.1.4/moucompress/moucompress.c:29: error: implicit declaration of function ‘crypto_alloc_tfm’
/usr/src/linux-3.1.4/moucompress/moucompress.c:29: warning: assignment makes pointer from integer without a cast
/usr/src/linux-3.1.4/moucompress/moucompress.c:38: warning: passing argument 1 of ‘crypto_comp_compress’ from incompatible pointer type
include/linux/crypto.h:1263: note: expected ‘struct crypto_comp *’ but argument is of type ‘struct crypto_tfm *’
/usr/src/linux-3.1.4/moucompress/moucompress.c:49: warning: passing argument 1 of ‘crypto_comp_decompress’ from incompatible pointer type
include/linux/crypto.h:1271: note: expected ‘struct crypto_comp *’ but argument is of type ‘struct crypto_tfm *’
make[2]: *** [/usr/src/linux-3.1.4/moucompress/moucompress.o] 错误 1

期望得到您的回信!
我QQ1965733801
email mou0718@163.com
再次谢谢您

论坛徽章:
0
19 [报告]
发表于 2015-07-16 15:33 |只看该作者
大牛,真的好帖子,时隔这么久我才学习到
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP