Skip to content

Conversation

@umnikos
Copy link

@umnikos umnikos commented Jul 13, 2021

Also called "exponentiation by squaring". It uses O(log b) multiplications instead of the O(b) multiplications the previous algorithm needed. With a slight modification you can also make a bignum_binmod() version which takes a modulo of the result in each intermediate step of the exponentiation and is a key operation in RSA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant