Expand description
AES-IGE (Infinite Garble Extension): used by Telegram’s MTProto.
Functions§
- ctr_
crypt - Encrypt/decrypt
bufferin-place with AES-256-CTR (symmetric).key= 32 bytes,iv= 16 bytes (full block = counter starting value). - ctr_
iv_ at_ offset - Return the effective AES-CTR IV for a CDN chunk starting at
byte_offset. Telegram CDN increments the counter (big-endian uint128) bybyte_offset / 16. - ige_
decrypt - Decrypt
bufferin-place with AES-256-IGE.buffer.len()must be a multiple of 16. - ige_
encrypt - Encrypt
bufferin-place with AES-256-IGE.buffer.len()must be a multiple of 16.