Method and apparatus for establishment of session keys