Security Analysis of Threema

A group of Swiss researchers have published an impressive security analysis of Threema.

We provide an extensive cryptographic analysis of Threema, a Swiss-based encrypted messaging application with more than 10 million users and 7000 corporate customers. We present seven different attacks against the protocol in three different threat models. As one example, we present a cross-protocol attack which breaks authentication in Threema and which exploits the lack of proper key separation between different sub-protocols. As another, we demonstrate a compression-based side-channel attack that recovers users’ long-term private keys through observation of the size of Threema encrypted back-ups. We discuss remediations for our attacks and draw three wider lessons for developers of secure protocols.

From a news article:

Threema has more than 10 million users, which include the Swiss government, the Swiss army, German Chancellor Olaf Scholz, and other politicians in that country. Threema developers advertise it as a more secure alternative to Meta’s WhatsApp messenger. It’s among the top Android apps for a fee-based category in Switzerland, Germany, Austria, Canada, and Australia. The app uses a custom-designed encryption protocol in contravention of established cryptographic norms.

The company is performing the usual denials and deflections:

In a web post, Threema officials said the vulnerabilities applied to an old protocol that’s no longer in use. It also said the researchers were overselling their findings.

“While some of the findings presented in the paper may be interesting from a theoretical standpoint, none of them ever had any considerable real-world impact,” the post stated. “Most assume extensive and unrealistic prerequisites that would have far greater consequences than the respective finding itself.”

Left out of the statement is that the protocol the researchers analyzed is old because they disclosed the vulnerabilities to Threema, and Threema updated it.

Posted on January 19, 2023 at 7:21 AM31 Comments

Comments

Winter January 19, 2023 8:42 AM

The app uses a custom-designed encryption protocol in contravention of established cryptographic norms.

That says it all. No more information needed.

Clive Robinson January 19, 2023 9:12 AM

@ ALL,

I will have to read through the paper to be sure, but from what is given above not only have the designed their own cryptography, but their own protocols.

AND in the process not applied the principles of segregation and issolation sufficiently.

Then of course there are those darn “side channels”… Where there is one found there is generally a family of them hiding away, breeding more at every twist and turn.

Ted January 19, 2023 11:26 AM

@Frank

Someone did a nice analysis of the vulnerabilities described

It’s funny you say it like that. That analysis is most interesting to me since it’s written by a current software engineer at Threema and provides a more technical eval of the vulnerabilities. Plus, it’s done in a less standoffish manner.

It’s interesting to compare Danilo’s attack analyses with the summaries provided by the ETH Zurich researchers. Dan provided a link to a higher-level summary from the Swiss researchers:

https://breakingthe3ma.app/

I guess these specific attacks are moot points since they have supposedly been patched. However, I’m wondering who all is going to do a security review on the updated messenger app and also on the Ibex protocol.

dorukayhan January 19, 2023 11:46 AM

Left out of [Threema’s] statement is that the protocol the researchers analyzed is old because they disclosed the vulnerabilities to Threema, and Threema updated it.

bruh.

vas pup January 19, 2023 5:02 PM

Tag – vulnerabilities

How one volcano could trigger world chaos

https://www.bbc.com/future/article/20230117-malacca-strait-the-sea-lane-that-could-trigger-world-chaos

“…below them, running along the seabed, is a dense array of submarine internet cables that keep the world online.

A large and relatively nearby earthquake would be a menace of similar scale. It could cause a tsunami to hit the strait, as the Boxing Day tsunami did in 2004. It would also cause turbidity currents – clouds of fast-moving, shaken-up sediment – that rip across the seabed.

“That’s typically what severs cables,” Mani says. “In the Tonga eruption” – Hunga Tonga-Hunga Ha’apai’s VEI5 eruption in January 2022 – “it was turbidity currents that severed the cables, causing a regional internet blackout. The turbidity currents also bury those cables, making their recovery even harder.” (Read more about the scale and aftermath of this eruption from BBC News: “Tonga eruption: Atlantic seafloor felt Pacific volcano megablast”.

Worse, the severing of those cables would cause economic pandemonium. “Trillions of dollars are transported through those cables every single day,” says Mani, “and that basically props up our financial markets. !!! Our submarine cables are vulnerable, and there have been accidents over the years.”

Mani highlights the breaking of several submarine internet cables by an earthquake near Taiwan in 2006, leaving a !!! single cable connecting Hong Kong to the rest of the world. “It took 45 {!!!} days to repair the other cables, and it was very lucky that one of them managed to survive.
Imagine 45 days of nothing for Hong Kong and the broader region.”
It would have been catastrophic, she continues, not only for Hong Kong but for the rest of the world. Hong Kong, like Singapore, is a financial hub whose effective disappearance would cause
worldwide economic havoc. “We just don’t have redundancy,” says Mani of the cables: if something goes wrong, there aren’t spares to pick up the slack. “And our satellites, in their ???current state, can only handle about 3% of global communication.”

!!!Elsewhere, the best preparation is diversification. More internet satellites would help [Hey, Elon Musk, that is your business- VP].

Local countries would also bolster their resilience by laying down new submarine cables that take a different route to the existing ones. China seems to be taking this approach to shipping. For years it has been trying to construct a canal across southern Thailand, obviating the need to go via the Strait of Malacca. The Thai Canal, as it is known, would reduce energy costs by providing a shortcut for crude oil transport, but it would also add
significant resilience to Chinese shipping.”

Clive Robinson January 19, 2023 7:11 PM

@ David in Toronto, dorukayhan, ALL,

Re : Service time scales.

There is a joke[1] in England about how you know you are in the countryside.

“If you are at the village green and it does not have a bus stop, or the bustop does not have a timetable but a calender, then welcome to rural England.”

With the unsaid tail rider of,

“If you did not come properly prepared then the chances are you might never leave… And people will never know why…”.

Another indicator is “no bars on your mobile phone” indicating that the public phones probably “are gone” as in torn out on the argument “cellular is comming”, but there’s not enough bodies without “cold dead hands” to justify a comercial organisation putting in a mobile phone service…

Oh and even though it does not grow in the UK anything that looks remotely like “tumble weed” should make you “Get the heck out of dodge” immediately whilst you still can.

A while ago now I went “on holiday” and took my Ham Radio equipment with me. Of the people I went with I was the only one who got to speak to “friends” back home because I’d arranged a radio schedule with them… As for some of the kids, no mobile service was to them a tragedy beyond slamming doors, tears, and stamping feet. Then I got “told off” for “rubbing it in” with the use of my Ham Radio gear… Honestly you can not win with some people…

But in some places a “CB Set” is still worthwhile as there are still plenty of people who use it, because at the end of the day they have no choice.

[1] Sadly it’s over 9/10ths based on facts… Some places realy do only have a “dail or weekly bus service” with many without any weekend service at all and some children only “school busses” weekdays. In some places there were “post buses” where the Post Office having to drive a van to and from rural post offices have found that the extra cost of using a mini-bus for upto seven people can pay for it’s self. But with rural post offices having been prosecuted out of business by the “oh so holly Rev Paula” over the Horizon debacle,

https://www.telegraph.co.uk/news/2021/04/26/former-post-office-boss-steps-back-church-role-wake-miscarriage/

That “life line” of “The village Post Office” has been cut and revealed to late as the carrier of the village “life blood”. The result the villages start to die or worse get “developers” move in. There used to be a legal duty on the old “General Post Office”(GPO) before it was privatized of “equity of service” such that those in the city and those in the countryside had “equal access” to communications technology. It’s not taken too long for “business interests” to eviscerate those strictures to the detriment of Society.

tfb January 20, 2023 7:34 AM

Just to make something clear about the ‘they designed their own x’ argument that a couple of people have made: that’s clearly a bad thing, if a well-known & well-designed x already exists. From the blog entry already referred to (which is by someone who works there, so perhaps not free from bias):

The Signal protocol didn’t exist yet […]

With these options, the protocol choices by Threema at launch were

  • A client-server protocol modelled after CurveCP, which is a protocol developed by Daniel “djb” Bernstein […]
  • An end-to-end encryption protocol based on the NaCl library (with NaCl also developed and published by Bernstein). […]
  • HTTPS for the contact discovery API. […]

[…]

I’d argue that – given the historical context and the “don’t roll your own crypto” approach – these choices were sensible and appropriate. Both the client-server protocol and the end-to-end encryption format use concepts and libraries from Daniel Bernstein, who is quite the authority in cryptography. […]

I’ve marked elisions with ‘[…]’, to stop the quote being too long: there is a bunch more in the article which is worth reading.

I don’t know but it looks to me as if the things they did themselves they did because there were no existing solutions.

Obviously they made mistakes. But they didn’t at any point think that using your phone number as your identifier was a good idea.

Winter January 20, 2023 8:12 AM

@tfb

I don’t know but it looks to me as if the things they did themselves they did because there were no existing solutions.

That only holds if you put up your protocols and primitives up for review. If you don’t, you get what they experience now.

Ted January 20, 2023 10:59 AM

@tfb, Winter, All

@tfb, I’m glad you read Danilo’s analysis. I also found some of the historical context to be rather educational.

Did you all have any thoughts on the seriousness of any of the attacks?

For example, I’m just picking one attack very much at random: Attack 4, Message Replay and Reflection.

If I understand this correctly (and this is questionable), Threema was using nonces to uniquely identify outgoing and incoming messages. Where this broke down was when the Android version of the app was reinstalled, or the app was installed on a new device. In both cases the nonce database was deleted or not transferred to the new device on the client side.

This would allow a compromised server to replay old messages to the user, or reflect past messages sent by the user. This also would have required an attacker to have stored the messages and to have access to the server. (I guess these messages would still have been encrypted, right?)

This is how Danilo says this was fixed:

We’re adding the createdAt timestamp of a message to the encrypted metadata part of the message, so that the user is warned if the non-encrypted timestamp deviates significantly from the encrypted timestamp. […]

When using PFS (“Ibex”) in a 1:1 chat, replayed messages are detected and the user is warned.

It was helpful for me to try to read Danilo’s account, plus ETH’s summary and paper to have a better sense of what may have been going on.

William January 20, 2023 2:00 PM

Excellent (Cornell University Press) book on The History of Information Security in the Computer Age “A Vulnerable System” author Stewart explains why
“Cryptographers rarely create anything of value.”
I’ve been to several conferences and gathered most all papers are related to dissertations. Umpteen lectures on the Internet, how encryption works, are the same thing over and over and over.
Meanwhile, systems have exploded in complexity. Developers are being challenged with complex AND complicated scenarios all the time. And all cryptographers have to say is…don’t roll your own. Keep doing the same exact thing that was invented before anyone had ever heard of the cloud.
The fact is, most problems are NOT cryptographic, they’re security system problems.
As Stewart points out, notice that cryptographers never have time to review anything. They can never say if anything is secure.
All they do is wait until someone does something then collect enough evidence to bury them.
So what does that tell you?
It’s not about cryptography.
It’s about them.

Clive Robinson January 20, 2023 6:07 PM

@ William, ALL,

Re : Cryptographers.

“Cryptographers rarely create anything of value.”

Value to whom and in what way?

I can argue that the security guard at the front door of a building never create anything of value, in fact worse they represent a continuous cost…

So why do so many people pay for the services of security guards?

“Meanwhile, systems have exploded in complexity. Developers are being challenged with complex AND complicated scenarios all the time.”

Who’s fault is that?

Certainly not the cryptographers or nearly every one else related to actual security research work.

It’s actually the fault of two non qualified departments in most software development organisations,

1, Managment.
2, Marketing and sales.

At senior level most CSO’s have next to no say, carry significant liability and more often than you would expect have next to no training in security where as corporate managment and law… This should be telling you something.

Which in part tells you why,

“The fact is, most problems are NOT cryptographic, they’re security system problems.”

Actually it’s worse than that, they are mostly down to “lack of common sense”. Nearly all “Computer Crime” is not new, it’s old certainly older than computers. That is it is well established tangible object physical world crimes that are just “changed a little” to work with intagible object information world systems.

Invariably such crimes are based on the simple notion of sending a list of instructions to a computer system which is in no way under the criminals control, and the system carries them out…

Why an earth would any rational person not see where the fault for that actually exists…

I’ll give you a clue it’s not with the cryptographers, and they darn well know it, which is why the give that

“Don’t run with scissors warning”

Of,

“don’t roll your own”

Because they know from experience that mostly those with whom the problem exists,

1, Lack the training / competence.
2, Seek to externalise risk&blaim.

What highlights this inability of understanding is that people would say,

“Keep doing the same exact thing that was invented before anyone had ever heard of the cloud.”

Actually what is needed to be done for secure communications and storage was known before any computer including Babbage’s were ever thought up let alone built.

Information systems cover three areas,

1, Information Storage.
2, Information Communications.
3, Information Processing.

None of them are realy new ideas, Queen Elizabeth The First of England half a millennium ago certainly appeared to understand all three or at least Sir Francis Walsingham her “Spymaster” and close confidant certainly did.

The “physical object” security and communications methods from back then have in no way realy changed just some ot the techniques in the minor steps.

What has changed and only since the 1970’s is how we process information. Whilst the pre 1970’s security physical methods still work as ever they did we now want to do something entirely different.

Processing Information in the Cloud is not in anyway under your control or in actuallity anybody who you rent the systems from. Even though you have to sign away every right and throw away every sensible precaution people want that “cheep deal today” and “S@d the consequences tommorow”.

Have a look at the failures of “hardware solutions” in CPU’s to see that fundementally the computer architectures we mainly use are not in anyway designed for security in the lower levels in the computing stack. In fact they have been designed for convenience in which efficiency not security played the real driving role.

Supprisingly cryptographers are working quite industriously to solve this physical problem with an informational solution, and we know it’s no easy task and the result almost certainly will be in most cases slow, inefficient and therefore costly to implement. So unlikely to be of any use in saving money in the cloud, so probably won’t get used, or more importantly used properly.

And “used properly” is a big big issue when it comes to cryptographic algorithms, protocols and standards. Apparently it does not matter how we write them, some one will always either put their own spin on it or think they know better.

If you don’t believe me go and look up the history of “Number used Only Once”(nonce). It’s a very simple idea, however it can be extrodinarily hard to implement correctly in fact it can be shown to be imposible to do reliably in some cases. Often though the entire proof of security is founded on it…

You can almost guarentee if you give developers not sufficiently versed in security –as most are not– even a well written specification and implementation guide they will get it wrong…

“notice that cryptographers never have time to review anything.”

That “not having time” aspect is not just the fact that cryptographers are a very scarce resource (which they very definately are). But also amoungst other things going around telling people the same thing over and over again, and having those people then ignore you, have it blow up on them, and then blaim you not themselves, is at best a thankless task. Worse with idiot lawyers running the CSO Show you risk way more than you have for no gain, which is not sensible. So look on it as a “polite refusal to shoot themselves in the foot”.

It is also why you get the issue of,

“I’ve been to several conferences and gathered most all papers are related to dissertations. Umpteen lectures on the Internet, how encryption works, are the same thing over and over and over.”

Two points to think about,

1, Who the conferences are actually for, almost certainly not non cryptographers…
2, If you as a person for whom the conference is not actually for, can not get the basics right, why should those letting you in bother going beyond the basics you are going to ignore anyway…

Which brings us onto the next selfish accusation,

“They can never say if anything is secure.”

Nobody and I mean nobody can say something is 100% secure, all they can do is say they have found something wrong within the limits of our current quite small knowledge.

If you meet someone who says they can give you security guarentees with cryptography they are almost certainly a sales person or wrong. In many cases due to unicity distance in crypto algorithms and similar in modes and protocols they are used in. And if they are not wrong, then almost certainly it’s not practical in all but quite specific cases (see say the OTP and dealing with more than two communicating parties or more recently why E2EE is very difficult to get working securely in all multiparty “secure messaging apps”).

As for,

“All they do is wait until someone does something then collect enough evidence to bury them.”

Actually whilst it might feel like they are being buried remember,

1, They were told not to run with scissors.

2, The resulting mess they are sitting in, is entirely down to them ignoring what they’d been told.

3, Ignoring even the most basic of security advise is such a trend in the industry that just saying “I told you not too” is nolonger enough. Being nice does not work, it just encorages idiots to strike out.

4, It’s their own mess they are sitting in, why should anyone else clean it up for them? Especially when there is nothing in it for those daft enough to do so.

So unless you can find more positive observations in Mr Stewart’s book I’m assuming one or both of you do not understand very much about cryptographers.

tfb January 21, 2023 9:18 AM

@Winter

That only holds if you put up your protocols and primitives up for review

Which I supppose is why their source code is on github, why they undergo regular audits, and why they publish a cryptography whitepaper. I think they were not always open source, but the third-party code audits predated them being so, so independent people were always able to look at the code. Quite sure that if Bruce Schneier had asked to look at the code they would have said yes (and now they can’t even say no, which is better).

I mean, I don’t know anything, but it certainly looks like they are trying pretty hard to do the right thing.

Winter January 21, 2023 11:02 AM

@tfb

Which I supppose is why their source code is on github, why they undergo regular audits, and why they publish a cryptography whitepaper.

I have no time now, but a glance at their github repositories I could not find anything older than 2018 (copyright) or 2019 (submits). Not sure when they actually open sourced. They grew big in 2014. This suggests that the open sourcing was done only ~5 years ago.

Nick Levinson January 21, 2023 12:06 PM

@Bruce Schneier:

Error, apparently, in your post: The paragraph that begins “Left out of the statement . . . .” probably does not belong in the blockquote. It’s appropriate as your own comment.

@Winter & @William:

@Winter:

It’s possible to be innovative and right, although unusual. Thus, yes, more information is needed (and now, at least partly, supplied).

@William:

In most major subjects, basics are repeated. A discussant doesn’t know if all of the audience has the same understanding the discussant has, even in a refereed journal or Ph.D. dissertation. It’s no different with security or cryptography.

Winter January 21, 2023 1:03 PM

@William

“Cryptographers rarely create anything of value.”

Simplified, cryptographers create protocols and algorithms for cryptographic primitives. That is, they produce “mathematics”. Programmers then implement these mathematical results into libraries. Other programmers create products with these libraries.

Whether you consider knowledge about mathematics “valuable” or not is a question only you can answer. The world at large pays good money for cryptographers, so they think their work is valuable.

Clive Robinson January 21, 2023 2:41 PM

@ Winter, William, ALL,

Re : Maths and implementations

“Programmers then implement these mathematical results into libraries. Other programmers create products with these libraries.”

One major reason why this goes wrong, is to be secure, it has to be secure at every level, not just “part” of the maths.

AES for instance is secure as a mathmatical algorithm, but natoriously insecure when implemented as a program due to creating “side channels”.

Being mathematically secure is not enough it has to be also secure when it executes in the time and power domains as well. These extra security domains were not those of research cryptograpers prior to AES.

Even now they are pushed from “theoretical cryptography security” into “practical cryptography security” where the implementation of the algorithms, modes and protocols are done with care and a lot of knowledge that untill fairly recently was not even published in a form that appeared related to cryptography as it involves fundemental physical laws of nature quite closely, not mathmatical proofs.

The joke of secure cryptography in the real world is,

“The maths and logic is easy it’s the physics that’s hard”

Most if not all implementations in code libraries have side channels as the hardware they run on changes.

Even the “Secure Enclaves” designed by some of the best chip designers in the world still have exploitable time based side channels, as we have seen repeatedly over the past couple of years.

If you look back over the years on this blog I’ve frequently said,

“Do encryption or decryption ‘Off-Line’ never ‘On-Line'”

Because if you don’t the chances are you are not secure at all. The primary reason as I’ve noted repeatedly in the past,

“Efficiency -v- Security”

Whilst it is posible to have a secure design be efficient, it is not normally the case. Our standard computing architectures and their sub components are never designed for security, and often not even efficiency in terms of power, they are designed for maximum throughput. This generally opens up more power and time based side channels than you can imagine. With many of them going through transparently to the network where they can be seen above the “up-stream” node of gateway / router where the likes of the SigInt Agencies play, and increasingly so will Law Enforcment unless the SigInt agencies can stop them[1] ruining their game.

Most cryptographers can not help you in this EmSec area, especially as in some parts of the world the information, though in the public domain in other ways is still very classified in this area[3].

[1] The SigInt agencies play in the real network cloud (not the marketing crap world). That is just above the upstream node of Gateway / router. So they can see all your traffic, but you have no way to see them. This is prime real estate for surveillance but it is also largely unknown to the majority of people. So they happily haemorrhage data into this space via usage for traffic analysis, and side channels leaking content, KeyMat, or both. You can never ever be secure using “Saas etc Cloud Services”. Something the SigInt people do not becoming wide knowledge, because then those they “target” would stop making those mistakes, thus the real network cloud will cease to be the prime realestate for SigInt and they will have to move through the gateway “into the garden path”[2] and become visable to security devices and staff at the targets site.

[2] I’ve described in the past on this blog a way using routers and instrumentation, ways to spot even highly sophisticated attackers whilst they are in effect “on the garden path, and not inside your house”.

[3] Start with a decent book on electronics design for “ElectroMagnetic Compatability”(EMC). Then some books on radio communications theory to do with modulation and antennas. And realy get to understand what “4KTR” and “Johnson Nyquist” noise are and how they are effected by channel bandwidth, and so you also need to get your head around extended “Shannon Channels”. To see why you might not relate this to security read,

https://eepower.com/resistor-guide/resistor-fundamentals/resistor-noise/

In it you will find,

“The equation shows that the noise level can be decreased by reducing the resistance, the temperature or the bandwidth.”

Understanding this is the fundemental step or foundation in TEMPEST / EmSec. And as can be seen from the equation it’s all fundemental physics and the laws of nature not mathmatical proofs based on often practically unrealisable notions such as nonces.

tfb January 22, 2023 5:18 AM

@Winter

Commit dates &c are not worth much: I have commits in git repos dating well before git existed.

Better information is this: they open-sourced it at the end of 2020.

However, as I said, before that (and as far as I know since they have existed) they had regular independent code audits and I am pretty sure that if any reputable person wanted access to audit their code they would have been granted it.

That’s the point I’m trying to make: they did something approximating to the best thing they could have done, I think. It wasn’t quite enough, but they’re not the villains they are being made out to be, I think.

Winter January 22, 2023 5:37 AM

@tfb

It wasn’t quite enough, but they’re not the villains they are being made out to be, I think.

I would like to quote David A Wheeler and Bruce Schneier on this:
‘https://dwheeler.com/secure-programs/Secure-Programs-HOWTO/open-source-security.html

Bruce Schneier is a well-known expert on computer security and cryptography. He argues that smart engineers should “demand open source code for anything related to security” [Schneier 1999], and he also discusses some of the preconditions which must be met to make open source software secure.

David A Wheeler himself

So, what’s the bottom line? I personally believe that when a program began as closed source and is then first made open source, it often starts less secure for any users (through exposure of vulnerabilities), and over time (say a few years) it has the potential to be much more secure than a closed program. If the program began as open source software, the public scrutiny is more likely to improve its security before it’s ready for use by significant numbers of users, but there are several caveats to this statement (it’s not an ironclad rule). Just making a program open source doesn’t suddenly make a program secure, and just because a program is open source does not guarantee security

Clive Robinson January 22, 2023 7:34 AM

@ tfb, Winter,

“It wasn’t quite enough, but they’re not the villains they are being made out to be, I think.”

The question of “villainy” is an open one, and falls not under the purview of the involved, but those who look on as observers.

As has been highlighted above the “villains” are that because they “rolled their own” and got it wrong.

But arguably they had no choice, because there was nothing already rolled and available at the time.

So damned if they did damned if they did not.

As I’ve noted above AES is a security failure in several important ways as those ways were deliberately excluded from the compatition assessment process[1]. Further I suspect that at some point in time AES’s basic constructs will become questionable (there were better AES candidates, but “the cute mutt won the show”).

Security is hard to implement and extrodinarily fragile, testing it is well neigh impossible for anyone outside of Government because of the number of people you would have to hire would be prohibitive and commensurably expensive.

The only reason the NIST competitions happen is “for the fame” or publicity and if you are lucky the potential to convert that into a reasonable position in an organisation.

The only way most people can get their system sufficiently tested is by making a target of themselves.

The classic example of crypto dog piling was probably the “Fast Encryption ALgorithm”(FEAL) that got torn to pieces so badly it was effectively a “blood sport”.

However it pushed people to come up with new attack methods (differential and linear) which kind of pushed quite a few other cryptographic algorithms off of the stage, the most obvious being DES.

You can get a feel for the salvaging FEAl got from

https://en.m.wikipedia.org/wiki/FEAL

So the reality is unless you are a Government, you have to have two things happen,

1, Be totally Open and Unencumbered.
2, Have sufficient standing to be news worthy enough to give others fame / publicity to in effect form a competition.

They had neither at the time, but things changed and they got both of them…

[1] Much that should have been in the AES competition was not even though known to be concern areas to the “Technical advisors” to NIST the NSA. In fact the competition looks very much like it was rigged to make the most insecure implementations of AES get put into just about every piece of software it could and every code library… Worse the NSA does not realy approve of AES themselves, noting it is secure to protect “data at rest” to secret. Worse if you look around you will find the NSA do not approve of the use of AES when systems are processing or communicating information… So theoretically secure, OK for stored data, but not to be used to encrypt or decrypt in systems that can be reached externally.

Winter January 22, 2023 7:50 AM

@tfb, Clive

But arguably they had no choice, because there was nothing already rolled and available at the time.

It is not the fact that they rolled their own. They had to as you wrote.

I follow David A Wheeler [1] here. It is the fact that they kept the source closed until 2020 which allowed them to grow a large user base, that is objectionable.

Now they have a very large user base with a long use history that are at risk.

[1] ‘https://dwheeler.com/secure-programs/Secure-Programs-HOWTO/open-source-security.html

Clive Robinson January 22, 2023 11:16 AM

@ Winter, ALL,

Re : D Wheeler HowTo Extract.

“I follow David A Wheeler [1] here. It is the fact that they kept the source closed until 2020 which allowed them to grow a large user base, that is objectionable.”

I’ve read it and it actually says very little.

Your argument of,

“… to grow a large user base, that is objectionable.”

Would be funny if you’ld said it about Microsoft or Apple and their many many as, if not more, serious security faults march out the door almost daily.

As I pointed out above, nobody would have looked at Threema’s code unless they became sufficiently large to be newsworthy.

That’s the reason the researchers looked, because they are now “big enough to boast about”.

In Western culture nobody is realy interested if you beat up on a 35kg little kid, or they will take the little kids side and look badly at you. However you beat down a 140kg behemoth then the crowd will shout and cheer and yell for more. The story of David v Goliath exemplifies this.

Nobody would have looked at Threema’s code when they had to roll it themselves because they were not worth the time or effort back then. Now they have lots of users they are newsworthy and that is a path to fame for others.

That is the only reason the code was looked at, pure and simple.

Pretending Threema are villains just to sell newspaper space really does not change anything. Because the users would still have signed up to them or some other insufficiently secure system provider.

As I’ve mentioned before “None of the Secure Messaging Apps are Secure” and “The designers of those systems know it”.

I very much doubt that any “user usable” communications program is secure, as the all have the same fundemental foundational mistakes.

It’s why over and over I tell people not to trust consumer / commercial programs on consumer / commercial platforms, because I know beyond reasonable doubt they are all insecure and in practice can not be anything close to secure. It is afterall not that hard to work out why and gets confirmed almost every day as look through CVE will show.

I’ve even told people how to get better security but I know that few if any will heed my advice let alone actually follow it.

Why?

Because the evidence points to the fact that people in general won’t make the effort[1], they all want convenience and will quite happily believe in any old nonsense as long as they can share photos of kittens that look grumpy or cute.

I’ve shown the horse the path to water, I’m not going to waste any more effort to drag it down there and push it’s nose in it, just to have it kick back at me now or in the future.

And am I happy Threema’s proved me right? nope.

Will I be happy when I’m proved right about the rest of them? nope.

All your comment proves is that “a large user base” failed to do their simple due diligence, because they wanted conveniance etc, so who is realy to blaim?

The answer from my perspective is the users, they had alternatives, they did not have to use Threema, the same as you don’t have to use Microsoft, Apple, Google, or Adobe products.

We once were all told we had to have “Flash” or “Java” in our webbrowsers, I said we did not, and after a veritable death race carnage of security vulnarabilities most do not use Flash or Java in their browsers now. I’ve as consistently warned about JavaScript and more recently HTML5. They too are going to have their own blood and gut strewn street of security vulnerabilities… But will they stop going for the convenience? Nope because that’s how users are and,

“You can not stop stupid doing as stupid does”.

History tells us this over and over like a wheel stuck in a rut.

[1] Look up all the “Why Johnny can’t encrypt” research.

Winter January 22, 2023 11:40 AM

@Clive

Would be funny if you’ld said it about Microsoft or Apple and their many many as, if not more, serious security faults march out the door almost daily.

I do not use Microsoft as an example of good security practices.

Also, the efforts Apple can invest in security are not possible for an enterprise like Threema.

Attracting a large user base with self-developed Cryptographic protocols and primitives is far from “responsible security practices”.

Clive Robinson January 22, 2023 2:23 PM

@ Winter,

“Attracting a large user base with self-developed Cryptographic protocols and primitives is far from “responsible security practices”.”

But that is the way the software industry works, and as far as I can remember, how it’s always been done with consumer / commercial grade software in even the largest of software companies untill fairly recently.

So in effect you are saying Threema’s crime is to have followed industry best practice of the time?

Ted January 22, 2023 2:55 PM

@Winter, Clive, tfb, All

Attracting a large user base with self-developed Cryptographic protocols and primitives is far from “responsible security practices”

I see what you’re saying. However, it’s interesting looking at the factors that have driven users to Threema. According to Wikipedia – so take this with a grain of salt – the 2013 Snowden revelations drove a large number of users to Threema. As you recall, Threema was initially spun up in late 2012.

Then in 2014 Facebook took over WhatsApp. That doubled Threema’s users in a 24 hour period, with 80% of those users coming from Germany.

https://en.wikipedia.org/wiki/Threema

What’s likewise fascinating is the current popularity of the various instant messaging platforms. WhatsApp has the most users, followed by Facebook Messenger, WeChat, a few more apps, then Telegram… and further down on the list we have Signal, and further still there’s Threema.

There’s also a matter of jurisdication and legal access to data.

Winter January 23, 2023 2:44 AM

@Clive

So in effect you are saying Threema’s crime is to have followed industry best practice of the time?

I understand your sarcasm, but I think industries should be called out for using known dangerous practices.

We do not say that security in the “White Star Line” was good just because it was industry standard to leave the Titanic with too few life boats to carry all passengers. Nor do we think that car makers were right to stall seat-belt use because it was how the industry worked.

“Industry best practices” is rightfully considered an oxymoron. At the time, it was well known that “closed source cryptography” was snake oil.

Clive Robinson January 23, 2023 5:53 AM

@ Winter,

“I understand your sarcasm, but I think industries should be called out for using known dangerous practices.”

Then call out an industry, not demonize individuals.

Because if you don’t you get two undesirable effects,

1, You create “scapegoats” to be demonized in show trials.
2, You give a “pass” to all the others to continue as they are doing.

One of the reasons we had Banking Crisis after Banking crisis untill the term was meaningless was because of this “oh they were rouge elements” nonsense, which still gors on today, only they are a little more carefull to make things more deniable.

That “hidden hand of the market” that gets talked about, is in almost every market especially faux-markets criminal or highly unethical behaviour.

Yes we need to call these markets out, and make the more honest practitioners call out the less honest or down right criminals around them very publically.

Because as many will point out the so called “Whistle blower” schemes are almost always a way to have the honest and good intentioned to be discriminated against so the dishonest will not just survive but thrive.

Winter January 23, 2023 6:30 AM

@Clive

Then call out an industry, not demonize individuals.

I am not aware of singling out any individuals. I was criticizing the behavior of Threema, a company that sold a product, with a responsibility for the security&safety of their customers.

Clive Robinson January 23, 2023 11:02 AM

@ Winter,

“I am not aware of singling out any individuals”

Actually you are. Threema is an individual organisation, and remember in the EU,

“Any person legal or natural”.

Makes Threema the equivalent of an individual person.

But it’s not just “the on-line software industry” that needs calling out.

Part of the problem is that Threema had to “role their own” because there was no available “ready rolled”.

It’s all very well cryptographers and other security persons giving the,

“Don’t run with scissors”

Talk, but that only becomes possible if there is an alternative.

Our host @Bruce back before the NIST Hash Competition, made a comment about crypto algorithms had got about as far as we realistically needed them, and that cryprographers really should start looking into other areas of much greater need such as Key Managment/distribution. Which arguably we’ve made no real progress since in academia.

What has drawn everyones attention has been yet again another NIST algorithm competition. To replace the existing PubKey algorithms that are likely to be susceptible to Quantum Computing if it ever gets to the point it will be of use (which many doubt for quite reasonable reasons / beliefs).

Cryptographers finding an entirely different alternative to PubKey and it’s many failings might not be trendy, but it is arguably more important.

The thing is it’s not the only area of cryptography that needs work done, not yesterday but a decade ago and well the academic cryptographers are not just not delivering, they are not realy working on them…

For instance I’ve explained how the One Time Pad can give the first party in an encrypted communications against betrayal to a third party by the second party. The problem with OTP key distribution are well known finding a way to get deniability in other ways would be highly advantageous.

There are other equally as useful things academic cryptograpers could be doing than vying for fame and prestige in NIST competitions…

Leave a comment

Login

Allowed HTML <a href="URL"> • <em> <cite> <i> • <strong> <b> • <sub> <sup> • <ul> <ol> <li> • <blockquote> <pre> Markdown Extra syntax via https://michelf.ca/projects/php-markdown/extra/

Sidebar photo of Bruce Schneier by Joe MacInnis.