Changed to key encrpytion