Foo Barrigno
Foo Barrigno

Reputation: 237

Python 3.2 number theory library

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

Answers (1)

Lennart Regebro
Lennart Regebro

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

Related Questions