News for hackers. Stuff that matters.
Re:Telegram - secure, free messaging by kitd on Monday December 16, 2013 @05:33AM (#6913925)
You are correct to be wary. However, the MTProto java impl is here: https://github.com/ex3ndr/telegram-mt
Re:Telegram - secure, free messaging by jzwinck on Monday December 16, 2013 @07:46AM (#6914375)
Great, let's take a quick look.

TcpContext.java[1] says:

    MAX_PACKED_SIZE = 1024 * 1024 * 1024;//1 MB
    READ_DIE_TIMEOUT = 5 * 1000; // 15 sec
So those are bugs, though I'm not sure if documentation or code. Most importantly to me, there are very few comments in the code, and the few there are are incorrect. One might infer that this code has been written either in haste, or by someone who believes that comments are not needed in this sort of systems code.

There are also writeInt() and readInt() method which seems to be little-endian, which seems odd for a network program. No comments near them.

Finally, there's a "Package" class which is just a byte array and a flag. And there's a method which writes it after a cute encoding for the length divided by 4. But there is no code which checks that the length is evenly divisible by 4. This may lead to incomplete Packages being written, with what effect I am not sure.

In summary, I wouldn't trust this program, having reviewed one of its source files mostly at random.

Oh, and despite its README saying that it is designed for mobile, it uses TCP Keep-Alive, which seems like a bad idea for mobile specifically (due to keeping the radio alive and draining the battery). Again, no comments explaining why.

[1] https://github.com/ex3ndr/telegram-mt/blob/master/src/main/j...

Re:Telegram - secure, free messaging by ToastyMallows on Monday December 16, 2013 @09:11AM (#6914742)
Curious, why are those bugs?
Re:Telegram - secure, free messaging by rattray on Monday December 16, 2013 @09:38AM (#6914919)
5ms * 1000 != 15s. It's unclear whether the comment is outdated, and 5s is in fact intended, or whether 15s was intended and the 5 is a typo (therefore a bug, although unlikely a critical one). Either way, it's certainly sloppy programming, and the kind of thing that can lead to more serious problems.
Re:Telegram - secure, free messaging by ToastyMallows on Monday December 16, 2013 @11:44AM (#6915876)
Ah, duh. I was analyzing too in-depth. Thanks.
Re:Telegram - secure, free messaging by wcummings on Monday December 16, 2013 @08:23PM (#6919074)
Someone probably updated the constant and forgot to / was to lazy to update the comment
Re:Telegram - secure, free messaging by tptacek on Monday December 16, 2013 @10:05AM (#6915102)
I looked for 4 minutes.

* Uses unpadded RSA in its authentication protocol

* Uses a novelty mode (IGE) for its bulk transport

* Does not appear to authenticate messages (other than by using IGE)

* Or, at least, what authentication it is doing must be happening after it decrypts data, not before

I could be wrong about any of these things, because again, 4 minutes. But this design does not look sturdy.

Re:Telegram - secure, free messaging by sillysaurus2 on Monday December 16, 2013 @05:40AM (#6913950)
Interesting. Some observations:

TextSecure has been a work in progress for two years: https://github.com/WhisperSystems/TextSecure/commits/master?...

Telegram seems to have been in progress for two months: https://github.com/ex3ndr/telegram-mt/commits/master?page=2

Telegram also seems to be the work of a single author. While TextSecure was written mostly by Moxie, there were several other contributing members.

Re:Telegram - secure, free messaging by haarts on Tuesday December 17, 2013 @05:20AM (#6920370)
Textsecure != Telegram. Textsecure is a replacement for SMS/text messages and Telegram for Whatsapp type messages. Totally different things.