CryptoCollaboration Client Testing / Encryption Optimization

I am working on benchmarking some of the CryptoCollaboration encryption algorithms in order to optimize performance in relation to the threading that is required. It is pretty tough in order to balance out what is optimal, but it is coming along pretty nicely.Because this is solely a proof of concept, it shouldn’t really be that big of a deal, but I am finding I have to make modifications to the asymmetric encryption engine in order to continually optimize the actual encryption process. I have certain criteria that I am targeting which are required for this to be actually considered for production use. Although I should probably spend some time writing out the business cases of it, meh, hopefully when I release it I can get someone else to give me some material about that.

I am using this small WinForms client in order to test it out locally as I push builds out into the receivers that are normally called since it is easier for test and deployment; just using two text files for the testing. One of the text files is used for the document input (plain-text), and other is used for document output (encryption). Afterwards, the outputs can be reversed and re-input back into the client program, which can harness opposing methods. Looking at the client, it should be somewhat clear how this could be instead be architected through a receiver structure that will trip the relevant encryption events upon file upload. Although there has to be compensation in the encryption program as such (clearly running encryption algorithms via client trapped event through a web browser is a little bit different than running through a WinForms program), from my initial testing through integration with SharePoint it still is relatively effective.

So these are my two text files that I am using, one is meant to house the plain text and the other is meant to act as the destination for the encrypted text.

The MyTestDecrypted.txt file has 1KB because it contains the string “Adam Buenz”.

Now that I have my two files that I want to throttle the threading for in order to optimize the encryption data, the next part that I have to do is start the actual encryption process.

So I am going to take the decrypted text document as a parameter, and the encrypted output as the results file, and I am going to encrypt the document with the passphrase string “adambuenz”. I am also going to choose Rijndael as my encryption scheme, although there are several other encryption options that I built into the shared encryption library that will eventually be packaged and delivered.

Once the encryption routine is selected, I am going to trip the encryption process and collect my relevant metrics. After I collect my metrics, I am going to verify that the text was indeed encrypted.

I have collected my metrics, and it appears that the encrypted text was accomplished successfully. Alright!

The routines that are responsible for this can be seen within the relevant sequence diagrams that depict how the actual encryption process progressions. I have two methods that will get the encryption class and another that will get the hash class.

Get the Hash Class:

(Select For Larger Image)

Get The Encryption Class:

(Select For Larger Image)

Invoking the Encryption Routine:

(Select For Larger Image)

Then Calling This Routine:

There is also some exception handling that had to be integrated in order for this to work correctly:

So, this is where I am at with the thing. In the next post regarding this, I am going to be going to be releasing the common library along with the related receivers in a SharePoint solution file. Although it will allow the creation of an “Encrypted Enabled” document library, I still haven’t written the decryption CEB that will open a new application page, pop-up, or whatever that will allow the passphrase to be entered in order to trip the decryption process.

Yeah, it will only be 50% of the solution. But I want to test things gradually with this and optimize each as I encounter them. Either way, for those with a test environment that contribute to the testing, your name will be included within the final paper.