Using GOST with Crypt::CBC

443 Views Asked by At

I want to use the GOST encryption algorithm in Perl. I tried using RC4 and Blowfish and it was ok, but I'd rather use GOST and Elijah which aren't supported by Crypt::CBC. How can I use Crypt::CBC interface for encryption and decryption with GOST?

1

There are 1 best solutions below

8
On

You can pass a cipher-Object when you create your Crypt::CBC-object. So install Crypt::GOST from CPAN and use it there.

This works here:

#!/usr/bin/perl

use strict;
use warnings;

use Crypt::CBC;

my $cipher = Crypt::CBC->new(-key => 'test', -cipher => 'GOST');