查看“Lesson 54--Microduino MD5”的源代码
←
Lesson 54--Microduino MD5
跳转至:
导航
、
搜索
因为以下原因,您没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
{| style="width: 800px;" |- | ==Purpose== This course will show you the most common MD5(Message Digest Algorithm 5) and explain the correctness of encryption in Microduino. 本教程将介绍如何使用最常用的加密方法MD5加密,并在Microduino中解释加密的正确性。 ==MD5 Encryption== ''Introduction:''' MD5 is a widely-used hash function in the field of computer safety, offering overall protection for information. The file number of the algorithm is RFC 1321. ( R.Rivest,MIT Laboratory for Computer Science and RSA Data Security Inc. April 1992) Here is the brief introduction of MD5: MD5 handles the input information grouped in 512-bit and each group is divided into sixteen 32-bit group. After a series of processing, the output of the algorithm consists of four 32-bit groups which generates a 128-bit hash value after cascading. '''Advantage:''' Van oorschot and Wiener has considered to find brute-force hash function and they supposed a specially designed MD5 conflict searching machine can find a conflict every 24-day. But from the year of 1991 to 2001, there was no new algorithm that came to replace MD5. From that we can see, MD5 is not influenced in safety. All the defects cannot become the problem of MD5 in practical application. Besides, since MD5 algorithm needs no copyright cost to pay, it can also be treated as an excellent intermediate technology. '''Disadvantage:''' On August 17th, 2004, Chinese professor Xiaoyun Wang posted the decode of MD5, HAVAL-128, MD4 and RIPEMD algorithm in Crypto’ 2004 in the US, announcing the decoding result of MD series algorithm. (Note: it was not really decode but accelerated hash collisions.) ==Equipment== *'''[[Microduino-Core/zh]]''' *'''[[Microduino-USBTTL/zh]]''' *Other Hardware Equipment **USB cable one **Breadboard jumpers one box ==Program== <source lang="cpp"> #include "MD5.h" /* This is en example of how to use my MD5 library. It provides two easy-to-use methods, one for generating the MD5 hash, and the second one to generate the hex encoding of the hash, which is frequently used. */ void setup() { //initialize serial Serial.begin(9600); //give it a second delay(1000); //generate the MD5 hash for our string unsigned char* hash=MD5::make_hash("Hello Microduino"); //generate the digest (hex encoding) of our hash char *md5str = MD5::make_digest(hash, 16); //print it on our serial monitor Serial.println(md5str); char* test="Hello Microduino"; unsigned char* hash2=MD5::make_hash(test); md5str=MD5::make_digest((unsigned char*)hash2, 16); Serial.println(md5str); } void loop() { } </source> ==Debugging== Step 1: Download the code and run it. If the compile goes wrong, it means you don’t have local library of [[https://github.com/tzikis/ArduinoMD5 ArduinoMD5]]. After download and installation, you should restart IDE. Step 2: Open serial communication and it will show two lines of ciphertext, just as follows: [[File:MicroduinoMD5.jpg|600px|center|thumb]] The ciphertext is the text after “Hello Microduino” gets enciphered by MD5. Step 3: Prove it on [http://md5calculator.chromefans.org md5calculator.chromefans.org]. [[File:MicroduinoMD5_1.jpg|600px|center|thumb]] The result is consistent with the calculation result of the editor on the online MD5 website. ==Result== The text “Hello Microduino” is enciphered by MD5 algorithm, which is very hard to be changed to the previous one. ==Video== |}
返回至
Lesson 54--Microduino MD5
。
导航菜单
个人工具
创建账户
登录
名字空间
页面
讨论
变种
视图
阅读
查看源代码
查看历史
更多
搜索
Welcome
首页
创客大赛
大赛详情
3D打印
安装月球车
图形化编程
操控月球车
升级月球车
编程工具下载
软件下载
Arduino
Processing
Mixly
Scratch
模块套件
Microduino 102
mCookie 102
mCookie 202
mCookie 302
IBC
其他
应用套件
四轴飞行器
平衡车
小车CUBE
音乐播放器
刷卡音乐播放器
wifi气象站
彩虹音乐触摸灯
分贝检测仪
迎门汇报
LED点阵时钟
LED点阵屏幕
硬件
mCookie
Sensor
Microduino
MicroWrt
MicroNux
MicroRobot-Core
MicroRobot-CoreESP
ideaBoard
ideaBox
MicroMV
MicroAI
帮助
常见问题
帮助
工具
链入页面
相关更改
特殊页面
页面信息