don't store private public-share-key in session

proposed solution for #12405 

cc @DeepDiver1975 @LukasReschke @MorrisJobke what do you think?
static field but non-static accessors feels strange