MCPcopy Create free account
hub / github.com/TheAlgorithms/Rust / mod_pow

Function mod_pow

src/ciphers/rsa_cipher.rs:102–119  ·  view source on GitHub ↗

Performs modular exponentiation: (base^exp) % modulus Uses the square-and-multiply algorithm for efficiency # Arguments `base` - The base number `exp` - The exponent `modulus` - The modulus # Returns The result of (base^exp) % modulus

(mut base: u64, mut exp: u64, modulus: u64)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 2

encryptFunction · 0.85
decryptFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected