A few days ago I started a little project with my friend.
The goal is to make an encryption utility which can encrypt and decrypt files using various algorithms. So far we have XOR, Vigenère and Caesar cipher, with RC4 and TEA on the way! We'll try not to use an encryption library and instead write the implementations ourselves (after all, we do this to learn!).
Feel free to give feedback or even contribute :)
I also haven't looked at your encrypt() and decrypt() functions, but I'm curious as to how you're implementing them. Personally I would have them take a pointer to a function (whatever the actual encryption you want to perform is), so that you only have to deal with one encrypt() function that encrypts in whatever manner you tell it too :)
¿why GUI? I would prefer read from stdin, write to stdout and command line options
Try to separate the interface from the 'actual program'
By instance, there shouldn't be a QMessageBox or a QElapsedTimer in the Xor::encrypt method.
One addition that I'd recommend is support for encrypting byte arrays as well as files. That support is inherently available through file encryption, sure, but an interface for byte-array-specific encryption would in my opinion be a huge plus.
* I've recently had to encrypt data for transport over the wire, and I actually had a hard enough time figuring out how to do that with the multitudes of libraries available. They all seemed so cryptic in how they operate.
** Another little tidbit that would be attractive would be to provide current stable binary builds for multiple platforms. Building from source is, to some, an annoyance, and to others, an impossibility due to inexperience.
** Another little tidbit that would be attractive would be to provide current stable binary builds for multiple platforms. Building from source is, to some, an annoyance, and to others, an impossibility due to inexperience.
Fair point, but building from source isn't that hard :/ It takes around two minutes to cd to the right directory and type "make." And how many people that are using an encryption program don't know how to "open up that little black box" and type a few things.
When I followed instructions (even copypasted a bat file) the "little black box" told me that 'make' is not supported on the version of Windows I have ;p
I'm talking about EncryptDialog::EncryptionAlgorithm* algorithm;
You aren't deleting it.
There is one in update(), but you reconstruct it afterwards. ¿why don't just use the assignment operator? As the dialog is coupled with the algorithm, there is no danger of 'base slice'.
That sounds familliar...
I would love to join, this would actually be my first Open source project, i have been looking around for a while to join a project and this one seems interesting.
can you elaborate on the current community and support
Haha there is no real "community" yet. You can only expect somewhat of a community from really big projects like jmonkeyengine. Currently were 3 developers who contribute in their spare time.
Suggestion: add key file option for XOR encryption, because:
1) The 0 is a neutral operand for XOR, so by encrypting binary files with lots of 0's, part of the (or even the whole!) password may be visible when opening the encrypted file in a hex editor.
2) The password could also be deduced if your adversary knows what kind of data you encrypted, by extracting it from the file format.
Also this:
1 2 3 4 5 6 7 8 9 10 11 12 13
void Vigenere::encrypt(std::ifstream &in, std::ofstream &out)
{
std::string::const_iterator keyChr = key.begin();
// Start the encryption
char chr;
while(in.get(chr) && out)
{
out<<char(chr ^ (*keyChr)); // shouldn't this be a `+'?
if(++keyChr == key.end())
keyChr = key.begin();
}
}