I am trying to calculate something like this: a^b mod c, where all three numbers are large.
Things I've tried:

Python's pow() function is taking hours and has yet to produce a result. (if someone could tell me how it's implemented that would be very helpful!)
A right-to-left binary method that I implemented, with O(log e) time, would take about 30~40 hours (don't wanna wait that long).
Various recursion methods are producing segmentation faults (after I changed the recursion limits)

Any optimizations I could make?
It sounds like you are trying to evaluate pow(a, b) % c. You should be using the 3-argument form, pow(a, b, c), which takes advantage of the fact that a * b mod c == a mod c * b mod c, which means you can reduce subproducts as they are computed while computing a ^ b, rather than having to do all the multiplications first.
How to implement modular exponentiation?