Skip to content

n is not invertible when modulus = 2p^k #13

@jacksonwalters

Description

@jacksonwalters

note that n is required to be a power of 2 for the divide-and-conquer algorithm to work. this means that gcd(n,2p^k) = 2, so n is not invertible modulo 2p^k. this prevents us from using this modulus despite the fact that the multiplicative group is cyclic.

we add an assertion in the modular inverse function to ensure that the input is actually invertible which was missing before.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions