So using that method, I really shouldn't have any problems, right?
I mean, besides the insecurity (I hope for something this simple to be temporary).
Thanks again!
FlyingIsFun1217
Printable View
So using that method, I really shouldn't have any problems, right?
I mean, besides the insecurity (I hope for something this simple to be temporary).
Thanks again!
FlyingIsFun1217
Ok, since I've gotten that to work...
Is there any way to do other math to the string to change its characters? Right now all it does is add and subtract 7, but would it be possible to do other math functions to it to make it just a little more secure?
Thanks again!
FlyingIsFun1217
You will not be making it more secure with a shifting method. No matter how much math you add to it. It will always "shift" the characters on the character table by a given amount.
Search the web for "c++ encryption" if you want to make it any more secure than that.
[QUOTE=FlyingIsFun1217]Ok, since I've gotten that to work...
Is there any way to do other math to the string to change its characters? Right now all it does is add and subtract 7, but would it be possible to do other math functions to it to make it just a little more secure?
Thanks again!
FlyingIsFun1change it by a pattern. For example change it by the fibinachi sequence -- change the first two element by 1, the seccond by 2, the third by 3 ext.
If the file is only used on one computer, you can use random numbers to change it. Then you store the random seed in the file. If use the same random seed and change in the opposite direction you will get your original results back. This always works on the same computer and sometimes works on the same system. This meathod is proveably breakable if the codebreaker does not discover the seed, and the numbers are truely random.
Simmilarly, you could create your own list of random numbers that come with the program. That would make the pervious option portable across computers. This would also allow you to use sites like random.org to generate true random numbers. The problem with this aproach is that the list or random numbers needs to be very long, and therefore the file must be very large. Otherwise a user could apply every possible seed to decrypt your program.
Back to option two, instead of storing the seed in the file, you could store it in the Windows Registry. This is a bit more complex, but it will make it very hard to decrypt your data.
EDIT: For some reason(Mario F.'s last post) I thought you were using a bitwise shift. I changed this post to accomidate any kind of reversible change. Change can mean mean adding a number, using a bitwise rotation, XOR, and many other functions.
As Mario F. said, applying more than one of these functions on a single number, will not make the encryption more secure, unless the function is very easy to guess.
hashing is probably your best bet.
take a look at MD5 and SHA on wikipedia:
http://en.wikipedia.org/wiki/MD5
http://en.wikipedia.org/wiki/SHA-1
for examples of implementations in C++ search the forums for MD5 and SHA, I know for a fact that there are a few good examples posted here.
I suspect the OP will get confused at any possibility beyond what King Mir alreay provided. He will probably learn more by trying his suggestions.
I suspect even suggesting a Xor algorithm will confuse our friend. I don't want to sound pretentious. But its probably best if he takes baby steps.
I agee there is little point in showing him xor. The only advantage of using xor in this case is that the generated text looks more alien. But that's a misleading, because it would still be equally dificult to decrypt.
A better aproach would be to use a look up table. Kind of like what siavoshkc suggested, exept his example does more than he said it does, and is therefore not applicable.
Thanks to all for your help, I am currently looking into the problem, and since I am using wxWidgets to create the GUI, I may want to look into something with that...
FlyingIsFun1217 :)
Sorry for late answering. It was "password encryption (algorithm)" I think.Quote:
Mind me asking what search term you used?