The key management is an important area of research in internet applications, because protecting secret messages during transmission becomes an essential issue for the Internet. The PGP cryptography protocol work as first stage to creates a session key, which is a one-time-only secret key. This key is a random number generated from the random movements for mouse and the keystrokes when the person type. This paper proposes new algorithm to generate session keys instead of the traditional method that used in PGP protocol stages. The proposed algorithm based on Context Free Grammar to build meaningful sentences with related production rules.