Battleship game state save so players can't look up each others' states but server can
You don't even need the server to decrypt.
You need players to commit to their initial board by providing a hash of the board(probably with extra random data to increase entropy).
They can then play as usual. And save the game in encrypted form using independent keys.
At the game end commitment are to be revealed to verify no cheating.
The server need not do anything beyond store information and optionally forward messages.
Alternatively if you have a trusted server, skip encryption of state entirely, only have both parties authenticate to the server, and communicate with it over a secure channel (e.g HTTPS) and the server will enforce permissions and let each player see only their own state.