Difference between revisions of "Zombie Panda Breeders"

From CDOT Wiki
Jump to: navigation, search
Line 17: Line 17:
 
Attempted by: Andrei Kopytov
 
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.
+
This is an open source project hosted on code.google.com. The source was written from scratch in C++ to implement RSA encryption.
  
 
It currently supports prime number generation, key generation and encryption/decryption of files or strings.
 
It currently supports prime number generation, key generation and encryption/decryption of files or strings.

Revision as of 18:29, 3 October 2012

Welcome to the team page for Zombie Panda Breeders.

We are a team focused on parallelizing C/C++ applications using CUDA for the Parallel Programming course (GPU610/DPS915) at Seneca for the Fall 2012 semester.


The team consists of:

Andrei Kopytov

Zack Bloom

Assignment 1

RSA Key Generator

Attempted by: Andrei Kopytov

This is an open source project hosted on code.google.com. The source was written from scratch in C++ 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.

/* 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] = static_cast<int>(mult) % 10;
			carry = static_cast<int>(mult) / 10;
		}
		if (carry)
		{
			result[i + nb] += carry;
			carry = 0;
		}
	}
}