miniproto_native::crypto::pq_factorize
Provenance
Section titled “Provenance”- Crate:
miniproto_native - Rust visibility:
restricted - Source:
rust/miniproto/src/crypto.rs - Python exposure:
miniproto._native.pq_factorize(confirmed from adjacent PyO3 attributes)
Signature
Section titled “Signature”fn pq_factorize(py: _, pq: u64) -> _Arguments
Section titled “Arguments”py: The acquired GIL token used to detach the factorization search.pq: Composite MTProto handshake value to split into ordered factors.
cargo-docs-md rendering
Section titled “cargo-docs-md rendering”pq_factorize
Section titled “pq_factorize”fn pq_factorize(py: Python<'_>, pq: u64) -> PyResult<(u64, u64)>Defined in rust/miniproto/src/crypto.rs:468-470
Factorizes Python pq_factorize(pq) into ordered nontrivial u64 factors.
Returns ValueError for non-composite values and runs the potentially expensive search with
the GIL released.
Arguments
Section titled “Arguments”py: The acquired GIL token used to detach the factorization search.pq: Composite MTProto handshake value to split into ordered factors.