Only "a" and "b" are kept secret. All the other values – "p", "g", "ga" mod "p", and "gb" mod "p" – are sent in the clear. The strength of the scheme comes from the fact that "gab" mod "p" = "gba" mod "p" take extremely long times to compute by any known algorithm just from the knowledge of "p", "g", "ga" mod "p", and "gb" mod "p". Once Alice and Bob compute the shared secret they can use it as an encryption key, known only to them, for sending messages across the same open communications channel.