~ubuntu-branches/ubuntu/jaunty/gnupg2/jaunty-security

« back to all changes in this revision

Viewing changes to doc/gcryptref-pubkey.sgml

  • Committer: Bazaar Package Importer
  • Author(s): Thomas Viehmann
  • Date: 2008-10-04 10:25:53 UTC
  • mfrom: (5.1.15 intrepid)
  • Revision ID: james.westby@ubuntu.com-20081004102553-fv62pp8dsitxli47
Tags: 2.0.9-3.1
* Non-maintainer upload.
* agent/gpg-agent.c: Deinit the threading library before exec'ing
  the command to run in --daemon mode. And because that still doesn't
  restore the sigprocmask, do that manually. Closes: #499569

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<!-- gcryptref-digest.sgml - libgcrypt reference (digests)
2
 
    Copyright (C) 2000 Free Software Foundation, Inc.
3
 
 
4
 
    This file is part of GnuPG.
5
 
 
6
 
    GnuPG is free software; you can redistribute it and/or modify
7
 
    it under the terms of the GNU General Public License as published by
8
 
    the Free Software Foundation; either version 2 of the License, or
9
 
    (at your option) any later version.
10
 
 
11
 
    GnuPG is distributed in the hope that it will be useful,
12
 
    but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 
    GNU General Public License for more details.
15
 
 
16
 
    You should have received a copy of the GNU General Public License
17
 
    along with this program; if not, write to the Free Software
18
 
    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
19
 
-->
20
 
 
21
 
 
22
 
<!--**********************************************
23
 
***********  pk_encrypt  *************************
24
 
***********************************************-->
25
 
<refentry>
26
 
  <refnamediv>
27
 
    <refname>gcry_pk_encrypt</refname>
28
 
    <refpurpose>do a public key encryption</refpurpose>
29
 
  </refnamediv>
30
 
 
31
 
  <refsynopsisdiv>
32
 
    <funcsynopsis>
33
 
      <funcsynopsisinfo>
34
 
      #include &lt;gcrypt.h&gt;
35
 
      </funcsynopsisinfo>
36
 
      <funcprototype>
37
 
        <funcdef>int <function>gcry_pk_encrypt</function></funcdef>
38
 
        <paramdef>GCRY_SEXP *<parameter>result</parameter></paramdef>
39
 
        <paramdef>GCRY_SEXP  <parameter>data</parameter></paramdef>
40
 
        <paramdef>GCRY_SEXP  <parameter>pkey</parameter></paramdef>
41
 
      </funcprototype>
42
 
    </funcsynopsis>
43
 
  </refsynopsisdiv>
44
 
 
45
 
 
46
 
  <refsect1><title>Description</title>
47
 
  <para>
48
 
  <indexterm><primary>public key functions</primary>
49
 
             <secondary>gcry_pk_encrypt</secondary>
50
 
             </indexterm>
51
 
  <function>gcry_pk_encrypt</function> performs public key encryption
52
 
  operations.  The caller has to provide a public key as the &sexp;
53
 
  <parameter>pkey</> and <parameter>data</> as a &sexp;
54
 
  with just one MPI in it.  The function returns a &sexp; which may
55
 
  be passed tp to pk_decrypt.
56
 
  Later versions of this functions may take more complex input data.
57
 
 
58
 
  Returns: 0 or an errorcode.
59
 
  </para>
60
 
  <literallayout>
61
 
  s_data = (<replaceable/mpi/)
62
 
  s_pkey = <replaceable/key-as-defined-in-sexp_to_key/
63
 
  r_ciph = (enc-val
64
 
             (<replaceable/algo/
65
 
               (<replaceable/param_name1/ <replaceable/mpi/)
66
 
               ...
67
 
               (<replaceable/param_namen/ <replaceable/mpi/)
68
 
             ))
69
 
  </literallayout>
70
 
</refentry>
71
 
 
72
 
 
73
 
<!--
74
 
int gcry_pk_decrypt( GCRY_SEXP *result, GCRY_SEXP data, GCRY_SEXP skey );
75
 
 
76
 
 
77
 
 
78
 
int gcry_pk_sign(    GCRY_SEXP *result, GCRY_SEXP data, GCRY_SEXP skey );
79
 
int gcry_pk_verify(  GCRY_SEXP sigval, GCRY_SEXP data, GCRY_SEXP pkey );
80
 
int gcry_pk_testkey( GCRY_SEXP key );
81
 
int gcry_pk_genkey(  GCRY_SEXP *r_key, GCRY_SEXP s_parms );
82
 
 
83
 
int gcry_pk_ctl( int cmd, void *buffer, size_t buflen);
84
 
int gcry_pk_algo_info( int algo, int what, void *buffer, size_t *nbytes);
85
 
#define gcry_pk_test_algo(a) \
86
 
            gcry_pk_algo_info( (a), GCRYCTL_TEST_ALGO, NULL, NULL )
87
 
 
88
 
const char *gcry_pk_algo_name( int algo );
89
 
int gcry_pk_map_name( const char* name );
90
 
unsigned int gcry_pk_get_nbits( GCRY_SEXP key );
91
 
    -->
92