The responses of the licensing services on the Android Market are signed using the private key, and the signature is sent along with the signed data. Using the public key from the Developer Console, you can verify that the signature is valid for the signed data. Only data generated using the private key will be valid for the data. Similarly, if the data has been changed, the signature will no longer be correct.
In the Android application, you can send a signature and signed data to your content server, which can verify the signature and allow access to the content if the signature is valid.
If you are using PHP, you can use the openssl_verify function to verify the signature.
If you use Java, you can see how the Android library verifies the signature in LicenseValidator.verify.
source share