author Brian Smith <>
Thu, 11 Apr 2013 16:46:53 -0700
changeset 128536 0857f2bc8f8a646e96b93a76307451c65238f35a
parent 108803 699db88b5ea01fd321fe8abfe5bb071e991b120d
child 130535 0314d200873a8962e8556a656bbf9e4b26e23cfc
permissions -rw-r--r--
Bug 858231: Upgrade to NSS 3.15 BETA 1 and adjust security/build to work with new NSS directory layout, r=bsmith

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at

=head1 NAME

 invmod - compute modular inverse of an integer


 invmod <a> <m>


The B<invmod> program computes the inverse of I<a>, modulo I<m>, if
that inverse exists.  Both I<a> and I<m> are arbitrary-precision
integers in decimal notation.  The result is written in standard
decimal notation to the standard output.

If there is no inverse, the message:

 No inverse

...will be printed to the standard output (an inverse exists if and
only if the greatest common divisor of I<a> and I<m> is 1).

=head1 SEE ALSO

gcd(1), isprime(1), lap(1)

=head1 AUTHOR

 Michael J. Fromberger <>
 Thayer School of Engineering, Hanover, New Hampshire, USA