{"id":17129595,"url":"https://github.com/janos/hashchain","last_synced_at":"2025-10-08T11:21:36.409Z","repository":{"id":57628545,"uuid":"405099318","full_name":"janos/hashchain","owner":"janos","description":"Transparent log with Hash Chain","archived":false,"fork":false,"pushed_at":"2022-04-20T14:17:11.000Z","size":21,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-29T10:32:20.698Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/janos.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":null,"support":null}},"created_at":"2021-09-10T13:58:39.000Z","updated_at":"2022-04-15T09:10:42.000Z","dependencies_parsed_at":"2022-09-26T20:12:04.283Z","dependency_job_id":null,"html_url":"https://github.com/janos/hashchain","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janos%2Fhashchain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janos%2Fhashchain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janos%2Fhashchain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janos%2Fhashchain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/janos","download_url":"https://codeload.github.com/janos/hashchain/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245211025,"owners_count":20578328,"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":[],"created_at":"2024-10-14T19:10:02.125Z","updated_at":"2025-10-08T11:21:31.378Z","avatar_url":"https://github.com/janos.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hash Chain Go library\n\n[![Go](https://github.com/janos/hashchain/workflows/Go/badge.svg)](https://github.com/janos/hashchain/actions)\n[![PkgGoDev](https://pkg.go.dev/badge/resenje.org/hashchain)](https://pkg.go.dev/resenje.org/hashchain)\n[![NewReleases](https://newreleases.io/badge.svg)](https://newreleases.io/github/janos/hashchain)\n\nHash Chain is a Go implementation of a compact append only log structure with integrity validation using cryptographic hash functions.\n\nThe implementation goals are compact storage size and relatively fast writes and reads.\n\n## Data structure\n\nData structure that is written by `Writer` and read by `Reader` is a binary representation of a sequence of records that contain a timestamp, message of the specified size and a hash for integrity validation. The data structure is:\n\n```\n   8 bytes    messageSize   hashSize\n+-----------+-------------+----------+\n\n+-----------+-------------+----------+\n| timestamp |   message   |   hash   |  record id 0\n+-----------+-------------+----------+\n| timestamp |   message   |   hash   |  ...\n+-----------+-------------+----------+\n| timestamp |   message   |   hash   |  record id n\n+-----------+-------------+----------+\n```\n\nWhere the `n`-th hash is a product of the hash function applied to the concatenated data of the previous (`n-1`-th) record hash, `n`-th record timestamp and `n`-th record message, basically the exact data of the complete record size (hashSize + 8 bytes + messageSize) before the same hash in the structure. The hash used for calculation of the first record is a constant data of zero hash (zero bytes of the length of hashSize).\n\n## Validation\n\nThe integrity validation involves successive hashing of records with previous record's hashes and comparing them to the current record hash value. This method ensures detection of changes after the messages is appended to the hash chain structure.\n\n## License\n\nThis application is distributed under the BSD-style license found in the [LICENSE](LICENSE) file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjanos%2Fhashchain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjanos%2Fhashchain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjanos%2Fhashchain/lists"}