Hi John, This doesn't make a lot of sense. You should be statically linking Crypto++ to your code, and the linker should strip out everything you aren't using. If you are using Crypto++ in a DLL then you will have all of the code etc., but you shouldn't use it in a DLL.
Friday, May 16, 2003, 2:16:01 AM, you wrote: JS> Hello, JS> I have an existing C/C++ program to which I have added Crypto++ 5.1 in JS> order to verify a digital signature on one of the files this program works JS> with. I'm basically using the RSAVerifyFile() function from the test JS> program and it works great. But unfortunately it's making my program a bit JS> larger than I'd like. Specifically before adding the verification JS> functionality my program was 225280 bytes in size. After adding crypto++ it JS> grew to 540672 bytes. That's quite a jump. JS> The first change I made in order to slim it down was to remove it's JS> dependency on the C++ file I/O library. I did this by writing an adaptation JS> of the FileSource filter that uses the C file I/O library. This was JS> successful and the resulting executable was 450560 bytes. But it's still JS> rather larger than I'd like it to be. I've also tried using the compiler's JS> switches to optimize for space instead of speed with a result of 397312 JS> bytes. But almost all of my experience with this compiler(MSVC++ 6.0) is JS> with it set to generate code with the maximize speed setting. Thus I'd JS> prefer to leave it set that way. JS> What I'd like to try next is to strip my use of Crypto++ down to the JS> point where I'm using the bare minimum of what I need. Specifically I'd JS> like to somehow get it down to the point where I'm only using the crypto++ JS> library to decrypt and unpad the signature and to compute the SHA hash on JS> the file I'm trying to verify. Then I can do the buffer management, file JS> I/O, and hash comparison myself and see how much space(if any) is saved. JS> It looks like computing an SHA hash is easy enough. But I'm still JS> somewhat new to OOP and I find crypto++ a bit impenetrable. Thus I don't JS> immediately see a way to replace the RSASSA_PKCS1v15_SHA_Verifier class with JS> something that will only decrypt and unpad the signature. Will the JS> RSAES_PKCS1v15_Decryptor class do what I need? I have a feeling it will do JS> something different with the padding. Or should I be looking somewhere JS> else? Any other ideas on slimming crypto++ down? JS> Thanks for any help you can provide, JS> John Stewart -- Best Regards, Neville Franks, Author of ED for Windows - the programmer's editor. Soft As It Gets Pty Ltd, http://www.getsoft.com - Download your Free Trial now. Victoria, Australia mailto:[EMAIL PROTECTED]
