Updated the simulation for phase2 to account for the two distinct phases of the key propagation.