Fix a critical error at the last step of kimlik validation

I had forgotten the modulus operation since I transferred from a
different version to this one. It's fixed, tested and works pretty
robustly right now.