Use RAND_pseudo_bytes, not RAND_bytes, for IVs/salts.