惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
SecWiki News
SecWiki News
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Forbes - Security
Forbes - Security
Schneier on Security
Schneier on Security
W
WeLiveSecurity
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Google Online Security Blog
Google Online Security Blog
O
OpenAI News
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
S
Secure Thoughts
PCI Perspectives
PCI Perspectives
人人都是产品经理
人人都是产品经理
Blog — PlanetScale
Blog — PlanetScale
S
SegmentFault 最新的问题
Help Net Security
Help Net Security
G
GRAHAM CLULEY
Latest news
Latest news
V
Visual Studio Blog
The Cloudflare Blog
T
Troy Hunt's Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Stack Overflow Blog
Stack Overflow Blog
GbyAI
GbyAI
I
InfoQ
Know Your Adversary
Know Your Adversary
B
Blog RSS Feed
V2EX - 技术
V2EX - 技术
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
H
Heimdal Security Blog
Y
Y Combinator Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
The GitHub Blog
The GitHub Blog
P
Palo Alto Networks Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
T
Tor Project blog
T
Threat Research - Cisco Blogs
博客园 - 三生石上(FineUI控件)
Cloudbric
Cloudbric
博客园 - Franky
博客园 - 叶小钗
S
Security @ Cisco Blogs
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
阮一峰的网络日志
阮一峰的网络日志
WordPress大学
WordPress大学
T
Threatpost
MongoDB | Blog
MongoDB | Blog
V
Vulnerabilities – Threatpost
Martin Fowler
Martin Fowler

Backups done right! on restic

restic · Restic 0.19.0 Released restic · Restic 0.18.1 Released restic · REST-server 0.14.0 released restic · Restic 0.18.0 Released restic · Restic 0.17.3 Released restic · Restic 0.17.2 Released restic · Restic 0.17.1 Released restic · Restic 0.17.0 Released restic · REST-server 0.13.0 released restic · Restic 0.16.5 Released restic · Restic 0.16.4 Released restic · Restic 0.16.3 Released restic · Restic 0.16.2 Released restic · Restic 0.16.1 Released restic · Restic 0.16.0 Released restic · REST-server 0.12.1 released restic · REST-server 0.12.0 released restic · Restic 0.15.2 released restic · Restic 0.15.1 Released restic · Restic 0.15.0 Released restic · Restic 0.14.0 Released restic · Restic 0.13.1 Released restic · Restic 0.13.0 Released restic · Rest Server 0.11.0 released restic · Restic 0.12.1 released restic · Restic 0.12.0 released restic · Restic 0.11.0 released restic · restic 0.10.0 released restic · Rest Server 0.10.0 Released restic · restic 0.9.6 released restic · restic 0.9.5 released restic · restic 0.9.4 released restic · New Year, New Infrastructure! restic · restic 0.9.3 released restic · Configuring GitHub Issue Templates restic · Enabling the Go Build Cache on Travis/AppVeyor restic · restic 0.9.2 released restic · restic 0.9.1 released restic · restic 0.9.0 released restic · The restic project turns four! restic · Using rclone as a restic Backend restic · restic 0.8.3 released restic · restic 0.8.2 released restic · moving to restic.net restic · restic 0.8.1 released restic · restic 0.8.0 released restic · Upcoming changes for the S3 backend restic · restic 0.7.3 released restic · restic 0.7.2 released restic · Meeting at FrOSCon 2017 restic · Discourse Forum restic · Please upgrade to restic 0.7.1! restic · restic 0.7.1 released restic · Meeting at FrOSCon 2017 restic · restic 0.7.0 released restic · restic on GoTime #48 restic · restic 0.6.0 released restic · restic 0.6.1 released restic · restic 0.6.0-rc.1 released restic · restic 0.5.0 released restic · restic 0.4.0 released restic · The Go Devroom at FOSDEM 2017 restic · restic 0.3.3 released, Debian package restic · restic 0.3.2 released restic · restic 0.3.1 released restic · restic 0.3.0 released restic · Removing Snapshots restic · restic 0.2.0 released restic · Documentation and Manual restic · OpenChaos at CCC Cologne: restic restic · Foundation - Introducing Content Defined Chunking (CDC) A Solution to the Backup Inconvenience restic · Introduction to the restic Blog
restic · Verifying Code Archive Integrity
2015-09-16 · via Backups done right! on restic

16 Sep 2015

The restic project and all the source code, even this website is hosted by GitHub, and they provide an awesome service! This post describes how we sign releases of restic by using GnuPG so you can independently verify the integrity of the source code. In addition it is show how the automatically generated tar.gz files can be recreated with from the git repository.

Signing Git Tags

In a git repository, “tags” can be created which basically are just named pointers to a commit, optionally annotated with other data. You can read about tags in detail here. Creating a signed tag is really easy: just call git tag with --annotate and --sign, e.g. to sign the current commit as version 0.1.0 run:

$ git tag --annotate --sign --message "v0.1.0" v0.1.0

You can then use git tag --verify to check the signature:

$ git tag --verify v0.1.0
object 16e87d72087a2550b24b413ffc46e9d1fa50dd68
type commit
tag v0.1.0
tagger Alexander Neumann <alexander@bumpern.de> 1440188457 +0200

v0.1.0
gpg: Signature made Fr 21 Aug 2015 22:20:57 CEST using RSA key ID D3F7A907
gpg: Good signature from "Alexander Neumann <alexander@bumpern.de>"

At the moment, we’re in an early stage of the project and haven’t setup a dedicated signing key so all releases are signed by fd0. In order to verify the integrity against this key you need to import it, e.g. from the public key servers:

$ gpg --recv-key D3F7A907

Afterwards make sure to verify the fingerprint:

$ gpg --fingerprint D3F7A907
pub   rsa4096/D3F7A907 2014-11-01
      Key fingerprint = CF8F 18F2 8445 7597 3F79  D4E1 91A6 868B D3F7 A907
uid         [ultimate] Alexander Neumann <alexander@bumpern.de>
sub   rsa4096/4043FDF1 2014-11-01

Recreating Automatically Generated Release Archives

For each tag, we create a release on the restic GitHub project page. You can see a list of all releases here. For each release, GitHub offers an automatically generated tar.gz file containing the code for that release.

For restic version 0.1.0, the tar.gz file can be recreated from a checkout of the repository as follows:

$ git archive --format=tar --prefix=restic-0.1.0/ v0.1.0 | gzip -n > restic-0.1.0.tar.gz

Comparing the SHA-256 hash against the hash of the automatically generated file shows that indeed the same file has been generated:

$ sha256sum restic-0.1.0.tar.gz
df7842cb690a56ce5371013a958d9f324072429897511d4bbfc092d76303f198  restic-0.1.0.tar.gz

$ curl -s -L https://github.com/restic/restic/archive/v0.1.0.tar.gz | sha256sum
df7842cb690a56ce5371013a958d9f324072429897511d4bbfc092d76303f198  -

Signing and Verifying Release Files

The file generated via git archive as described above is then signed with GPG:

$ gpg --armor --detach-sign restic-0.1.0.tar.gz

And both files restic-0.1.0.tar.gz and restic-0.1.0.tar.gz.asc are uploaded and attached to the release on GitHub.

When you download the source code and the signature from the GitHub Releases Page, you can afterwards verify the signature as follows (provided the necessary GPG key has been retrieved):

$ gpg --verify restic-0.1.0.tar.gz.asc 
gpg: assuming signed data in 'restic-0.1.0.tar.gz'
gpg: Signature made Mi 16 Sep 2015 23:33:11 CEST using RSA key ID D3F7A907
gpg: Good signature from "Alexander Neumann <alexander@bumpern.de>"

Conclusion

While GitHub provides a great service, it’s always a good idea to independently verify the integrity of the source code before using it. Especially for package maintainers of the different Linux distributions, this is very important. We’ve seen that all releases of restic are tagged with as signed commit and in addition a GPG signature is provided for the tar.gz files for each release.