Posts Tagged school

MASC: Miniature/Modifiable Asymmetric-Symmetric Cryptosystem

I just finished writing my final report for Intro to Modern Cryptography. The topic: a light, home-brewed, C++, library-asisted OpenPGP equivalent for encrypting files. The basic concept is as follows for OpenPGP:

  1. Symmetric encryption (AES etc.) is fast but you have to get the key from point A to point B securely
  2. Asymmetric encryption (RSA etc.) negates the key sharing requirement but is slow
  3. Asymmetrically encrypt a symmetric “session” key, then use the session key to encrypt the file/message you’re trying to send and you get the best of both worlds!

So I made a command line utility, using the Chilkat Visual C++ library set, that did the above for file encryption, with automatic signing built in so the recipient knows who sent the file. The application is rather basic, but it works very well (and pretty quickly for encryption/decryption…my IdeaPad took about seven seconds each to encrypt and decrypt a 100MB file) and is easy to dissect for anyone who wants to do that sort of thing.

For more information, download the package below Read the rest of this entry »

Tags: , , , , ,

Bitter at C++ for the moment

Why am I up when I have this to study for tomorrow? ‘cuz I’m a bit bitter…

I turned in my C++ final project (an ISP traffic analysis tool basically) two and a half hours late. The reasons were severalfold:

1. Due to waiting on people to edit and (correctly) upload code. Hate to say it but I could have done the edits they did in much less time than they took…

2. Due to ofstream data types being unavailable as members of a class. Due to the requirement to pass them referentially when used. I could have switched the implementation of that whole part of the program to a struct, but we didn’t study about those, so I wouldn’t really know where to start. As it stood, I got very confused, and am now rather angry, at C++. In the end, I just integrated the ofstream in question into the main body of the program, generating maybe 1KB of code that would’ve been unecessary if the language had been just a tad smarter.

Maybe I have an over-inflated ego, but one of the two other people working with me on the project (I apologize to these people if they read this…I’m venting here) couldn’t figure out the solution to the problem, even when looking at it for an hour or two, solid. I looked at it for the same period, but I got an answer.

I have to give credit where credit is due: the other coding partner did a great job of debugging my code. It was a disgusting mess of bugs, I’m sure, when he started, and it was a workable program at the end of the process. From there, he worked on some additional debugging and fine-tuning as his main contributios to the project. Which helped. The other guy did similar, but to a lesser extent. I found myself rewriting a lot of his code so I could understand and expand on it. He’s used to Java…but C++ is my first non-BASIC language, and it looks like I’m picking it up rater well.

All in all, I feel like I spent more time on the project than the other two guys, combined. Granted, this probably has to count the idea/planning stage, in which they didn’t partiipate. I probably made our project the hardest out of everyone else’s. Hopefully it’ll be scored accordingly.

On the other hand, my participation in antoher class, in which I’ll get an A grade, could be contested. In that class I could probably be ranked “average”. Then again, I worked at that class more than I did in a much larger class, worth the same number of credit hours, and in which I’ve earned just as much of an A as everyone else.

In closing, it feels lonely at the top. At least, I feel lonely, therefore I have a sense of being at the top. I’m getting positive feedback on this feeling. And I’m disgusted with the inflexibility of C++ about including output file streams as class member variables. Then again, if I know how to program in C++, I’m able to create light, fast apps, which is what I want to do…

Tags: , , ,