{"id":28421143,"url":"https://github.com/latchset/luksmeta","last_synced_at":"2025-10-24T13:46:06.676Z","repository":{"id":49263501,"uuid":"56808790","full_name":"latchset/luksmeta","owner":"latchset","description":null,"archived":false,"fork":false,"pushed_at":"2021-06-21T11:38:18.000Z","size":88,"stargazers_count":26,"open_issues_count":1,"forks_count":7,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-06-29T04:36:39.158Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/latchset.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-04-21T22:13:49.000Z","updated_at":"2025-06-03T23:23:56.000Z","dependencies_parsed_at":"2022-09-07T22:11:08.744Z","dependency_job_id":null,"html_url":"https://github.com/latchset/luksmeta","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/latchset/luksmeta","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/latchset%2Fluksmeta","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/latchset%2Fluksmeta/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/latchset%2Fluksmeta/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/latchset%2Fluksmeta/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/latchset","download_url":"https://codeload.github.com/latchset/luksmeta/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/latchset%2Fluksmeta/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280806798,"owners_count":26394451,"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","status":"online","status_checked_at":"2025-10-24T02:00:06.418Z","response_time":73,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-06-05T04:46:28.627Z","updated_at":"2025-10-24T13:46:06.664Z","avatar_url":"https://github.com/latchset.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![License](http://img.shields.io/:license-lgpl2-blue.svg?style=flat-square)](http://www.gnu.org/licenses/lgpl-2.1.html)\n[![Build Status](https://travis-ci.org/latchset/luksmeta.svg?branch=master)](https://travis-ci.org/latchset/luksmeta)\n[![Code Coverage](http://codecov.io/github/latchset/luksmeta/coverage.svg?branch=master)](http://codecov.io/github/latchset/luksmeta?branch=master)\n[![Coverity Scan Build Status](https://scan.coverity.com/projects/8706/badge.svg)](https://scan.coverity.com/projects/latchset-luksmeta)\n\n# LUKSMeta\n\nWelcome to LUKSMeta! LUKSMeta is a simple library for storing metadata in the LUKSv1 header. This library is licensed under the GNU LGPLv2+.\n\n## Why LUKSMeta?\n\nSome projects need to store additional metadata about a LUKS volume that is accessable before unlocking it. Two such examples are [USBGuard][usbguard] and [Tang][tang]. Fortunately, there is a gap in the LUKS header between the end of the slot area and the payload offset:\n\n    +---------------+------------------+-----------------------------------------+----------------+\n    | LUKSv1 header | LUKSv1 slots (8) |                                         | Encrypted Data |\n    +---------------+------------------+-----------------------------------------+----------------+\n\nLUKSMeta uses this hole to store additional metadata.\n\n## How does LUKSMeta work?\n\nLUKSMeta's on-disk format consists of a header block, followed by 0-8 data blocks. Each block is aligned to 4096 bytes. The LUKSMeta header contains a checksum (CRC32c) of itself and of each data block to detect data corruption. Each data block is also given a 16 byte UUID type to uniquely identify the contents of the block.\n\nThe end result looks like this on disk:\n\n    +---------------+------------------+-----------------+-----------------------+----------------+\n    | LUKSv1 header | LUKSv1 slots (8) | LUKSMeta header | LUKSMeta blocks (0-8) | Encrypted Data |\n    +---------------+------------------+-----------------+-----------------------+----------------+\n\n## LUKSMeta Command Line Interface\n\n    luksmeta test -d DEVICE\n    luksmeta nuke -d DEVICE [-f]\n    luksmeta init -d DEVICE [-f] [-n]\n    luksmeta show -d DEVICE [-s SLOT]\n    luksmeta save -d DEVICE [-s SLOT]  -u UUID  \u003c DATA\n    luksmeta load -d DEVICE  -s SLOT  [-u UUID] \u003e DATA\n    luksmeta wipe -d DEVICE  -s SLOT  [-u UUID] [-f]\n\n### Examples\n\nDestroy all data (including LUKSMeta data) in the LUKSv1 header gap and\ninitalize the gap for LUKSMeta storage:\n\n    $ luksmeta init -n -d /dev/sdz\n    You are about to initialize a LUKS device for metadata storage.\n    Attempting to initialize it may result in data loss if data was\n    already written into the LUKS header gap in a different format.\n    A backup is advised before initialization is performed.\n\n    Do you wish to initialize /dev/sdz? [yn] y\n\nIf already initialized, do nothing. Otherwise, destroy all non-LUKSMeta data\nin the LUKSv1 header gap and initialize the gap for LUKSMeta storage. Skip\nuser confirmation (dangerous!):\n\n    $ luksmeta init -f -d /dev/sdz\n\nWrite some data to a slot:\n\n    $ UUID=`uuidgen`\n    $ echo $UUID\n    31c25e3b-b8e2-4eaa-a427-23aa882feef2\n    $ echo \"Hello, World\" | luksmeta save -d /dev/sdz -s 0 -u $UUID\n\nRead the data back:\n\n    $ luksmeta load -d /dev/sdz -s 0 -u $UUID\n    Hello, World\n\nWipe the data from the slot:\n\n    $ luksmeta wipe -d /dev/sdz -s 0 -u $UUID\n\nErase all trace of LUKSMeta:\n\n    $ luksmeta nuke -d /dev/sdz\n    You are about to erase all data in the LUKSMeta storage area.\n    A backup is advised before erasure is performed.\n\n    Do you wish to nuke /dev/sdz? [yn] y\n\n[usbguard]: https://github.com/dkopecek/usbguard\n[tang]: https://github.com/latchset/tang\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flatchset%2Fluksmeta","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flatchset%2Fluksmeta","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flatchset%2Fluksmeta/lists"}