Add keys to segment

Adds identity keys to the specified segment in the given environment.