Skip to content

Latest commit

 

History

History
23 lines (18 loc) · 639 Bytes

README.md

File metadata and controls

23 lines (18 loc) · 639 Bytes

NTC-1819-A1-154-233

Assignment for the course Number Theory and Cryptography

  • Dibyadarshan Hota (16CO154)
  • Omkar Prabhu (16CO233)

Q 22. Write a MATLAB code to find (a^x + b^y) modulo m where a, b, x, y and m are positive integers.

Usage

Run

>> main

Output

Folder Structure

  • main.m - Main logic of the program
  • fast_modulo_exponentiation.m - Exponentiates using repeated squaring and taking modulo
  • phi.m - Euler's Totient function
  • modulo.m - modulo operator
  • gcd_int.m - greatest common divisor of two numbers using Euclid's algorithm