Sophie

Sophie

distrib > Fedora > 17 > i386 > media > updates > by-pkgid > 675c8c8167236dfcf8d66da674f931e8 > files > 1217

erlang-doc-R15B-03.3.fc17.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns:fn="http://www.w3.org/2005/02/xpath-functions">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../../doc/otp_doc.css" type="text/css">
<title>Erlang -- Public key records</title>
</head>
<body bgcolor="white" text="#000000" link="#0000ff" vlink="#ff00ff" alink="#ff0000"><div id="container">
<script id="js" type="text/javascript" language="JavaScript" src="../../../../doc/js/flipmenu/flipmenu.js"></script><script id="js2" type="text/javascript" src="../../../../doc/js/erlresolvelinks.js"></script><script language="JavaScript" type="text/javascript">
            <!--
              function getWinHeight() {
                var myHeight = 0;
                if( typeof( window.innerHeight ) == 'number' ) {
                  //Non-IE
                  myHeight = window.innerHeight;
                } else if( document.documentElement && ( document.documentElement.clientWidth ||
                                                         document.documentElement.clientHeight ) ) {
                  //IE 6+ in 'standards compliant mode'
                  myHeight = document.documentElement.clientHeight;
                } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
                  //IE 4 compatible
                  myHeight = document.body.clientHeight;
                }
                return myHeight;
              }

              function setscrollpos() {
                var objf=document.getElementById('loadscrollpos');
                 document.getElementById("leftnav").scrollTop = objf.offsetTop - getWinHeight()/2;
              }

              function addEvent(obj, evType, fn){
                if (obj.addEventListener){
                obj.addEventListener(evType, fn, true);
                return true;
              } else if (obj.attachEvent){
                var r = obj.attachEvent("on"+evType, fn);
                return r;
              } else {
                return false;
              }
             }

             addEvent(window, 'load', setscrollpos);

             //--></script><div id="leftnav"><div class="innertube">
<img alt="Erlang logo" src="../../../../doc/erlang-logo.png"><br><small><a href="users_guide.html">User's Guide</a><br><a href="index.html">Reference Manual</a><br><a href="release_notes.html">Release Notes</a><br><a href="../pdf/public_key-0.17.pdf">PDF</a><br><a href="../../../../doc/index.html">Top</a></small><p><strong>public_key</strong><br><strong>User's Guide</strong><br><small>Version 0.17</small></p>
<br><a href="javascript:openAllFlips()">Expand All</a><br><a href="javascript:closeAllFlips()">Contract All</a><p><small><strong>Chapters</strong></small></p>
<ul class="flipMenu" imagepath="../../../../doc/js/flipmenu">
<li id="no" title="Introduction" expanded="false">Introduction<ul>
<li><a href="introduction.html">
              Top of chapter
            </a></li>
<li title="Purpose"><a href="introduction.html#id56658">Purpose</a></li>
<li title="Prerequisites"><a href="introduction.html#id62235">Prerequisites</a></li>
<li title="Performance tips"><a href="introduction.html#id56630">Performance tips</a></li>
</ul>
</li>
<li id="loadscrollpos" title="Public key records" expanded="true">Public key records<ul>
<li><a href="public_key_records.html">
              Top of chapter
            </a></li>
<li title="RSA as defined by the PKCS-1 standard and RFC 3447."><a href="public_key_records.html#id60524">RSA as defined by the PKCS-1 standard and RFC 3447.</a></li>
<li title="DSA as defined by Digital Signature Standard (NIST FIPS PUB 186-2)
    "><a href="public_key_records.html#id60554">DSA as defined by Digital Signature Standard (NIST FIPS PUB 186-2)
    </a></li>
</ul>
</li>
<li id="no" title="Certificate records" expanded="false">Certificate records<ul>
<li><a href="cert_records.html">
              Top of chapter
            </a></li>
<li title="Common Data Types"><a href="cert_records.html#id61390">Common Data Types</a></li>
<li title=" PKIX Certificates"><a href="cert_records.html#id61050"> PKIX Certificates</a></li>
<li title="Standard certificate extensions"><a href="cert_records.html#id62358">Standard certificate extensions</a></li>
<li title="Private Internet Extensions"><a href="cert_records.html#id62027">Private Internet Extensions</a></li>
<li title=" CRL and CRL Extensions Profile"><a href="cert_records.html#id62112"> CRL and CRL Extensions Profile</a></li>
</ul>
</li>
<li id="no" title="Using the public_key API" expanded="false">Using the public_key API<ul>
<li><a href="using_public_key.html">
              Top of chapter
            </a></li>
<li title="General information"><a href="using_public_key.html#id60775">General information</a></li>
<li title="PEM files"><a href="using_public_key.html#id60793">PEM files</a></li>
<li title="RSA public key cryptography "><a href="using_public_key.html#id63884">RSA public key cryptography </a></li>
<li title="Digital signatures"><a href="using_public_key.html#id63919">Digital signatures</a></li>
<li title="SSH files"><a href="using_public_key.html#id63952">SSH files</a></li>
</ul>
</li>
</ul>
</div></div>
<div id="content">
<div class="innertube">
<h1>2 Public key records</h1>
  
    
  <p>This chapter briefly describes Erlang records derived from asn1
  specifications used to handle public and private keys. The intent
  is to describe the data types and not to specify the meaning of
  each component for this we refer you to the relevant standards and RFCs.</p>

  <p>Use the following include directive to get access to the
  records and constant macros used in the following sections.</p>
  
  <div class="example"><pre> -include_lib("public_key/include/public_key.hrl"). </pre></div>

  <h3><a name="id60524">2.1 
        RSA as defined by the PKCS-1 standard and RFC 3447.</a></h3>
    
    
    <div class="example"><pre>
#'RSAPublicKey'{
	  modulus,       % integer()
	  publicExponent % integer()
	  }.

#'RSAPrivateKey'{
          version,         % two-prime | multi
	  modulus,         % integer()
	  publicExponent,  % integer()
	  privateExponent, % integer()
	  prime1,          % integer() 
	  prime2,          % integer()
	  exponent1,       % integer()
	  exponent2,       % integer()
	  coefficient,     % integer()
	  otherPrimeInfos  % [#OtherPrimeInfo{}] | asn1_NOVALUE
	 }.

#'OtherPrimeInfo'{
         prime,           % integer() 
 	 exponent,        % integer()
         coefficient      % integer() 
 	 }.	 
    </pre></div>

  

  <h3><a name="id60554">2.2 
        DSA as defined by Digital Signature Standard (NIST FIPS PUB 186-2)
    </a></h3>
    
    
    <div class="example"><pre>	 
#'DSAPrivateKey',{
	  version,      % integer()
	  p,            % integer()
	  q,            % integer()
	  g,            % integer()
	  y,            % integer()
	  x             % integer()
	  }.

#'Dss-Parms',{
         p,         % integer()
	 q,         % integer()
	 g          % integer()
	 }. 
    </pre></div>
  
</div>
<div class="footer">
<hr>
<p>Copyright © 2008-2012 Ericsson AB, All Rights Reserved</p>
</div>
</div>
</div></body>
</html>