{"id":21430875,"url":"https://github.com/hizkifw/brittle","last_synced_at":"2025-07-02T13:37:46.690Z","repository":{"id":151581142,"uuid":"102189648","full_name":"hizkifw/brittle","owner":"hizkifw","description":"Force file integrity","archived":false,"fork":false,"pushed_at":"2019-03-29T05:25:01.000Z","size":18,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-16T22:13:29.563Z","etag":null,"topics":["file-format","hash","integrity","integrity-checker","python3","xor"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hizkifw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-02T10:39:19.000Z","updated_at":"2019-03-29T05:25:03.000Z","dependencies_parsed_at":"2023-04-27T04:17:49.766Z","dependency_job_id":null,"html_url":"https://github.com/hizkifw/brittle","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hizkifw/brittle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hizkifw%2Fbrittle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hizkifw%2Fbrittle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hizkifw%2Fbrittle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hizkifw%2Fbrittle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hizkifw","download_url":"https://codeload.github.com/hizkifw/brittle/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hizkifw%2Fbrittle/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263148932,"owners_count":23421280,"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":["file-format","hash","integrity","integrity-checker","python3","xor"],"created_at":"2024-11-22T22:29:03.385Z","updated_at":"2025-07-02T13:37:46.660Z","avatar_url":"https://github.com/hizkifw.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# brittle\n\n[![Build Status](https://travis-ci.org/HizkiFW/brittle.svg?branch=master)](https://travis-ci.org/HizkiFW/brittle)\n\nA format that makes a file completely unreadable if any part of it gets corrupted.\n\nUsage:\n\n- `python ./brittle.py file.txt out.bin`\n- `python ./brittle.py file.bin out.txt --decode`\n\n## How it works\n\n### Encoding\n\n1. Get hash of entire file (call it hash A)\n2. XOR file using hash A\n3. Get hash of XOR'd file (call it hash B)\n4. XOR hash A using hash B (call it key)\n5. Put key at beginning of file\n\n### Decoding\n\n1. Hash file excluding key (we get hash B)\n2. XOR key using hash B (we get hash A)\n3. XOR file excluding key with hash A\n4. File is good if its hash matches hash A\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhizkifw%2Fbrittle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhizkifw%2Fbrittle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhizkifw%2Fbrittle/lists"}