[VB.NET] Encrypt / Decrypt Software (with key)

Place to place any code snippets, completed games, or even uncompleted games for IR users to use.
Post Reply
User avatar
vitinho444
Posts: 2825
Joined: Mon Mar 21, 2011 4:54 pm

[VB.NET] Encrypt / Decrypt Software (with key)

Post by vitinho444 »

Hey guys, so after sharing my random password generator, where to put all the passwords? Simple, in a .txt file :)
Wow, a .txt file? are you crazy? People can open it with notepad and easily steal your accounts. Well, the .txt file doesn't contain plain text :) It contains encrypted text.

Encrypted how and where?
I present you Project Georgia (If I would move to the US, i would probably go to Georgia, thus the name), name that i recently change to S.A.F.E (Secure and Free Encryption).

What this is basically is a software that uses encryption functions inside VB.NET (System.Security.Cryptography.TripleDESCryptoServiceProvider) and using a key it gives you ability to encrypt (multiple times, with different or same key) and decrypt text.
Then just save it to a .txt file and it's done.

Yeah yeah it's not perfect, it's not NSA proof or Anonymous proof... but hey, who cares? Nobody wants your facebook password... :roll: so I think it's pretty decent security for the average person right?

So Source Code can be found here: https://www.dropbox.com/s/07lwdguene9hp ... eorgia.zip
It's built using VS for Desktop 2013.. and I think (didn't tested) that it only works with .NET Framework 4+ (But nowadays, who doesn't have a Win 7/8 right?)

And Standalone .EXE here: https://www.dropbox.com/s/56hwnidubbhajxf/SAFE.zip

So if you don't trust me download the Source Code and see that your passwords are not sent anywhere, not even stored in your computer.

Hope you guys enjoy it, and I would like to know if you think this is good security or not.


PS: I tried like 4 times to build a PHP/JS encrypt/decrypt system... I failed, but maybe one day i can get it working, and it can be portable to Multi-platform because all you need is to open the index.html and use javascript to encrypt and decrypt :)
My Company Website: http://www.oryzhon.com

Skype: vpegas1234
User avatar
Jackolantern
Posts: 10893
Joined: Wed Jul 01, 2009 11:00 pm

Re: [VB.NET] Encrypt / Decrypt Software (with key)

Post by Jackolantern »

Nice stuff! :cool:

It seems you thought for quite a while on that thread we had a while back about how to store passwords :D
The indelible lord of tl;dr
User avatar
vitinho444
Posts: 2825
Joined: Mon Mar 21, 2011 4:54 pm

Re: [VB.NET] Encrypt / Decrypt Software (with key)

Post by vitinho444 »

Jackolantern wrote:Nice stuff! :cool:

It seems you thought for quite a while on that thread we had a while back about how to store passwords :D
Well the need makes we think on something :P With all those passwords, i needed some way to store them securely, so i did a little research and built my own software, so i can make sure my passwords don't end up in someone's pc :D.
My Company Website: http://www.oryzhon.com

Skype: vpegas1234
User avatar
vitinho444
Posts: 2825
Joined: Mon Mar 21, 2011 4:54 pm

Re: [VB.NET] Encrypt / Decrypt Software (with key)

Post by vitinho444 »

I've added the source code to github, with a latest version of the software. It's now much more reliable, it will store the encrypted text inside the APP (Project Settings) and can be cleaned up if you want and exported to a txt file. The KEY is never stored in any way, so please remember it to avoid data loss!

Here's the github: https://github.com/vitorpegas95/SAFE
My Company Website: http://www.oryzhon.com

Skype: vpegas1234
User avatar
a_bertrand
Posts: 1537
Joined: Mon Feb 25, 2013 1:46 pm

Re: [VB.NET] Encrypt / Decrypt Software (with key)

Post by a_bertrand »

DES.Mode you use ECB. Bad choice as stated by MSN:

Important: This mode is not recommended because it opens the door for multiple security exploits. If the plain text to be encrypted contains substantial repetition, it is feasible for the cipher text to be broken one block at a time. It is also possible to use block analysis to determine the encryption key. Also, an active adversary can substitute and exchange individual blocks without detection, which allows blocks to be saved and inserted into the stream at other points without detection.

Also you could use maybe a better algorithm than DES... .NET offers much better options out of the box ;)
Creator of Dot World Maker
Mad programmer and annoying composer
User avatar
vitinho444
Posts: 2825
Joined: Mon Mar 21, 2011 4:54 pm

Re: [VB.NET] Encrypt / Decrypt Software (with key)

Post by vitinho444 »

Oh my :O

The tutorial i saw covered this one.. apparently bad idea to use it.. :/
What algorithm would your recommend ? :)
My Company Website: http://www.oryzhon.com

Skype: vpegas1234
User avatar
a_bertrand
Posts: 1537
Joined: Mon Feb 25, 2013 1:46 pm

Re: [VB.NET] Encrypt / Decrypt Software (with key)

Post by a_bertrand »

I would look into:
http://msdn.microsoft.com/en-us/library ... 10%29.aspx

Seems a bit stronger...
Creator of Dot World Maker
Mad programmer and annoying composer
User avatar
vitinho444
Posts: 2825
Joined: Mon Mar 21, 2011 4:54 pm

Re: [VB.NET] Encrypt / Decrypt Software (with key)

Post by vitinho444 »

Thanks I'll try :D
My Company Website: http://www.oryzhon.com

Skype: vpegas1234
User avatar
vitinho444
Posts: 2825
Joined: Mon Mar 21, 2011 4:54 pm

Re: [VB.NET] Encrypt / Decrypt Software (with key)

Post by vitinho444 »

Wow, I'm here for 1h and I can't even get started ahaha, I took a look at ECDiffieHellmanCng Class, then the CngKey Class, then the CngAlgorithm Class and I'm getting errors, because I don't know how to work with this :O

I think I will remain with the previous algorithm, although it's not considered safe, I think it's pretty good for the average user like me.

Thanks anyway Alain for the information :D
My Company Website: http://www.oryzhon.com

Skype: vpegas1234
Post Reply

Return to “Code Sharing”