Reputation: 237
I'm having trouble finding a usable python 3 number theory library. All the libraries I found are written for python version 2, or they're lacking the functionality that I am looking for. I require modular square root function that can handle composite numbers with a known factorization.
I could roll my own, but I assumed that someone else had already solved this problem and it's a relatively routine thing to find.
Upvotes: 5
Views: 1422
Reputation: 172309
This collection of functions have modular square roots. The code looks Python 3 compatible to me. (Closer inspection seems to indicate it's Python 3 only, in fact).
https://github.com/hellman/libnum
If nothing else, it should be a start.
Upvotes: 1