Article Preview
Buy Now
COLUMN
Fast Exponentiation
It's Not Just for Numbers
Issue: 6.3 (March/April 2008)
Author: Charles Yeomans
Author Bio: Charles will be speaking at Real World 2008 on topics other than algorithms.
Article Description: No description available.
Article Length (in bytes): 7,731
Starting Page Number: 38
Article Number: 6317
Related Link(s): None
Excerpt of article text...
The problem we set for ourselves in this issue's column is: given integers x and N, compute x^N. Since this is a primitive operation in almost every public-key cryptographic system, it is both interesting and useful to understand how to do it quickly. And as a consequence, we can apply what we have learned to write a handy string function.
Let us begin with the direct translation of the meaning of exponentiation into code.
Function Power(x as Integer, N as Integer) as Integer
...End of Excerpt. Please purchase the magazine to read the full article.