Documentation
¶
Overview ¶
Copyright (c) 2025 @AmarnathCJD
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DoRSAencrypt ¶
DoRSAencrypt encrypts exactly one message block of size 255 bytes using the given public key. This is a custom algorithm for MTProto. The Telegram documentation does not specify whether this encryption follows OAEP or any other standard padding scheme. Use only for MTProto protocol blocks, not for general-purpose RSA encryption.
func SplitPQ ¶
SplitPQ factors a composite number pq into two prime numbers p and q, ensuring p < q. This is used in Diffie-Hellman key exchange, where factoring pq is required for protocol security checks. The function implements Pollard's rho algorithm for integer factorization, which is efficient for numbers with small factors.
Types ¶
This section is empty.