The process of signing and verifying is similar to encryption and decryption, although it differs in a fundamental way; encryption is done using the public key and decryption using the private key, while signing is done using the private key and verification is done using the public key. Signing helps a recipient that owns a public key to verify that a file is unmodified by using the signature and its public key. Having the public key, however, is not enough to change the file and sign it again. The Crypto++ library is used for solving this problem too.
Although you can use any pair of public-private RSA keys to perform the signing and verification, in the implementation provided here the keys are randomly generated when ...