Google
 

Wednesday, August 10, 2005

Download with Peace of Mind

So you finally decide to download some open-source software, say gimp2, from some web site. You now notice that the file you are about to download has a corresponding MD5 file (or MD5sum). The md5sum file contains some weird looking string of characters like 86e676934455864c42b42b342406c26b. So, what is this MD5 business?

MD5 is a Message Digest algorithm which calculates an unique checksum (the weird characters) based on the contents of a file. You use it to verify the integrity of the file you downloaded. After you download a file, you run a MD5 checker/decoder on the downloaded file to calculate its checksum. Then, you compare the 2 checksums, and if they are not equal, then the file you downloaded was somehow corrupted (not the same as the intended file).

If you are a Linux user, it is a breeze to compute the checksum of the downloaded file. Just enter:

md5sum /path/to/file.

If you are a Windows user, you need to download and install the md5sum utility. There are several Windows implementation of md5sum. I use the command line interface version as part of the
Win32 ports of GNU tools. The md5sum executable is within the Core Utilities package. Download the package here.

Alternatively, download digestit which provides a GUI frontend to md5sum. This may be a better choice for many because it is more straightforward to install, and has a graphical front-end. The Microsoft Installer for digestit is found here. Running the installer is quick and painless.

To use digestit to verify a checksum, right click the file you just downloaded, and choose digestIT 2004/Verify MD5 Hash. Then, paste in the target MD5 checksum that you obtain from the web site.

md5sum is a basic security tool that you need if you ever download anything from the net. You may find yourself with that much more peace of mind.




2 comments:

Anonymous said...

山東女教授教路 15分鐘解密 新 聞 — 國 際 新 聞
【 本 報 綜 合 報 道 】 電 子 商 貿 系 統 和 互 聯 網 常 用 的 密 碼 算 法 存 有 漏 洞 , 中 國 山 東 大 學 訊 息 安 全 所 所 長 王 小 雲 授 指 , 配 備 手 提 電 腦 的 黑 客 使 用 她 創 製 的 方 法 進 行 破 譯 , 只 需 十 五 分 鐘 時 間 便 能 破 解 MD5 加 密 系 統 。

在 網 絡 安 全 協 議 中 , 「 雜 湊 函 數 」 用 來 處 理 「 電 子 簽 名 」 , 把 冗 長 簽 名 文 件 壓 縮 為 獨 特 的 數 字 訊 息 , 有 如 指 紋 認 證 。 MD5 是 目 前 最 常 用 雜 湊 函 數 之 一 , 經 這 些 算 法 處 理 後 的 原 始 訊 息 即 使 被 改 動 一 個 字 母 , 對 應 的 壓 縮 訊 息 便 成 為 截 然 不 同 的 「 指 紋 」 。

證 實 資 料 可 被 竄 改
安 全 的 雜 湊 函 數 必 須 不 可 從 計 算 結 果 推 斷 出 它 的 初 始 狀 態 , 也 不 可 能 輸 入 兩 組 不 同 數 據 得 出 相 同 結 果 , 否 則 便 會 出 現 「 雜 湊 衝 撞 」 , 即 加 密 系 統 被 破 解 。

上 周 王 小 雲 在 英 國 倫 敦 大 學 學 院 的 研 討 會 上 , 便 介 紹 了 她 發 現 的 破 解 方 法 。 研 究 員 花 了 十 五 分 鐘 便 找 到 MD5 的 雜 湊 衝 撞 , 這 表 示 用 來 紀 錄 超 速 車 輛 速 度 、 車 牌 號 碼 、 地 點 、 時 間 和 日 期 的 MD5 算 法 存 在 保 安 漏 洞 , 資 料 可 被 竄 改 。

Peter Leung said...

Thanks, anonymous, for pointing it out.

Indeed, MD5 is known to be cracked. SHA1 is better but it is still not 100% foolproof.

In some sense, it is like saying putting your $ into a bank (or a mutual fund) is not fool-proof because banks are known to go out of business, especially, in the two/third world.

But, it still beats stuffing your $ under your mattress.