So I'm trying to build a licensing server, where the licenses of the applications need to be checked when logging in or when the application gets used. But some of those application work offline most of the time, so I need to have some sort of 'caching' of the last check of the license with a date where the license should next be checked(let's say like every week). For the moment I'm storing this in the database of the application, but I need to make sure that that 'next check date' can't be changed by the user of the application.
So I came up with the following idea: When a license needs to get checked(because it has been more than a week), the server will check the license and will decide the 'next check date'. He will then encrypt that date and send it to the application which will store it in the database. Then when the application will be used, it will get that encrypted date, then decrypt it and check it. So when the application tries to encrypt a date himself, he won't be able to decrypt is because he doesn't use the same key that the server used to encrypt.
At first thought I came up with a private key on the server and public key on the application, but then it wouldn't be encryption but signing, and that would involve sending the date in clear text, which is not what I want. Or is there a way to use signing that the application can't change the date?