// Copyright (c) Ankit Chaubey <ankitchaubey.dev@gmail.com>
//
// ferogram: async Telegram MTProto client in Rust
// https://github.com/ankit-chaubey/ferogram
//
// Licensed under either the MIT License or the Apache License 2.0.
// See the LICENSE-MIT or LICENSE-APACHE file in this repository:
// https://github.com/ankit-chaubey/ferogram
//
// Feel free to use, modify, and share this code.
// Please keep this notice when redistributing.
use BigUint;
/// Compute `base^exp mod modulus` over arbitrary-precision big-endian byte slices.
///
/// All three inputs are big-endian byte slices. Returns big-endian bytes,
/// zero-padded to nothing (caller pads if needed).
///
/// Used for MTProto DH key exchange: `g^b mod p` and `g_a^b mod p`.