EldoS | Feel safer!

Software components for data protection, secure storage and transfer

"Invalid signature" thrown by sample VerifyDetached.exe

Also by EldoS: CallbackFilter
A component to monitor and control disk activity, track file and directory operations (create, read, write, rename etc.), alter file data, encrypt files, create virtual files.
#27787
Posted: 12/27/2013 23:27:31
by Hugh Adamson (Basic support level)
Joined: 12/27/2013
Posts: 1

On compiling your four CryptoBlackBox samples in
G:\ ... \RAD Studio\Projects\CryptoBlackBox\Samples\Delphi\CryptoBlackbox\Primitives

with Delphi 2009, Encrypt.exe and Decrypt.exe work as expected. A small text file containing one line with the one word 'hello' can be encrypted and decrypted using the 1024-bit private.key and public.key keyfiles downloaded from the website where they were generated with web-based psp openssl and shown below.

The sample program SignDetached.exe also works, but VerifyDetached throws exception/error invalid signature from within procedure TElBuiltInRSAPublicKeyCrypto.VerifyInit when attempting to verify the signed file.

Public.key:

-----BEGIN PUBLIC KEY-----
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwG9rPpAv2MG2s2QMwAZpdeC9p
G9eEK+Dav8reXcLXTeZmH8faURV/pcqC6SL/bGEaPnVSBN4+UDt05Gme1PGba0ja
P4hVS4kKaTZ2nJ0v8Xmxuf3aHKV5Grbkww0rAfMw5qMJBDLpR7QTCgx6PkG/TtXN
OU1AMaA7Y6iO2Ow8+wIDAQAB
-----END PUBLIC KEY-----

Private.Key:

-----BEGIN RSA PRIVATE KEY-----
MIICXAIBAAKBgQCwG9rPpAv2MG2s2QMwAZpdeC9pG9eEK+Dav8reXcLXTeZmH8fa
URV/pcqC6SL/bGEaPnVSBN4+UDt05Gme1PGba0jaP4hVS4kKaTZ2nJ0v8Xmxuf3a
HKV5Grbkww0rAfMw5qMJBDLpR7QTCgx6PkG/TtXNOU1AMaA7Y6iO2Ow8+wIDAQAB
AoGAErwj3wsYqqwkPssnZ6gEAAWVJZ1spAb2+M6Ginl3DOigpiSjYjpWCypcDOk4
a+vfuKcEXCFgc0idyqWyBs+olC77778MVBERA47MCNSFGRTEtZTWzNBpHxYPFI6r
zdiv3NktxXYomaFbE1kgOlDYeMtULgLBZSHVcCn6iQbf0SECQQDWD3ET1Pd9FmbU
g1THmsu9PaZubID36d7SBpUTvk36DsO5EcgKW65FBrGEqTQxIVqjZJpLMXEEmUPU
vbJ2S5IfAkEA0pzj/nYBhNMcnH+9f0+8HNDjJFavYxU2u+eWHp/rHNUYZNen78cV
C5xRW4tj+VfZ4b/fsS2VxtsgHd9w+B0RpQJAHAjDr2w5yWkQqI5WoRmVyz/ytw2A
yncXlnwENCS9Q52BZpB8mVaueR3KS+x5CGIs468+QdDE02xbJNZ/M9zr0wJAIJvg
BQ76TzlsjaKNkX+j7YY+FOtC/oFTVyaVLKqv+WfY/gwR2WMmlASg6B6d3QZIGtbd
aI5ZSU+2Gkn1MMU3bQJBAMZ3cS/G8uGp2DB0VGQQ/Hy91oZQD28hi99KpCghN1q3
0ix8vtEuZ4CzwA/mzovVIocRcKjvXYRascdegS27XVA=
-----END RSA PRIVATE KEY-----

What am I doing wrong?


#27788
Posted: 12/28/2013 04:38:25
by Ken Ivanov (EldoS Corp.)

Hello Hugh,

Thank you for contacting us.

Could you please send us the source and the signed file so that we could have a look into them?
#27789
Posted: 12/28/2013 04:42:55
by Eugene Mayevski (EldoS Corp.)

Given that the forum doesn't let you attach large files or archives, I've moved the topic to the HelpDesk. There you can attach the ZIP archive to the message. Pleased proceed to HelpDesk and you'll find the ticket there.


Sincerely yours
Eugene Mayevski

Reply

Statistics

Topic viewed 720 times

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




|

Back to top

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

Got it!