EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Verifying a plaintext signed file

Posted: 06/23/2006 14:36:41
by Ned Schoenfeld (Basic support level)
Joined: 06/23/2006
Posts: 5

I am trying to use VerifyDetached to tell me if a plain text file is valid. Where is the result of this method returned? I don't get any result whether or not the signature file matches the source file.
Posted: 06/23/2006 15:09:40
by Eugene Mayevski (Team)

1) please specify the version and edition of SecureBlackbox
2) It would be nice if you told us how you create the detached signature and how you verify it. Code snippets would help.

Sincerely yours
Eugene Mayevski
Posted: 06/23/2006 15:12:06
by Ned Schoenfeld (Basic support level)
Joined: 06/23/2006
Posts: 5

version is
and here is the code snippet:


Dim KeyRing1 As SBPGPKeys.TElPGPKeyring
Dim PGPReader As SBPGP.TElPGPReader
Dim oStream As IO.FileStream
Dim iStream As IO.FileStream
Dim vStream As IO.FileStream
Dim SR As IO.StreamReader
Dim SW As IO.StreamWriter

Dim strPubKeyRing As String = "C:\PGP\" & "NedPubRing.PKR"

KeyRing1 = New SBPGPKeys.TElPGPKeyring
KeyRing1.Load(strPubKeyRing, strPubKeyRing, True)

PGPReader = New SBPGP.TElPGPReader
PGPReader.VerifyingKeys = KeyRing1

'SR = New IO.StreamReader(oStream)

iStream = New IO.FileStream("c:\pgp\SignMe.TXT", IO.FileMode.Open)
vStream = New IO.FileStream("C:\pgp\SignMe.TXT.Sig", IO.FileMode.Open)

oStream = New IO.FileStream("c:\pgp\signmeResults.txt", IO.FileMode.Create)
PGPReader.OutputStream = oStream

PGPReader.VerifyDetached(iStream, vStream, 0, 0)
'PGPReader.DecryptAndVerify(iStream, 0)


Posted: 06/25/2006 07:00:04
by Eugene Mayevski (Team)

VerifyDetached fires OnSigned and OnSignatures events.

OnSigned lets you know the IDs of the keys, used for verification.
Verification results are passed via OnSignatures event .

Sincerely yours
Eugene Mayevski
Posted: 06/26/2006 15:28:14
by Ned Schoenfeld (Basic support level)
Joined: 06/23/2006
Posts: 5

OK, I tried that and it works. Thanks. It seems that PGPMime and PGP are implemented slightly differently since there is no function that returns the verification results here, only the event. Suggestion: maybe make them more consistent in a future release? Thanks.
Posted: 06/26/2006 15:45:21
by Eugene Mayevski (Team)

With PGPMIME you know what you have (i.e. signed or encrypted message). With PGP data the situation is much more complicated, -- a file can contain the number of signed and/or encrypted and/or compressed packets.

Sincerely yours
Eugene Mayevski



Topic viewed 6918 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS business operates as a division of /n software, inc. For more information, please read the announcement.

Got it!