summaryrefslogtreecommitdiff
path: root/doc/librpm/html/structpgpPktPubkey__s.html
blob: 3e4cd46ba2308f47aee64580bd7ce88fc33fc681 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>rpm: pgpPktPubkey_s Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.4 -->
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">rpm&#160;<span id="projectnumber">4.9.1</span></div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="functions.html"><span>Data&#160;Fields</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-attribs">Data Fields</a>  </div>
  <div class="headertitle">
<div class="title">pgpPktPubkey_s Struct Reference<div class="ingroups"><a class="el" href="group__rpmpgp.html">OpenPGP API.</a></div></div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="pgpPktPubkey_s" -->
<p>5.1.  
 <a href="structpgpPktPubkey__s.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="rpmpgp_8h_source.html">rpmpgp.h</a>&gt;</code></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-attribs"></a>
Data Fields</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpgpPktPubkey__s.html#a2bb317231138c8dd5d58cde3f2d22a0a">version</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rpmpgp_8h.html#af019dbf23a90a2232ca5bd955ac79e03">pgpKeyID_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpgpPktPubkey__s.html#acbb7495a3c75dd779b255dc752f1726d">keyid</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpgpPktPubkey__s.html#a299a72314f95798b15aca67785bb7d21">algo</a></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>5.1. </p>
<p>Public-Key Encrypted Session Key Packets (Tag 1)</p>
<p>A Public-Key Encrypted Session Key packet holds the session key used to encrypt a message. Zero or more Encrypted Session Key packets (either Public-Key or Symmetric-Key) may precede a Symmetrically Encrypted Data Packet, which holds an encrypted message. The message is encrypted with the session key, and the session key is itself encrypted and stored in the Encrypted Session Key packet(s). The Symmetrically Encrypted Data Packet is preceded by one Public-Key Encrypted Session Key packet for each OpenPGP key to which the message is encrypted. The recipient of the message finds a session key that is encrypted to their public key, decrypts the session key, and then uses the session key to decrypt the message.</p>
<p>The body of this packet consists of:</p>
<ul>
<li>A one-octet number giving the version number of the packet type. The currently defined value for packet version is 3. An implementation should accept, but not generate a version of 2, which is equivalent to V3 in all other respects.</li>
<li>An eight-octet number that gives the key ID of the public key that the session key is encrypted to.</li>
<li>A one-octet number giving the public key algorithm used.</li>
<li>A string of octets that is the encrypted session key. This string takes up the remainder of the packet, and its contents are dependent on the public key algorithm used.</li>
</ul>
<p>Algorithm Specific Fields for RSA encryption</p>
<ul>
<li>multiprecision integer (MPI) of RSA encrypted value m**e mod n.</li>
</ul>
<p>Algorithm Specific Fields for Elgamal encryption:</p>
<ul>
<li>MPI of Elgamal (Diffie-Hellman) value g**k mod p.</li>
<li>MPI of Elgamal (Diffie-Hellman) value m * y**k mod p. </li>
</ul>

<p>Definition at line <a class="el" href="rpmpgp_8h_source.html#l00106">106</a> of file <a class="el" href="rpmpgp_8h_source.html">rpmpgp.h</a>.</p>
</div><hr/><h2>Field Documentation</h2>
<a class="anchor" id="a299a72314f95798b15aca67785bb7d21"></a><!-- doxytag: member="pgpPktPubkey_s::algo" ref="a299a72314f95798b15aca67785bb7d21" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t <a class="el" href="structpgpPktPubkey__s.html#a299a72314f95798b15aca67785bb7d21">pgpPktPubkey_s::algo</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>public key algorithm used. </p>

<p>Definition at line <a class="el" href="rpmpgp_8h_source.html#l00109">109</a> of file <a class="el" href="rpmpgp_8h_source.html">rpmpgp.h</a>.</p>

</div>
</div>
<a class="anchor" id="acbb7495a3c75dd779b255dc752f1726d"></a><!-- doxytag: member="pgpPktPubkey_s::keyid" ref="acbb7495a3c75dd779b255dc752f1726d" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="rpmpgp_8h.html#af019dbf23a90a2232ca5bd955ac79e03">pgpKeyID_t</a> <a class="el" href="structpgpPktPubkey__s.html#acbb7495a3c75dd779b255dc752f1726d">pgpPktPubkey_s::keyid</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>key ID of the public key for session key. </p>

<p>Definition at line <a class="el" href="rpmpgp_8h_source.html#l00108">108</a> of file <a class="el" href="rpmpgp_8h_source.html">rpmpgp.h</a>.</p>

</div>
</div>
<a class="anchor" id="a2bb317231138c8dd5d58cde3f2d22a0a"></a><!-- doxytag: member="pgpPktPubkey_s::version" ref="a2bb317231138c8dd5d58cde3f2d22a0a" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t <a class="el" href="structpgpPktPubkey__s.html#a2bb317231138c8dd5d58cde3f2d22a0a">pgpPktPubkey_s::version</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>version number (generate 3, accept 2). </p>

<p>Definition at line <a class="el" href="rpmpgp_8h_source.html#l00107">107</a> of file <a class="el" href="rpmpgp_8h_source.html">rpmpgp.h</a>.</p>

</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="rpmpgp_8h_source.html">rpmpgp.h</a></li>
</ul>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Fri Jul 15 2011 for rpm by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>