1. Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

Activation Key Storage Utility

Discussion in 'Programming & Webmastering' started by Kreij, Aug 27, 2010.

  1. FordGT90Concept

    FordGT90Concept "I go fast!1!11!1!"

    Joined:
    Oct 13, 2008
    Messages:
    14,785 (6.17/day)
    Thanks Received:
    4,436
    Location:
    IA, USA
    Yes, AES/Rjindael is sufficient. You're original was, without a doubt, overkill. I doubt even CIA files are that encrypted. XD


    On your screenshot of hashes, it looks like it only accepts a file. Why not a string? Most hashes can be created from any byte array, files and strings being the most common.
     
    Crunching for Team TPU
  2. Kreij

    Kreij Senior Monkey Moderator Staff Member

    Joined:
    Feb 6, 2007
    Messages:
    13,881 (4.61/day)
    Thanks Received:
    5,622
    Location:
    Cheeseland (Wisconsin, USA)
    I didn't know if anyone had a use for that, Ford.
    I know that the ability to check hashes against downloaded files to make sure they were not corrupt, and the ability to create a hash in case you wanted to put a file on the internet along with it's hash would be useful to people, but just strings?

    Converting plaintext passwords to a hash for, say storage in a database is pretty common, but that is better suited for the application that accesses the database and not this little utility.

    Input please.
     
  3. TheMailMan78

    TheMailMan78 Big Member

    Joined:
    Jun 3, 2007
    Messages:
    21,418 (7.40/day)
    Thanks Received:
    7,900
    Also let me know what I need to do Kreij.
     
  4. Kreij

    Kreij Senior Monkey Moderator Staff Member

    Joined:
    Feb 6, 2007
    Messages:
    13,881 (4.61/day)
    Thanks Received:
    5,622
    Location:
    Cheeseland (Wisconsin, USA)
    For starters we're going to need an icon for both the app and the desktop.
    So a 16x16 for the app and a 48x48 for the desktop.
    I was thinking of something maybe with a ... uh ... key. lol

    Update : File encryption and decryption coding complete but not tested.
    I'm using Rijndael (AES) with a 256 bit key.
    It's a little more complicated than that as I am running your password through multiple iterations of a SHA-256 hash (with a random salt) to generate the key and using an algorith based on your PIN number to generate the initialization vector for the encryption.

    So if someone was really determined to crack your file, they would have to brute force every possible combination of the 256 bit key (and try to guess the variable number of SHA iterations to get a valid derived key) against every possible combination of the initialization vector.
    It would be far easier to just take someone you know hostage and ransom them for the info.

    Question #1 :
    Do you want secure wipe?
    Let's say you are travelling through an airport (or you get busted somewhere) and they demand the password/PIN infromation. Secure wipe would allow you to give them an alternative pw/PIN that the application would take as the signal to present them with alternate information and do a secure wipe of the real data.
    This could be useful if you are storing extremely sensitive information in this application.

    Question #2 :
    Last time I stored the data in a DataSet and then bound the DataGridViews to the dataset. This gave the app a larger memory footprint but more sort functionality.
    I currently have it coded for direct access to the DataGridViews (no DataSets), but the sorting functionality of the DataGridViews is limited.
    What do you guys want ... More sort functionality or smaller footprint?

    Question #3:
    How useful will sub-groups actually be?
    It's simple to implement, but adds more rows to the DataGridView, so to see more you would have to streatch the app wider on the screen.
    Again, I'll go with the consensus.

    Question #4:
    Still need answer on hashing for strings. Will anyone use that?
     
  5. CrAsHnBuRnXp

    CrAsHnBuRnXp

    Joined:
    Oct 19, 2007
    Messages:
    5,698 (2.07/day)
    Thanks Received:
    727
    I know this is off topic but you mentioning secure wiping got me thinking, how come there really is no really good third party file shredder that also puts itself into the right click context menu? I mean sure there is the one in Tuneup Utilities, but Id rather have something that was exactly like the one Tuneup has but free and not bundled with other things that Tuneup has to offer.

    Maybe that can be your next project? :D

    You can call it the Crash and burn file shredder and have an animation of the files being put into a fire. :laugh:
     
  6. Kreij

    Kreij Senior Monkey Moderator Staff Member

    Joined:
    Feb 6, 2007
    Messages:
    13,881 (4.61/day)
    Thanks Received:
    5,622
    Location:
    Cheeseland (Wisconsin, USA)
    File shredding is not terribly difficult to do right.
    Do you want a file shredding tab in this app too?
     
  7. CrAsHnBuRnXp

    CrAsHnBuRnXp

    Joined:
    Oct 19, 2007
    Messages:
    5,698 (2.07/day)
    Thanks Received:
    727
    If you want to put it in the app or make it a sepearate app its totally up to you. At first it was just a statement on top of what you said in a previous post and then joked about it. I dont want you to take focus away from what you are doing with the app right now or waste your time.
     
  8. Kreij

    Kreij Senior Monkey Moderator Staff Member

    Joined:
    Feb 6, 2007
    Messages:
    13,881 (4.61/day)
    Thanks Received:
    5,622
    Location:
    Cheeseland (Wisconsin, USA)
    The desire to absorb information from every situation I am in, is what I thrive on.
    Coding is the medium I use to relax and apply what I learn.
    Passing it on to the next generation is what makes the above worthwhile.

    If you feel that something is a waste of your time, you are not paying enough attention.

    Just a little advice from yer old Uncle Kreij. ;)
     
  9. CrAsHnBuRnXp

    CrAsHnBuRnXp

    Joined:
    Oct 19, 2007
    Messages:
    5,698 (2.07/day)
    Thanks Received:
    727
    I feel as though i just got shot by that sniper in your avatar. :laugh:

    Anyway since youre up for it, You can either include it in your key app or as a separate app all together. Ill leave it up to you to decide. The are two things I really want from it:

    1. Have an option in the right click context menu to which I can select the file shredder when I select a file/folder for shredding

    2. I want the option to have secure deletions in accordance with the DoD 5220.22 and the Gutmann method with the ability to choose the number of repetitions of the predetermined secure file shredding method.

    Thanks! :toast:
     
  10. Kreij

    Kreij Senior Monkey Moderator Staff Member

    Joined:
    Feb 6, 2007
    Messages:
    13,881 (4.61/day)
    Thanks Received:
    5,622
    Location:
    Cheeseland (Wisconsin, USA)
    If you want the ability to nuke files from the context menu in Windows Explorer, then this application is not the place for it. It would make an install mandatory and completely destroy the portability of the app.
     
  11. CrAsHnBuRnXp

    CrAsHnBuRnXp

    Joined:
    Oct 19, 2007
    Messages:
    5,698 (2.07/day)
    Thanks Received:
    727
    Like I said your call. :)
     
  12. Solaris17

    Solaris17 Creator Solaris Utility DVD

    Joined:
    Aug 16, 2005
    Messages:
    17,570 (4.95/day)
    Thanks Received:
    3,854
    Location:
    Florida
    random stuff to allow posting
     
    Kreij says thanks.
  13. Kreij

    Kreij Senior Monkey Moderator Staff Member

    Joined:
    Feb 6, 2007
    Messages:
    13,881 (4.61/day)
    Thanks Received:
    5,622
    Location:
    Cheeseland (Wisconsin, USA)
    Thanks Sol.
    For secure wipe I'll make it optional. I don't want to make the wipe key(s) the same for everyone, so you will have to chose a password and PIN for wipe the same as you would for general access to the data.
    Remember, if you accidentally type in your wipe key(s) instead of your access key(s), it's bye bye data. :D
     
    Solaris17 and digibucc say thanks.
  14. Solaris17

    Solaris17 Creator Solaris Utility DVD

    Joined:
    Aug 16, 2005
    Messages:
    17,570 (4.95/day)
    Thanks Received:
    3,854
    Location:
    Florida
    sounds good man im looking forward to the first iteration with the new options.
     
  15. TheMailMan78

    TheMailMan78 Big Member

    Joined:
    Jun 3, 2007
    Messages:
    21,418 (7.40/day)
    Thanks Received:
    7,900
    Can you send me a PM with a list of what I need to do? It will help me plan out an over all "feel".
     
  16. Kreij

    Kreij Senior Monkey Moderator Staff Member

    Joined:
    Feb 6, 2007
    Messages:
    13,881 (4.61/day)
    Thanks Received:
    5,622
    Location:
    Cheeseland (Wisconsin, USA)
    Sure MM. I'll get a PM off to you shortly.

    Hopefully I will get a chance to work on more coding today too.
     
  17. Aceman.au

    Aceman.au

    Joined:
    Jun 19, 2008
    Messages:
    1,491 (0.59/day)
    Thanks Received:
    77
    Run it in a sandbox and monitor outbound connections if u think it's sus.
     
  18. Kreij

    Kreij Senior Monkey Moderator Staff Member

    Joined:
    Feb 6, 2007
    Messages:
    13,881 (4.61/day)
    Thanks Received:
    5,622
    Location:
    Cheeseland (Wisconsin, USA)
    Alpha release soon. I just need to finish up initial testing and write up a help file.
     
    Solaris17 says thanks.
  19. Solaris17

    Solaris17 Creator Solaris Utility DVD

    Joined:
    Aug 16, 2005
    Messages:
    17,570 (4.95/day)
    Thanks Received:
    3,854
    Location:
    Florida
    hurray!
     
  20. Kreij

    Kreij Senior Monkey Moderator Staff Member

    Joined:
    Feb 6, 2007
    Messages:
    13,881 (4.61/day)
    Thanks Received:
    5,622
    Location:
    Cheeseland (Wisconsin, USA)
    Okay, I added the secure wipe, was not happy with it and removed it. I'm pondering if this is even worthwhile as the encryption is virtually impossible to break and a secure wipe will not stand up under HDD forensics if they really want the raw encrypted data. I will look into this more soon. I'm thinking instead of a secure wipe, more of a "smoke screen".

    I ditched the whole "add/delete" a group. The program will now save/create groups based on what you either select for the group or type in the datagrid itself. This way if you do not want a group anymore, just do not create any entries in that group and it will disappear. If you want it back, create an entry of any group type and change it to what you want in the data grid. The group will then be added to the group dropdown combobox.

    Import and export not implemented yet. I'm still pondering the options, features and drawbacks of this.

    When entering a key, hitting the "-" will advance you to the next segment textbox, using backspace key will pop you back to the previous textbox once a segment is empty.

    Pasting a "-" delimited key into the first textbox automagically will spread the key across the number of needed boxes. I'm thinking of completely removing the segment numeric entry as I think we can determine that by entry and you should not have to set it manual. Just type of paste. I'm pondering the GUI look for this so it's a little more intuitive when you are doing it.

    Double clicking on any row copies the key or password to the clipboard for pasting somewhere else.

    I was finalizing some testing today at work, and the encryption/decryption seems stable, as does the password generation and hashing section.

    I will be releasing a "Pro" version for $49.99 that will not send your e-mail address to the spammers in Nigeria. :D
     
    Solaris17 says thanks.
  21. Solaris17

    Solaris17 Creator Solaris Utility DVD

    Joined:
    Aug 16, 2005
    Messages:
    17,570 (4.95/day)
    Thanks Received:
    3,854
    Location:
    Florida
    lolod and im pumped if you need debugging or w/e lmk. any ideas toss me an alpha and pm me.
     
  22. Kreij

    Kreij Senior Monkey Moderator Staff Member

    Joined:
    Feb 6, 2007
    Messages:
    13,881 (4.61/day)
    Thanks Received:
    5,622
    Location:
    Cheeseland (Wisconsin, USA)
    Okay here is version 0.0.1
    .Net Framework 4 is required.
     

    Attached Files:

    digibucc says thanks.
  23. digibucc

    digibucc

    Joined:
    May 21, 2009
    Messages:
    4,966 (2.28/day)
    Thanks Received:
    1,516
    testing today :)
     
  24. Solaris17

    Solaris17 Creator Solaris Utility DVD

    Joined:
    Aug 16, 2005
    Messages:
    17,570 (4.95/day)
    Thanks Received:
    3,854
    Location:
    Florida
    {General Bugs}

    No options? Or are you trying to keep us from stealing pro?

    also. under cryptographic hashes attempting to simply hit "generate hash" without entering anything the program gets pissed.

    Code:
    See the end of this message for details on invoking 
    just-in-time (JIT) debugging instead of this dialog box.
    
    ************** Exception Text **************
    System.ArgumentException: Empty path name is not legal.
       at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath)
       at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
       at System.IO.FileStream..ctor(String path, FileMode mode)
       at Key_Z.Utils.GenerateMD5(String Filename, Boolean IsString)
       at Key_Z.Form1.generateHashButton_Click(Object sender, EventArgs e)
       at System.Windows.Forms.Control.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ButtonBase.WndProc(Message& m)
       at System.Windows.Forms.Button.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    
    
    ************** Loaded Assemblies **************
    mscorlib
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.225 (RTMGDR.030319-2200)
        CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
    ----------------------------------------
    Key-Z
        Assembly Version: 0.0.1.0
        Win32 Version: 0.0.1.0
        CodeBase: file:///E:/User/Downloads/Key-Z_0_0_1.exe
    ----------------------------------------
    System.Windows.Forms
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.1 built by: RTMRel
        CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    ----------------------------------------
    System.Drawing
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.1 built by: RTMRel
        CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    ----------------------------------------
    System
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.1 built by: RTMRel
        CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
    ----------------------------------------
    
    ************** JIT Debugging **************
    To enable just-in-time (JIT) debugging, the .config file for this
    application or computer (machine.config) must have the
    jitDebugging value set in the system.windows.forms section.
    The application must also be compiled with debugging
    enabled.
    
    For example:
    
    <configuration>
        <system.windows.forms jitDebugging="true" />
    </configuration>
    
    When JIT debugging is enabled, any unhandled exception
    will be sent to the JIT debugger registered on the computer
    rather than be handled by this dialog box.
    
    
    

    Hitting continue allows the program to operate as normal.

    * The Key blocks do not have a character limit.

    * Clicking the "*" button under the groups screen and then clicking a button such as "group" "application" or "key" while everything is highlighted produces the following error. (It also does it not highlighted or selected when you simply press the groups with nothing their.)

    [​IMG]

    Code:
    See the end of this message for details on invoking 
    just-in-time (JIT) debugging instead of this dialog box.
    
    ************** Exception Text **************
    System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
    Parameter name: index
       at System.Collections.ArrayList.get_Item(Int32 index)
       at System.Windows.Forms.DataGridViewRowCollection.SharedRow(Int32 rowIndex)
       at System.Windows.Forms.DataGridViewRowCollection.get_Item(Int32 index)
       at Key_Z.Form1.keysDataGridView_CellClick(Object sender, DataGridViewCellEventArgs e)
       at System.Windows.Forms.DataGridView.OnCellClick(DataGridViewCellEventArgs e)
       at System.Windows.Forms.DataGridView.OnMouseClick(MouseEventArgs e)
       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.DataGridView.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    
    
    ************** Loaded Assemblies **************
    mscorlib
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.225 (RTMGDR.030319-2200)
        CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
    ----------------------------------------
    Key-Z
        Assembly Version: 0.0.1.0
        Win32 Version: 0.0.1.0
        CodeBase: file:///E:/User/Downloads/Key-Z_0_0_1.exe
    ----------------------------------------
    System.Windows.Forms
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.1 built by: RTMRel
        CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    ----------------------------------------
    System.Drawing
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.1 built by: RTMRel
        CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    ----------------------------------------
    System
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.1 built by: RTMRel
        CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
    ----------------------------------------
    
    ************** JIT Debugging **************
    To enable just-in-time (JIT) debugging, the .config file for this
    application or computer (machine.config) must have the
    jitDebugging value set in the system.windows.forms section.
    The application must also be compiled with debugging
    enabled.
    
    For example:
    
    <configuration>
        <system.windows.forms jitDebugging="true" />
    </configuration>
    
    When JIT debugging is enabled, any unhandled exception
    will be sent to the JIT debugger registered on the computer
    rather than be handled by this dialog box.

    This same error happens on the passwords tab.

    {General additions}

    * "Working" dots or orb (preferablly orb) when Generating hash.
    * Multi core capable?

    {Random BS I might want added for the lolz or ideas}

    When exporting or importing (which I hope is implimented) couldnt you just do it as an .xml but inside a zipfile that you need to have a password for? or is that illegal to do? Either way i think it would solve both problems. Also I have an intedrestin request about the method in which something may be exported.

    I think instead of dumping EVERYTHING. Yopu might have a Tree like the windows registry. then you can pick

    Keys>
    >Group 1
    >Group 2
    Passwords>
    >Group 1
    >>My ex's bank account
    >Group 2
    >>My FB login

    Export Keys/Pass? Group 1/2? Then you can come up with some prompt that dumping your lists to XML is potentially unsafe and therefor not recommended. As your lists are not encrypted and if lost your data can be stolen. If the zip method cant be done. Holler at me your good at code MM is good at arty but im very good at writing if you look past TPU and a KB. If you need some kind of disclaimer i can knock one up.

    Get it "knock"? password program lololololol oh man too much D&D

    Windows 7 Pro X64
    All updates / .nets

    I will test more later when I have more time.
     
    Last edited: May 18, 2011
  25. Kreij

    Kreij Senior Monkey Moderator Staff Member

    Joined:
    Feb 6, 2007
    Messages:
    13,881 (4.61/day)
    Thanks Received:
    5,622
    Location:
    Cheeseland (Wisconsin, USA)
    I had the secure wipe there orginally. I left it because there will almost certainly be options in the near future.

    Fixed.

    As per design. I have no idea how long a key segment may be.
    Some are quite long.

    Fixed.

    I can add a progress indicator of some sort.

    For what specifically?

    Import/Export suggestion noted and under consideration.
     
    Solaris17 says thanks.

Currently Active Users Viewing This Thread: 2 (0 members and 2 guests)

Share This Page