I have already gone through MS-OFFCRYPTO. But I have some problems:
As according to section : 2.3.4.11 and 2.3.4.12
1) In case of generating encryption Key,
The initial password hash is generated as the following.
H0 = H(salt + password)
The salt used MUST be generated randomly. The hash is then iterated using the following approach:
Hn = H(iterator + Hn-1)
Where iterator is an unsigned 32-bit value which is initially set to 0x00000000, and is then incremented monotonically on each iteration until PasswordKey.spinCount iterations have been performed. The value of the iterator on the last iteration MUST be one less than PasswordKey.spinCount.
The final hash data which is used for an encryption key is then generated using the following method:
Hfinal = H(Hn + block_key)
Where block_key represents an array of bytes used to prevent two different blocks from encrypting to the same cipher text.
2) In case of Initialization vector: another block key is used.
IV= Salt key+Block key.
i) Are the both block keys same or different ?
ii) From where I can get the block keys ?
Can anyone please help me out of this problem. Your help is heartly appreciated.
Thanks,
SamDev
|