رمزنگاری سرتاسر کالی به زبان ساده: از کد QR تا کلید هر اتصال

کالی تماس و پیامک را میان دو گوشی شما رمزنگاری‌شده جابه‌جا می‌کند. جفت‌سازی، دست‌دادن هر اتصال، قفل هر پیام و مرزهای این محافظت را ساده توضیح داده‌ایم.

گوشی فرستنده با یک کد QR و گوشی گیرنده با نماد قفل؛ نماد کلید میان دو گوشی

«رمزنگاری سرتاسر» (end-to-end encryption) یعنی فقط دو سرِ ارتباط می‌توانند محتوا را بخوانند. در کالی این دو سر، گوشی فرستنده و گوشی گیرنده‌ی شما هستند؛ نه سرور ما و نه کسی که کنارتان ایستاده.

این نوشته بدون فرمول توضیح می‌دهد این کار در سه مرحله چطور انجام می‌شود و کجا تمام می‌شود.

مرحله‌ی اول: آشنا کردن دو گوشی

جفت‌سازی (pairing) فقط یک بار انجام می‌شود. هر گوشی از قبل یک جفت کلید دارد که روی خودش ساخته شده: کلید خصوصی که هرگز از گوشی بیرون نمی‌رود و کلید عمومی که می‌شود به دیگران نشانش داد.

کد QR روی صفحه‌ی فرستنده دو چیز دارد: کلید عمومی فرستنده و یک رمز یک‌بارمصرف. گیرنده با دوربین آن را می‌خواند، کلید فرستنده را به خاطر می‌سپارد و با آن رمز ثابت می‌کند که واقعاً همان کسی است که QR را دیده. در این راه هیچ سروری وسط نیست.

اگر با کد ۶ رقمی جفت کنید

وقتی دو گوشی کنار هم نیستند یا دوربین در دسترس نیست، می‌توانید کد ۶ رقمی را وارد کنید. در این حالت هر دو گوشی باید با یک حساب وارد شده و آنلاین باشند.

سرور فقط پیشنهاد جفت‌سازی را، رمزنگاری‌شده، از یک گوشی به دیگری می‌رساند و بعد از استفاده یا حداکثر ۵ دقیقه پاکش می‌کند. پس از ۵ تلاش اشتباه، این راه ۱۰ دقیقه قفل می‌شود تا حدس زدن کد عملی نباشد. راهنمای قدم‌به‌قدم: جفت کردن دو گوشی.

مرحله‌ی دوم: دست‌دادن در هر اتصال

هر بار که دو گوشی به هم وصل می‌شوند، مثلاً وقتی به اتاق برمی‌گردید، اول یک «دست‌دادن» (handshake) انجام می‌دهند:

  1. هر گوشی با کلیدهایش ثابت می‌کند همان گوشی جفت‌شده است.
  2. دو گوشی با روش توافق کلید P-256 به یک راز مشترک می‌رسند، بدون اینکه خود راز از هوا عبور کند.
  3. از این راز با HKDF کلیدهای تازه‌ای فقط برای همین نشست ساخته می‌شود.

نتیجه: هر اتصال کلید خودش را دارد. اگر روزی کلید یک نشست لو برود، به نشست‌های دیگر راه پیدا نمی‌کند.

مرحله‌ی سوم: قفل هر پیام

هر تکه داده‌ای که میان دو گوشی می‌رود، از صدای تماس تا متن پیامک و کد بانک، با AES-GCM رمز می‌شود. این روش دو کار با هم می‌کند: محتوا را پنهان می‌کند و هر دست‌کاری را آشکار می‌کند؛ بسته‌ای که حتی یک بیتش عوض شده باشد پذیرفته نمی‌شود.

هر بسته شماره‌ی ترتیب (counter) هم دارد. اگر کسی بسته‌ای قدیمی را دوباره بفرستد یا ترتیب بسته‌ها را به هم بزند، گوشی مقصد آن را رد می‌کند.

حتی خداحافظی آخر اتصال هم امضا دارد، پس کسی نمی‌تواند با یک پیام جعلی ارتباط دو گوشی را قطع کند.

کسی که با بلوتوث شنود کند چه می‌بیند

کسی که در برد بلوتوث ابزار شنود داشته باشد می‌تواند ببیند دو دستگاه با هم داده رد و بدل می‌کنند. اما محتوا برایش فقط بایت‌های درهم است: نه صدا، نه متن پیامک، نه کد.

سرور کالی هم در این مسیر نیست. فهرست دقیق آنچه سرور نگه می‌دارد و نمی‌بیند در سرور کالی چه چیزهایی را نمی‌بیند آمده است.

مرز این محافظت

رمزنگاری از مسیر میان دو گوشی محافظت می‌کند، نه از همه‌چیز. این مرزها را بدانید:

  • شبکه‌ی اپراتور: تماس میان فرستنده و طرف مقابل، مثل هر تماس دیگری از شبکه‌ی اپراتور می‌گذرد. کالی فقط مسیر بلوتوثی دو گوشی شما را رمز می‌کند.
  • خود گوشی: اگر یکی از دو گوشی آلوده یا بدون قفل صفحه در دست دیگری باشد، رمزنگاری کمکی نمی‌کند؛ چون محتوا روی صفحه‌ی همان گوشی باز می‌شود.
  • اشکال‌زدایی بی‌سیم: فرستنده برای صدای تماس از این قابلیت اندروید استفاده می‌کند. آن را فقط روی وای‌فای مطمئن نگه دارید و دستگاه ناشناسی را با آن جفت نکنید. اشکال‌زدایی بی‌سیم چیست را بخوانید.

روی هر دو گوشی قفل صفحه بگذارید و برنامه‌ها را فقط از سایت کالی نصب کنید، نه نسخه‌ای که کسی در پیام‌رسان فرستاده.

اگر گوشی گیرنده گم شد

  1. آن گوشی را از فهرست گوشی‌های حساب حذف کنید.
  2. گوشی تازه را وارد حساب کنید و دوباره با فرستنده جفت کنید. هر گیرنده فقط یک فرستنده دارد.
  3. رمزهایی را که ممکن است روی آن گوشی دیده شده باشند، طبق روال بانک یا سرویس عوض کنید.

یادتان باشد که گیرنده فقط در برد بلوتوث فرستنده چیزی دریافت می‌کند؛ گوشی‌ای که دور از فرستنده گم شده، تماس و پیامک تازه‌ای نمی‌گیرد. راهنمای گوشی تازه قدم‌ها را دارد.

کلیدهای من کجا نگه داشته می‌شوند؟

کلیدهای خصوصی روی خود گوشی‌ها ساخته می‌شوند و همان‌جا می‌مانند. سرور فقط کلید عمومی هر گوشی را برای شناختن آن دارد.

کد QR را کسی دیگر هم می‌تواند اسکن کند؟

QR را فقط وقتی باز کنید که می‌خواهید جفت کنید و آن را به کسی نشان ندهید یا عکسش را نفرستید.

QR امن‌تر است یا کد ۶ رقمی؟

هر دو پیشنهاد جفت‌سازی را رمزنگاری‌شده جابه‌جا می‌کنند. QR از سرور استفاده نمی‌کند، پس اگر دو گوشی کنار هم‌اند، QR ساده‌تر است.

Caly's end-to-end encryption in plain words: from the QR to every session key

How Caly encrypts calls and texts between your two phones: pairing, the handshake on every connection, sealing each message, and where the protection ends.

The Sender showing a QR code and the Receiver showing a padlock, with a key icon between them

End-to-end encryption means only the two ends of a conversation can read it. In Caly those ends are your Sender and your Receiver: not our server, and not the person standing next to you.

Here is how it works in three stages, without the maths, and where it stops.

Stage one: introducing the phones

You pair the phones once. Each phone already holds a key pair it made itself: a private key that never leaves it and a public key that can be shown to others.

The QR code on the Sender carries two things: the Sender's public key and a one-time secret. The Receiver reads it with its camera, remembers the Sender's key, and uses the secret to prove it really saw that QR. No server is involved.

Pairing with the 6-digit code

When the phones are not side by side or the camera is not an option, you can type a 6-digit code. Both phones must then be signed in to the same account and online.

The server only passes the encrypted pairing offer from one phone to the other and deletes it once used or after at most 5 minutes. After 5 wrong tries the code path locks for 10 minutes, so guessing is not practical. Step by step: pairing your phones.

Stage two: a handshake on every connection

Every time the phones connect, say when you walk back into the room, they start with a handshake:

  1. Each phone uses its keys to prove it is the paired phone.
  2. The two agree on a shared secret with P-256 key agreement, without the secret itself ever crossing the air.
  3. HKDF turns that secret into fresh keys used only for this session.

So every connection has its own keys. If one session's key ever leaked, it would not open any other session.

Stage three: sealing every message

Every piece of data between the phones, from call audio to SMS text to a bank code, is sealed with AES-GCM. That hides the content and exposes tampering: a frame with even one changed bit is rejected.

Each frame also carries a counter. If someone replays an old frame or shuffles their order, the receiving phone drops it.

Even the goodbye at the end of a connection is authenticated, so nobody can cut your phones apart with a forged message.

What a Bluetooth eavesdropper sees

Someone within Bluetooth range with a sniffer can see that two devices are exchanging data. The content is scrambled bytes to them: no audio, no message text, no codes.

The Caly server is not on that path either. The exact list is in what the Caly server never sees.

Where the protection ends

Encryption protects the hop between your two phones, not everything. Know the edges:

  • The operator network: the call between the Sender and the other person travels the operator's network like any other call. Caly encrypts the Bluetooth hop between your phones.
  • The phone itself: if one of your phones is compromised, or unlocked in someone else's hands, encryption cannot help, because the content is opened on that screen.
  • Wireless debugging: the Sender uses this Android feature for call audio. Keep it on a trusted Wi-Fi and never pair an unknown device with it. See what Wireless debugging is.

Use a screen lock on both phones, and install the apps only from the Caly site, never from a copy someone forwarded on a messenger.

If you lose the Receiver

  1. Remove that phone from your account's phone list.
  2. Sign in on the new phone and pair it with the Sender again. A Receiver keeps one Sender.
  3. Change any passwords that may have been visible on the lost phone, following your bank's or service's process.

Remember that a Receiver only gets anything within the Sender's Bluetooth range; a phone lost away from the Sender receives no new calls or texts. The new phone guide has the steps.

Where are my keys kept?

Private keys are created on the phones and stay there. The server only holds each phone's public key to recognise it.

Can someone else scan my QR code?

Open the QR only when you are pairing, and do not show it to anyone or send a photo of it.

Is the QR safer than the 6-digit code?

Both carry the pairing offer encrypted. The QR does not use the server at all, so when the phones are side by side it is the simpler choice.