{"id":16358812,"url":"https://github.com/pbatard/uefi-md5sum","last_synced_at":"2025-03-23T01:32:10.388Z","repository":{"id":207953136,"uuid":"720038318","full_name":"pbatard/uefi-md5sum","owner":"pbatard","description":"MD5 checksum validation for UEFI","archived":false,"fork":false,"pushed_at":"2025-01-21T22:25:39.000Z","size":239,"stargazers_count":16,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-18T16:22:38.964Z","etag":null,"topics":["md5","md5-hash","md5sum","rufus","uefi","uefi-boot"],"latest_commit_sha":null,"homepage":"http://md5.akeo.ie/","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pbatard.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-17T12:55:19.000Z","updated_at":"2025-03-05T16:38:46.000Z","dependencies_parsed_at":"2024-03-22T17:46:06.368Z","dependency_job_id":null,"html_url":"https://github.com/pbatard/uefi-md5sum","commit_stats":null,"previous_names":["pbatard/uefi-md5sum"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pbatard%2Fuefi-md5sum","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pbatard%2Fuefi-md5sum/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pbatard%2Fuefi-md5sum/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pbatard%2Fuefi-md5sum/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pbatard","download_url":"https://codeload.github.com/pbatard/uefi-md5sum/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245044046,"owners_count":20551877,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["md5","md5-hash","md5sum","rufus","uefi","uefi-boot"],"created_at":"2024-10-11T02:06:49.401Z","updated_at":"2025-03-23T01:32:10.120Z","avatar_url":"https://github.com/pbatard.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Windows Build Status](https://img.shields.io/github/actions/workflow/status/pbatard/uefi-md5sum/Windows.yml?style=flat-square\u0026label=VS2022/gnu-efi%20Build)](https://github.com/pbatard/uefi-md5sum/actions/workflows/Windows.yml)\n[![Linux Build status](https://img.shields.io/github/actions/workflow/status/pbatard/uefi-md5sum/Linux.yml?style=flat-square\u0026label=gcc/EDK2%20Build)](https://github.com/pbatard/uefi-md5sum/actions/workflows/Linux.yml)\n[![Tests status](https://img.shields.io/github/actions/workflow/status/pbatard/uefi-md5sum/Tests.yml?style=flat-square\u0026label=Tests)](https://github.com/pbatard/uefi-md5sum/actions/workflows/Tests.yml)\n[![Coverity Scan Build Status](https://img.shields.io/coverity/scan/29422.svg?style=flat-square\u0026label=Coverity)](https://scan.coverity.com/projects/pbatard-uefi-md5sum)\n[![Release](https://img.shields.io/github/release/pbatard/uefi-md5sum.svg?style=flat-square\u0026label=Release)](https://github.com/pbatard/uefi-md5sum/releases)\n[![Licence](https://img.shields.io/badge/license-GPLv2-blue.svg?style=flat-square\u0026label=License)](https://www.gnu.org/licenses/gpl-2.0.en.html)\n\nuefi-md5sum - MD5 checksum validation for UEFI\n==============================================\n\n## Description\n\nuefi-md5sum is a UEFI bootloader designed to perform MD5 hash verification of a\nmedia containing an `md5sum.txt` list of hashes.\n\nThis is primarily aimed at being used with [Rufus](https://rufus.ie) for the\ncreation of USB bootable media (such as Linux or Windows installation drives)\nthat can perform self-verification on each boot.\n\nThe reasoning with wanting to perform validation on boot rather than on media\ncreation is based on the fact that flash based media, and especially cheap USB\nflash drives or SD cards, are exceedingly prone to failures **after** the media\nwas written.\n\nAs such, we assert that, only validating the content at write-time (like\nbalenaEtcher and, in part, Microsoft's Media Creation Tool do) is not enough to\nhelp users ensure that their installation media hasn't become compromised.\n\nThis boot time validation can also prove itself useful if the boot process or\ninstallation process produces errors, in which case, the first thing a user\nmay want to do, is reboot and let uefi-md5sum perform its check, to highlight\nor rule out data corruption.\n\n## Usage\n\nuefi-md5sum is intended to replace, and then chain load, the original UEFI\nbootloader.\n\nTo accomplish this, the original `/efi/boot/boot###.efi` should be renamed to\n`/efi/boot/boot###_original.efi` with uefi-md5sum bootloader then installed as\n`/efi/boot/boot###.efi`.\n\n## md5sum.txt extensions\n\nIf `md5sum.txt` sets an `md5sum_totalbytes` variable, in the form of a comment\nsimilar to:\n```\n# md5sum_totalbytes = 0x1234abcd\n```\nThen uefi-md5sum interprets this value to be sum of all the file sizes of the\nfiles referenced in `md5sum.txt`, and uses it for more accurate progress\nreporting. Otherwise, progress is only incremented after each file has been\nprocessed, regardless of its actual size.\n\nThus, the provision of `md5sum_totalbytes` allows for accurate progress report,\nas well the avoidance of apparent progress \"freezeouts\" when very large files\nare being hashed (such as large squashfs or install.wim images).\n\nIt should be noted however that, currently, uefi-md5sum supports only the\nprovision of an `md5sum_totalbytes` value in hexadecimal (no decimal values).\nOn the other hand, there is no restriction to where, in `md5sum.txt`,\n`md5sum_totalbytes` needs to be specified (i.e. it does not necessarily need to\nappear at the beginning of the file).\n\n## md5sum.txt generation\n\nOn Linux, it is very easy to generate an `md5sum.txt`, that also includes\n`md5sum_totalbytes`, by navigating to the directory that contains your content\nand then issuing:\n```sh\nfind . ! -name 'md5sum.txt' -type f -exec du -cb {} + | grep total$ | cut -f 1 | xargs printf '# md5sum_totalbytes = 0x%x\\n' \u003e md5sum.txt\nfind . ! -name 'md5sum.txt' -type f -exec md5sum {} \\; \u003e\u003e md5sum.txt\n```\n\n## Prerequisites\n\n* [Visual Studio 2022](https://www.visualstudio.com/vs/community/) or gcc/EDK2.\n* [QEMU](http://www.qemu.org) __v2.7 or later__\n  (NB: You can find QEMU Windows binaries [here](https://qemu.weilnetz.de/w64/))\n\n## Compilation\n\n* If using the Visual Studio solution (`.sln`), just press \u003ckbd\u003eF5\u003c/kbd\u003e to\nhave the application compiled and launched in the QEMU emulator. Remember\nhowever that you may first have to initialize the `gnu-efi` git submodules.\n\n* If using gcc with EDK2 on Linux, and assuming that your edk2 directory resides\nin `/usr/src/edk2`:  \n\n        export EDK2_PATH=\"/usr/src/edk2\"\n        export WORKSPACE=$PWD\n        export PACKAGES_PATH=$WORKSPACE:$EDK2_PATH\n        . $EDK2_PATH/edksetup.sh --reconfig\n        build -a X64 -b RELEASE -t GCC5 -p uefi-md5sum.dsc\n\n## Testing\n\n* The automated GitHub Actions build process is designed to run a very\ncomprehensive list of tests under QEMU. You can find a detailed summary of\nall the tests being run in `tests/test_list.txt`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpbatard%2Fuefi-md5sum","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpbatard%2Fuefi-md5sum","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpbatard%2Fuefi-md5sum/lists"}