[Python-checkins] python/nondist/peps pep-0272.txt,1.5,1.6

akuchling@sourceforge.net akuchling@sourceforge.net
Tue, 16 Apr 2002 14:24:22 -0700


Update of /cvsroot/python/python/nondist/peps
In directory usw-pr-cvs1:/tmp/cvs-serv25785

Modified Files:
	pep-0272.txt 
Log Message:
Remove references to stream ciphers.  As a result, this is now retitled the
    block encryption API PEP.


Index: pep-0272.txt
===================================================================
RCS file: /cvsroot/python/python/nondist/peps/pep-0272.txt,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** pep-0272.txt	16 Apr 2002 13:33:44 -0000	1.5
--- pep-0272.txt	16 Apr 2002 21:24:19 -0000	1.6
***************
*** 1,4 ****
  PEP: 272
! Title: API for Secret-Key Encryption Algorithms
  Version: $Revision$
  Author: A.M. Kuchling <akuchlin@mems-exchange.org>
--- 1,4 ----
  PEP: 272
! Title: API for Block Encryption Algorithms
  Version: $Revision$
  Author: A.M. Kuchling <akuchlin@mems-exchange.org>
***************
*** 10,17 ****
  Abstract
  
!     This document specifies a standard API for secret-key encryption
!     algorithms such as DES or Rijndael, making it easier to switch
!     between different algorithms and implementations.  The API is
!     intended to be suitable for both block and stream ciphers.
  
  
--- 10,16 ----
  Abstract
  
!     This document specifies a standard API for secret-key block
!     encryption algorithms such as DES or Rijndael, making it easier to
!     switch between different algorithms and implementations.  
  
  
***************
*** 32,36 ****
          1         MODE_ECB      Electronic Code Book     
          2         MODE_CBC      Cipher Block Chaining
!         3         MODE_CFB      Cipher FeedBack 
          5         MODE_OFB      Output Feedback
          6         MODE_CTR      Counter
--- 31,35 ----
          1         MODE_ECB      Electronic Code Book     
          2         MODE_CBC      Cipher Block Chaining
!         3         MODE_CFB      Cipher Feedback 
          5         MODE_OFB      Output Feedback
          6         MODE_CTR      Counter
***************
*** 49,56 ****
      In a strict formal sense, stream ciphers encrypt data bit-by-bit;
      practically, stream ciphers work on a character-by-character
!     basis.  Stream ciphers can support the API described here by using
!     fixing the block length at 1; this is how block and stream ciphers
!     could be distinguished.  The only feedback mode available for
!     stream ciphers is ECB mode.
  
  
--- 48,56 ----
      In a strict formal sense, stream ciphers encrypt data bit-by-bit;
      practically, stream ciphers work on a character-by-character
!     basis.  This PEP only aims at specifying an interface for block
!     ciphers, though stream ciphers can support the interface described
!     here by fixing 'block_size' to 1.  Feedback modes also don't make
!     sense for stream ciphers, so the only reasonable feedback mode
!     would be ECB mode.
  
  
***************
*** 125,130 ****
          module, measured in bytes.  For all feedback modes, the length
          of strings passed to the encrypt() and decrypt() must be a
!         multiple of the block size.  For stream ciphers, block_size
!         will be 1.
  
      key_size
--- 125,129 ----
          module, measured in bytes.  For all feedback modes, the length
          of strings passed to the encrypt() and decrypt() must be a
!         multiple of the block size.  
  
      key_size
***************
*** 167,173 ****
          the object, and with the appropriate feedback mode.  The
          string's length must be an exact multiple of the algorithm's
!         block size or, in CFB mode, of the segment size.  For stream
!         ciphers, the string can be of any length.  Returns a string
!         containing the ciphertext.
  
      Here's an example, using a module named 'DES':
--- 166,171 ----
          the object, and with the appropriate feedback mode.  The
          string's length must be an exact multiple of the algorithm's
!         block size or, in CFB mode, of the segment size.  Returns a
!         string containing the ciphertext.
  
      Here's an example, using a module named 'DES':