Count power of big numbers and then apply modulo on this numbers
Your spelling of length is unconventional, and will cause errors.

Calculating the full result will generate a large number, slowing computation.  It's better to reduce the partial results as you compute the power, and keep the partial result mod n - you'll probably want to use binary exponentiation instead of the ** operator so that you can apply the modulus to the intermediate results.

I don't see what m = int(m) and similar lines are intended to achieve - probably worth a comment there.

How is the final (partial) block handled?  That seems to be missing altogether.