Duo icon indicating copy to clipboard operation
Duo copied to clipboard

The Password verification value comes out to be wrong

Open tajiknomi opened this issue 7 years ago • 0 comments

Hi, I have encrypted a file using Winzip with AES-128 encryption. The password i applied is "12345678". The Salt value stored in the encrypted zip archive is 8 bytes i.e. [0xa4 0x94 0x72 0xce 0x84 0x16 0x84 0x05].

Now i tried using the following:

           fcrypt_ctx ctx;
	int mode = 1;
	unsigned char pwd[8] = {'1','2','3','4','5','6','7','8'};
            unsigned char salt[8] = {0xa4,0x94,0x72,0xce,0x84,0x16,0x84,0x05};
	unsigned char pwd_ver[2] = { 0 };

           fcrypt_init(mode,pwd,8,salt,pwd_ver,&ctx);
           printf("Password Verifier : 0x%02x 0x%02x\n",pwd_ver[0],pwd_ver[1]);

The output i.e. "Password Verifier" comes out to be [0XEA,0X43] which is not the same Password verifier i extracted from the ZIP archive [0X97,0XB1] using the same SALT and PASSWORD. Have i missed anything ?

tajiknomi avatar Jul 18 '18 11:07 tajiknomi