Topic: Verifying a Signature in a Non-Standard Environment
Forgive me if I sound like an idiot. All of this cryptography stuff is very new to me and I am trying to struggle my way to understanding it all and getting this to work.
To give a brief background of my project, I am implementing the DNP3.0 protocol which contains Secure Authentication (SA). I am using a 3rd party software that handles the bulk of the protocol, but I am using wolfSSL embedded SSL to implement the cryptography part. So basically I am bridging the calls from the other software to wolfSSL.
The first place I seem to have gotten stuck is verifying a signature. The section of the wolfSSL Manual that deals with this is, I think, 10.5.4.
To make it simple, let's just assume that they are only using the SHA256 hashing algorithm to verify the signature. I'm not even sure I will implement the SHA1 part because it appears to not be recommended any more.
So I am being passed a pointer to an array of bytes that contains the key (*pKey) and its length (pKeyLength). Also I am being passed a pointer to an array of bytes that contains "data to use for verifying signature" (*pData) and its length (pDataLength). The last thing I am being passed is "signature data (certification) to be verified" (*pSig) and its length (pSigLength).
I am having a hard time understanding how I fit this into your functions. I have dug down into some of the structures and functions, but it wasn't clear to me exactly how I should tie this data in. I don't think I need to call "InitSha256()" or do any of the updating or Final. . . but I'm really not quite sure. I assume I only need to figure out how to get their data/key into your data/key and then call DsaVerify, but I can't find the information I need to make this happen.
Thanks for any help.