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.pswp.cn/news/541534.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/541534.shtml
英文地址,請注明出處:http://en.pswp.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;它返回一個包含字典所有值…