Second rewrite of get_shared_key(). The struct Shared_Keys was again modified, making the the array part of the type hid the data too much.