5 ms·
https://core.telegram.org/techfaq#q-why-do-you-use-sha-1-in-the-place-of-a-mac https://core.telegram.org/techfaq#q-why-do-you-use-sha-1-in-... > Q: Why do you
by tjaerv 13y ago
https://core.telegram.org/techfaq#q-why-do-you-use-sha-1-in-the-place-of-a-mac https://core.telegram.org/techfaq#q-why-do-you-use-sha-1-in-...
> Q: Why do you use SHA-1 in the place of a MAC?
> Technically speaking, in our implementation SHA-1 can be seen as a specific case of a MAC (but not HMAC), since it is also used as an encryption key.
> We use it, because it is faster, especially when you need to send photos or large videos (Telegram supports videos and documents up to 1Gb). And since this means still requiring at least 2^128 operations (instead of 2^256 with, say, SHA-2) to even begin trying to break this scheme, the trade-off seems fair.