<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/pycrypto.git/lib/Crypto/SelfTest/Protocol/test_KDF.py, branch master</title>
<subtitle>github.com: dlitz/pycrypto.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/pycrypto.git/'/>
<entry>
<title>Rename S2V -&gt; _S2V until we come up with a real PRF API</title>
<updated>2013-10-21T00:48:54+00:00</updated>
<author>
<name>Dwayne Litzenberger</name>
<email>dlitz@dlitz.net</email>
</author>
<published>2013-10-21T00:46:14+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/pycrypto.git/commit/?id=7bb217aedd421fc89120baf98b719bf49c4f5fb7'/>
<id>7bb217aedd421fc89120baf98b719bf49c4f5fb7</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add support for SIV (Synthetic IV) mode</title>
<updated>2013-10-20T20:30:21+00:00</updated>
<author>
<name>Legrandin</name>
<email>helderijs@gmail.com</email>
</author>
<published>2013-05-22T20:18:35+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/pycrypto.git/commit/?id=199a9741a1849066d070b114333fcf90bc73c55a'/>
<id>199a9741a1849066d070b114333fcf90bc73c55a</id>
<content type='text'>
This patch add supports for SIV, an AEAD block cipher
mode defined in RFC5297. SIV is only valid for AES.

The PRF of SIV (S2V) is factored out in the Protocol.KDF module.

See the following example to get a feeling of the API (slightly
different than other AEAD mode, during decryption).

Encryption (Python 2):

	&gt;&gt;&gt; from Crypto.Cipher import AES
	&gt;&gt;&gt; key = b'0'*32
	&gt;&gt;&gt; siv = AES.new(key, AES.MODE_SIV)
	&gt;&gt;&gt; ct  = siv.encrypt(b'Message')
	&gt;&gt;&gt; mac = siv.digest()

Decryption (Python 2):

	&gt;&gt;&gt; from Crypto.Cipher import AES, MacMismatchError
	&gt;&gt;&gt; key = b'0'*32
	&gt;&gt;&gt; siv = AES.new(key, AES.MODE_SIV)
	&gt;&gt;&gt; pt  = siv.decrypt(ct + mac)
	&gt;&gt;&gt; try:
	&gt;&gt;&gt;	siv.verify(mac)
	&gt;&gt;&gt;	print "Plaintext", pt
	&gt;&gt;&gt; except MacMismatchError:
	&gt;&gt;&gt;     print "Error"

This change also fixes the description/design of AEAD API.

With SIV (RFC5297), decryption can only start when the MAC is known.
The original AEAD API did not support that.

For SIV the MAC is now exceptionally passed together with the ciphertext
to the decrypt() method.

[dlitz@dlitz.net: Included changes from the following commits from the author's pull request:]
- [9c13f9c] Rename 'IV' parameter to 'nonce' for AEAD modes.
- [d7727fb] Fix description/design of AEAD API.
- [fb62fae] ApiUsageError becomes TypeError [whitespace]
- [4ec64d8] Removed last references to ApiUsageError [whitespace]
- [ee46922] Removed most 'import *' statements
- [ca460a7] Made blockalgo.py more PEP-8 compliant;
            The second parameter of the _GHASH constructor
            is now the length of the block (block_size)
            and not the full module.
[dlitz@dlitz.net: A conflict that was not resolved in the previous
                  commit was originally resolved here.  Moved the
                  resolution to the previous commit.]
[dlitz@dlitz.net: Replaced MacMismatchError with ValueError]
[dlitz@dlitz.net: Replaced ApiUsageError with TypeError]
[dlitz@dlitz.net: Whitespace fixed with "git rebase --whitespace=fix"]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch add supports for SIV, an AEAD block cipher
mode defined in RFC5297. SIV is only valid for AES.

The PRF of SIV (S2V) is factored out in the Protocol.KDF module.

See the following example to get a feeling of the API (slightly
different than other AEAD mode, during decryption).

Encryption (Python 2):

	&gt;&gt;&gt; from Crypto.Cipher import AES
	&gt;&gt;&gt; key = b'0'*32
	&gt;&gt;&gt; siv = AES.new(key, AES.MODE_SIV)
	&gt;&gt;&gt; ct  = siv.encrypt(b'Message')
	&gt;&gt;&gt; mac = siv.digest()

Decryption (Python 2):

	&gt;&gt;&gt; from Crypto.Cipher import AES, MacMismatchError
	&gt;&gt;&gt; key = b'0'*32
	&gt;&gt;&gt; siv = AES.new(key, AES.MODE_SIV)
	&gt;&gt;&gt; pt  = siv.decrypt(ct + mac)
	&gt;&gt;&gt; try:
	&gt;&gt;&gt;	siv.verify(mac)
	&gt;&gt;&gt;	print "Plaintext", pt
	&gt;&gt;&gt; except MacMismatchError:
	&gt;&gt;&gt;     print "Error"

This change also fixes the description/design of AEAD API.

With SIV (RFC5297), decryption can only start when the MAC is known.
The original AEAD API did not support that.

For SIV the MAC is now exceptionally passed together with the ciphertext
to the decrypt() method.

[dlitz@dlitz.net: Included changes from the following commits from the author's pull request:]
- [9c13f9c] Rename 'IV' parameter to 'nonce' for AEAD modes.
- [d7727fb] Fix description/design of AEAD API.
- [fb62fae] ApiUsageError becomes TypeError [whitespace]
- [4ec64d8] Removed last references to ApiUsageError [whitespace]
- [ee46922] Removed most 'import *' statements
- [ca460a7] Made blockalgo.py more PEP-8 compliant;
            The second parameter of the _GHASH constructor
            is now the length of the block (block_size)
            and not the full module.
[dlitz@dlitz.net: A conflict that was not resolved in the previous
                  commit was originally resolved here.  Moved the
                  resolution to the previous commit.]
[dlitz@dlitz.net: Replaced MacMismatchError with ValueError]
[dlitz@dlitz.net: Replaced ApiUsageError with TypeError]
[dlitz@dlitz.net: Whitespace fixed with "git rebase --whitespace=fix"]
</pre>
</div>
</content>
</entry>
<entry>
<title>Removed most 'import *' statements</title>
<updated>2013-10-20T20:30:21+00:00</updated>
<author>
<name>Legrandin</name>
<email>helderijs@gmail.com</email>
</author>
<published>2013-09-10T05:43:50+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/pycrypto.git/commit/?id=7214ce9929afeb98b1a54735d83881f4337cd8b8'/>
<id>7214ce9929afeb98b1a54735d83881f4337cd8b8</id>
<content type='text'>
[dlitz@dlitz.net: Re-ordered commits; so don't import S2V yet]
[dlitz@dlitz.net: Included an additional 'import *' change from the following commit:]
    commit 4ec64d8eaaa4965889eb8e3b801fc77aa84e0a4e
    Author: Legrandin &lt;helderijs@gmail.com&gt;
    Date:   Tue Sep 10 07:28:08 2013 +0200

        Removed last references to ApiUsageError

[dlitz@dlitz.net: Removed unrelated whitespace changes]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[dlitz@dlitz.net: Re-ordered commits; so don't import S2V yet]
[dlitz@dlitz.net: Included an additional 'import *' change from the following commit:]
    commit 4ec64d8eaaa4965889eb8e3b801fc77aa84e0a4e
    Author: Legrandin &lt;helderijs@gmail.com&gt;
    Date:   Tue Sep 10 07:28:08 2013 +0200

        Removed last references to ApiUsageError

[dlitz@dlitz.net: Removed unrelated whitespace changes]
</pre>
</div>
</content>
</entry>
<entry>
<title>whitespace changes (pre-AEAD)</title>
<updated>2013-10-20T20:30:21+00:00</updated>
<author>
<name>Legrandin</name>
<email>helderijs@gmail.com</email>
</author>
<published>2013-08-04T20:46:06+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/pycrypto.git/commit/?id=8766da37a2612ebcea13c7451a2157d175f29a41'/>
<id>8766da37a2612ebcea13c7451a2157d175f29a41</id>
<content type='text'>
[dlitz@dlitz.net: Whitespace changes extracted from the author's pull request:]
- [9c13f9c] Rename 'IV' parameter to 'nonce' for AEAD modes.
- [4ec64d8] Removed last references to ApiUsageError
- [ee46922] Removed most 'import *' statements
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[dlitz@dlitz.net: Whitespace changes extracted from the author's pull request:]
- [9c13f9c] Rename 'IV' parameter to 'nonce' for AEAD modes.
- [4ec64d8] Removed last references to ApiUsageError
- [ee46922] Removed most 'import *' statements
</pre>
</div>
</content>
</entry>
<entry>
<title>Hash: Rename SHA-&gt;SHA1 and RIPEMD-&gt;RIPEMD160 (1/2)</title>
<updated>2013-02-17T00:20:23+00:00</updated>
<author>
<name>Dwayne Litzenberger</name>
<email>dlitz@dlitz.net</email>
</author>
<published>2013-02-17T00:06:32+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/pycrypto.git/commit/?id=755375bb7d866a01e19153f5809772f4474eb94d'/>
<id>755375bb7d866a01e19153f5809772f4474eb94d</id>
<content type='text'>
These algorithm names were confusing, because there are actually
algorithms called "SHA" (a.k.a. SHA-0) and "RIPEMD" (the original
version).

This commit just renames the modules, with no backward-compatibility
support.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These algorithm names were confusing, because there are actually
algorithms called "SHA" (a.k.a. SHA-0) and "RIPEMD" (the original
version).

This commit just renames the modules, with no backward-compatibility
support.
</pre>
</div>
</content>
</entry>
<entry>
<title>Re-enable (accidentally?) disabled PBKDF2 tests</title>
<updated>2012-01-13T15:01:17+00:00</updated>
<author>
<name>Dwayne C. Litzenberger</name>
<email>dlitz@dlitz.net</email>
</author>
<published>2012-01-13T15:01:16+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/pycrypto.git/commit/?id=7c3c710995aec06435997dc11969a34280e0e174'/>
<id>7c3c710995aec06435997dc11969a34280e0e174</id>
<content type='text'>
These were disabled in commit 897b75983c31a9e2630af92161e6206c2480685e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These were disabled in commit 897b75983c31a9e2630af92161e6206c2480685e
</pre>
</div>
</content>
</entry>
<entry>
<title>Merged from upstream (py3k support) and modified so that all unit tests pass.</title>
<updated>2011-10-18T21:20:26+00:00</updated>
<author>
<name>Legrandin</name>
<email>gooksankoo@hoiptorrow.mailexpire.com</email>
</author>
<published>2011-10-18T21:20:26+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/pycrypto.git/commit/?id=c22fa18c0dedb43a8b19dcb9b29512ba59e1764b'/>
<id>c22fa18c0dedb43a8b19dcb9b29512ba59e1764b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Added Lorenz Quack's native C implementation of all SHA-2 algorithm</title>
<updated>2011-10-16T20:41:21+00:00</updated>
<author>
<name>Legrandin</name>
<email>gooksankoo@hoiptorrow.mailexpire.com</email>
</author>
<published>2011-10-16T20:41:21+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/pycrypto.git/commit/?id=897b75983c31a9e2630af92161e6206c2480685e'/>
<id>897b75983c31a9e2630af92161e6206c2480685e</id>
<content type='text'>
(as submitted here https://bugs.launchpad.net/pycrypto/+bug/544792)
so that they are available also in Python 2.1, 2.2, 2.3 and 2.4.

Regardless where the implementation comes from (Python standard
library or our native modules, depending on the Python version),
all Crypto.Hash objects are always used as front-ends.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(as submitted here https://bugs.launchpad.net/pycrypto/+bug/544792)
so that they are available also in Python 2.1, 2.2, 2.3 and 2.4.

Regardless where the implementation comes from (Python standard
library or our native modules, depending on the Python version),
all Crypto.Hash objects are always used as front-ends.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add new module Crypto.Protocol.KDF with two PKCS#5 key derivation algorithms.</title>
<updated>2011-09-22T18:51:46+00:00</updated>
<author>
<name>Legrandin</name>
<email>gooksankoo@hoiptorrow.mailexpire.com</email>
</author>
<published>2011-09-22T18:51:46+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/pycrypto.git/commit/?id=8a69efb465fe9ae5bed921fd505a6a569c98d40d'/>
<id>8a69efb465fe9ae5bed921fd505a6a569c98d40d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
