check shared key