md5不是对称密码算法_密码学中的消息摘要算法5(MD5)

md5不是对称密码算法

In cryptography, MD5 (Message-Digest algorithm 5) is a mainly used cryptographic hash function with a 128-bit hash value. As we use in an Internet standard (RFC 1321), MD5 has been employed or developed in a more variety of security applications and is also mainly used to check the integrity of files or the product. An MD5 hash is expressed as a 32 digit hexadecimal number in it.

在密码学中, MD5(消息摘要算法5)是主要使用的具有128位哈希值的密码哈希函数。 正如我们在Internet标准(RFC 1321)中使用的那样, MD5已在多种安全应用程序中使用或开发,并且还主要用于检查文件或产品的完整性。 MD5哈希表示为其中的32位十六进制数字。

MD5 is a strengthened or latest version of MD4. Similarly, like MD4, the MD5 hash was invented by "Professor Ronald Rivest" of MIT University. Also, MD5 was used as the model for SHA-1, since they sharing many common features between them. MD5 and SHA-1 are the two most mainly used hash algorithms nowadays, but the use of MD5 will certainly decline over time since it is now considered broken.

MD5是MD4的增强版本或最新版本。 类似地,像MD4一样,MD5哈希由麻省理工大学的“ Ronald Rivest教授”发明。 此外,由于MD5在SHA-1之间共享许多共同的功能,因此它们被用作SHA-1的模型。 MD5和SHA-1是当今两种最常用的哈希算法,但是MD5的使用肯定会随着时间的流逝而减少,因为现在认为它已被破坏。

算法 (The Algorithm)

The MD5 hash technique is described in "RFC 1321" along with a C implementation. MD5 is similar to the MD4 hash. The padding is identical.

MD5哈希技术与C实现一起在“ RFC 1321”中进行了描述。 MD5与MD4哈希类似。 填充是相同的。

MD5 works on 32-bit words. Let the required message to be implemented is "M".

MD5适用于32位字。 让所需的消息实现为“ M”。

The message "M" is padded so that its length in bits is similar to 448 modulo 512, that is, the padded message is less than 64 bits of multiple of 512.

填充消息“ M”,以便其长度(以位为单位)类似于448模512,即,填充的消息小于512的倍数的64位。

Firstly, the padding consists of a single 1 bit in the first column, followed by enough zeros to pad the message to the required length till the 512 bit. Padding is always used, even if the original length of M happens to equal 448 mod 512. As a result, there is at least one bit of padding, and at most 512 bits of padding. Then the length in bits of the message uses before padding is appended as a 64-bit block.

首先,填充由第一列中的单个1位组成,后跟足够的零以将消息填充至所需的长度,直到512位为止。 即使M的原始长度恰好等于448 mod 512,也始终使用填充。因此,至少有一位填充,最多512位填充。 然后,在填充之前将消息的长度(以位为单位)附加为64位块。

The padded message is a multiple of 512 bits and, it is also a multiple of 32 bits.

填充消息是512位的倍数,也是32位的倍数。

Let M be the required message and N is the number of 32-bit words used in the padded message. Due to the actual padding, N is a multiple of 16 bit.

令M为必填消息,N为填充消息中使用的32位字的数量。 由于实际的填充,N是16位的倍数。

MD5 (1)

There is a four-word buffer (A, B, C, D) is used to generate the message digest. Here each of A, B, C, D is a 32-bit buffer for a use. These buffer words are initialized to the following values in hexadecimal as follow,

有一个四字缓冲区(A,B,C,D)用于生成消息摘要。 在此,A,B,C,D中的每一个都是供使用的32位缓冲区。 这些缓冲字被初始化为以下十六进制值:


word A: 01 23 45 67
word B: 89 ab cd ef
word C: fe dc ba 98
word D: 76 54 32 10

We first define the four auxiliary functions which use in the buffer that each takes as input three 32-bit words and produces as output one 32-bit word.

我们首先定义在缓冲区中使用的四个辅助功能,每个辅助功能将三个32位字作为输入并产生一个32位字作为输出。

MD5 (2)

here

MD5 (c) it is logical "and",
MD5 (b) is logical "xor".

这里

MD5(a) 它是逻辑“或”,并且

The uses of the four buffers (A, B, C, and D) are now combined with the words of the input using the four auxiliary functions (F, G, H and I). Here, there are four rounds, each involves 16 basic operations to perform. One operation is shown in the figure below,

现在,使用四个辅助功能(F,G,H和I)将四个缓冲区(A,B,C和D)的使用与输入的单词组合在一起。 在这里,有四个回合,每个回合涉及要执行的16个基本操作。 下图显示了一种操作,

MD5 (3)

The figure shows how the auxiliary function "F" is used to the four buffers (A, B, C, and D), using the message word "M(i)" and constant "K(i)." The item "<<<n" denotes a binary left shift by n bits.

该图显示了如何通过消息字“ M(i)”和常量“ K(i)”将辅助功能“ F”用于四个缓冲区(A,B,C和D)。 项目“ <<< n”表示二进制左移n位。

The output

输出

After we perform all rounds, the buffers A, B, C, and D contain the MD5 digest of the original input.

完成所有回合后,缓冲区A,B,C和D包含原始输入的MD5摘要。

Mainly, MD5 has five steps with four rounds of computations that compute the hash of the input value and gave the buffer output.

MD5主要具有五个步骤,其中包括四轮计算,这些运算计算输入值的哈希值并给出缓冲区输出。

References:

参考文献:

  • Md5 Hash

    Md5哈希

  • The MD5 Hashing Algorithm

    MD5哈希算法

翻译自: https://www.includehelp.com/cryptography/message-digest-algorithm-5-md5.aspx

md5不是对称密码算法

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/541534.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Windows 7 SID 修改

在安裝Windows系統時會產生一個獨一無二的SID (Security ID)&#xff0c;它用來識別每一部主機&#xff0c;若在同一個區域網路內有兩部相同SID的主機&#xff0c;會出現警告訊息。一般而言&#xff0c;每次安裝時的SID不可能會發生重複&#xff0c;但若是使用TrueImage或Ghost…

discuz mysql 类_discuz7 phpMysql操作类

MySql数据库连接类&#xff0c;大家可以看下网上老手们用的什么方法&#xff0c;大家可以直接拿来用&#xff0c;但前提是大家能熟练的掌握的基础上&#xff0c;这样才能有所进步。/** MySql数据库连接类* mysql.class.php 2009.04.15 by Hackbaby*/class dbstuff {var $versio…

1 并发模型

并发系统可以采用多种并发编程模型来实现。并发模型指定了系统中的线程如何通过协作来完成分配给它们的作业。不同的并发模型采用不同的方式拆分作业&#xff0c;同时线程间的协作和交互方式也不相同。这篇并发模型教程将会较深入地介绍目前&#xff08;2015年&#xff0c;本文…

Java String compareTo()方法与示例

字符串compareTo()方法 (String compareTo() Method) compareTo() is a String method in Java and it is used to compare two strings (case-sensitive). compareTo()是Java中的String方法&#xff0c;用于比较两个字符串(区分大小写)。 If both strings are equal – it r…

nginx mysql 查询系统_nginx/mysql查看内存占用

查看每个php-fpm平均占用系统内存,也适用看nginx/mysqld等,把php-fpm换成mysqldps --no-headers -o "rss,cmd" -C php-fpm | awk { sum$1 } END { printf ("%d%s\n", sum/NR/1024,"M") }查看占用内存[rootcentos69 ~]# ps -ylC php-fpm --sort:r…

linux用户及权限详解(20170425)

计算机资源权限用户用户&#xff0c;容器&#xff0c;关联权限&#xff1a;用户组&#xff0c;方便的指派权限用户&#xff1a;标示符用户组&#xff1a;标示符r 、w、x&#xff1a;1、2、4对于文件r:可读&#xff0c;可以使用类似cat等命令查看文件内容w&#xff1a;可写&…

kotlin 判断数字_Kotlin程序检查数字是否为质数

kotlin 判断数字A prime number is a natural number that is greater than 1 and cannot be formed by multiplying two smaller natural numbers. 质数是大于1的自然数&#xff0c;不能通过将两个较小的自然数相乘而形成。 Given a number num, we have to check whether nu…

mysql gtid配置_mysql 5.7 GTID主从配置

binlog-format&#xff1a;二进制日志的格式&#xff0c;有row、statement和mixed几种类型&#xff1b;需要注意的是&#xff1a;当设置隔离级别为READ-COMMITED必须设置二进制日志格式为ROW&#xff0c;现在MySQL官方认为STATEMENT这个已经不再适合继续使用&#xff1b;但mixe…

mysql log4jlogger_mybatis结合log4j打印SQL日志

mybatis结合log4j打印SQL日志1.Maven引用jar包默认的mybatis不能打印出SQL日志&#xff0c;不便于查看调试&#xff0c;须要结合log4jdbc-log4j2就能够完整的输入SQL的调试信息。pom.xml 配置maven。注意以下3个都须要org.bgee.log4jdbc-log4j2log4jdbc-log4j2-jdbc4.11.16org.…

限制对web路径的访问

$ipcmd -I INPUT -i eth0 -p tcp --dport 80 -m string --string "/adapi" --algo bm -j DROP$ipcmd -I INPUT -i eth0 -p tcp --dport 80 -m string --string "/epapi" --algo bm -j DROP转载于:https://blog.51cto.com/luoguoling/1919928

kotlin 查找id_Kotlin程序查找等边三角形的区域

kotlin 查找idFormula to find area of Equilateral Triangle: area ( 1.73 side side)/4 查找等边三角形面积的公式&#xff1a; 面积(1.73边边)/ 4 Given the value of side, we have to find the area of Equilateral Triangle. 给定边的值&#xff0c;我们必须找到等边…

Orcale11g单机安装与卸载

前言&#xff1a;本篇主要介绍Oracle11g企业版安装的准备工作&#xff0c;建议使用图形化界面安装&#xff0c;静默安装出现问题较多&#xff0c;初学者不好排查&#xff0c;本篇只给出关键步骤&#xff0c;最后介绍完全删除Orcale方法&#xff1b; Oracle Database 11g Expres…

qt连接mysql4.7数据库_QT4.7访问MySQL的驱动编译过程

我们假设你已经成功安装了MySQL(我用的是MySQL的安装版)和QT&#xff0c;MySQL的安装路径采用的是其默认安装路径&#xff0c;也就是安装在了C:\Program Files下。下面开始正式讲解QT访问安装版MySQL的驱动的编译方法。第一步&#xff1a;因为MySQL的安装路径下有空格&#xff…

cellpadding_在CSS中设置cellpadding和cellspacing

cellpaddingIntroduction: 介绍&#xff1a; It is not unknown anymore that now and then we make use of tables in our web page or website, therefore we all are familiar with how to create tables or grids in our website or web page but there are times when we…

JavaScript中的arguments对象

JavaScript中的arguments对象 arguments 是一个类似数组的对象, 对应于传递给函数的参数。 语法 arguments 描述 arguments对象是所有函数中可用的局部变量。你可以使用arguments对象在函数中引用函数的参数。此对象包含传递给函数的每个参数的条目&#xff0c;第一个条目的索引…

mongodb 排序_技术分享 | MongoDB 一次排序超过内存限制的排查

本文目录&#xff1a;一、背景1. 配置参数检查2. 排序字段是否存在索引二、测试环境模拟索引对排序的影响1. 测试环境信息2. 报错语句的执行计划解释 3. 建立新的组合索引进行测试三、引申的组合索引问题1. 查询语句中&#xff0c;排序字段 _id 使用降序2. 查询语句中&#xff…

sim800 模式切换_SIM的完整形式是什么?

sim800 模式切换SIM&#xff1a;订户标识模块或订户标识模块 (SIM: Subscriber Identity Module or Subscriber Identification Module) SIM is an abbreviation of a Subscriber Identity Module or Subscriber Identification Module. SIM is a portable chip and an integra…

css新单位 vw , vh

考虑到未来响应式设计的开发&#xff0c;如果你需要&#xff0c;浏览器的高度也可以基于百分比值调整。但使用基于百分比值并不总是相对于浏览器窗口的大小定义的最佳方式&#xff0c;比如字体大小不会随着你窗口改变而改变&#xff0c;如今css3引入的新单位明确解决这一问题。…

linux下mysql目录结构_linux下mysql安装配置与目录结构

本节内容&#xff1a;linux下mysql安装与配置、mysql目录结构。1、准备安装程序(官方网站下载)服务端&#xff1a;MySQL-server-community-5.1.44-1.rhel4.i386.rpm客户端&#xff1a;MySQL-client-community-5.1.44-1.rhel4.i386.rpm2、安装(打印信息略) 代码示例:[rootlocalh…

Python字典values()方法与示例

字典values()方法 (Dictionary values() Method) values() method is used to get all values of a dictionary, it returns a view object that contains the all values of the dictionary as a list. values()方法用于获取字典的所有值&#xff0c;它返回一个包含字典所有值…