decrypt.rb

Dave dave at momentumweb.com
Wed Apr 10 23:53:16 EEST 2019


On 4/10/2019 1:32 AM, Aki Tuomi wrote:
> On 9.4.2019 18.15, Dave wrote:
>>>> I've tried specifying an output file as well, per the script's
>> command line options,
>>>> but the output file is 0 bytes.  Does anyone have any suggestions?
>> I *think* I'm
>>>> using it the way it's intended to be used, but maybe I'm not?!
>>>> -Dave
>>> Hi!
>>> Maybe the key you tried was not used to encrypt the file?
>>> Aki
>> Aki, it's the same key I've used in the config for the mail_crypt
>> plugin in 90-plugin.conf:
>>
>> plugin {
>>    mail_crypt_global_private_key = <[PATH_TO_PRIVATE_KEY]
>>    mail_crypt_global_public_key = <[PATH_TO_PUBLIC_KEY]
>>    mail_crypt_save_version = 2
>> }
>>
>> That's the private key that's encrypting all of the messages
>> successfully, so that's the one I would use with script, correct?
>> -Dave
>>
> Yes. I gave it a try here, and it seems to work. Does it give any extra
> information if you include -i flag?
>
> Aki
>

Yes, I had tried that, and it doesn't give much extra information, at 
least to my eye, that seems to help my issue.  Above the previous output 
it outputs the Version, Flags, Header length, Cipher algo, and Digest 
algo, and then the Key derivation Rounds.  Then it does the previous 
output and exits as before.

I tried using pry to debug through the script a little, and strace as 
well, but have not found anything pointing me in the direction of a 
solution or what may be causing it not to work for me yet.  Will keep 
looking.

Out of curiosity, what version of ruby were you using to run the 
script?  My ruby version is 2.5.1p57.

-Dave



More information about the dovecot mailing list