I’m playing around with Asymmetric Encryption and Decryption, but I don’t understand the results I’m getting when I use VerifySignedByAsymKey().
Why does this:
CREATE ASYMMETRIC KEY myasymkey
WITH ALGORITHM = RSA_2048
ENCRYPTION BY PASSWORD = '123pass!';
GO
Select VerifySignedByAsymKey(AsymKey_ID('myasymkey'),
'Greg',
EncryptByAsymKey(AsymKey_ID('myasymkey'), 'Greg'));
GO
Produce 0? I was expecting it to be 1.
You’ve only encrypted the data, not signed it.
See
SignByAsymKey(). The following example returns 1: