Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Convert HEX to ASCII / Encrypt Password  (Read 6142 times)

0 Members and 1 Guest are viewing this topic.

Mickets

    Topic Starter


    Greenhorn
  • Hello, world!
  • Experience: Expert
  • OS: Windows XP
Convert HEX to ASCII / Encrypt Password
« on: March 21, 2012, 01:41:07 PM »
Hello all,

My wife is no computer expert, but I need her to have access to an encrypted True Crypt volume. So I setup a batch script that runs every hour to do the following:

  • Check if a certain True Crypt volume is mounted
  • If it's not, ask my wife for a key name that only she should know
  • If the entered name is correct, then mount the True Crypt volume via command line, including password

The problem is the third step: the password is there in plain text. It's a looooonnng password, hard to remember (hence my wanting her to enter something she doesn't need to try and remember).

To obfuscate the password, I did some research and decided a good approach is to use free command line tool to encrypt a text file: http://www.codeode.com/command-line-encrypt.html.

The idea is to:

  • Store the encrypted text in the batch file
  • Use the word to decrypt the text from the encrypted file, and assign it to a password variable
[li]Mount the volume using the decrypted password.
[/li][/list]

All sounds good. But then I noticed that the encrypted password in the encrypted text file isn't made of only readable ASCII characters. There are other ASCII values in it that make even PSPad text editor not read it as text, but as a binary file.

So another approach I thought of was to copy all the HEX values, and when needed dynamically generate the encrypted file by outputting the HEX values in to the file.

But... how do I send the HEX values in to a file and make this binary/encrypted file to decrypt?

Was I clear?

Thanks for any help.

Michael

Salmon Trout

  • Guest
Re: Convert HEX to ASCII / Encrypt Password
« Reply #1 on: March 21, 2012, 01:48:58 PM »
Let me get this right. You have a long password, which is hard to remember, in fact it's so hard to remember that you are going to encrypt it and use a simple, easy-to-remember password to decrypt it?