ダウンロードしたファイルが正しいか照合する方法
- 調べる
- 貼る
- 確かめる
ソフトやファイルを配布しているサイトでは、ダウンロードしたファイルが正しいものか確かめるため、ハッシュ値を公開していることがあります。ファイルのハッシュ値を調べる(SHA-256) の「照合する」で、比べられます。
手順
- 「ファイルを1つ選ぶ」で、ダウンロードしたファイルを選びます。
- ハッシュ値(SHA-256)が表示されます。
- 「照合したい値」の欄に、配布元が公開している値を貼り付けます。
- 「照合する」を押します。
- 一致していれば、同じファイルです。違うときは、「一致しません」と表示されます。
照合の流れ
- 配布元の公式ページで、SHA-256の値を探す。
- ファイルをダウンロードする。
- このツールで、ファイルを選ぶ。
- 公式の値を貼り付けて、「照合する」を押す。
一致しないときの原因
- ダウンロードが不完全:通信が途中で切れた。もう一度ダウンロードする。
- 別のファイルを選んだ:ファイル名が似ているものを、間違えていないか。
- 別のバージョン:公開された値が、別のバージョンのもの。
- 改ざんの可能性:公式以外の場所から入手した場合。
- 値の形式の違い:SHA-1やMD5の値と、比べている。
値を貼り付けるときの注意
- 前後に、空白が入っていないか
- 途中で、改行が入っていないか
- 大文字・小文字は、区別されません
不一致のときの行動
- もう一度ダウンロードして、試す。
- それでも合わなければ、そのファイルは使わない。
- 公式の窓口に、問い合わせる。
例
OSのインストール用のファイルをダウンロードして、公式のSHA-256と照合した。一致したので、安心して使えた。
つまずきやすい点
- 公式ページと、ダウンロード元が違う:ミラーサイトでも、値は同じはず。
- 値が見つからない:公開されていない場合は、照合できない。
よくある質問
一致すれば、安全ですか?
同じファイルであることは確認できます。ただし、公式の値自体が、信頼できる場所から入手したものか、注意が必要です。
まとめ
公式の値を貼り付けて照合する。一致しなければ、使わずに、取得し直しましょう。
ファイルのハッシュ値を調べる(SHA-256)を使う(無料)あわせて使えるツール
- ZIPを開く(解凍):ZIPの中身を見て、ほしいファイルだけ取り出します。
- ファイルをZIPにまとめる:複数のファイルを、1つのZIPにまとめます。
- 安全なパスワードを作る(ランダム生成):強いランダムなパスワードを、すぐに作ります。
同じツールの、ほかの解説
How to Verify a Downloaded File
- Check
- Paste
- Confirm
Sites that distribute software and files sometimes publish hash values so you can check that a downloaded file is correct. "Compare" in Check a File's Hash (SHA-256) can check them.
Steps
- With "Choose one file", choose the downloaded file.
- The hash (SHA-256) is displayed.
- Paste the value published by the distributor into "Value to compare".
- Press "Compare".
- If they match, it is the same file. If different, "No match" is shown.
Flow of comparison
- Find the SHA-256 value on the distributor's official page.
- Download the file.
- Choose the file in this tool.
- Paste the official value and press "Compare".
Causes of a mismatch
- Incomplete download: the connection was cut partway. Download again.
- Chose another file: check you haven't mixed up files with similar names.
- Another version: the published value is for a different version.
- Possible tampering: if you got it from somewhere other than the official source.
- Different value format: comparing with a SHA-1 or MD5 value.
Cautions when pasting the value
- Whether blanks got in before or after
- Whether line breaks got in the middle
- Case is not distinguished
What to do on a mismatch
- Download again and retry.
- If it still doesn't match, don't use that file.
- Contact the official support.
Example
Downloaded an OS installer file and compared it with the official SHA-256. It matched, so it could be used with peace of mind.
Common stumbling blocks
- The official page and download source differ: even on mirror sites, the value should be the same.
- Cannot find a value: if not published, it cannot be compared.
Frequently asked questions
If they match, is it safe?
It confirms it is the same file. But you must take care that the official value itself came from a trustworthy place.
Summary
Paste the official value and compare. If it doesn't match, don't use it; fetch it again.
Use "Check a File's Hash (SHA-256)" (free)Tools that go well with this
- Open a ZIP File (Unzip): See what is inside a ZIP and extract the files you need.
- Make a ZIP File: Pack several files into one ZIP.
- Generate a Strong Random Password: Generate strong random passwords instantly.