<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://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"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>rpm: pgpPktKeyV3_s Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">rpm
 <span id="projectnumber">4.14.3-rc1</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-attribs">Data Fields</a> </div>
<div class="headertitle">
<div class="title">pgpPktKeyV3_s Struct Reference<div class="ingroups"><a class="el" href="group__rpmpgp.html">OpenPGP API.</a></div></div> </div>
</div><!--header-->
<div class="contents">
<p>5.5.1.
<a href="structpgpPktKeyV3__s.html#details">More...</a></p>
<p><code>#include <<a class="el" href="rpmpgp_8h_source.html">rpmpgp.h</a>></code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Data Fields</h2></td></tr>
<tr class="memitem:a938936d2df98d45bb79147754c8a436b"><td class="memItemLeft" align="right" valign="top">uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="structpgpPktKeyV3__s.html#a938936d2df98d45bb79147754c8a436b">version</a></td></tr>
<tr class="separator:a938936d2df98d45bb79147754c8a436b"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ad3766ee054726e1b0ff0899cdb908f8b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="rpmpgp_8h.html#a3f26618361eeb911e1c83947661a4b93">pgpTime_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="structpgpPktKeyV3__s.html#ad3766ee054726e1b0ff0899cdb908f8b">time</a></td></tr>
<tr class="separator:ad3766ee054726e1b0ff0899cdb908f8b"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:afff1851a4fc5e7f5039056d369dd0979"><td class="memItemLeft" align="right" valign="top">uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="structpgpPktKeyV3__s.html#afff1851a4fc5e7f5039056d369dd0979">valid</a> [2]</td></tr>
<tr class="separator:afff1851a4fc5e7f5039056d369dd0979"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:abbe632000557097d1d37374901ef1670"><td class="memItemLeft" align="right" valign="top">uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="structpgpPktKeyV3__s.html#abbe632000557097d1d37374901ef1670">pubkey_algo</a></td></tr>
<tr class="separator:abbe632000557097d1d37374901ef1670"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>5.5.1. </p>
<p>Key Packet Variants</p>
<p>5.5.1.1. Public Key Packet (Tag 6)</p>
<p>A Public Key packet starts a series of packets that forms an OpenPGP key (sometimes called an OpenPGP certificate).</p>
<p>5.5.1.2. Public Subkey Packet (Tag 14)</p>
<p>A Public Subkey packet (tag 14) has exactly the same format as a Public Key packet, but denotes a subkey. One or more subkeys may be associated with a top-level key. By convention, the top-level key provides signature services, and the subkeys provide encryption services.</p>
<p>Note: in PGP 2.6.x, tag 14 was intended to indicate a comment packet. This tag was selected for reuse because no previous version of PGP ever emitted comment packets but they did properly ignore them. Public Subkey packets are ignored by PGP 2.6.x and do not cause it to fail, providing a limited degree of backward compatibility.</p>
<p>5.5.1.3. Secret Key Packet (Tag 5)</p>
<p>A Secret Key packet contains all the information that is found in a Public Key packet, including the public key material, but also includes the secret key material after all the public key fields.</p>
<p>5.5.1.4. Secret Subkey Packet (Tag 7)</p>
<p>A Secret Subkey packet (tag 7) is the subkey analog of the Secret Key packet, and has exactly the same format.</p>
<p>5.5.2. Public Key Packet Formats</p>
<p>There are two versions of key-material packets. Version 3 packets were first generated by PGP 2.6. Version 2 packets are identical in format to Version 3 packets, but are generated by PGP 2.5 or before. V2 packets are deprecated and they MUST NOT be generated. PGP 5.0 introduced version 4 packets, with new fields and semantics. PGP 2.6.x will not accept key-material packets with versions greater than 3.</p>
<p>OpenPGP implementations SHOULD create keys with version 4 format. An implementation MAY generate a V3 key to ensure interoperability with old software; note, however, that V4 keys correct some security deficiencies in V3 keys. These deficiencies are described below. An implementation MUST NOT create a V3 key with a public key algorithm other than RSA.</p>
<p>A version 3 public key or public subkey packet contains:</p><ul>
<li>A one-octet version number (3).</li>
<li>A four-octet number denoting the time that the key was created.</li>
<li>A two-octet number denoting the time in days that this key is valid. If this number is zero, then it does not expire.</li>
<li>A one-octet number denoting the public key algorithm of this key</li>
<li>A series of multi-precision integers comprising the key material:<ul>
<li>a multiprecision integer (MPI) of RSA public modulus n;</li>
<li>an MPI of RSA public encryption exponent e.</li>
</ul>
</li>
</ul>
<p>V3 keys SHOULD only be used for backward compatibility because of three weaknesses in them. First, it is relatively easy to construct a V3 key that has the same key ID as any other key because the key ID is simply the low 64 bits of the public modulus. Secondly, because the fingerprint of a V3 key hashes the key material, but not its length, which increases the opportunity for fingerprint collisions. Third, there are minor weaknesses in the MD5 hash algorithm that make developers prefer other algorithms. See below for a fuller discussion of key IDs and fingerprints. </p>
<p class="definition">Definition at line <a class="el" href="rpmpgp_8h_source.html#l00608">608</a> of file <a class="el" href="rpmpgp_8h_source.html">rpmpgp.h</a>.</p>
</div><h2 class="groupheader">Field Documentation</h2>
<a id="abbe632000557097d1d37374901ef1670"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abbe632000557097d1d37374901ef1670">◆ </a></span>pubkey_algo</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t pgpPktKeyV3_s::pubkey_algo</td>
</tr>
</table>
</div><div class="memdoc">
<p>public key algorithm. </p>
<p class="definition">Definition at line <a class="el" href="rpmpgp_8h_source.html#l00612">612</a> of file <a class="el" href="rpmpgp_8h_source.html">rpmpgp.h</a>.</p>
</div>
</div>
<a id="ad3766ee054726e1b0ff0899cdb908f8b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad3766ee054726e1b0ff0899cdb908f8b">◆ </a></span>time</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="rpmpgp_8h.html#a3f26618361eeb911e1c83947661a4b93">pgpTime_t</a> pgpPktKeyV3_s::time</td>
</tr>
</table>
</div><div class="memdoc">
<p>time that the key was created. </p>
<p class="definition">Definition at line <a class="el" href="rpmpgp_8h_source.html#l00610">610</a> of file <a class="el" href="rpmpgp_8h_source.html">rpmpgp.h</a>.</p>
</div>
</div>
<a id="afff1851a4fc5e7f5039056d369dd0979"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afff1851a4fc5e7f5039056d369dd0979">◆ </a></span>valid</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t pgpPktKeyV3_s::valid[2]</td>
</tr>
</table>
</div><div class="memdoc">
<p>time in days that this key is valid. </p>
<p class="definition">Definition at line <a class="el" href="rpmpgp_8h_source.html#l00611">611</a> of file <a class="el" href="rpmpgp_8h_source.html">rpmpgp.h</a>.</p>
</div>
</div>
<a id="a938936d2df98d45bb79147754c8a436b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a938936d2df98d45bb79147754c8a436b">◆ </a></span>version</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t pgpPktKeyV3_s::version</td>
</tr>
</table>
</div><div class="memdoc">
<p>version number (3). </p>
<p class="definition">Definition at line <a class="el" href="rpmpgp_8h_source.html#l00609">609</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><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.15
</small></address>
</body>
</html>