Created
June 10, 2016 23:09
-
-
Save sh1nu11bi/87935c4eba9878b03e97949f0fda8653 to your computer and use it in GitHub Desktop.
This will contained both text documents and code snippets that will be reference in the text documents.
The objective is to find an alternative method for inherent flaws in this code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Seed of Random Algorithm | |
The most important security flaw is in creating random encryption key process. I used .Net’s Random Class to generate random strings. Random Class uses Environment.TickCount (gets the number of milliseconds elapsed since the system started) as seed. Which is reduces the surface of brute forcing and beyond that it’s easy to predict. | |
<snippet1> | |
Reuse of the IV | |
Algorithm uses the same IV for every file in encryption process. | |
Static Salt | |
It uses static salt for encryption. | |
<snippet2> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int getRandomNumber() | |
{ | |
return 4; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 byte[] saltBytes = new byte[]{1,2,3,4,5,6,7,8}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I hope this helps. Looks like a fun little project. Interested to see the product!!
I dont know the full scope you are using this on but here are my comments. Maybe put a good use case together for it if there is more you want me to review so that I can better help you.