NAME

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

DESCRIPTION

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

METHODS

bint
bint( $scalar );
Mostly a shortcut for Math::GMPz->new( ).

Makes a new Math::GMPz type bigint arbitrary sized integer 
from a scalar argument or another bigint.
two_pow
my $two_to_the_power_of_n = two_pow( $n );

Returns a new 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.