QuestionQ87

Security Fundamentals

While working on Linux, a plain-text file (text.txt) must be transferred to another location. Which of the following methods can be used to verify data integrity and detect any change to that file?

  • A scp text.txt user@host:/remote/path/
  • B sha256sum text.txt
  • C zip -e protected.zip text.txt
  • D 7z a -tzip -mem=AES256 protected.zip text.txt
Explanation

A SHA-256 checksum is a content-derived digest. Generating it for the source file and comparing it with the digest for the transferred copy detects any content change; matching digests indicate that the file contents are intact. GNU Coreutils documents that sha256sum computes SHA-2 checksums and can determine whether a file and checksum are consistent.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!