
sutter at informatik
Jul 28, 2008, 7:55 AM
Post #1 of 1
(134 views)
Permalink
|
|
equivalent to encrypt_filter for decryption
|
|
Hi! For encrypting generated shares I had a look at sign_file() in g10/sign.c, which uses the encrypt_filter and now have basic code encrypting internally available data when writing it out. The function encode_crypt() in g10/encode.c doesn't use this filter although it's actually encrypting data, is this because of historical reasons? Now when searching for an appropriate method for decrypting given shares for recombination I looked at decrypt_message() in g10/decrypt.c and it seems to be getting really ugly now: do_proc_encryption_packets() is quite a bunch of code, decrypting data to either opt.outfile or stdout; But I need the decrypted data internally to send it to the combiner. Is there any way doing this without reinventing the wheel? I mean, before I start copying much code only to change certain bits or hacking up the existing functions (which seems non-trivial here) I find it more useful to leave it to the user doing the en-/decryption on commandline (e.g. via pipe: "gpg -d share.pgp | gpg --add-share"). Greetings, Phil
|