From efbe3e713c46be480c5fd87eb78105630ca46cd2 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Fri, 6 Nov 2026 12:59:28 +0100 Subject: content: add "Your own password store" series as drafts Three-part beginner tutorial, in English and Italian: creating a store with pass, GPG and git, choosing where to host it, and using it on the phone with HardenedPass. Screenshots are from the 0.3.3 release build on the test store. Co-Authored-By: Claude Opus 5.5 --- .../how-it-works.svg | 67 ++++++++ .../your-own-password-store-part-1/index.md | 169 ++++++++++++++++++++ .../your-own-password-store-part-2/index.md | 139 +++++++++++++++++ .../your-own-password-store-part-3/entry.png | Bin 0 -> 120733 bytes .../your-own-password-store-part-3/generator.png | Bin 0 -> 168517 bytes .../your-own-password-store-part-3/index.md | 133 ++++++++++++++++ .../your-own-password-store-part-3/menu.png | Bin 0 -> 137529 bytes .../your-own-password-store-part-3/new-entry.png | Bin 0 -> 153509 bytes .../your-own-password-store-part-3/passphrase.png | Bin 0 -> 151180 bytes .../your-own-password-store-part-3/pgp-import.png | Bin 0 -> 147211 bytes .../your-own-password-store-part-3/repository.png | Bin 0 -> 144192 bytes .../ssh-generate.png | Bin 0 -> 137342 bytes .../your-own-password-store-part-3/ssh-key.png | Bin 0 -> 104249 bytes .../your-own-password-store-part-3/ssh-public.png | Bin 0 -> 199833 bytes .../your-own-password-store-part-3/store-list.png | Bin 0 -> 96216 bytes .../your-own-password-store-part-3/welcome.png | Bin 0 -> 133771 bytes .../how-it-works.svg | 67 ++++++++ .../your-own-password-store-part-1/index.md | 171 +++++++++++++++++++++ .../your-own-password-store-part-2/index.md | 139 +++++++++++++++++ .../your-own-password-store-part-3/entry.png | Bin 0 -> 122123 bytes .../your-own-password-store-part-3/generator.png | Bin 0 -> 177013 bytes .../your-own-password-store-part-3/index.md | 133 ++++++++++++++++ .../your-own-password-store-part-3/menu.png | Bin 0 -> 140689 bytes .../your-own-password-store-part-3/new-entry.png | Bin 0 -> 157033 bytes .../your-own-password-store-part-3/passphrase.png | Bin 0 -> 152716 bytes .../your-own-password-store-part-3/pgp-import.png | Bin 0 -> 159988 bytes .../your-own-password-store-part-3/repository.png | Bin 0 -> 154354 bytes .../ssh-generate.png | Bin 0 -> 149752 bytes .../your-own-password-store-part-3/ssh-key.png | Bin 0 -> 113405 bytes .../your-own-password-store-part-3/ssh-public.png | Bin 0 -> 215748 bytes .../your-own-password-store-part-3/store-list.png | Bin 0 -> 97353 bytes .../your-own-password-store-part-3/welcome.png | Bin 0 -> 132832 bytes 32 files changed, 1018 insertions(+) create mode 100644 content/en/articles/your-own-password-store-part-1/how-it-works.svg create mode 100644 content/en/articles/your-own-password-store-part-1/index.md create mode 100644 content/en/articles/your-own-password-store-part-2/index.md create mode 100644 content/en/articles/your-own-password-store-part-3/entry.png create mode 100644 content/en/articles/your-own-password-store-part-3/generator.png create mode 100644 content/en/articles/your-own-password-store-part-3/index.md create mode 100644 content/en/articles/your-own-password-store-part-3/menu.png create mode 100644 content/en/articles/your-own-password-store-part-3/new-entry.png create mode 100644 content/en/articles/your-own-password-store-part-3/passphrase.png create mode 100644 content/en/articles/your-own-password-store-part-3/pgp-import.png create mode 100644 content/en/articles/your-own-password-store-part-3/repository.png create mode 100644 content/en/articles/your-own-password-store-part-3/ssh-generate.png create mode 100644 content/en/articles/your-own-password-store-part-3/ssh-key.png create mode 100644 content/en/articles/your-own-password-store-part-3/ssh-public.png create mode 100644 content/en/articles/your-own-password-store-part-3/store-list.png create mode 100644 content/en/articles/your-own-password-store-part-3/welcome.png create mode 100644 content/it/articles/your-own-password-store-part-1/how-it-works.svg create mode 100644 content/it/articles/your-own-password-store-part-1/index.md create mode 100644 content/it/articles/your-own-password-store-part-2/index.md create mode 100644 content/it/articles/your-own-password-store-part-3/entry.png create mode 100644 content/it/articles/your-own-password-store-part-3/generator.png create mode 100644 content/it/articles/your-own-password-store-part-3/index.md create mode 100644 content/it/articles/your-own-password-store-part-3/menu.png create mode 100644 content/it/articles/your-own-password-store-part-3/new-entry.png create mode 100644 content/it/articles/your-own-password-store-part-3/passphrase.png create mode 100644 content/it/articles/your-own-password-store-part-3/pgp-import.png create mode 100644 content/it/articles/your-own-password-store-part-3/repository.png create mode 100644 content/it/articles/your-own-password-store-part-3/ssh-generate.png create mode 100644 content/it/articles/your-own-password-store-part-3/ssh-key.png create mode 100644 content/it/articles/your-own-password-store-part-3/ssh-public.png create mode 100644 content/it/articles/your-own-password-store-part-3/store-list.png create mode 100644 content/it/articles/your-own-password-store-part-3/welcome.png (limited to 'content') diff --git a/content/en/articles/your-own-password-store-part-1/how-it-works.svg b/content/en/articles/your-own-password-store-part-1/how-it-works.svg new file mode 100644 index 0000000..c69b088 --- /dev/null +++ b/content/en/articles/your-own-password-store-part-1/how-it-works.svg @@ -0,0 +1,67 @@ + + How pass, GPG and git work together + On your devices, pass turns a password into a named entry and GPG encrypts it into a file. Git copies that encrypted file to and from the server. The private key and passphrase stay on your devices. + + + + + + + + + + + + YOUR DEVICES + + + your password + hunter2 + + + pass + gives it a name + + + an entry in your store + example.org + + + GPG + locks it with public key + + + encrypted file + example.org.gpg + + + + + private key + + passphrase + unlock the + files, and never + leave here + + + + + SERVER + + + + git + push and pull copy the + encrypted file, nothing else + + + + + encrypted file + example.org.gpg + + + the name is + visible, what's + inside is not + diff --git a/content/en/articles/your-own-password-store-part-1/index.md b/content/en/articles/your-own-password-store-part-1/index.md new file mode 100644 index 0000000..7ba9d93 --- /dev/null +++ b/content/en/articles/your-own-password-store-part-1/index.md @@ -0,0 +1,169 @@ ++++ +title = "Your own password store #1" +author = "Danilo M." +type = "tech" +date = "2026-11-06T10:01:00+01:00" +draft = true +description = "Build a password store from scratch with pass, GPG and git, even if you've never touched any of them." +excerpt = "Build a password store from scratch with pass, GPG and git, even if you've never touched any of them." +image = "/uppies/2026/11/hardenedpass-banner.png" +tags = ["pass", "gnupg", "git", "android", "hardenedpass", "security", "tutorial"] +categories = ["Code", "DIY"] ++++ + +## Build the store + +I've been using [pass](https://www.passwordstore.org/) for years now. No cloud vault, no subscription, no company holding my passwords: just a folder of encrypted files in a git repository, which I can read with any tool I like. When the Android app I used to read that folder on my phone was archived, I forked it, and that's how [HardenedPass](https://danix.xyz/hardenedpass/) was born. + +The thing is, every time I try to explain this setup to someone I see their eyes glaze over at the third acronym. GPG, SSH, git, remotes, keys... it sounds like a lot, and honestly the first time it is a bit of work. But you do it once, and it's a lot less scary than it looks. + +So I'll take you by the hand and we'll build a password store from scratch, starting from nothing, and by the end you'll have your passwords on your phone, encrypted and synced. You don't need to know anything about git or GPG, I'll explain what you need as we go, and you can copy and paste every command. + +This is a series in three parts. Today we create the store, in [part two](../your-own-password-store-part-2/) we give it a home on a server, and in [part three](../your-own-password-store-part-3/) we put it on your phone and start using it. + + + +## What are we building? + +Three tools, each doing one job: + +- **pass** keeps every password in its own small file, and folders group them. That folder is called the *store*. +- **GPG** (the program that does OpenPGP encryption) locks those files. You get a pair of keys: the **public key** locks, the **private key** unlocks, and a **passphrase** protects the private key. +- **git** keeps track of the changes and copies the store between your devices, going through a *remote*, which is simply a copy of the repository living on a server. + +Here's the part that makes all of this work: the server only ever sees encrypted files. It can't read your passwords, and neither can anybody who breaks into it. Decryption happens on your devices only, with a key that never goes to the server. + +{{< image src="how-it-works.svg" alt="Diagram. On your devices, pass turns the password hunter2 into an entry called example.org, and GPG locks it into the encrypted file example.org.gpg. Git pushes and pulls that encrypted file to and from the server. The private key and passphrase unlock the files and stay on your devices. On the server the file name is visible, but its content is not." class="max-w-md mx-auto rounded-lg border border-border" />}} + +{{< callout type="warning" title="What the server can see" >}} +Passwords and everything else inside an entry are encrypted, but **file names are not**. If you have an entry called `bank/mybank.example.org`, whoever can read the repository knows you have an account there, and git history tells them when you changed it. That's why we'll keep the repository private, even if the content is encrypted. +{{< /callout >}} + +## Computer or phone only? + +You have two ways of doing this, and both end in the same place. + +| | With a computer | Phone only | +|---|---|---| +| Typing commands | Real keyboard, copy and paste | On a phone screen, in a terminal | +| Extra software | `pass`, GPG and git, usually one command | [Termux](https://termux.dev/), a terminal app for Android | +| Backup of your key | Easy, on a USB stick | You must find a way to get it off the phone | +| Using the store on a computer later | Already there | Needs the key moved over | + +HardenedPass can't create OpenPGP keys, it only imports them, so *something* has to make the key for you. If you have access to a Linux computer, even for half an hour, take that road: it's more comfortable, and backing up the key is much easier. It's what I'll describe first. If you only have your phone it's perfectly doable, follow along anyway because I'll explain everything here, and then jump to [the phone only route](../your-own-password-store-part-2/#the-phone-only-route) in part two, which uses the same commands. + +## Install the tools + +On Linux everything's in your distribution's repositories: + +```bash +# Debian, Ubuntu, Mint +sudo apt install gnupg pass git + +# Fedora +sudo dnf install gnupg2 pass git + +# Arch +sudo pacman -S gnupg pass git +``` + +On Slackware you already have GPG and git, and `password-store` is on [SlackBuilds.org](https://slackbuilds.org/). + +**On macOS** you can get the same tools from [Homebrew](https://brew.sh/) with `brew install gnupg pass git`. **On Windows** `pass` doesn't run natively, so install [WSL](https://learn.microsoft.com/en-us/windows/wsl/install) with its default Ubuntu and use the Debian command above inside it. From here on, all the commands are the same. + +Now tell git who you are. This is only a label on your changes, it doesn't need to be your real name: + +```bash +git config --global user.name "Your Name" +git config --global user.email "you@example.org" +``` + +## Create your key + +```bash +gpg --full-generate-key +``` + +GPG will ask you a few questions. Here's what I'd answer: + +1. **Kind of key:** press Enter to accept the default. On a recent GPG that's *ECC (sign and encrypt)*. +2. **Elliptic curve:** press Enter again, for *Curve 25519*. +3. **How long the key should be valid:** press Enter for *does not expire*, then `y` to confirm. +4. **Real name and email address:** they don't have to be real, but remember the address, you'll need it in a minute. Leave the comment empty and press `O` to confirm. +5. **Passphrase:** this one deserves its own section, see below. + +The defaults are good, but you have alternatives: + +- **RSA** (option 1) is the old reliable: bigger and slower keys, but it works everywhere. Pick it only if you have a reason to, for example an old tool that doesn't understand the newer curves. +- **ECC and Kyber** is the new post-quantum option in the latest GPG versions. Stay away from it for now: it's very new and not everything can read it. +- **An expiry date**, like `2y`, is a safety net: a key you lost stops being valid by itself. The price is that you must remember to extend it, so if this is your first key I'd rather keep it simple and not set one. + +### Choosing a passphrase + +The passphrase is the last line of defence: if somebody gets a copy of your private key, this is the only thing between them and all of your passwords, and they can try guessing it on their own machine as fast as they like. So it has to be strong, but you also have to remember it and type it, because **nobody can recover it for you**. There's no "forgot my password" link here. + +There are two ways of making a strong one: + +| | Random characters | Diceware | +|---|---|---| +| Looks like | `q7#Vm2!xTz9&Lp4w` | `smartness-dayroom-celtic-cheer-anointer-pulley` | +| Strength | 16 characters: about 105 bits | 6 words: about 77 bits, 7 words: about 90 bits | +| Easy to remember | No | Yes, after a few days | +| Easy to type on a phone | Painful | Quite easy | +| Good for | What a password manager remembers for you | What *you* have to remember | + +**Diceware** means picking random words from a list of 7776, traditionally by rolling five dice for each word. The trick is that the words must be picked *at random*: a sentence you came up with yourself, or your favourite song lyric, is much weaker than it looks, because people are terrible at being random. Each word adds about 12.9 bits, which is why length matters more than the words themselves. + +Random characters pack more strength in less space, but you'll never remember them. So my advice is: **7 diceware words for your GPG passphrase**, the one thing you need to memorize, and let the app generate everything else. The [EFF wordlist and instructions](https://www.eff.org/dice) are all you need, plus real dice if you have them. Write the passphrase on paper while you learn it, and keep the paper somewhere safe at home. + +When you're done, GPG prints a summary with a line looking like this: + +``` +pub ed25519 2026-11-06 [SC] + 1905811B654B494FBD151671593A16E792BC639D +uid Your Name +sub cv25519 2026-11-06 [E] +``` + +That long string is your key's *fingerprint*. GPG also made you a **revocation certificate**, a file in `~/.gnupg/openpgp-revocs.d/` which tells the world the key shouldn't be used anymore, in case you lose control of it. + +## Back up your key, now + +If you lose your private key, your passwords are gone forever. There's no way around this: it's the same encryption that protects you from everyone else. So let's do this before we put anything important in the store. + +```bash +gpg --armor --export-secret-keys you@example.org > private-key.asc +``` + +GPG asks for the passphrase and writes your private key in `private-key.asc`. Copy that file and the revocation certificate on a USB stick that stays at home, preferably an encrypted one, and keep the file around for now, because the phone will need it in part three. + +## Create the store + +Use the address you gave to your key: + +```bash +pass init you@example.org +pass git init +``` + +The first command creates the store in `~/.password-store`, and the second turns it into a git repository. From now on `pass` saves every change in git by itself. + +Let's add a first entry, to have something to test with. The first line is always the password, anything below it is extra information. Type this and finish with `Ctrl+D`: + +```bash +pass insert -m example.org +``` + +``` +hunter2 +username: alice +url: https://example.org +``` + +Check that it works with `pass show example.org`: GPG asks for your passphrase and you should see those three lines. + +## Up next + +If you made it up to here, you have a working password store, but for now it only lives on this computer. In [part two](../your-own-password-store-part-2/) we'll choose where to keep a copy of it, and I'll go through the options, from the big hosted services to your own server. + +See you on the next one 👋 diff --git a/content/en/articles/your-own-password-store-part-2/index.md b/content/en/articles/your-own-password-store-part-2/index.md new file mode 100644 index 0000000..16f47df --- /dev/null +++ b/content/en/articles/your-own-password-store-part-2/index.md @@ -0,0 +1,139 @@ ++++ +title = "Your own password store #2" +author = "Danilo M." +type = "tech" +date = "2026-11-06T10:02:00+01:00" +draft = true +description = "Choose where your encrypted password store lives, from hosted git services to your own server." +excerpt = "Choose where your encrypted password store lives, from hosted git services to your own server." +image = "/uppies/2026/11/hardenedpass-banner.png" +tags = ["pass", "gnupg", "git", "android", "hardenedpass", "security", "tutorial"] +categories = ["Code", "DIY"] ++++ + +## Give it a home + +In [part one](../your-own-password-store-part-1/) we made a GPG key and created a password store, but so far it lives on a single machine. Today we'll give it a home on a server, so that your phone can reach it and you have a copy if that machine dies. If you don't have a computer at all, this is also where you'll find the phone only route. + + + +## Pick a home for your store + +You need a git server to sync through. Since your store is encrypted you have more freedom here than you'd think, these are all good options: + +| Provider | Cost | Run by | Good to know | +|---|---|---|---| +| [Codeberg](https://codeberg.org/) | Free | German non-profit | Private repositories have limits, read below | +| [GitHub](https://github.com/) | Free | Microsoft | Easiest to find help for, private repositories included | +| [GitLab](https://gitlab.com/) | Free | GitLab Inc. | 10 GiB per project, far more than you'll ever need | +| [SourceHut](https://sourcehut.org/) | Optional, from €4 a month | SourceHut | Minimal, no JavaScript needed, SSH only | +| Your own server | What you already pay | You | The most private, but keeping it alive is on you | + +A store is tiny, a few KB per password, so storage limits aren't a concern anywhere. What you're really choosing is who you're comfortable with holding your file names and your history. With a hosted service you're trusting a company or an association, with your own server you're trusting yourself. + +If you don't know what to pick: **GitHub or GitLab** are the easiest to start with, **Codeberg** is the one I'd pick if you already contribute to free software, and **your own server** is what I use myself, once you're comfortable with the rest. + +Whichever you pick, you'll need two things: an **SSH key**, which is how your computer proves who it is without a password, and an **empty, private repository**. Let's make the key first, it's the same for all of them: + +```bash +ssh-keygen -t ed25519 +``` + +Press Enter to accept the file name, and give it a passphrase if you want one. Then print the public part, which is the one you'll paste on the provider's website: + +```bash +cat ~/.ssh/id_ed25519.pub +``` + +As with GPG, the public half isn't a secret. The file without `.pub` is, and it never leaves your computer. + +### GitHub + +1. Create an account, then go to **Settings**, **SSH and GPG keys**, **New SSH key**, and paste your key. +2. Go to [github.com/new](https://github.com/new), name the repository `password-store` and choose **Private**. Don't add a README, a license or a `.gitignore`: the repository must be empty. +3. Your address is `git@github.com:you/password-store.git`. + +### GitLab + +1. Create an account, then in your profile's preferences open **SSH Keys** and add your key. +2. Go to [New project](https://gitlab.com/projects/new), choose **Create blank project**, name it `password-store`, set the visibility to **Private** and untick the option that creates a README. +3. Your address is `git@gitlab.com:you/password-store.git`. + +### Codeberg + +Codeberg is a non-profit for free software, and it's upfront about it: [private repositories](https://docs.codeberg.org/getting-started/faq/) are meant for people who contribute to free software, with a limit of 100 MB, and its [terms](https://codeberg.org/Codeberg/org/src/branch/main/TermsOfUse.md) allow "really small & personal stuff", but not a personal cloud. A password store is small and personal, but if you don't contribute to free software at all, please pick another provider and leave those resources to the people they're meant for. + +1. Create an account, then go to **Settings**, **SSH / GPG keys**, and add your key. +2. Go to [New repository](https://codeberg.org/repo/create), name it `password-store`, tick **Make repository private** and leave everything else unticked so it stays empty. +3. Your address is `git@codeberg.org:you/password-store.git`. + +### SourceHut + +I've never used SourceHut for my store, so this comes from [their documentation](https://man.sr.ht/tutorials/set-up-account-and-git.md). It's a small, independent and very no-nonsense service. Git hosting doesn't require a paid account while the service is in alpha, but paying is how it stays alive. + +1. Register at [meta.sr.ht](https://meta.sr.ht/) and add your key at [meta.sr.ht/keys](https://meta.sr.ht/keys). +2. You don't even need to create the repository: it's created on your first push, and it's **private by default**. +3. Your address is `git@git.sr.ht:~you/password-store`. + +### Your own server + +Any machine you can reach with SSH will do: a VPS, a NAS, a Raspberry Pi in the closet. All you need there is git and an empty repository: + +```bash +git init --bare ~/password-store.git +``` + +Your address is `you@server.example.org:password-store.git`, and if SSH doesn't run on port 22, use the long form: `ssh://you@server.example.org:2222/home/you/password-store.git`. + +If you want a web interface as well, [Forgejo](https://forgejo.org/) is a lightweight self-hosted GitHub alternative, and it's what powers Codeberg. Once it's installed the steps are the same as Codeberg's. Just remember that a server you own only stays safe if you keep it updated. + +## Send your store to the server + +Use your own address here: + +```bash +pass git remote add origin git@github.com:you/password-store.git +pass git push -u origin HEAD +``` + +The first time SSH shows you the server's fingerprint and asks if you trust it. Type `yes`. To be thorough, compare it with the one on the provider's documentation first. + +That's it, your store now lives on the server too. If you open the repository in your browser you'll see `example.org.gpg`, and if you open it you'll see nothing useful. Good. + +## The phone only route + +No computer? Your phone can do everything we did above, thanks to [Termux](https://f-droid.org/packages/com.termux/). Install it from F-Droid or from its GitHub releases, not from the Play Store, and open it. I'll only tell you what's different, the explanations above are still valid. + +First update everything, **this is not optional**. If you skip it, GPG refuses to start with `libgcrypt is too old`. During the upgrade you may be asked what to do with some configuration files: just press Enter to keep the default. + +```bash +pkg upgrade +pkg install gnupg pass git openssh +``` + +Let Termux reach your Download folder, and tap **Allow** when Android asks: + +```bash +termux-setup-storage +``` + +Now it's the same as in part one: [tell git who you are](../your-own-password-store-part-1/#install-the-tools), [create your key](../your-own-password-store-part-1/#create-your-key) and [your store](../your-own-password-store-part-1/#create-the-store), [make an SSH key](#pick-a-home-for-your-store), and [send it all to the server](#send-your-store-to-the-server). A couple of notes: + +- GPG asks for the passphrase in a text box inside the terminal. Type it, move to the Repeat field with the Tab key (it's on the extra row above the keyboard), type it again, press Tab to reach **OK** and then Enter. +- To copy your public SSH key on the provider's website, run `cat ~/.ssh/id_ed25519.pub`, long-press the text in Termux and select it. + +Then export your key where the app can find it: + +```bash +gpg --armor --export-secret-keys you@example.org > ~/storage/downloads/private-key.asc +``` + +{{< callout type="warning" title="Your phone is now your only copy" >}} +With this route, your key lives only on your phone. If the phone dies or gets stolen you lose every password, even though the encrypted files are safe on the server. Before you put real passwords in the store, copy `private-key.asc` somewhere safe: a USB stick through an OTG adapter works. Don't send it through email or a cloud drive. +{{< /callout >}} + +## Up next + +You made it, now your store is safe on a server, and that was the boring part. In [part three](../your-own-password-store-part-3/) we'll install HardenedPass, connect it to your store and see how to use it every day. + +cheers 👋 diff --git a/content/en/articles/your-own-password-store-part-3/entry.png b/content/en/articles/your-own-password-store-part-3/entry.png new file mode 100644 index 0000000..ad84bac Binary files /dev/null and b/content/en/articles/your-own-password-store-part-3/entry.png differ diff --git a/content/en/articles/your-own-password-store-part-3/generator.png b/content/en/articles/your-own-password-store-part-3/generator.png new file mode 100644 index 0000000..015ad0d Binary files /dev/null and b/content/en/articles/your-own-password-store-part-3/generator.png differ diff --git a/content/en/articles/your-own-password-store-part-3/index.md b/content/en/articles/your-own-password-store-part-3/index.md new file mode 100644 index 0000000..642a4c7 --- /dev/null +++ b/content/en/articles/your-own-password-store-part-3/index.md @@ -0,0 +1,133 @@ ++++ +title = "Your own password store #3" +author = "Danilo M." +type = "tech" +date = "2026-11-06T10:03:00+01:00" +draft = true +description = "Install HardenedPass, connect it to your store and use your passwords every day on your phone." +excerpt = "Install HardenedPass, connect it to your store and use your passwords every day on your phone." +image = "/uppies/2026/11/hardenedpass-banner.png" +tags = ["pass", "gnupg", "git", "android", "hardenedpass", "security", "tutorial"] +categories = ["Code", "DIY"] ++++ + +## Use it daily + +This is the part where it all pays off. In [part one](../your-own-password-store-part-1/) we created a key and a password store, and in [part two](../your-own-password-store-part-2/) we sent it to a server. Today we'll put it on your phone, and then we'll see how to live with it day by day. You'll need the address of your repository and the `private-key.asc` file you exported. + + + +## Install HardenedPass + +Go to the [latest release](https://github.com/danixland/HardenedPass/releases/latest) and download `HardenedPass_vX.Y.Z.apk` and `HardenedPass_vX.Y.Z.apk.sha256`. You need Android 12 or newer, and no Google services at all, it runs perfectly on GrapheneOS. + +A password manager is a really bad thing to install from a tampered file, so check the download. In the folder with the two files, on your computer or in Termux, run: + +```bash +sha256sum -c HardenedPass_vX.Y.Z.apk.sha256 +``` + +It must say `OK`. The [install page]({{< relref "/hardenedpass/getting-started/install" >}}) also explains how to verify who signed the APK, which is the stronger check. Copy the APK on the phone if it isn't already there, open it from your file manager and allow the install. + +## Connect the app + +Open the app and tap **Clone Remote Repo**. + +{{< image src="welcome.png" alt="Welcome screen with the buttons Clone Remote Repo, Create Local Repo and Settings." class="max-w-sm mx-auto rounded-lg border border-border" />}} + +{{< callout type="note" title="Don't use Create Local Repo for now" >}} +Create Local Repo is fine for a store living only on your phone, but right now a store made this way can't pull changes if you add a server to it later. Since you already have a repository, you don't need it. +{{< /callout >}} + +Paste your repository's address in **Repository URL**. **SSH key** is already selected, and it's what we want. + +{{< image src="repository.png" alt="Repository information screen with the address filled in and SSH key selected." class="max-w-sm mx-auto rounded-lg border border-border" />}} + +Your phone needs its own SSH key. Tap **Manage**, then **Generate SSH key pair**. + +{{< image src="ssh-key.png" alt="SSH key screen with the buttons Import SSH key and Generate SSH key pair." class="max-w-sm mx-auto rounded-lg border border-border" />}} + +Choose **Ed25519**, leave **Protect with screen lock credential** on and tap **Generate**. Now the app will ask for your fingerprint or PIN every time it uses this key, and the private half never leaves the phone. + +{{< image src="ssh-generate.png" alt="Generate SSH key pair screen with Ed25519 selected and the screen lock protection turned on." class="max-w-sm mx-auto rounded-lg border border-border" />}} + +The app shows you the public key. Tap **Share** to send it to yourself, then add it on your provider's website, in the same place where you [added the first one](../your-own-password-store-part-2/#pick-a-home-for-your-store). A separate key for each device means that if you lose the phone, you can remove that key alone. + +{{< image src="ssh-public.png" alt="Dialog showing the generated public key, with the buttons Later and Share." class="max-w-sm mx-auto rounded-lg border border-border" />}} + +Go back to the repository screen and tap **Clone**. The first time you connect, the app remembers the server's identity, and from then on it refuses to connect if that changes. + +Once the clone is done, the app tells you which key the store is encrypted for. Copy `private-key.asc` on the phone over USB, unless it's already in your Download folder, tap **Import PGP key** and pick the file. + +{{< image src="pgp-import.png" alt="Import PGP key screen listing the store's recipient you@example.org, with an Import PGP key button." class="max-w-sm mx-auto rounded-lg border border-border" />}} + +And there's your store! + +{{< image src="store-list.png" alt="The store list, showing the entry example.org." class="max-w-sm mx-auto rounded-lg border border-border" />}} + +{{< callout type="warning" title="Delete the key file" >}} +The app keeps its own copy, so delete `private-key.asc` from the phone's storage right now, and from your computer's disk too. The only other copy should be your offline backup. +{{< /callout >}} + +Tap your entry. The app asks for the passphrase of your GPG key (the box just says *Password*), and shows you what's inside. + +{{< image src="passphrase.png" alt="Dialog asking for the password, with the keyboard open." class="max-w-sm mx-auto rounded-lg border border-border" />}} + +{{< image src="entry.png" alt="Entry example.org, showing password, username and url with buttons to copy each one." class="max-w-sm mx-auto rounded-lg border border-border" />}} + +If you got here, it works, and the hard part is over. You did it! + +## Daily use + +### Adding a password + +Tap **New entry**, then **Create new password**. Give it a name, usually the site's address, so that autofill can find it later. A folder helps too, if you like to keep things tidy. + +{{< image src="new-entry.png" alt="New entry editor with name, folder, password, username and extra content fields." class="max-w-sm mx-auto rounded-lg border border-border" />}} + +Tap the three dots in the password field to open the generator. **Random** makes character passwords and **Diceware** makes word passwords. For most logins go with Random: you'll never type them anyway, the app does it for you. Diceware is better for the few you must type by hand, like the password of your TV's streaming account. + +{{< image src="generator.png" alt="Password generator sheet on the Diceware tab, with a five word password, length and separator." class="max-w-sm mx-auto rounded-lg border border-border" />}} + +Tap **Use**, then **Save**. There's more on [entries in the docs]({{< relref "/hardenedpass/using/entries" >}}), including [one-time codes]({{< relref "/hardenedpass/using/otp" >}}) if you want to keep your 2FA in the store. + +### Syncing + +This is the one thing to get used to: saving an entry on the phone doesn't send it anywhere. It stays on your phone until you sync. Pull down on the list, or use the menu in the search bar and tap **Synchronize repository**. + +{{< image src="menu.png" alt="The list's menu with Synchronize repository, Pull from remote, Push to remote, Settings and About." class="max-w-sm mx-auto rounded-lg border border-border" />}} + +If you don't want to think about it, turn on **Push after each change** in **Settings**, **Repository**. On the computer the same thing takes two commands: + +```bash +pass git pull +pass git push +``` + +Sync often, and always before you edit something on another device: two devices changing the same entry is the one situation where git needs your help. The [sync page]({{< relref "/hardenedpass/using/sync" >}}) explains how to get out of that. + +### Autofill + +Copy and paste works, but filling your logins directly is much nicer. Open **Settings**, **Autofill**, turn on **Enable Autofill** and choose HardenedPass in the system dialog. It only trusts browsers it knows, and Firefox has the best support. The [autofill page]({{< relref "/hardenedpass/using/autofill" >}}) has the whole list. + +## When things go wrong + +**You lost your phone.** Your entries are encrypted and the key inside the app is protected by your passphrase, so don't panic. Go on your provider's website and remove the phone's SSH key, so it can't reach the repository anymore, then set up the app on the new phone from your backup. If you think somebody may have your passphrase too, read the next one. + +**You think your private key was stolen.** Assume your passwords will be read: create a new key, re-encrypt the store with `pass init new@example.org`, and change the passwords that matter, starting from your email. Moving to a new key doesn't help with old copies of the files, because git history keeps them. + +**You forgot your passphrase.** I'm sorry, but this is the end of the road. Nobody can help you, and that's the whole point of encryption. This is why it's on paper, in a drawer, while you learn it. + +**You lost your key, and you have no backup.** Same as above. Back up your key. + +**Something else broke.** Have a look at the [troubleshooting page]({{< relref "/hardenedpass/reference/troubleshooting" >}}), and if it's a bug, [let me know](https://github.com/danixland/HardenedPass/issues). + +## What's next + +You now have a password manager which you fully control, that doesn't depend on any company, and that works with any tool that speaks `pass`. If tomorrow I stop working on HardenedPass, your passwords are still right there, and that's the whole reason I like this setup. + +There's still more you can do to make this safer: two-factor authentication on your git account, keys limited to a single repository, hiding your entry names, hardware keys. That's a topic of its own and I'll cover it in a future post, for now enjoy your new password store. + +The [complete documentation](https://danix.xyz/hardenedpass/) has all the details about everything we've seen here, and if you get stuck somewhere, let me know. + +I'll see you on the next one 👋 diff --git a/content/en/articles/your-own-password-store-part-3/menu.png b/content/en/articles/your-own-password-store-part-3/menu.png new file mode 100644 index 0000000..53fab2e Binary files /dev/null and b/content/en/articles/your-own-password-store-part-3/menu.png differ diff --git a/content/en/articles/your-own-password-store-part-3/new-entry.png b/content/en/articles/your-own-password-store-part-3/new-entry.png new file mode 100644 index 0000000..cc47d1d Binary files /dev/null and b/content/en/articles/your-own-password-store-part-3/new-entry.png differ diff --git a/content/en/articles/your-own-password-store-part-3/passphrase.png b/content/en/articles/your-own-password-store-part-3/passphrase.png new file mode 100644 index 0000000..48a80bc Binary files /dev/null and b/content/en/articles/your-own-password-store-part-3/passphrase.png differ diff --git a/content/en/articles/your-own-password-store-part-3/pgp-import.png b/content/en/articles/your-own-password-store-part-3/pgp-import.png new file mode 100644 index 0000000..0546df3 Binary files /dev/null and b/content/en/articles/your-own-password-store-part-3/pgp-import.png differ diff --git a/content/en/articles/your-own-password-store-part-3/repository.png b/content/en/articles/your-own-password-store-part-3/repository.png new file mode 100644 index 0000000..67173fe Binary files /dev/null and b/content/en/articles/your-own-password-store-part-3/repository.png differ diff --git a/content/en/articles/your-own-password-store-part-3/ssh-generate.png b/content/en/articles/your-own-password-store-part-3/ssh-generate.png new file mode 100644 index 0000000..5ff7d8b Binary files /dev/null and b/content/en/articles/your-own-password-store-part-3/ssh-generate.png differ diff --git a/content/en/articles/your-own-password-store-part-3/ssh-key.png b/content/en/articles/your-own-password-store-part-3/ssh-key.png new file mode 100644 index 0000000..b454f1a Binary files /dev/null and b/content/en/articles/your-own-password-store-part-3/ssh-key.png differ diff --git a/content/en/articles/your-own-password-store-part-3/ssh-public.png b/content/en/articles/your-own-password-store-part-3/ssh-public.png new file mode 100644 index 0000000..8ff56ad Binary files /dev/null and b/content/en/articles/your-own-password-store-part-3/ssh-public.png differ diff --git a/content/en/articles/your-own-password-store-part-3/store-list.png b/content/en/articles/your-own-password-store-part-3/store-list.png new file mode 100644 index 0000000..38e71bc Binary files /dev/null and b/content/en/articles/your-own-password-store-part-3/store-list.png differ diff --git a/content/en/articles/your-own-password-store-part-3/welcome.png b/content/en/articles/your-own-password-store-part-3/welcome.png new file mode 100644 index 0000000..de5a82d Binary files /dev/null and b/content/en/articles/your-own-password-store-part-3/welcome.png differ diff --git a/content/it/articles/your-own-password-store-part-1/how-it-works.svg b/content/it/articles/your-own-password-store-part-1/how-it-works.svg new file mode 100644 index 0000000..5126721 --- /dev/null +++ b/content/it/articles/your-own-password-store-part-1/how-it-works.svg @@ -0,0 +1,67 @@ + + Come lavorano insieme pass, GPG e git + Sui tuoi dispositivi, pass trasforma una password in una voce con un nome e GPG la cifra in un file. Git copia quel file cifrato da e verso il server. La chiave privata e la passphrase restano sui tuoi dispositivi. + + + + + + + + + + + + I TUOI DISPOSITIVI + + + la tua password + hunter2 + + + pass + le dà un nome + + + una voce del tuo archivio + example.org + + + GPG + cifra con chiave pubblica + + + file cifrato + example.org.gpg + + + + + chiave privata + + passphrase + aprono i file, + e non escono + mai da qui + + + + + SERVER + + + + git + push e pull copiano il + file cifrato, nient'altro + + + + + file cifrato + example.org.gpg + + + il nome si vede, + il contenuto + invece no + diff --git a/content/it/articles/your-own-password-store-part-1/index.md b/content/it/articles/your-own-password-store-part-1/index.md new file mode 100644 index 0000000..adf84b6 --- /dev/null +++ b/content/it/articles/your-own-password-store-part-1/index.md @@ -0,0 +1,171 @@ ++++ +title = "Il tuo archivio di password #1" +author = "Danilo M." +type = "tech" +date = "2026-11-06T10:01:00+01:00" +draft = true +description = "Crea da zero un archivio di password con pass, GPG e git, anche se non li hai mai toccati." +excerpt = "Crea da zero un archivio di password con pass, GPG e git, anche se non li hai mai toccati." +image = "/uppies/2026/11/hardenedpass-banner.png" +tags = ["pass", "gnupg", "git", "android", "hardenedpass", "sicurezza", "tutorial"] +categories = ["Code", "DIY"] ++++ + +## Crea l'archivio + +Uso [pass](https://www.passwordstore.org/) da anni ormai. Niente vault nel cloud, niente abbonamenti, nessuna azienda che ospita le mie password: solo una cartella di file cifrati in un repository git, che posso leggere con qualsiasi strumento mi vada. Quando l'app Android che usavo per leggere quella cartella sul telefono è stata archiviata, ne ho fatto un fork, ed è così che è nato [HardenedPass](https://danix.xyz/it/hardenedpass/). + +Il punto è che ogni volta che provo a spiegare questo sistema a qualcuno, al terzo acronimo vedo lo sguardo che si spegne. GPG, SSH, git, remote, chiavi... sembra tanta roba, e onestamente la prima volta un po' di lavoro c'è. Però lo fai una volta sola, ed è molto meno spaventoso di come sembra. + +Quindi oggi, procediamo insieme e creiamo un archivio di password da zero, partendo dal nulla, e alla fine avrai le tue password sul telefono, cifrate e sincronizzate. Non serve sapere niente di git o GPG, ti spiego quello che serve man mano, e tutti i comandi si possono copiare e incollare. + +Questa è una serie in tre parti. Oggi creiamo l'archivio, nella [seconda parte](../your-own-password-store-part-2/) gli diamo una casa su un server, e nella [terza parte](../your-own-password-store-part-3/) lo mettiamo sul telefono e iniziamo a usarlo. + + + +## Cosa stiamo creando? + +Tre strumenti, ognuno con il suo lavoro: + +- **pass** contiene ogni password in un suo piccolo file, e le cartelle le raggruppano. La cartella principale si chiama *archivio*. +- **GPG** (il programma che si occupa della cifratura OpenPGP) chiude a chiave quei file. Hai una coppia di chiavi: la **chiave pubblica** cripta, la **chiave privata** decodifica, e una **passphrase** protegge la chiave privata. +- **git** tiene traccia delle modifiche e copia l'archivio tra i tuoi dispositivi, passando per un *remote*, che è semplicemente una copia del repository che vive su un server. + +Ecco la parte che fa funzionare tutto: il server vede solo file cifrati. Non può leggere le tue password, e non può farlo neanche chi dovesse entrarci. La decifratura avviene solo sui tuoi dispositivi, con una chiave che sul server non ci va mai. + +{{< image src="how-it-works.svg" alt="Diagramma. Sui tuoi dispositivi, pass trasforma la password hunter2 in una voce chiamata example.org, e GPG la chiude nel file cifrato example.org.gpg. Git manda e riceve quel file cifrato dal server. La chiave privata e la passphrase aprono i file e restano sui tuoi dispositivi. Sul server il nome del file si vede, il contenuto no." class="max-w-md mx-auto rounded-lg border border-border" />}} + +{{< callout type="warning" title="Cosa può vedere il server" >}} +Le password e tutto il resto dentro una voce sono cifrati, ma **i nomi dei file no**. Se hai una voce che si chiama `banca/miabanca.example.org`, chi può leggere il repository sa che lì hai un conto, e la cronologia di git gli dice quando l'hai modificata. Per questo terremo il repository privato, anche se il contenuto è cifrato. +{{< /callout >}} + +## Computer o solo telefono? + +Ci sono due strade, ed entrambe portano allo stesso risultato. + +| | Con un computer | Solo telefono | +|---|---|---| +| Scrivere i comandi | Tastiera vera, copia e incolla | Sullo schermo del telefono, in un terminale | +| Software in più | `pass`, GPG e git, di solito un comando | [Termux](https://termux.dev/), un'app terminale per Android | +| Backup della chiave | Facile, su una chiavetta USB | Devi trovare il modo di portarla fuori dal telefono | +| Usare l'archivio su un computer in futuro | È già lì | Bisogna spostare la chiave | + +HardenedPass non può creare chiavi OpenPGP, può solo importarle, quindi *qualcosa* deve generarti la chiave. Se hai accesso a un computer Linux, anche solo per mezz'ora, usalo: è più comodo, e fare il backup della chiave è molto più facile. È quello che descrivo per primo. + +Se hai solo il telefono si può fare benissimo: segui comunque, perché qui spiego tutto, e poi passa alla [strada solo telefono](../your-own-password-store-part-2/#la-strada-solo-telefono) nella seconda parte, che usa gli stessi comandi. + +## Installa gli strumenti + +Su Linux c'è tutto nei repository della tua distribuzione: + +```bash +# Debian, Ubuntu, Mint +sudo apt install gnupg pass git + +# Fedora +sudo dnf install gnupg2 pass git + +# Arch +sudo pacman -S gnupg pass git +``` + +Su Slackware hai già GPG e git, e `password-store` è su [SlackBuilds.org](https://slackbuilds.org/). + +**Su macOS** puoi prendere gli stessi strumenti da [Homebrew](https://brew.sh/) con `brew install gnupg pass git`. **Su Windows** `pass` non gira in modo nativo, quindi installa [WSL](https://learn.microsoft.com/it-it/windows/wsl/install) con la sua Ubuntu predefinita e usa lì dentro il comando per Debian qui sopra. Da qui in poi i comandi sono tutti uguali. + +Adesso di' a git chi sei. È solo un'etichetta sulle tue modifiche, non deve essere per forza il tuo vero nome: + +```bash +git config --global user.name "Il Tuo Nome" +git config --global user.email "you@example.org" +``` + +## Crea la tua chiave + +```bash +gpg --full-generate-key +``` + +GPG ti farà qualche domanda. Ecco cosa risponderei: + +1. **Tipo di chiave:** premi Invio per accettare quello predefinito. Con un GPG recente è *ECC (sign and encrypt)*. +2. **Curva ellittica:** premi di nuovo Invio, per *Curve 25519*. +3. **Durata della chiave:** premi Invio per *does not expire* (non scade), poi `y` per confermare. +4. **Nome e indirizzo email:** non devono essere veri, ma ricordati l'indirizzo, ti serve tra un attimo. Lascia vuoto il commento e premi `O` per confermare. +5. **Passphrase:** questa si merita una sezione tutta sua, la trovi qui sotto. + +I valori predefiniti vanno bene, ma hai delle alternative: + +- **RSA** (opzione 1) è il vecchio affidabile: chiavi più grandi e più lente, ma funziona ovunque. Sceglilo solo se hai un motivo, per esempio un vecchio strumento che non capisce le curve più recenti. +- **ECC and Kyber** è la nuova opzione post-quantistica delle ultime versioni di GPG. Per ora lasciala stare: è molto recente e non tutto la sa leggere. +- **Una data di scadenza**, tipo `2y`, è una rete di sicurezza: una chiave che hai perso smette da sola di essere valida. Il prezzo è che devi ricordarti di prolungarla, quindi se è la tua prima chiave preferirei farla semplice e non impostarla. + +### Scegliere una passphrase + +La passphrase è l'ultima linea di difesa: se qualcuno mette le mani su una copia della tua chiave privata, è l'unica cosa tra lui e tutte le tue password, e può provare a indovinarla sulla sua macchina alla velocità che vuole. Quindi deve essere robusta, ma devi anche ricordarla e digitarla, perché **nessuno può recuperartela**. Qui non esiste il link "ho dimenticato la password". + +Ci sono due modi per crearne una robusta: + +| | Caratteri casuali | Diceware | +|---|---|---| +| Aspetto | `q7#Vm2!xTz9&Lp4w` | `smartness-dayroom-celtic-cheer-anointer-pulley` | +| Robustezza | 16 caratteri: circa 105 bit | 6 parole: circa 77 bit, 7 parole: circa 90 bit | +| Facile da ricordare | No | Sì, dopo qualche giorno | +| Facile da digitare sul telefono | Penoso | Abbastanza | +| Ideale per | Quello che ricorda il gestore di password al posto tuo | Quello che devi ricordare *tu* | + +**Diceware** vuol dire pescare parole a caso da una lista di 7776, tradizionalmente tirando cinque dadi per ogni parola. Il trucco è che le parole devono essere scelte *a caso*: una frase inventata da te, o il verso della tua canzone preferita, è molto più debole di quanto sembri, perché le persone sono pessime a fare le cose a caso. Ogni parola aggiunge circa 12,9 bit, ed è per questo che conta di più quante parole usi che quali. + +I caratteri casuali mettono più robustezza in meno spazio, ma non li ricorderai mai. Quindi il mio consiglio è: **7 parole diceware per la passphrase di GPG**, l'unica cosa che devi imparare a memoria, e lascia che tutto il resto lo generi l'app. La [lista di parole e le istruzioni dell'EFF](https://www.eff.org/dice) sono in inglese, ma sono tutto quello che ti serve, più dei dadi veri se li hai. Scrivi la passphrase su un foglio mentre la impari, e tieni il foglio in un posto sicuro in casa. + +Quando hai finito, GPG stampa un riepilogo con una riga di questo tipo: + +``` +pub ed25519 2026-11-06 [SC] + 1905811B654B494FBD151671593A16E792BC639D +uid Il Tuo Nome +sub cv25519 2026-11-06 [E] +``` + +Quella stringa lunga è l'*impronta* (fingerprint) della tua chiave. GPG ti ha anche preparato un **certificato di revoca**, un file in `~/.gnupg/openpgp-revocs.d/` che dice al mondo di non usare più la chiave, nel caso ne perdessi il controllo. + +## Fai subito il backup della chiave + +Se perdi la chiave privata, le tue password sono perse per sempre. Non c'è modo di aggirarlo: è la stessa cifratura che ti protegge da tutti gli altri. Quindi facciamolo prima di mettere qualcosa di importante nell'archivio. + +```bash +gpg --armor --export-secret-keys you@example.org > private-key.asc +``` + +GPG chiede la passphrase e scrive la tua chiave privata in `private-key.asc`. Copia quel file e il certificato di revoca su una chiavetta USB che resta a casa, meglio se cifrata, e per ora tieni il file a portata di mano, perché nella terza parte servirà al telefono. + +## Inizializza l'archivio + +Usa l'indirizzo che hai dato alla chiave: + +```bash +pass init you@example.org +pass git init +``` + +Il primo comando crea l'archivio in `~/.password-store`, il secondo lo trasforma in un repository git. Da adesso in poi `pass` salva da solo ogni modifica in git. + +Aggiungiamo una prima voce, così abbiamo qualcosa con cui provare. La prima riga è sempre la password, tutto quello che sta sotto sono informazioni aggiuntive. Scrivi questo e termina con `Ctrl+D`: + +```bash +pass insert -m example.org +``` + +``` +hunter2 +username: alice +url: https://example.org +``` + +Controlla che funzioni con `pass show example.org`: GPG ti chiede la passphrase e dovresti vedere quelle tre righe. + +## Prossima puntata + +A questo punto hai un archivio di password funzionante, ma per ora vive solo su questo computer. Nella [seconda parte](../your-own-password-store-part-2/) scegliamo dove tenerne una copia, e vediamo le varie opzioni, dai grandi servizi in hosting fino al tuo server. + +Alla prossima 👋 diff --git a/content/it/articles/your-own-password-store-part-2/index.md b/content/it/articles/your-own-password-store-part-2/index.md new file mode 100644 index 0000000..5f6d486 --- /dev/null +++ b/content/it/articles/your-own-password-store-part-2/index.md @@ -0,0 +1,139 @@ ++++ +title = "Il tuo archivio di password #2" +author = "Danilo M." +type = "tech" +date = "2026-11-06T10:02:00+01:00" +draft = true +description = "Scegli dove far vivere il tuo archivio di password cifrato, dai servizi git in hosting fino al tuo server." +excerpt = "Scegli dove far vivere il tuo archivio di password cifrato, dai servizi git in hosting fino al tuo server." +image = "/uppies/2026/11/hardenedpass-banner.png" +tags = ["pass", "gnupg", "git", "android", "hardenedpass", "sicurezza", "tutorial"] +categories = ["Code", "DIY"] ++++ + +## Dagli una casa + +Nella [prima parte](../your-own-password-store-part-1/) abbiamo creato una chiave GPG e un archivio di password, ma per ora vive su una macchina sola. Oggi gli diamo una casa su un server, così il telefono ci può arrivare e ne hai una copia se quella macchina muore. Se non hai proprio un computer, qui trovi anche la strada solo telefono. + + + +## Scegli una casa per il tuo archivio + +Ti serve un server git da usare per sincronizzare. Visto che il tuo archivio è cifrato hai più libertà di quanto pensi, e queste sono tutte buone opzioni: + +| Provider | Costo | Gestito da | Da sapere | +|---|---|---|---| +| [Codeberg](https://codeberg.org/) | Gratis | Associazione tedesca non profit | I repository privati hanno dei limiti, leggi sotto | +| [GitHub](https://github.com/) | Gratis | Microsoft | Il più facile per cui trovare aiuto, repository privati inclusi | +| [GitLab](https://gitlab.com/) | Gratis | GitLab Inc. | 10 GiB per progetto, molto più di quanto ti servirà mai | +| [SourceHut](https://sourcehut.org/) | Facoltativo, da 4 € al mese | SourceHut | Minimale, non serve JavaScript, solo SSH | +| un tuo server | Quello che già paghi | Tu | Il più riservato, ma tenerlo in vita tocca a te | + +Un archivio è minuscolo, qualche KB per password, quindi i limiti di spazio non sono un problema da nessuna parte. Quello che stai scegliendo davvero è a chi ti va bene affidare i nomi dei tuoi file e la tua cronologia. Con un servizio in hosting ti fidi di un'azienda o di un'associazione, con un tuo server ti fidi di te stesso. + +Se non sai cosa scegliere: **GitHub o GitLab** sono i più facili per iniziare, **Codeberg** è quello che sceglierei se contribuisci già al software libero, l'opzione **un tuo server** è quello che uso io, quando ti sentirai a tuo agio con tutto il resto. + +Qualunque sia la scelta, ti servono due cose: una **chiave SSH**, che è il modo in cui il tuo computer dimostra chi è senza password, e un **repository vuoto e privato**. Partiamo dalla chiave, che è uguale per tutti: + +```bash +ssh-keygen -t ed25519 +``` + +Premi Invio per accettare il nome del file, e dalle una passphrase se vuoi. Poi stampa la parte pubblica, che è quella da incollare sul sito del provider: + +```bash +cat ~/.ssh/id_ed25519.pub +``` + +Come per GPG, la metà pubblica non è un segreto. Il file senza `.pub` invece lo è, e non lascia mai il tuo computer. + +### GitHub + +1. Crea un account, poi vai su **Settings**, **SSH and GPG keys**, **New SSH key** e incolla la tua chiave. +2. Vai su [github.com/new](https://github.com/new), chiama il repository `password-store` e scegli **Private**. Non aggiungere README, licenza o `.gitignore`: il repository deve essere vuoto. +3. Il tuo indirizzo è `git@github.com:you/password-store.git`. + +### GitLab + +1. Crea un account, poi nelle preferenze del tuo profilo apri **SSH Keys** e aggiungi la tua chiave. +2. Vai su [New project](https://gitlab.com/projects/new), scegli **Create blank project**, chiamalo `password-store`, imposta la visibilità su **Private** e togli la spunta all'opzione che crea un README. +3. Il tuo indirizzo è `git@gitlab.com:you/password-store.git`. + +### Codeberg + +Codeberg è un'associazione non profit per il software libero, e lo dice chiaramente: i [repository privati](https://docs.codeberg.org/getting-started/faq/) sono pensati per chi contribuisce al software libero, con un limite di 100 MB, e i suoi [termini](https://codeberg.org/Codeberg/org/src/branch/main/TermsOfUse.md) permettono "really small & personal stuff", cioè roba piccola e personale, ma non un cloud privato. Un archivio di password è piccolo e personale, ma se non contribuisci in nessun modo al software libero, per favore scegli un altro provider e lascia quelle risorse a chi sono destinate. + +1. Crea un account, poi vai su **Settings**, **SSH / GPG keys** e aggiungi la tua chiave. +2. Vai su [New repository](https://codeberg.org/repo/create), chiamalo `password-store`, spunta **Make repository private** e lascia tutto il resto senza spunta, così resta vuoto. +3. Il tuo indirizzo è `git@codeberg.org:you/password-store.git`. + +### SourceHut + +Non ho mai usato SourceHut per il mio archivio, quindi questo viene dalla [loro documentazione](https://man.sr.ht/tutorials/set-up-account-and-git.md). È un servizio piccolo, indipendente e molto essenziale. L'hosting git non richiede un account a pagamento finché il servizio è in alpha, ma è pagando che resta in vita. + +1. Registrati su [meta.sr.ht](https://meta.sr.ht/) e aggiungi la tua chiave su [meta.sr.ht/keys](https://meta.sr.ht/keys). +2. Non serve neanche creare il repository: viene creato al primo push, ed è **privato di default**. +3. Il tuo indirizzo è `git@git.sr.ht:~you/password-store`. + +### un tuo server + +Va bene qualsiasi macchina raggiungibile via SSH: una VPS, un NAS, un Raspberry Pi nello sgabuzzino. Lì ti servono solo git e un repository vuoto: + +```bash +git init --bare ~/password-store.git +``` + +Il tuo indirizzo è `you@server.example.org:password-store.git`, e se SSH non gira sulla porta 22 usa la forma lunga: `ssh://you@server.example.org:2222/home/you/password-store.git`. + +Se vuoi anche un'interfaccia web, [Forgejo](https://forgejo.org/) è un'alternativa leggera a GitHub da ospitare in casa, ed è quello che fa girare Codeberg. Una volta installato, i passaggi sono gli stessi di Codeberg. Ricordati solo che un server tuo resta sicuro solo se lo tieni aggiornato. + +## Manda l'archivio sul server + +Qui usa il tuo indirizzo: + +```bash +pass git remote add origin git@github.com:you/password-store.git +pass git push -u origin HEAD +``` + +La prima volta SSH ti mostra l'impronta del server e ti chiede se ti fidi. Scrivi `yes`. Per essere scrupoloso, confrontala prima con quella nella documentazione del provider. + +Fatto, adesso il tuo archivio vive anche sul server. Se apri il repository nel browser vedrai `example.org.gpg`, e se lo apri non vedrai niente di utile. Bene così. + +## La strada solo telefono + +Niente computer? Il telefono può fare tutto quello che abbiamo fatto finora, grazie a [Termux](https://f-droid.org/packages/com.termux/). Installalo da F-Droid o dalle release su GitHub, non dal Play Store, e aprilo. Ti dico solo quello che cambia, le spiegazioni restano valide. + +Per prima cosa aggiorna tutto, e **non è facoltativo**. Se lo salti, GPG si rifiuta di partire con `libgcrypt is too old`. Durante l'aggiornamento potrebbe chiederti cosa fare con alcuni file di configurazione: premi semplicemente Invio per tenere il valore predefinito. + +```bash +pkg upgrade +pkg install gnupg pass git openssh +``` + +Permetti a Termux di raggiungere la cartella Download, e tocca **Consenti** quando Android lo chiede: + +```bash +termux-setup-storage +``` + +Adesso è tutto come nella prima parte: [di' a git chi sei](../your-own-password-store-part-1/#installa-gli-strumenti), [crea la tua chiave](../your-own-password-store-part-1/#crea-la-tua-chiave) e [il tuo archivio](../your-own-password-store-part-1/#inizializza-larchivio), [crea una chiave SSH](#scegli-una-casa-per-il-tuo-archivio) e [manda tutto sul server](#manda-larchivio-sul-server). Un paio di note: + +- GPG chiede la passphrase in una finestra di testo dentro il terminale. Scrivila, passa al campo Repeat con il tasto Tab (è nella riga di tasti extra sopra la tastiera), scrivila di nuovo, premi Tab per arrivare su **OK** e poi Invio. +- Per copiare la tua chiave SSH pubblica sul sito del provider, esegui `cat ~/.ssh/id_ed25519.pub`, tieni premuto sul testo in Termux e selezionalo. + +Poi esporta la chiave dove l'app la può trovare: + +```bash +gpg --armor --export-secret-keys you@example.org > ~/storage/downloads/private-key.asc +``` + +{{< callout type="warning" title="Il telefono ora ha la tua unica copia" >}} +Con questa strada la tua chiave vive solo sul telefono. Se il telefono muore o te lo rubano perdi tutte le password, anche se i file cifrati sono al sicuro sul server. Prima di mettere password vere nell'archivio, copia `private-key.asc` in un posto sicuro: va bene una chiavetta USB con un adattatore OTG. Non mandarla via email o su un cloud. +{{< /callout >}} + +## Prossima puntata + +Adesso il tuo archivio è al sicuro su un server, e la parte noiosa è finita. Nella [terza parte](../your-own-password-store-part-3/) installiamo HardenedPass, lo colleghiamo al tuo archivio e vediamo come usarlo tutti i giorni. + +Alla prossima 👋 diff --git a/content/it/articles/your-own-password-store-part-3/entry.png b/content/it/articles/your-own-password-store-part-3/entry.png new file mode 100644 index 0000000..9dca49e Binary files /dev/null and b/content/it/articles/your-own-password-store-part-3/entry.png differ diff --git a/content/it/articles/your-own-password-store-part-3/generator.png b/content/it/articles/your-own-password-store-part-3/generator.png new file mode 100644 index 0000000..4c8af5e Binary files /dev/null and b/content/it/articles/your-own-password-store-part-3/generator.png differ diff --git a/content/it/articles/your-own-password-store-part-3/index.md b/content/it/articles/your-own-password-store-part-3/index.md new file mode 100644 index 0000000..d724625 --- /dev/null +++ b/content/it/articles/your-own-password-store-part-3/index.md @@ -0,0 +1,133 @@ ++++ +title = "Il tuo archivio di password #3" +author = "Danilo M." +type = "tech" +date = "2026-11-06T10:03:00+01:00" +draft = true +description = "Installa HardenedPass, collegalo al tuo archivio e usa le tue password tutti i giorni sul telefono." +excerpt = "Installa HardenedPass, collegalo al tuo archivio e usa le tue password tutti i giorni sul telefono." +image = "/uppies/2026/11/hardenedpass-banner.png" +tags = ["pass", "gnupg", "git", "android", "hardenedpass", "sicurezza", "tutorial"] +categories = ["Code", "DIY"] ++++ + +## Usalo ogni giorno + +Questa è la parte in cui tutto ripaga. Nella [prima parte](../your-own-password-store-part-1/) abbiamo creato una chiave e un archivio di password, e nella [seconda parte](../your-own-password-store-part-2/) l'abbiamo mandato su un server. Oggi lo mettiamo sul telefono, e poi vediamo come conviverci giorno per giorno. Ti serviranno l'indirizzo del tuo repository e il file `private-key.asc` che hai esportato. + + + +## Installa HardenedPass + +Vai sull'[ultima release](https://github.com/danixland/HardenedPass/releases/latest) e scarica `HardenedPass_vX.Y.Z.apk` e `HardenedPass_vX.Y.Z.apk.sha256`. Ti serve Android 12 o più recente, e nessun servizio Google: gira benissimo su GrapheneOS. + +Un gestore di password è proprio una brutta cosa da installare da un file manomesso, quindi controlla il download. Nella cartella con i due file, sul computer o in Termux, esegui: + +```bash +sha256sum -c HardenedPass_vX.Y.Z.apk.sha256 +``` + +Deve dire `OK`. La [pagina di installazione]({{< relref "/hardenedpass/getting-started/install" >}}) spiega anche come verificare chi ha firmato l'APK, che è il controllo più forte. Copia l'APK sul telefono se non è già lì, aprilo dal file manager e consenti l'installazione. + +## Collega l'app + +Apri l'app e tocca **Clona repo remoto**. + +{{< image src="welcome.png" alt="Schermata di benvenuto con i pulsanti Clona repo remoto, Crea repo locale e Impostazioni." class="max-w-sm mx-auto rounded-lg border border-border" />}} + +{{< callout type="note" title="Per ora non usare Crea repo locale" >}} +Crea repo locale va bene per un archivio che vive solo sul telefono, ma al momento un archivio creato così non riesce a fare il pull delle modifiche se in seguito gli aggiungi un server. Visto che hai già un repository, non ti serve. +{{< /callout >}} + +Incolla l'indirizzo del tuo repository in **URL del repository**. **Chiave SSH** è già selezionata, ed è quello che vogliamo. + +{{< image src="repository.png" alt="Schermata Informazioni del repository con l'indirizzo compilato e Chiave SSH selezionata." class="max-w-sm mx-auto rounded-lg border border-border" />}} + +Il telefono ha bisogno di una chiave SSH tutta sua. Tocca **Gestisci**, poi **Genera coppia di chiavi SSH**. + +{{< image src="ssh-key.png" alt="Schermata Chiave SSH con i pulsanti Importa chiave SSH e Genera coppia di chiavi SSH." class="max-w-sm mx-auto rounded-lg border border-border" />}} + +Scegli **Ed25519**, lascia attivo **Proteggi con credenziali di blocco schermo** e tocca **Genera**. Ora l'app ti chiederà impronta o PIN ogni volta che usa questa chiave, e la metà privata non lascia mai il telefono. + +{{< image src="ssh-generate.png" alt="Schermata Genera coppia di chiavi SSH con Ed25519 selezionato e la protezione del blocco schermo attiva." class="max-w-sm mx-auto rounded-lg border border-border" />}} + +L'app ti mostra la chiave pubblica. Tocca **Condividi** per mandartela, poi aggiungila sul sito del tuo provider, nello stesso posto in cui hai [aggiunto la prima](../your-own-password-store-part-2/#scegli-una-casa-per-il-tuo-archivio). Una chiave separata per ogni dispositivo vuol dire che se perdi il telefono puoi rimuovere solo quella. + +{{< image src="ssh-public.png" alt="Finestra che mostra la chiave pubblica generata, con i pulsanti Più tardi e Condividi." class="max-w-sm mx-auto rounded-lg border border-border" />}} + +Torna alla schermata del repository e tocca **Clona**. Alla prima connessione l'app memorizza l'identità del server, e da quel momento si rifiuta di collegarsi se cambia. + +Finito il clone, l'app ti dice per quale chiave è cifrato l'archivio. Copia `private-key.asc` sul telefono via USB, se non è già nella cartella Download, tocca **Importa chiave PGP** e scegli il file. + +{{< image src="pgp-import.png" alt="Schermata Importa chiave PGP con il destinatario dell'archivio you@example.org e il pulsante Importa chiave PGP." class="max-w-sm mx-auto rounded-lg border border-border" />}} + +Ed eccolo lì, il tuo archivio! + +{{< image src="store-list.png" alt="L'elenco dell'archivio, con la voce example.org." class="max-w-sm mx-auto rounded-lg border border-border" />}} + +{{< callout type="warning" title="Cancella il file della chiave" >}} +L'app contiene una sua copia, quindi cancella subito `private-key.asc` dalla memoria del telefono, e anche dal disco del computer. L'unica altra copia deve essere il tuo backup offline. +{{< /callout >}} + +Tocca la tua voce. L'app chiede la passphrase della tua chiave GPG (la finestra dice solo *Password*) e ti mostra cosa c'è dentro. + +{{< image src="passphrase.png" alt="Finestra che chiede la password, con la tastiera aperta." class="max-w-sm mx-auto rounded-lg border border-border" />}} + +{{< image src="entry.png" alt="La voce example.org, con password, nome utente e url e un pulsante per copiare ciascuno." class="max-w-sm mx-auto rounded-lg border border-border" />}} + +Se sei arrivato fin qui funziona, e la parte difficile è finita. Ce l'hai fatta! + +## L'uso di tutti i giorni + +### Aggiungere una password + +Tocca **Nuova voce**, poi **Crea nuova password**. Dalle un nome, di solito l'indirizzo del sito, così la compilazione automatica la trova in seguito. Anche una cartella aiuta, se ti piace tenere le cose in ordine. + +{{< image src="new-entry.png" alt="Editor della nuova voce con i campi nome, cartella, password, nome utente e contenuto extra." class="max-w-sm mx-auto rounded-lg border border-border" />}} + +Tocca i tre puntini nel campo della password per aprire il generatore. **Casuale** crea password fatte di caratteri e **Diceware** password fatte di parole. Per la maggior parte dei login vai su Casuale: tanto non le digiterai mai, ci pensa l'app. Diceware è meglio per quelle poche che devi scrivere a mano, tipo la password dell'account di streaming sulla TV. Le parole sono in inglese. + +{{< image src="generator.png" alt="Generatore di password sulla scheda Diceware, con una password di cinque parole, lunghezza e separatore." class="max-w-sm mx-auto rounded-lg border border-border" />}} + +Tocca **Usa**, poi **Salva**. Nella documentazione c'è di più sulle [voci]({{< relref "/hardenedpass/using/entries" >}}), compresi i [codici monouso]({{< relref "/hardenedpass/using/otp" >}}) se vuoi tenere la 2FA nell'archivio. + +### Sincronizzare + +Questa è l'unica cosa a cui devi abituarti: salvare una voce sul telefono non la manda da nessuna parte. Resta sul telefono finché non sincronizzi. Trascina verso il basso l'elenco, oppure usa il menu nella barra di ricerca e tocca **Sincronizza repository**. + +{{< image src="menu.png" alt="Il menu dell'elenco con Sincronizza repository, Pull dal remote, Push sul remote, Impostazioni e Informazioni." class="max-w-sm mx-auto rounded-lg border border-border" />}} + +Se non vuoi pensarci, attiva **Push dopo ogni modifica** in **Impostazioni**, **Repository**. Sul computer la stessa cosa si fa con due comandi: + +```bash +pass git pull +pass git push +``` + +Sincronizza spesso, e sempre prima di modificare qualcosa su un altro dispositivo: due dispositivi che cambiano la stessa voce sono l'unico caso in cui git ha bisogno del tuo aiuto. La [pagina sulla sincronizzazione]({{< relref "/hardenedpass/using/sync" >}}) spiega come uscirne. + +### Compilazione automatica + +Copia e incolla funziona, ma compilare direttamente i login è molto più comodo. Apri **Impostazioni**, **Compilazione automatica**, attiva **Attiva la compilazione automatica** e scegli HardenedPass nella finestra di sistema. Si fida solo dei browser che conosce, e Firefox è quello con il supporto migliore. La [pagina sulla compilazione automatica]({{< relref "/hardenedpass/using/autofill" >}}) ha l'elenco completo. + +## Quando qualcosa va storto + +**Hai perso il telefono.** Le tue voci sono cifrate e la chiave dentro l'app è protetta dalla passphrase, quindi niente panico. Vai sul sito del tuo provider e rimuovi la chiave SSH del telefono, così non può più raggiungere il repository, poi configura l'app sul nuovo telefono partendo dal backup. Se pensi che qualcuno possa avere anche la tua passphrase, leggi il punto successivo. + +**Pensi che ti abbiano rubato la chiave privata.** Dai per scontato che le tue password verranno lette: crea una nuova chiave, cifra di nuovo l'archivio con `pass init nuovo@example.org` e cambia le password che contano, a partire dalla tua email. Passare a una nuova chiave non serve per le vecchie copie dei file, perché la cronologia di git le conserva. + +**Hai dimenticato la passphrase.** Mi dispiace, ma la strada finisce qui. Nessuno può aiutarti, ed è proprio il senso della cifratura. Ecco perché sta su un foglio, in un cassetto, mentre la impari. + +**Hai perso la chiave e non hai un backup.** Come sopra. Fai il backup della chiave. + +**Si è rotto qualcos'altro.** Dai un'occhiata alla [pagina di risoluzione dei problemi]({{< relref "/hardenedpass/reference/troubleshooting" >}}), e se è un bug [fammelo sapere](https://github.com/danixland/HardenedPass/issues). + +## E adesso? + +Ora hai un gestore di password che controlli del tutto, che non dipende da nessuna azienda e che funziona con qualsiasi strumento parli `pass`. Se domani smetto di lavorare su HardenedPass, le tue password sono ancora lì, ed è proprio il motivo per cui mi piace questo sistema. + +Si può fare ancora di più per renderlo sicuro: l'autenticazione a due fattori sul tuo account git, chiavi limitate a un solo repository, nascondere i nomi delle voci, chiavi hardware. È un argomento a sé e ne parlerò in un prossimo articolo, per ora goditi il tuo nuovo archivio di password. + +La [documentazione completa](https://danix.xyz/it/hardenedpass/) ha tutti i dettagli su quello che abbiamo visto qui, e se ti blocchi da qualche parte, fammelo sapere. + +Alla prossima 👋 diff --git a/content/it/articles/your-own-password-store-part-3/menu.png b/content/it/articles/your-own-password-store-part-3/menu.png new file mode 100644 index 0000000..d57d9f4 Binary files /dev/null and b/content/it/articles/your-own-password-store-part-3/menu.png differ diff --git a/content/it/articles/your-own-password-store-part-3/new-entry.png b/content/it/articles/your-own-password-store-part-3/new-entry.png new file mode 100644 index 0000000..95c6f2f Binary files /dev/null and b/content/it/articles/your-own-password-store-part-3/new-entry.png differ diff --git a/content/it/articles/your-own-password-store-part-3/passphrase.png b/content/it/articles/your-own-password-store-part-3/passphrase.png new file mode 100644 index 0000000..45d67a4 Binary files /dev/null and b/content/it/articles/your-own-password-store-part-3/passphrase.png differ diff --git a/content/it/articles/your-own-password-store-part-3/pgp-import.png b/content/it/articles/your-own-password-store-part-3/pgp-import.png new file mode 100644 index 0000000..1f433c0 Binary files /dev/null and b/content/it/articles/your-own-password-store-part-3/pgp-import.png differ diff --git a/content/it/articles/your-own-password-store-part-3/repository.png b/content/it/articles/your-own-password-store-part-3/repository.png new file mode 100644 index 0000000..f7f48dd Binary files /dev/null and b/content/it/articles/your-own-password-store-part-3/repository.png differ diff --git a/content/it/articles/your-own-password-store-part-3/ssh-generate.png b/content/it/articles/your-own-password-store-part-3/ssh-generate.png new file mode 100644 index 0000000..ab5c23f Binary files /dev/null and b/content/it/articles/your-own-password-store-part-3/ssh-generate.png differ diff --git a/content/it/articles/your-own-password-store-part-3/ssh-key.png b/content/it/articles/your-own-password-store-part-3/ssh-key.png new file mode 100644 index 0000000..2ee4aa1 Binary files /dev/null and b/content/it/articles/your-own-password-store-part-3/ssh-key.png differ diff --git a/content/it/articles/your-own-password-store-part-3/ssh-public.png b/content/it/articles/your-own-password-store-part-3/ssh-public.png new file mode 100644 index 0000000..3f27f19 Binary files /dev/null and b/content/it/articles/your-own-password-store-part-3/ssh-public.png differ diff --git a/content/it/articles/your-own-password-store-part-3/store-list.png b/content/it/articles/your-own-password-store-part-3/store-list.png new file mode 100644 index 0000000..efe4716 Binary files /dev/null and b/content/it/articles/your-own-password-store-part-3/store-list.png differ diff --git a/content/it/articles/your-own-password-store-part-3/welcome.png b/content/it/articles/your-own-password-store-part-3/welcome.png new file mode 100644 index 0000000..d6e4ebd Binary files /dev/null and b/content/it/articles/your-own-password-store-part-3/welcome.png differ -- cgit v1.2.3