Swapping safely with PGP
Check that you are on the real site, and that the terms of your swap cannot be changed
Disclosure: I run NoxSwap (noxswap.io). I use our own files as the example because I know them, but every step below works for any service that signs its messages with PGP. If a service you use doesn't sign anything, that tells you something too.
1. Why bother?A few threads here lately were about swaps going wrong, so here's the boring tool that prevents most of it. People rarely lose coins on a swap because the exchange got hacked. Usually it's one of these:
- a phishing clone of the site (one letter off in the domain, or a fake .onion address passed around on a forum),
- clipboard malware that swaps the deposit address you copied for the attacker's,
- a fake "support agent" who messages you first,
- or a dispute where the service says it never promised the amount you remember.
PGP helps with all four. The short version: it's a
seal only one key can make. Anyone can check it, nobody can fake it, and it breaks if even one character of the text changes.
2. What you needGnuPG, free and open source:
- Windows: Gpg4win (comes with Kleopatra, a point-and-click app)
- macOS: GPG Suite, or brew install gnupg
- Linux: usually already installed (gpg --version)
Step 1 Get the key and check its fingerprintDownload the service's public key and import it, then look at the fingerprint (the 40-character ID of the key).
The important part: compare that fingerprint with one you got
somewhere else. If you got the key from a phishing site, the fingerprint on that site will match the fake key too, so it proves nothing on its own. Use a second, independent source: a post by the service's long-standing forum account, a directory that lists the key, an old saved copy. Ours is:
2BEE 8468 AB94 9AC0 7C0A E29A DFE1 AE31 7EDB F79D
Step 2 Verify the official addresses before you trust a siteA careful service publishes its real domain and Tor address in a signed file. Verify it before you bookmark anything:
"Good signature" plus the same fingerprint as in step 1 means the text is exactly what the key owner signed. The grey
"WARNING: not certified" line is normal: it only means you haven't personally certified the key in your own keyring. The fingerprint check is what matters.
Step 3 Know what a fake looks likeSame file, I just edited one line in it:
"BAD signature" means the text was changed after it was signed. Don't trust a single address in it.
Step 4 During the swap, verify the letterSome services give you a signed confirmation for each order. Ours is a "letter of guarantee": order ID, both amounts, the deposit address, your payout address and the deadline, signed with the key from step 1.
Save it as
letter.txt and run
gpg --verify letter.txt. Then:
- compare the deposit address in the letter with the one in your wallet's send screen, right before you press send (this is what beats clipboard malware),
- check your payout address character by character,
- check that the amounts match what you were quoted,
- keep the letter until the swap is done.
Kleopatra users: import the key (File > Import), open the Notepad, paste the whole signed text from
-----BEGIN PGP SIGNED MESSAGE----- to the last line, and click
"Decrypt / Verify Notepad".
Green = valid,
red = changed.
No terminal? Verify in the browserMost services that sign letters also offer a checker on their site. Ours is at noxswap.io/pgp: paste the whole letter and press "Verify signature". The check runs in your browser and the letter isn't sent anywhere. The same page shows the key fingerprint and links to an independent check.
Convenient for a quick check on the
real site. For certainty, also verify once with a tool the service doesn't control (GnuPG, or a directory that publishes the key), see the next section.
! What PGP does NOT do- It doesn't make a service honest. It proves who signed a promise and that the promise wasn't altered.
- It won't catch a typo in an address you entered. That's why you read the payout address in the letter.
- Don't rely only on a verify button on the same site that issued the letter. A full clone could fake that page as well. Verify with your own GnuPG, or with an independent site that publishes the key itself.
✓ Short checklist✔ Key fingerprint checked against a second source
✔ Official addresses file: Good signature
✔ Order letter: Good signature
✔ Deposit address in the letter = address in your wallet's send screen
✔ Payout address and amounts correct
✔ Nobody "from support" messaged you first
Happy to answer questions here, also about other services' signatures. If a step doesn't make sense when you try it, say where you got stuck and I'll fix the guide.