Skip to content

Make gmpy2 optional #4

@NCGThompson

Description

@NCGThompson

gmpy2 relies on having gmp installed, which can be a hassle, especially is someone wants to implement this library in a stand-alone script to be run with Python3. I suggest using PyCryptodome for math functions related to cryptography (e.g. isPrime()). PyCryptodome will use either gmpy or gmpy2 if it is installed, but will run without it. For performance of long integer arithmetic, use the same strategy as PyCryptodome: use mpz if it is available but fallback on to the built in long type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions