Reading the key file on Windows
Reading the key file on Windows
Hi,
We are trying to decrypt the file on windows using Shared key.I saw in one of your posts that windows doesnt support "-k" option.Is there any way that we can read the contents of key file on the windows command line using -p.Is so can you please provide the syntax??
We are trying to decrypt the file on windows using Shared key.I saw in one of your posts that windows doesnt support "-k" option.Is there any way that we can read the contents of key file on the windows command line using -p.Is so can you please provide the syntax??
- paulej
- Posts: 595
- Joined: Sun Aug 23, 2009 7:32 pm
- Location: Research Triangle Park, NC, USA
- Contact:
Re: Reading the key file on Windows
If the key file is generated on Linux using aescrypt_keygen, sure. Just open the key file using notepad and copy the contents. The keys generated with that tool are nothing more than random characters that are the password. There is no separate logic for keys, per se. So, you just take the contents of the file and use with -p.
Re: Reading the key file on Windows
hi mr paul,
may i know how to use sha256.c in aescrypt? what is actually the function of it in aescrypt?
thanks
may i know how to use sha256.c in aescrypt? what is actually the function of it in aescrypt?
thanks
- paulej
- Posts: 595
- Joined: Sun Aug 23, 2009 7:32 pm
- Location: Research Triangle Park, NC, USA
- Contact:
Re: Reading the key file on Windows
SHA-256 is used for two things. One is to try to create a "more random" password. The user's password is hashed using SHA-256 about 8192 times. This might not be terribly effective, but some passwords people use are very weak.nabila12 wrote:may i know how to use sha256.c in aescrypt? what is actually the function of it in aescrypt?
thanks
The other use is post of the HMAC computation that ensures message integrity.
Re: Reading the key file on Windows
Sir, thank you for the explanation. But may i know the command to implement it in aescrypt? thanks again
- paulej
- Posts: 595
- Joined: Sun Aug 23, 2009 7:32 pm
- Location: Research Triangle Park, NC, USA
- Contact:
Re: Reading the key file on Windows
On Linux, the command-line looks like this:nabila12 wrote:Sir, thank you for the explanation. But may i know the command to implement it in aescrypt? thanks again
Code: Select all
$ aescrypt -d -k keyfile.txt encrypted_file.txt
Re: Reading the key file on Windows
sir,
does it mean that the .key file contains 32 bytes output after hashing using sha256?the function of the .key file is just the same with password, am i right? but why i cant open the .key file?
does it mean that the .key file contains 32 bytes output after hashing using sha256?the function of the .key file is just the same with password, am i right? but why i cant open the .key file?
- paulej
- Posts: 595
- Joined: Sun Aug 23, 2009 7:32 pm
- Location: Research Triangle Park, NC, USA
- Contact:
Re: Reading the key file on Windows
The key file is actually just a UTF-16 encoded password file. This could be created with notepad on windows, for example. The key file concept was introduced just to help with automated backups where very long passwords are used. Any kind of automated process could use key files, of course.nabila12 wrote:sir,
does it mean that the .key file contains 32 bytes output after hashing using sha256?the function of the .key file is just the same with password, am i right? but why i cant open the .key file?
Re: Reading the key file on Windows
Sir,
Many thanks for your reply..the key file stored the random password generated by sha256, right? but that key file is also sent to the receiver along with encrypted file,which is dangerous if other users get that keyfile?
Many thanks for your reply..the key file stored the random password generated by sha256, right? but that key file is also sent to the receiver along with encrypted file,which is dangerous if other users get that keyfile?
- paulej
- Posts: 595
- Joined: Sun Aug 23, 2009 7:32 pm
- Location: Research Triangle Park, NC, USA
- Contact:
Re: Reading the key file on Windows
The key file is either just a password in a file or its random data. AES Crypt on Linux will create a key file with random data of whatever length requested. SHA256 doesn't come into play.nabila12 wrote:Sir,
Many thanks for your reply..the key file stored the random password generated by sha256, right? but that key file is also sent to the receiver along with encrypted file,which is dangerous if other users get that keyfile?
You're right that you don't want to send the encrypted file and key together. That would allow anyone to read the file.