Perl implementation of the Damm ECC algorithm