Added shared secret functionality.