I have a small amount of data (about 128 bits) to secured with a strong password.
I plan to run PBKDF2-SHA2-256 on the password and a 128 bit random salt to generate a 256 bit derived key. Then with the first 128 bits of the derived key (Key1), XOR it with the data to encrypt it. Then create a MAC by using the last 128 bits of the derived key (Key2) i.e. HMAC-SHA-256(Key2, encrypted data). The data would be stored as salt | encrypted data | MAC tag.
Is it fine to do that? Or is there a more standard construct?