miniproto.crypto.native.pq_factorize
miniproto.crypto.native.pq_factorize
Section titled “miniproto.crypto.native.pq_factorize”pq_factorize(pq: int) -> tuple[int, int]Factor the composite integer used by the MTProto handshake.
Parameters:
- pq (
int) – A composite integer greater than or equal to four.
Returns:
Raises:
ValueError– Ifpqis too small or prime.
Uses the selected backend’s Pollard-rho-style implementation. It is a protocol helper, not a general-purpose factorization service; runtime grows with the input and no fixed latency guarantee is made.