飞凌嵌入式OKMX8MP-C开发板采用NXP i.MX8M Plus高性能处理器开发,AI计算能力高达2.3TOPS,可满足轻量级边缘计算需求。同时灵活的I/O接口配置和先进丰富的多媒体资源,方便客户应用程序开发。

添加图片注释,不超过 140 字(可选)
在OKMX8MP-C开发板中,飞凌移植了OpenSSL工具,OpenSSL整个软件包大概可以分成三个主要的功能部分:SSL协议库、应用程序以及密码算法库。OpenSSL的目录结构自然也是围绕这三个功能部分进行规划的。
作为一个基于密码学的安全开发包,OpenSSL提供的功能相当强大和全面,囊括了主要的密码算法、常用的密钥和证书封装管理功能以及SSL协议,并提供了丰富的应用程序供测试或其它目的使用。
今天小编为大家分享一些OpenSSL在OKMX8MP-C开发板上的简单应用。
OpenSSL分为交互模式和批处理模式,直接输入OpenSSL然后按回车键进入交互模式,输入带命令选项的OpenSSL进入批处理模式。

添加图片注释,不超过 140 字(可选)
version:用来打印版本以及 OpenSSL其他信息。

添加图片注释,不超过 140 字(可选)
版本号和版本发布日期:OpenSSL1.1.1g,2020年4月21日
使用库构建的选项:options
存储证书和私钥的目录:OPENSSLDIR
用法: opensslpasswd [-crypt] [-1] [-apr1] [-salt string] [-in file] [-stdin][-noverify] [-quiet] [-table] {password}
举例: passwd-cryp 默认选项,生成标准的unix口令密文。

添加图片注释,不超过 140 字(可选)

添加图片注释,不超过 140 字(可选)
用法:openssldsa [-inform PEM|DER] [-outform PEM|DER] [-in filename][-passinarg] [-out filename] [-passout arg] [-des] [-des3] [-idea][-text][-noout] [-modulus] [-engine id]
举例:dsaparam -out dsaparam.pem 1024 生成DSA参数文件。

添加图片注释,不超过 140 字(可选)
gendsa-out dsakey.pem dsaparam.pem 根据DSA参数文件生成DSA密钥。

添加图片注释,不超过 140 字(可选)
以上就是交互模式的简单使用方式,下面小编来为大家介绍批处理模式下的一些功能。
用法:openssl rand [-out file] [-base64] [-hex] num

添加图片注释,不超过 140 字(可选)
用法:openssl dgst [-md5|-md4|-md2|-sha1|-sha|-mdc2|-ripemd160|-dss1 ] [-c] [-d ] [-hex] [-binary] [-out filename] [-sign filename] [-passin arg] [-verify filename] [-prverify filename][-signature filename ] [file...]
举例:用SHA1算法计算文件openssl1.txt的哈希值。

添加图片注释,不超过 140 字(可选)
用SHA1算法计算文件openssl1.txt的哈希值,输出到文件sha1.txt。

添加图片注释,不超过 140 字(可选)
给文件openssl1.txt用base64编码,输出到文件jiami.txt。

添加图片注释,不超过 140 字(可选)
最后,小编为大家介绍一种测试OpenSSL性能的方法。
openssl speed:此命令用于测试库的性能。
用法:openssl speed [md5][rsa2048][rmd160]
以RSA-2048为例,分别测试OpenSSL在OKMX8MM-C、OKMX8MQ-C 和 OKMX8MP-C这3款开发板上的性能对比,给大家提供一个参考。

添加图片注释,不超过 140 字(可选)

添加图片注释,不超过 140 字(可选)

添加图片注释,不超过 140 字(可选)
从以上测试结果可以看出,OKMX8MM-C开发板私钥每秒生成84.5次,OKMX8MQ-C开发板私钥每秒生成120.5次,而OKMX8MP-C开发板的私钥每秒生成148.1次,由此可见,在OpenSSL性能这一方面,OKMX8MP-C开发板获胜。https://www.forlinx.com/
文章评论(0条评论)
登录后参与讨论