I am encrypting my data using AES-128 CBC. However it is decrypted by another software CodeIgnitor, which actually converts password into 2 elements. HMAC key and encryption_key using hkdf and SHA-512 digest.
How can i implement this thing in my code. (I am using VB 6)
Re-phrasing my question: How is password converted into 2 elements HMAC_key and encryption_key?
Let's see if I can explain further..
Encryption software used is CryptoSys while decryptionis done by CodeIgnitor..which is not working
So the difference I can see between the two is that codeignitor is expecting an HMAC authmessage when decrypting while the encryption does not prepend it the final message. So how can i do that? I am using VB6 for encryption.
So far I have come to the conclusion that there could be 2 key-derivation function a pb-kdf or a h-kdf.
The h-kdf authentication in particular works as follows:
- A password is enterd by user
- Based on this password and a random IV, an HMAC key is generated using HKDF and SHA-512 digest algo.
- This HMAC key is saved and also expanded and then using IV/salt encrypts the plaintext message.
- The IV is pre-pended to the plain-text message and base64 encoded.
- The HMAC key is then pre-pended to the final message gereated in step 4.
So basically hkdf does not convert a key into 2 elements but only uses the basic key generated to generate other keys (and HMAC key is the original key used to generate other keys) now my question becomes...
Is there any vb6 library that uses hkdf and sha-512? As far as i have researched, Chilkat and CryptoSys APIs are only pbkdf based..Am I correct?