~ubuntu-branches/ubuntu/precise/openssl098/precise

« back to all changes in this revision

Viewing changes to doc/crypto/BN_mod_inverse.pod

  • Committer: Bazaar Package Importer
  • Author(s): Kurt Roeckx
  • Date: 2011-03-23 19:50:31 UTC
  • Revision ID: james.westby@ubuntu.com-20110323195031-6h9crj4bymhhr8b8
Tags: upstream-0.9.8o
ImportĀ upstreamĀ versionĀ 0.9.8o

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
=pod
 
2
 
 
3
=head1 NAME
 
4
 
 
5
BN_mod_inverse - compute inverse modulo n
 
6
 
 
7
=head1 SYNOPSIS
 
8
 
 
9
 #include <openssl/bn.h>
 
10
 
 
11
 BIGNUM *BN_mod_inverse(BIGNUM *r, BIGNUM *a, const BIGNUM *n,
 
12
           BN_CTX *ctx);
 
13
 
 
14
=head1 DESCRIPTION
 
15
 
 
16
BN_mod_inverse() computes the inverse of B<a> modulo B<n>
 
17
places the result in B<r> (C<(a*r)%n==1>). If B<r> is NULL,
 
18
a new B<BIGNUM> is created.
 
19
 
 
20
B<ctx> is a previously allocated B<BN_CTX> used for temporary
 
21
variables. B<r> may be the same B<BIGNUM> as B<a> or B<n>.
 
22
 
 
23
=head1 RETURN VALUES
 
24
 
 
25
BN_mod_inverse() returns the B<BIGNUM> containing the inverse, and
 
26
NULL on error. The error codes can be obtained by L<ERR_get_error(3)|ERR_get_error(3)>.
 
27
 
 
28
=head1 SEE ALSO
 
29
 
 
30
L<bn(3)|bn(3)>, L<ERR_get_error(3)|ERR_get_error(3)>, L<BN_add(3)|BN_add(3)>
 
31
 
 
32
=head1 HISTORY
 
33
 
 
34
BN_mod_inverse() is available in all versions of SSLeay and OpenSSL.
 
35
 
 
36
=cut