Skip to main contentModule aes
Source - ctr_crypt
- Encrypt/decrypt
buffer in-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) by byte_offset / 16. - ige_decrypt
- Decrypt
buffer in-place with AES-256-IGE.
buffer.len() must be a multiple of 16. - ige_encrypt
- Encrypt
buffer in-place with AES-256-IGE.
buffer.len() must be a multiple of 16.