The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Crypt::ECDSA::Util -- Utility functions for Crypt::ECDSA

DESCRIPTION

These are for use with Crypt::ECDSA, a Math::BigInt based cryptography module

These routines work most efficiently if the GMP math library is installed. Otherwise, they may be too slow for comfort on most current hardware.

METHODS

bint
  bint( $scalar );
  A shortcut for Math::BigInt->new( ).
  Makes a new Math::BigInt from a scalar argument,
two_pow
  my $two_to_the_power_of_n = two_pow( $n );

  Returns a new Math::BigInt equal to 2 ** $n.
  
bigint_from_coeff
  my irreducible = bigint_from_coeff( [ 3, 1, 0 ] );

  returns a bigint given a list of exponents for a
  polynomial of base 2, such that [ 3, 1, 0 ] => 2**3 + 2**1 + 2**0 = 8 + 2 + 1
  
is_probably_prime
  my $is_prime = is_probably_prime( $n );

  Returns 1 if $n is almost certainly prime ( chance
make_pq_seed_counter_new

my( $p, $q, $seed, $counter ) = make_pq_seed_counter_new( 2048, 256, 256 );

  Make primes p and q for use in DSA algorithms, given L, N, and seed length.
  See FIPS PUB 186-3, 2006 (draft standard).
  
make_seed_and_pq_with_sha1

my( $p, $q, $seed, $counter ) = make_seed_and_pq_with_sha1( 1024, 164 );

  Make primes p and q for use in DSA algorithms, given L and seed length.
  See FIPS 186-2, the CURRENT standard.  This is may be obsolete after 2008.

AUTHOR

   William Herrera B<wherrera@skylightview.com>. 

SUPPORT

Questions, feature requests and bug reports should go to <wherrera@skylightview.com>.

COPYRIGHT

    Copyright (c) 2007 William Herrera. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.