How to use chinese remainder theorem to calculate k%m where m is not prime?

51 Views Asked by At

How to use Chinese Remainder Theorem for solving a%m when m is not prime, actually i have to solve a^b %m but i know it for prime numbers,but how to solve using decomposing m into prime powers and then recombining the solution.