Generating 3 keys from rand in GenrateKeys() and using one for enc and two for mac