summaryrefslogtreecommitdiff
path: root/old/api/2.6/Crypto.Signature.PKCS1_PSS.PSS_SigScheme-class.html
diff options
context:
space:
mode:
Diffstat (limited to 'old/api/2.6/Crypto.Signature.PKCS1_PSS.PSS_SigScheme-class.html')
-rw-r--r--old/api/2.6/Crypto.Signature.PKCS1_PSS.PSS_SigScheme-class.html313
1 files changed, 313 insertions, 0 deletions
diff --git a/old/api/2.6/Crypto.Signature.PKCS1_PSS.PSS_SigScheme-class.html b/old/api/2.6/Crypto.Signature.PKCS1_PSS.PSS_SigScheme-class.html
new file mode 100644
index 0000000..708f10b
--- /dev/null
+++ b/old/api/2.6/Crypto.Signature.PKCS1_PSS.PSS_SigScheme-class.html
@@ -0,0 +1,313 @@
+<?xml version="1.0" encoding="ascii"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <title>Crypto.Signature.PKCS1_PSS.PSS_SigScheme</title>
+ <link rel="stylesheet" href="epydoc.css" type="text/css" />
+ <script type="text/javascript" src="epydoc.js"></script>
+</head>
+
+<body bgcolor="white" text="black" link="blue" vlink="#204080"
+ alink="#204080">
+<!-- ==================== NAVIGATION BAR ==================== -->
+<table class="navbar" border="0" width="100%" cellpadding="0"
+ bgcolor="#a0c0ff" cellspacing="0">
+ <tr valign="middle">
+ <!-- Home link -->
+ <th>&nbsp;&nbsp;&nbsp;<a
+ href="Crypto-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
+
+ <!-- Tree link -->
+ <th>&nbsp;&nbsp;&nbsp;<a
+ href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
+
+ <!-- Index link -->
+ <th>&nbsp;&nbsp;&nbsp;<a
+ href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
+
+ <!-- Help link -->
+ <th>&nbsp;&nbsp;&nbsp;<a
+ href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
+
+ <!-- Project homepage -->
+ <th class="navbar" align="right" width="100%">
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr><th class="navbar" align="center"
+ ><a href="http://www.pycrypto.org/">PyCrypto.org</a></th>
+ </tr></table></th>
+ </tr>
+</table>
+<table width="100%" cellpadding="0" cellspacing="0">
+ <tr valign="top">
+ <td width="100%">
+ <span class="breadcrumbs">
+ <a href="Crypto-module.html">Package&nbsp;Crypto</a> ::
+ <a href="Crypto.Signature-module.html">Package&nbsp;Signature</a> ::
+ <a href="Crypto.Signature.PKCS1_PSS-module.html">Module&nbsp;PKCS1_PSS</a> ::
+ Class&nbsp;PSS_SigScheme
+ </span>
+ </td>
+ <td>
+ <table cellpadding="0" cellspacing="0">
+ <!-- hide/show private -->
+ <tr><td align="right"><span class="options"
+ >[<a href="frames.html" target="_top">frames</a
+ >]&nbsp;|&nbsp;<a href="Crypto.Signature.PKCS1_PSS.PSS_SigScheme-class.html"
+ target="_top">no&nbsp;frames</a>]</span></td></tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<!-- ==================== CLASS DESCRIPTION ==================== -->
+<h1 class="epydoc">Class PSS_SigScheme</h1><p class="nomargin-top"></p>
+This signature scheme can perform PKCS#1 PSS RSA signature or verification.
+
+<!-- ==================== INSTANCE METHODS ==================== -->
+<a name="section-InstanceMethods"></a>
+<table class="summary" border="1" cellpadding="3"
+ cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+ <td align="left" colspan="2" class="table-header">
+ <span class="table-header">Instance Methods</span></td>
+</tr>
+<tr>
+ <td width="15%" align="right" valign="top" class="summary">
+ <span class="summary-type">&nbsp;</span>
+ </td><td class="summary">
+ <table width="100%" cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td><span class="summary-sig"><a href="Crypto.Signature.PKCS1_PSS.PSS_SigScheme-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
+ <span class="summary-sig-arg">key</span>,
+ <span class="summary-sig-arg">mgfunc</span>,
+ <span class="summary-sig-arg">saltLen</span>)</span><br />
+ Initialize this PKCS#1 PSS signature scheme object.</td>
+ <td align="right" valign="top">
+
+
+ </td>
+ </tr>
+ </table>
+
+ </td>
+ </tr>
+<tr>
+ <td width="15%" align="right" valign="top" class="summary">
+ <span class="summary-type">&nbsp;</span>
+ </td><td class="summary">
+ <table width="100%" cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td><span class="summary-sig"><a name="can_sign"></a><span class="summary-sig-name">can_sign</span>(<span class="summary-sig-arg">self</span>)</span><br />
+ Return True if this cipher object can be used for signing messages.</td>
+ <td align="right" valign="top">
+
+
+ </td>
+ </tr>
+ </table>
+
+ </td>
+ </tr>
+<tr>
+ <td width="15%" align="right" valign="top" class="summary">
+ <span class="summary-type">&nbsp;</span>
+ </td><td class="summary">
+ <table width="100%" cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td><span class="summary-sig"><a href="Crypto.Signature.PKCS1_PSS.PSS_SigScheme-class.html#sign" class="summary-sig-name">sign</a>(<span class="summary-sig-arg">self</span>,
+ <span class="summary-sig-arg">mhash</span>)</span><br />
+ Produce the PKCS#1 PSS signature of a message.</td>
+ <td align="right" valign="top">
+
+
+ </td>
+ </tr>
+ </table>
+
+ </td>
+ </tr>
+<tr>
+ <td width="15%" align="right" valign="top" class="summary">
+ <span class="summary-type">&nbsp;</span>
+ </td><td class="summary">
+ <table width="100%" cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td><span class="summary-sig"><a href="Crypto.Signature.PKCS1_PSS.PSS_SigScheme-class.html#verify" class="summary-sig-name">verify</a>(<span class="summary-sig-arg">self</span>,
+ <span class="summary-sig-arg">mhash</span>,
+ <span class="summary-sig-arg">S</span>)</span><br />
+ Verify that a certain PKCS#1 PSS signature is authentic.</td>
+ <td align="right" valign="top">
+
+
+ </td>
+ </tr>
+ </table>
+
+ </td>
+ </tr>
+</table>
+<!-- ==================== METHOD DETAILS ==================== -->
+<a name="section-MethodDetails"></a>
+<table class="details" border="1" cellpadding="3"
+ cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+ <td align="left" colspan="2" class="table-header">
+ <span class="table-header">Method Details</span></td>
+</tr>
+</table>
+<a name="__init__"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+ cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+ <table width="100%" cellpadding="0" cellspacing="0" border="0">
+ <tr valign="top"><td>
+ <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
+ <span class="sig-arg">key</span>,
+ <span class="sig-arg">mgfunc</span>,
+ <span class="sig-arg">saltLen</span>)</span>
+ <br /><em class="fname">(Constructor)</em>
+ </h3>
+ </td><td align="right" valign="top"
+ >&nbsp;
+ </td>
+ </tr></table>
+
+ Initialize this PKCS#1 PSS signature scheme object.
+ <dl class="fields">
+ <dt>Parameters:</dt>
+ <dd><ul class="nomargin-top">
+ <li><strong class="pname"><code>key</code></strong> (an RSA key object) - If a private half is given, both signature and verification are possible.
+If a public half is given, only verification is possible.</li>
+ <li><strong class="pname"><code>mgfunc</code></strong> (callable) - A mask generation function that accepts two parameters: a string to
+use as seed, and the lenth of the mask to generate, in bytes.</li>
+ <li><strong class="pname"><code>saltLen</code></strong> (int) - Length of the salt, in bytes.</li>
+ </ul></dd>
+ </dl>
+</td></tr></table>
+</div>
+<a name="sign"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+ cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+ <table width="100%" cellpadding="0" cellspacing="0" border="0">
+ <tr valign="top"><td>
+ <h3 class="epydoc"><span class="sig"><span class="sig-name">sign</span>(<span class="sig-arg">self</span>,
+ <span class="sig-arg">mhash</span>)</span>
+ </h3>
+ </td><td align="right" valign="top"
+ >&nbsp;
+ </td>
+ </tr></table>
+
+ <p>Produce the PKCS#1 PSS signature of a message.</p>
+<p>This function is named <tt class="rst-docutils literal"><span class="pre">RSASSA-PSS-SIGN</span></tt>, and is specified in
+section 8.1.1 of RFC3447.</p>
+ <dl class="fields">
+ <dt>Parameters:</dt>
+ <dd><ul class="nomargin-top">
+ <li><strong class="pname"><code>mhash</code></strong> (hash object) - The hash that was carried out over the message. This is an object
+belonging to the <a href="Crypto.Hash-module.html" class="link">Crypto.Hash</a> module.</li>
+ </ul></dd>
+ <dt>Returns:</dt>
+ <dd>The PSS signature encoded as a string.</dd>
+ <dt>Raises:</dt>
+ <dd><ul class="nomargin-top">
+ <li><code><strong class='fraise'>ValueError</strong></code> - If the RSA key length is not sufficiently long to deal with the given
+hash algorithm.</li>
+ <li><code><strong class='fraise'>TypeError</strong></code> - If the RSA key has no private half.</li>
+ </ul></dd>
+ </dl>
+<div class="fields"> <p><strong>Attention:</strong>
+ Modify the salt length and the mask generation function only
+if you know what you are doing.
+The receiver must use the same parameters too.
+ </p>
+</div></td></tr></table>
+</div>
+<a name="verify"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+ cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+ <table width="100%" cellpadding="0" cellspacing="0" border="0">
+ <tr valign="top"><td>
+ <h3 class="epydoc"><span class="sig"><span class="sig-name">verify</span>(<span class="sig-arg">self</span>,
+ <span class="sig-arg">mhash</span>,
+ <span class="sig-arg">S</span>)</span>
+ </h3>
+ </td><td align="right" valign="top"
+ >&nbsp;
+ </td>
+ </tr></table>
+
+ <p>Verify that a certain PKCS#1 PSS signature is authentic.</p>
+<p>This function checks if the party holding the private half of the given
+RSA key has really signed the message.</p>
+<p>This function is called <tt class="rst-docutils literal"><span class="pre">RSASSA-PSS-VERIFY</span></tt>, and is specified in section
+8.1.2 of RFC3447.</p>
+ <dl class="fields">
+ <dt>Parameters:</dt>
+ <dd><ul class="nomargin-top">
+ <li><strong class="pname"><code>mhash</code></strong> (hash object) - The hash that was carried out over the message. This is an object
+belonging to the <a href="Crypto.Hash-module.html" class="link">Crypto.Hash</a> module.</li>
+ <li><strong class="pname"><code>S</code></strong> (string) - The signature that needs to be validated.</li>
+ </ul></dd>
+ <dt>Returns:</dt>
+ <dd>True if verification is correct. False otherwise.</dd>
+ </dl>
+</td></tr></table>
+</div>
+<br />
+<!-- ==================== NAVIGATION BAR ==================== -->
+<table class="navbar" border="0" width="100%" cellpadding="0"
+ bgcolor="#a0c0ff" cellspacing="0">
+ <tr valign="middle">
+ <!-- Home link -->
+ <th>&nbsp;&nbsp;&nbsp;<a
+ href="Crypto-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
+
+ <!-- Tree link -->
+ <th>&nbsp;&nbsp;&nbsp;<a
+ href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
+
+ <!-- Index link -->
+ <th>&nbsp;&nbsp;&nbsp;<a
+ href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
+
+ <!-- Help link -->
+ <th>&nbsp;&nbsp;&nbsp;<a
+ href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
+
+ <!-- Project homepage -->
+ <th class="navbar" align="right" width="100%">
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr><th class="navbar" align="center"
+ ><a href="http://www.pycrypto.org/">PyCrypto.org</a></th>
+ </tr></table></th>
+ </tr>
+</table>
+<table border="0" cellpadding="0" cellspacing="0" width="100%%">
+ <tr>
+ <td align="left" class="footer">
+ Generated by Epydoc 3.0.1 on Thu May 24 09:02:37 2012
+ </td>
+ <td align="right" class="footer">
+ <a target="mainFrame" href="http://epydoc.sourceforge.net"
+ >http://epydoc.sourceforge.net</a>
+ </td>
+ </tr>
+</table>
+
+<script type="text/javascript">
+ <!--
+ // Private objects are initially displayed (because if
+ // javascript is turned off then we want them to be
+ // visible); but by default, we want to hide them. So hide
+ // them unless we have a cookie that says to show them.
+ checkCookie();
+ // -->
+</script>
+</body>
+</html>