newbie question ( RSA with ac )
moritz at g10code.com
Mon Aug 27 02:37:21 CEST 2007
> but the decryption result does not match my string....
You probably confuse MPI formats. Your encryption function expects an
USG MPI as input returns a HEX MPI. Your decryption function expects,
again, an USG MPI as inpurt and returns a HEX MPI. Note that USG format
means: raw unsigned integers contained in memory. This has nothing to
do with c-strings (char *). HEX format on the other side means: MPIs
encoded as hexadecimal characters in a c-strings (as in
After modyfing your program to expect HEX MPIs as input in both places,
it simply works here. I send it to off-list.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 199 bytes
Desc: not available
Url : /pipermail/attachments/20070827/e61d0181/attachment-0001.pgp
More information about the Gcrypt-devel