improved key and iv generation for aes encryption of logs.  Will modify upgrader too, but it still needs code review