(no subject)

garbaj@cox.net garbaj@cox.net
Thu, 28 Aug 2003 11:08:07 -0400

Hello all,

I've been working for quite some time trying to convert a linux library, =
using libgcrypt 1.1.12, into something for Windows. After a lot of fumbli=
ng with Visual C++ and interference from other projects, I did manage to =
use the LIB.EXE tool to create a static Windows library out of the .dsp f=
ile I got from Timo.  Thanks Timo!  Then I successfully built my Windows =
library (.lib) for a small subset of public-key functions plus some error=

Using a test program with a loop that simply encrypts a buffer, writes it=
 to disk, reads it back and decrypts it to make sure the numbers match, I=
 am having problems with the creation of the sexp from the encrypted file=
 on disk...  Is anyone aware of any issues that would stop reading the fi=
le before the end...  Can an encrypted file contain an <eof> character?  =

The files being saved  (and those successfully re-read) are about 155 byt=

>String from disk:
>retSize =3D 155     <-----------------same as original size
>  [data=3D"enc-val"]
>  [open]
>    [data=3D"rsa"]
>    [open]
>      [data=3D"a"]
>      [data=3D"u\x0e\xbdT\x81\x1e\xc5\x8aKb\xae\x16\x05.F\0{\xf2\xf0#,\x=
>    [close]
>  [close]
>7u11A6781F520b32 <---> 7u11A6781F520b32 (MATCH)

but the failing files are less than that - sometimes substantially less..=

>String from disk:
>retSize =3D 43   <---- or 153, 129, 81, 140, etc...
                      no apparent pattern, =

                      but always < original file
>constructing data block failed.  Aborting function...
>8Q1271a36n5R44Y7 <--->      (NO MATCH)

Is there a way to put a wrapper on the file, or is there some sort of "as=
cii-armoring" or similar file I/O-safe format I can write these files in =
to fix this problem?  Thanks for any ideas.
-- =

Tony Warren
Prairie Systems, Inc.
<}-: =