Lists all of the journal entries for the day.

Fri, 6 Jan 2012

4:57 AM - Basic Knowledge of RAR

There are many people are using RAR to compress other files into the smaller ones, but there are not many people who know how to set RAR password . This is how to set a password to RAR.

RAR is widely used to compress files including word, Excel, folders, graphics and even videos. But not many people know that RAR can be added passwords to prevented others to view the information it included. Actually, set password to your RAR files with WinRAR is very easy.

1) Create a new RAR file, and drag the files you want in it, as you always do.  

2) Cick the "Advanced" tab and then "Set Password" on the middle-right.

3) Now you can set the password.

4) Click "OK" And now the file is password-protected!

You just need the WinRar. But do you how does RAR can do it? And how can RAR recognize the password you entered is right? When you read the article, you will understand why.

The RAR file file is encrypted with Winrar in total of two steps:

1. Compress the first source file into a data segment. encrypt

2. Then encrypt the compressed file.

For the same source file, it won't be encrypted because after compression, the data in the files is the same. But if the same source file, even though they use the same password, encrypted rar file complete data segment is not the same, which is due to the encryption key is dependent on a Salt (8 byte key, used to encrypt and store inside the rar file header)

So the key to decrypt rar encrypted file is data encryption step, then we next look at how encryption.

The process of encrypting "compressed the data segment":

1. Access keys:

Would be a plaintext password and Salt together, through HASH algorithm to generate two 16-byte key. (One is KEY (AES algorithm parameters), one initVector)

2. Encrypt and compress data with Key and initVector:

Here is an encrypted loop structure, each 16 bytes as a block encryption (which is why encryption may complete the total file length is 16 multiple reasons). Encryption using AES algorithm (RAR uses a standard application of AES rijndael). This Note: AES encryption before, there is an exclusive-or operation, is the first 16 bytes of each block with a 16-byte block on the results of XOR encryption, then the AES algorithm. I use a simple schematic description of the code to see:

packblock [0] = packblock ^ initVector

encryptBlock [0] = AES (packblock [0]); (KEY is the AES key)

for i = 1 to i-1

packblock = packblock ^ encryptBlock [i-1]

encryptBlock = AES (packblock); (KEY is the AES key)

next

; Packblock that compressing 16 bytes of data each

; EncryptBlock that end of every 16 bytes of encrypted data

The decryption process

As the AES algorithm is symmetrical, so decryption process is the inverse of the encryption process. However, the process of decryption and encryption AES algorithm used is not the same (because decryption sub-keys generated by the KEY table is not the same). We still need to input the password (If you forget the password, you can try rar password recovery ), and salt together to produce two 16-byte key, KEY, and initVector.

packblock [0] = AES1 (encryptBlock [0]); (KEY is the AES key)

packblock [0] = packblock ^ initVector

for i = 1 to i-1

packblock = AES1 (encryptBlock); (KEY is the AES key)

packblock = packblock ^ encryptBlock [i-1]

next

Then how can it determine the entered password is correct or not? Decryption is the process of decrypted data block to extract, then the solution into a source file, the file CRC check, there is a RAR file of the source files CRC checksum comparison, the same as the password is correct, or the password is wrong.

Note: if you forget the password, you can go to use password recovery software , it can deal with many various files password for you!

 

tags: how password to rar set

()