boat73 has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I am running pgplet with this command:

C:\garett\scripts\virus_project>perl pgplet.pl -decrypt -secret ./pgp/secring.skr ./pgp/data.pgp

It is asking for my passphrase and then kicks out this error:

encrypt: datasize not multiple of blocksize (16 bytes) at C:/perl/site/lib/Crypt /OpenPGP/CFB.pm line 60, <STDIN> line 1.

Has anyone seen this before.

Replies are listed 'Best First'.
Re: Crypt::OpenPGP pgplet error
by waswas-fng (Curate) on Mar 17, 2004 at 17:13 UTC
    Looks like the data must be padded to be mod 16bytes Here is I think where the error is coming from -- Crypt-Twofish2-0.06/Twofish2.xs:
    encrypt(self, data) Crypt::Twofish2 self SV * data ALIAS: decrypt = 1 CODE: { SV *res; STRLEN size; void *rawbytes = SvPV(data,size); if (size) { if (size % (BLOCK_SIZE >> 3)) croak ("encrypt: datasize not multiple of blocksize (% +d bits)", BLOCK_SIZE); RETVAL = NEWSV (0, size); SvPOK_only (RETVAL); SvCUR_set (RETVAL, size); if ((ix ? blockDecrypt : blockEncrypt) (&self->ci, &self->ki, rawbytes, size << 3, (void +*)SvPV_nolen(RETVAL)) < 0) croak ("block(De|En)crypt: unknown error, please repor +t"); } else RETVAL = newSVpv ("", 0); } OUTPUT: RETVAL


    -Waswas