Results 1 to 3 of 3

Thread: Simple Encryption

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2012
    Posts
    856

    Simple Encryption

    Attached is a simple Encryption/Decryption routine that utilizes the same Crypt32 API calls that the Operating System uses to encrypt passwords. There are limitations to these routines, the main one being that the encrypted data can only be decrypted on the same machine that they were encrypted on using the same user name. That means that it must utilize the users credentials in the generation of the key. I am also unaware of any limitation on size. I assume they were primarily designed for passwords, as they allowed for a description to be included, as well as extra entropy, that if used for encryption must also be used for decryption.

    J.A. Coutts
    Attached Images Attached Images  
    Attached Files Attached Files
    Last edited by couttsj; Feb 9th, 2020 at 12:46 PM.

  2. #2
    Hyperactive Member
    Join Date
    Oct 2005
    Posts
    386

    Re: Simple Encryption

    Quote Originally Posted by couttsj View Post
    Attached is a simple Encryption/Decryption routine that utilizes the same Crypt32 API calls that the Operating System uses to encrypt passwords.
    This is genius. It really looks like it has a lot of potential. The only issue is that I don't see any way to write out the encrypted string and save it to the drive, load it back into memory and decrypt it. It's dealing with blobs and binary strings and copying stuff in memory. It works fine on the screen but to take it to the next level and save/restore the data is just a little beyond my skill level.

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2012
    Posts
    856

    Re: Simple Encryption

    Quote Originally Posted by Darkbob View Post
    This is genius. It really looks like it has a lot of potential. The only issue is that I don't see any way to write out the encrypted string and save it to the drive, load it back into memory and decrypt it. It's dealing with blobs and binary strings and copying stuff in memory. It works fine on the screen but to take it to the next level and save/restore the data is just a little beyond my skill level.
    The length of the encrypted data may be a little excessive for the registry, so I put together this program to demonstrate how a password would be saved to a file. The password can be saved as an encrypted file by a blind entry to the text box and hitting the enter key. The User will be prompted to save it as a file or not. It can be decrypted at that point, or the file can be loaded and decrypted. I used App.Path for lack of a better location.

    J.A. Coutts
    Attached Images Attached Images  
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width