b
b
CC#
Created by b on 4/18/2025 in #help
Verify Signed Message with Server's Public Key?
Relevant Docs: https://learn.microsoft.com/en-us/dotnet/api/system.security.cryptography.rsacryptoserviceprovider.verifydata?view=net-9.0 Code in reply. After calling RetrievePublicKey() on client and then ProtectedSign("Hello") keep getting false printed because _clientRsaProvider.VerifyData(dataToCompare, SHA1.Create(), signedBytes) is False. I don't understand why this is. dataToCompare is "Hello" in ASCII encoded bytes, and signedBytes is the same as signedDataBytes = _rsaProvider.SignData(originalMessageBytes, SHA1.Create()) on the server, just reverse-engineered by the client by using the hex string passed by the server.
26 replies