Repository navigation
[Feature Request] Secret Chats in Telegram Desktop #2
Description
This issue is a continuation of telegramdesktop#871 and telegramdesktop#16835 and is dedicated to the code bounty campaign related to lack of implementation of a Secret Chat feature (end-to-end encryption in private messages) in Telegram Desktop.
The objective is to implement the Secret Chats feature into this Telegram client: https://github.com/telegramdesktop/tdesktop
It is possible to do it with 3 different ways (but not limited to):
Migrating tdesktop to TDLib/Including TDLib to Telegram Desktop and using its Secret Chat API partlycomment from @lukejohnsonrp- Extracting the Secret Chats code from TDLib or telegram-api (https://github.com/vysheng/tg / https://github.com/vysheng/tgl) and reimplementing it into tdesktop
- Reimplementing it from scratch based on the official public specification available here https://core.telegram.org/api/end-to-end and https://core.telegram.org/schema/end-to-end
- Only protocol handlers need to be implemented, because all the cryptographic functions are already present in the Telegram Desktop (source)
This code bounty doesn't limit the programmer to any specific way of implementation, as soon as the final result will make possible to use Secret Chats on the open source Telegram Desktop (tdesktop) client on Linux and Windows in the exactly same way as it's done in mobile clients.
UPDATE 04/2022 / Funds distribution scheme:
There will be 3 payouts based on completion of the following stages:
- [1/3]
Estabilishing Secret Chats via DH key exchange (ability to send and accept Secret Chat requests)[COMPLETE] in sergiotarxz@41fcaa8 - [2/3]
Ability to send and receive encrypted messages in estabilished Secret Chats[COMPLETE] in sergiotarxz@41fcaa8 - [3/3] Re-keying (PFS) and media sharing in Secret Chats
The developer(s) will receive 1 ETH for completing one of the stages from the list above, totalling 3 ETH for all stages. The source code should be available and compilable.
The adjacent functionality such as deleting and configuring Secret Chat options can be done during any phase of the work progress described in the list above, however it must be done before or with 3/3.
I have created a verified signature for my Ethereum address containing the funds for this issue: https://etherscan.io/verifySig/4431 (https://etherscan.io/address/0xd19ee4a49b9214c4c22694bb01f225baf35f6efc)
Any voluntary donations are welcome. You can send them to the address above.
My email for communication is marcovelon@protonmail.com
CURRENT PROJECT FUNDING:
The overall funding now is 13000 USDC and 1.18 ETH (~3929 USD)
Activity
marcovelon commentedon Aug 23, 2021
The campaign has been funded with 2.2 ETH which is equivalent to 0.15 BTC (turned out it's impossible to fund campaigns with BTC on Gitcoin). The proof of funds is available in the invoice attached to the campaign available at https://gitcoin.co/issue/marcovelon/tdesktop/2/100026398
UPDATE 04/2022: the campaign has been withdrawn from Gitcoin because their platform is totally broken. The funds distribution will be performed manually by me after completion of steps written in the first post. The current funding is 3 ETH and doesn't limit this only to 1 coder.
OMTDesign commentedon Aug 28, 2021
I just want to thank you on your efforts to implement secret/encrypted chats into telegram desktop. This feature has been missing since 2015, and has been asked for regularly by the community since. Yet the developers express no interest and close any issue, referring back to a post from 2015.
I wish you and the community well and hope this functionality is implemented.
basedcookie commentedon Sep 28, 2021
Update: currently working on adding in the logic for the secret chat, GUI is almost finished. Sometime in the next week or 2 I will be uploading my local commits to my account so the code will be available. Mods who see this, let me know if the inactivity issue has been solved, I forget we have to post regular WIP on here.
arch-btw commentedon Oct 26, 2021
Thank you so much for working on this @basedcookie.
When it's done maybe you can post a crypto address to donate to (BTC, XMR or LTC for example), because I can't for the life of me figure out how gitcoin works.
marcovelon commentedon Dec 23, 2021
Since the bounty has been abandoned by basedcookie (no updates for more than 2 months), it is now open for a new applicant.
If you are interested to code this feature, you can enroll here: https://gitcoin.co/issue/marcovelon/tdesktop/2/100026398
amritkumarj commentedon Jan 6, 2022
I had started working on this project, and will soon be posting the updates.
OMTDesign commentedon Jan 6, 2022
Sad to see them @basedcookie leave. But good to see there is still interest in this project and hopefully this feature will be implemented.
amritkumarj commentedon Jan 6, 2022
@OMTDesign Yeah, as now I am working on this project it will very soon be completed, I have expertise in cryptographic algorithms and hence it will be not a very difficult task for me
arch-btw commentedon Mar 11, 2022
@dhruvjain1122 which approach are you taking? Migration to TDLib?
basedcookie commentedon Mar 15, 2022
@arch-btw can't speak for them, but back when I was working on this I was trying to implement the feature directly into the existing code, personally that proved to be a little challenging and time consuming. If I were to work on it again I would take the approach of migrating to TDLib
marcovelon commentedon Mar 15, 2022
Alright, I think many of you will agree with the fact we have reached some point of absurd never seen before in FOSS community and it feels like Telegram purposely instructs their open source relations team to avoid this topic with an utmost effort.
I am not sure what exactly is causing a nearly zero interest in this issue, however my suspections are that it's either one of those:
lack of marketing for this issue, yet I highly doubt it, because there is a big ask for this feature since tdesktop appearance. See Secret chat telegramdesktop/tdesktop#871 [Feature Request] Secret Chats telegramdesktop/tdesktop#68 [Feature Request] Secret chat telegramdesktop/tdesktop#118 Secret Chat telegramdesktop/tdesktop#619 Telegram Secret Chat? telegramdesktop/tdesktop#8071 [Feature Request] Add "Start secret chat" in the desktop version telegramdesktop/tdesktop#17216 no secret chat! there is no button to start a new chat telegramdesktop/tdesktop#16938 Secret chats [Question] telegramdesktop/tdesktop#16878 [Feature Request] Secret Chats on Desktop Client telegramdesktop/tdesktop#16772 [Question] Why Desktop hasn't secret chats if Unigram has? telegramdesktop/tdesktop#16409 [Feature Request] Secret Chat on Desktop (Like Signal) telegramdesktop/tdesktop#16388 Secret chat telegramdesktop/tdesktop#10162 and so on https://github.com/telegramdesktop/tdesktop/issues?q=is%3Aissue+secret+chat - the amount of requests is ridiculously high.
insufficient funds announced by me, however, I expect more people to donate crypto to developers who will achieve that, so shouldn't be the case either.
the Telegram dev community itself being influenced by Pavel Durov's dubious views on IT Security with his fallacious argumentation from here https://tsf.telegram.org/manuals/e2ee-simple#2-why-are-there-no-secret-chats-on-desktop-apps . I would even say that they practice sophistry, since all those statements are extremely misleading and here is why:
I understand that most regular users recklessly follow their misleading arguments because Durov positions himself as man of knowledge in programming, while he is not, and everything he has done so far was outsourcing programmers, not even mentioning how his brother Nikolai Durov coded everything for Pavel during startups and never continued to help him because of marketing oriented ideology of Pavel (I know this from Nikolay himself from the personal conversation with him some years ago).
But what's more disappointing, is that even young developers from Telegram open source team, such as anonymous guy john-preston do share this weird ideology, for some reason supporting everything written on their page explaining "Why are Secret Chats only available on their devices of origin".
Just look at this:
See how many times this guy used the wording "no one", supposing that "no one will do it" and even if someone will, he won't merge it.
It seems that we are dealing with some amateur frontend coder who doesn't understand cryptography or has no experience with coding practical client/server applications with PKI and who is assuming that just because he doesn't know how it can be done, no one else does.
So, based on his logic, there are no programmers in the entire world who can code a simple client-side encryption.
I know that this guy has triggered skepticism from many experienced and knowledgeable people in this topic who instead of trying to prove him wrong, decided to not waste their time and just to leave Telegram. Some people even tried, but Durov often refute such stuff with well-marketed sophistry that results to work on his major part of the audience, since most of them don't have any knowledge in infosec and prefer believing what he says just because they trust him.
Another reason behind all this hesitance on this issue could be that they are afraid of letting too much users to have conversations out of their control, ensuring that they can provide users communications logs to the law enforcement when asked, since their normal "cloud" chats permit to do that easily. Actually, the increased amount of censorship in their platform lately indicates that it could be true.
Anyway, I am stopping to try finding only 1 coder for this task via non-efficient platforms such as Gitcoin (whose most important features stopped working completely and devs don't have any ETA to fix their stuff) because I think it's better if more people worked on this issue as supposed to be in the open source community.
I have asked to refund my funds from Gitcoin, which was done, and from now will watch the contributions made by particular devs to this issue. Once this task is complete, I will distribute my cryptofunds to each developer based on their amount of work, which will also allow others to donate to them. We could also try to launch the campaign on https://tallyco.in purposely for funding this issue.
My Ethereum address verification with the funds prepared for payout on this issue: https://etherscan.io/verifySig/4431
If you know how we can organize this better, please let's discuss it.
p.s.
@arch-btw he became inactive on this issue since the first week of his application
@basedcookie thanks for the feedback, and while I understand that this task may have looked challenging to you and this is normal even if your coding level is good - simply because encryption is rarely employed in C/C++ coding tasks, but I still believe it's a relatively easy task for programmers who have specific experience with coding encryption algorithms on C/C++. I also think that the lack of interest for this issue by people with experience in this field is caused by Telegram's shady policies on E2EE encryption, described by me earlier.
dm17 commentedon Mar 15, 2022
@marcovelon - good eye!
Yes, I just think it is too difficult for them to get a well hidden and functional backdoor into the secret chat functionality on FOSS desktop. In this age of information warfare, I think it is lazy not to assume such things. If a Russian company can re-domicile as Emirati and then censor RT, way ahead of a war that ends up using Telegram as a primary information source on the opposing side... This is going to get complicated to analyze.
Of course I love Telegram - the engineering marvel - but intentions factor in when we have to spend years guessing about their insistence to avoid E2EE on FOSS desktop while mobile can afford two full implementations from scratch (Telegram and Telegram X)... It begs the context of mobile being more secure. Yes, phones are more secure - with respect to their own root-of-trust! Desktops - despite these black box operating systems running transparently with respect to the host OS called "management engines" - have still not removed root-of-trust from each user's control as effectively as mobile solutions (where the user is sandboxed away from having full permission and even ownership of their own hardware). The context of mobile being more secure is: mobile is a more secure and foolproof eavesdropping platform.
233 remaining items
sergiotarxz commentedon Jul 16, 2025
Hi, I have to pay a large quantity of money for each month I am working in my own without being hired independently of if I get paid something or not and I cannot afford it anymore.
dm17 commentedon Jul 16, 2025
My BS alarm is going off
sergiotarxz commentedon Jul 16, 2025
sergiotarxz commentedon Jul 16, 2025
alfredonodo commentedon Aug 23, 2025
This is a very interesting and important initiative. Thank you. However, it seems that the project has stalled after a fast start since, as progress has been slow after four years. Were Telegram programmers right about the complexity?
Is it possible that Telegram highly skilled programmers, who are paid around $1 million per year, are unable to do it? Or is it just an excuse because Durov does not want to do it?
Indeed, the fact that it is not possible to have a secret chat group with e2e encryption and cloud synchronization is another excuse from Durov from 2017 and is no longer valid today. As a counterexample, we can take Matrix/Element.
aqbalmradyan9 commentedon Oct 21, 2025
dm17 commentedon Dec 5, 2025
I'm sure many people besides Durov do not want telecommunications to be so easily secured; we can't reduce it to a person but it is obvious that a subversive power exists.
I hope this effort isn't dead, but its continued failure is inspiring me to look into what it would take to develop a FOSS telegram server, and add functionality to telegram clients such that they work normally with the official server. You could describe this as a cleverly designed option to add "federated" servers - but let's say "other" servers due to terminology baggage surrounding "federation." This would also solve the above problem as you can just invite people to join your own server when you want the additional security (or even E2EE, later perhaps). Lack of E2EE is mostly a server trust issue, after all. I figure this is the best thread to get feedback on this idea - so please critique away! Thanks to everyone involved for their continued interest in this!
eyalroz commentedon Dec 5, 2025
@dm17 : Do you really need a special server to establish E2EE? The two users could send unsecured info via the regular serverto help them establish a connection, plus public keys; would that not be enough?
dm17 commentedon Dec 5, 2025
Of course not. But this would solve a lot more problems. The reason it could help solve the E2EE problem is because it removes a lot of need for it. But it could also allow one to create a more flexible negotiation protocol for E2EE that would not depend on Telegram (the company) at all. Please feel free to do whatever is easiest - but I believe the above idea solves a much wider set of problems.
alfredonodo commentedon Dec 6, 2025
Unfortunately, Durov is opposed to releasing the server code as open source and therefore to server federation (he deleted his 2021 response, but it is still visible on the web). In addition, there are several feature requests related to open source (Publish the source code of Telegram servers under a free license) and server federation (Federation, Allow the connection to custom servers, Messaging Layer Security (MLS) support). Even just MLS support would be sufficient for true interoperability.
If you are looking for a decentralized or p2p alternative, there is Matrix with its flagship client Element, which is not only decentralised and has features comparable to Telegram, but is also e2ee and solves the TOFU problem of common messaging apps (WhatsApp, Signal, Wire, etc.) thanks to cross-signing.
So, there is no need to reinvent the wheel.
dm17 commentedon Dec 7, 2025
Matrix gets pushed so hard and is honestly the worst I've ever used. I'm sure everyone in here is familiar with those so I don't get the need to do another promo... Your comment about this being "reinvent[ing] the wheel" does not seem to apply at all.
Regarding their refusal to release the server code - that is fine. People have written open source telegram servers that work well with existing clients: https://github.com/loyldg/mytelegram
Therefore, I think the above idea is totally feasible.
christaikobo commentedon Dec 7, 2025
While I agree matrix is not the silver bullet as advertised, writing a selfhosted telegram server seems to be more complicated than client side E2E implementation.
If we cannot even make E2E work, there is very little confidence in me to believe that the server would work.
alfredonodo commentedon Dec 7, 2025
Can you tell me exactly where it is being promoted so much? I have only seen Signal being marketed. Matrix is the only truly decentralised solution we have. I agree that in terms of speed, usability and functionality, it is inferior to Telegram and even WhatsApp, but I also think you have never tried it: 90% of the main features are there and work well.
I didn't know about this project. I looked into it and noticed some interesting things:
Good luck :)
alfredonodo commentedon Jun 14, 2026
I’ve noticed that the domain tdesktop.fail hasn’t been renewed (the site is still viewable on the wayback machine). Can we assume that the project has been abandoned?
dm17 commentedon Jun 14, 2026
Would be nice if we could contact the owner so we can take it over if domain price / upkeep is an issue.