LemmeDeskLemmeDesk

The 6-digit security code: how to verify a connection

What a man-in-the-middle attack is, how device keys and known computers protect you, and when and how to compare the security code.

The security code is a 6-digit number shown at both ends of a LemmeDesk connection at the same time. If the codes on the two screens match, you're connected to the right computer and nobody is in between. Comparing them takes a few seconds and lets you verify the connection with your own eyes.

Why it matters: man-in-the-middle attacks

End-to-end encryption stops data from being read on the way. But one question remains: is the computer you're talking to really the one you think? If an attacker slips into the connection and pretends to be the other side to each of you, that's a man-in-the-middle attack. The encryption still works, but one of the keys belongs to the attacker.

The security code exposes exactly this. It's derived from the encryption keys the two computers are actually using, so if someone is in between, the codes on the two screens will be different.

How LemmeDesk verifies a connection

LemmeDesk uses three layers:

  • Device key: every computer has a key that stays on that computer. When connecting, each side verifies the other's key.
  • Known computers: LemmeDesk remembers the computers you've connected to. Next time, a computer shows as Verified computer or Known computer.
  • Security code: on a first connection, or whenever you're unsure, you compare the 6-digit code on both screens.

With unattended access, the security password also binds the two computers together, and the connection shows as Verified by password.

How to compare the code

  1. When the connection is made, LemmeDesk shows the Security code in the connection security window.
  2. The other side sees the same window on their screen.
  3. Read the code out over the phone, or look at both screens if you're side by side. Ask the other person to read their code to you; having them repeat yours isn't enough.
  4. If the codes match, press Codes match, continue. If they don't, press Disconnect.

Reading the code aloud is safer than sending it by message: an attacker could alter a message, but imitating the voice of someone you know is much harder.

The "This computer's identity has changed" warning

If the device key of a computer you've connected to before has changed, LemmeDesk warns you. There are two possible reasons:

  • Harmless: LemmeDesk may have been reinstalled on the other computer, or the computer replaced.
  • Dangerous: someone may be trying to get between you.

The way to tell is to ask. Call the other person on a channel you trust, ask whether they reinstalled LemmeDesk, and compare the security code. If the codes don't match, or you're not sure, disconnect.

When should you compare?

  • When connecting to a computer for the first time.
  • When you see an identity changed warning.
  • If anything unexpected happens during the connection, or something just feels off.

You don't need to compare the code every time you connect to a known computer, but you can always check it in the connection security window.

Frequently asked questions

Is the security code the same as the ID?

No. The ID is your computer's permanent 9-digit address in LemmeDesk. The security code is a 6-digit number derived from that connection's encryption keys and is used to verify the connection.

Is it dangerous to tell someone the security code?

No. The code isn't a password, and knowing it gives nobody access to your computer. It only verifies the current connection.

What should I do if the codes don't match?

Disconnect straight away. Talk to the other person on a channel you trust and try again. If the codes still differ, don't connect from that network.

Can your server see the security code?

The code is computed from the two computers' own keys, and those keys never reach our server. Read more on our security page.