日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

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

發布時間:2025/3/11 编程问答 18 豆豆
生活随笔 收集整理的這篇文章主要介紹了 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位的倍數。

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 67word B: 89 ab cd efword C: fe dc ba 98word 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位字作為輸出。

here

it is logical "and", is logical "xor".

這里

它是邏輯“或”,并且

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個基本操作。 下圖顯示了一種操作,

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不是對稱密碼算法

總結

以上是生活随笔為你收集整理的md5不是对称密码算法_密码学中的消息摘要算法5(MD5)的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。