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

推荐订阅源

D
DataBreaches.Net
T
Threatpost
N
News and Events Feed by Topic
PCI Perspectives
PCI Perspectives
V2EX - 技术
V2EX - 技术
D
Docker
G
Google Developers Blog
Microsoft Security Blog
Microsoft Security Blog
N
News and Events Feed by Topic
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Google Online Security Blog
Google Online Security Blog
The GitHub Blog
The GitHub Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
Y
Y Combinator Blog
M
MIT News - Artificial intelligence
Blog — PlanetScale
Blog — PlanetScale
博客园 - 司徒正美
T
Troy Hunt's Blog
Webroot Blog
Webroot Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
量子位
Apple Machine Learning Research
Apple Machine Learning Research
H
Help Net Security
F
Full Disclosure
B
Blog
O
OpenAI News
H
Hackread – Cybersecurity News, Data Breaches, AI and More
博客园_首页
Google DeepMind News
Google DeepMind News
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Engineering at Meta
Engineering at Meta
大猫的无限游戏
大猫的无限游戏
Forbes - Security
Forbes - Security
Know Your Adversary
Know Your Adversary
B
Blog RSS Feed
MongoDB | Blog
MongoDB | Blog
Scott Helme
Scott Helme
T
The Exploit Database - CXSecurity.com
博客园 - 聂微东
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
The Last Watchdog
The Last Watchdog
Recorded Future
Recorded Future
IT之家
IT之家
Project Zero
Project Zero
Stack Overflow Blog
Stack Overflow Blog
小众软件
小众软件
Attack and Defense Labs
Attack and Defense Labs
L
Lohrmann on Cybersecurity
SecWiki News
SecWiki News
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com

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.