1
edit
Changes
no edit summary
Zack Bloom
== Assignment 1 ==
=== <u>RSA Key Generator</u> ===
Attempted by: Andrei Kopytov
This is an open source project hosted on code.google.com. The source was written in C++ from scratch to implement RSA encryption.
It currently supports prime number generation, key generation and encryption/decryption of files or strings. The project can be found here: http://code.google.com/p/rsa/ My goal for this project will be to parallelize the longMultiply() function inside the BigInt class. <big><pre>/* Multiplies two unsigned char[] the long way. */void BigInt::longMultiply(unsigned char *a, unsigned long int na, unsigned char *b, unsigned long int nb, unsigned char *result){ std::fill_n(result, na + nb, 0); unsigned char mult(0); int carry(0); for (unsigned long int i(0L); i < na; i++) { for (unsigned long int j(0L); j < nb; j++) { mult =a[i] * b[j] + result[i + j] + carry; result[i + j] = Assignment 1 static_cast<int>(mult) % 10; carry =static_cast<int>(mult) / 10; } if (carry) { result[i + nb] +=carry; carry = 0; } }}</pre></big>