# Securing RubyGems with TUF, Part 2

DevFeed: [Securing RubyGems with TUF, Part 2](<https://devfeed.tech/articles/securing-rubygems-with-tuf-part-2-15841.md>)

Original publisher: [Read original article](<https://developer.squareup.com/blog/securing-rubygems-with-tuf-part-2>)

Author: Square Engineering

Published: 2013-12-09T17:05:00Z

Content type: article

Language: en

Sources: [Square Corner](<https://devfeed.tech/sources/square-corner-blog-medium.md>)

Topics: [rubygems](<https://devfeed.tech/topics/rubygems.md>), [open-source-security](<https://devfeed.tech/topics/open-source-security.md>), [public key](<https://devfeed.tech/topics/public-key.md>), [private key](<https://devfeed.tech/topics/private-key.md>), [Cryptography](<https://devfeed.tech/topics/cryptography.md>)

Tags: [attacks](<https://devfeed.tech/tags/attacks.md>), [developers](<https://devfeed.tech/tags/developers.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [framework](<https://devfeed.tech/tags/framework.md>), [offline](<https://devfeed.tech/tags/offline.md>), [online](<https://devfeed.tech/tags/online.md>), [published](<https://devfeed.tech/tags/published.md>), [rubygems](<https://devfeed.tech/tags/rubygems.md>), [update](<https://devfeed.tech/tags/update.md>)

## AI overview

The article describes a TUF delegation flow that lets RubyGems authors publish updates without requiring maintainers to re-promote each release manually. An author signs metadata containing each gem's digest with a private key. New author keys and delegations first enter `recent.txt`, which RubyGems signs with its online key; maintainers later move the delegation to `verified.txt`, signed with an offline key. For subsequent releases, the author updates and signs their gem metadata, while the server replaces its copy without changing `verified.txt`. Clients verify the chain from `targets.txt` through `verified.txt` and the author's metadata, then compare the downloaded gem's digest. The article says this prevents a compromised server from supplying a malicious gem unless the attacker also obtains the RubyGems offline key or the author's private key. It presents reduced key-distribution effort as a benefit, while noting the workflow still requires authors to sign metadata.

## Source excerpt

Applying The Update Framework (TUF) to RubyGems to secure it against nefarious activity.