So, I have been reading about RSA encryption where the public key is used to encrypt while the private key is used to decrypt. And for RSA signature, the private key performs an encryption operation to produce a signature and the public key performs a decryption operation on the signature to verify it.
It seems to me that encryption/decryption operations are just transforming data into another form so I guess it is also possible to generate a signature by performing a DECRYPTION operation using the private key and the sender verifies the signature by performing an ENCRYPTION operation using the public key.
So in summary:
RSA encryption -> Public Key Encrypts, Private Key Decrypts
RSA signing -> Private Key Encrypts, Public Key Decrypts
My question is whether this works too:
RSA signing -> Private Key performs a DECRYPTION operation on the hash of the message to produce a signature, Public Key performs an ENCRYPTION operation to verify the signature
RSA_private_encrypt
and similar functions, but they are dealing with things like padding and algorithm identifiers, the underlying mathematical function is the same. – matt