Research Article
Efficient Big Integer Multiplication and Squaring Algorithms for Cryptographic Applications
Algorithm 9
Multiple-precision classical squaring,
.
| Input: positive integer having base 2 digits. | | Output: the square in base representation. | | | | (1) Compute = . // | | (2) For from 0 up to do: . | | (3) For from 0 up to do the following: | | (3.1) If then do the following: | | (3.1.1) Compute , and set , . | | (3.1.2) For from up to do the following: | | (3.1.2.1) Compute . // u is a multi-precision binary | | (3.1.2.2) Set and . // digit and v is a single-precision | | // binary digit | | (3.2) . | | (4) Return |
|