making key generation independent of the order of the keys specified <Mahesh>