Expand description
Sans-IO MTProto authorization key generation.
§Flow
let (req, s1) = authentication::step1()?;
// send req, receive resp
let (req, s2) = authentication::step2(s1, resp)?;
// send req, receive resp
let (req, s3) = authentication::step3(s2, resp)?;
// send req, receive resp
let done = authentication::finish(s3, resp)?;
// done.auth_key is readyStructs§
- Finished
- The final output of a successful auth key handshake.
- Step1
- State after step 1.
- Step2
- State after step 2.
- Step3
- State after step 3.
Enums§
- Error
- Errors that can occur during auth key generation.
Functions§
- finish
- Finalise the handshake. Returns the ready
Finishedon success. - key_
for_ fingerprint - RSA key by server fingerprint. Includes both production and test DC keys.
- step1
- Generate a
req_pq_multirequest. Returns the request + opaque state. - step2
- Process
ResPQand generatereq_DH_params. - step3
- Process
ServerDhParamsand generateset_client_DH_params.