r6996 - in /trunk/libcrypt-rijndael-perl: Changes LICENSE MANIFEST META.yml Makefile.PL README Rijndael.pm Rijndael.xs _rijndael.c debian/changelog debian/control debian/rules examples/ rijndael.h t/pod.t t/pod_coverage.t t/test_manifest test

tincho-guest at users.alioth.debian.org tincho-guest at users.alioth.debian.org
Mon Aug 20 11:50:21 UTC 2007


Author: tincho-guest
Date: Mon Aug 20 11:50:21 2007
New Revision: 6996

URL: http://svn.debian.org/wsvn/?sc=1&rev=6996
Log:
* New upstream release.
* Added myself to uploaders.
* Enabled tests, and added build dependencies to fully run the tests.

Added:
    trunk/libcrypt-rijndael-perl/Changes
      - copied unchanged from r6995, branches/upstream/libcrypt-rijndael-perl/current/Changes
    trunk/libcrypt-rijndael-perl/LICENSE
      - copied unchanged from r6995, branches/upstream/libcrypt-rijndael-perl/current/LICENSE
    trunk/libcrypt-rijndael-perl/META.yml
      - copied unchanged from r6995, branches/upstream/libcrypt-rijndael-perl/current/META.yml
    trunk/libcrypt-rijndael-perl/examples/
      - copied from r6995, branches/upstream/libcrypt-rijndael-perl/current/examples/
    trunk/libcrypt-rijndael-perl/t/pod.t
      - copied unchanged from r6995, branches/upstream/libcrypt-rijndael-perl/current/t/pod.t
    trunk/libcrypt-rijndael-perl/t/pod_coverage.t
      - copied unchanged from r6995, branches/upstream/libcrypt-rijndael-perl/current/t/pod_coverage.t
    trunk/libcrypt-rijndael-perl/t/test_manifest
      - copied unchanged from r6995, branches/upstream/libcrypt-rijndael-perl/current/t/test_manifest
Removed:
    trunk/libcrypt-rijndael-perl/test
Modified:
    trunk/libcrypt-rijndael-perl/MANIFEST
    trunk/libcrypt-rijndael-perl/Makefile.PL
    trunk/libcrypt-rijndael-perl/README
    trunk/libcrypt-rijndael-perl/Rijndael.pm
    trunk/libcrypt-rijndael-perl/Rijndael.xs
    trunk/libcrypt-rijndael-perl/_rijndael.c
    trunk/libcrypt-rijndael-perl/debian/changelog
    trunk/libcrypt-rijndael-perl/debian/control
    trunk/libcrypt-rijndael-perl/debian/rules
    trunk/libcrypt-rijndael-perl/rijndael.h

Modified: trunk/libcrypt-rijndael-perl/MANIFEST
URL: http://svn.debian.org/wsvn/trunk/libcrypt-rijndael-perl/MANIFEST?rev=6996&op=diff
==============================================================================
--- trunk/libcrypt-rijndael-perl/MANIFEST (original)
+++ trunk/libcrypt-rijndael-perl/MANIFEST Mon Aug 20 11:50:21 2007
@@ -1,11 +1,18 @@
+_rijndael.c
+Changes
 COPYING
+examples/README
+LICENSE
+Makefile.PL
 MANIFEST
-Makefile.PL
+NEWS
 README
+rijndael.h
 Rijndael.pm
 Rijndael.xs
-_rijndael.c
-rijndael.h
-test
+t/00_load.t
+t/pod.t
+t/pod_coverage.t
+t/test_manifest
 typemap
-t/00_load.t
+META.yml                                 Module meta-data (added by MakeMaker)

Modified: trunk/libcrypt-rijndael-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/trunk/libcrypt-rijndael-perl/Makefile.PL?rev=6996&op=diff
==============================================================================
--- trunk/libcrypt-rijndael-perl/Makefile.PL (original)
+++ trunk/libcrypt-rijndael-perl/Makefile.PL Mon Aug 20 11:50:21 2007
@@ -1,13 +1,31 @@
+# $Id: Makefile.PL 2170 2007-02-22 21:31:05Z comdog $
+
 use ExtUtils::MakeMaker;
 
+eval "use Test::Manifest 1.14";
+
 WriteMakefile(
-    dist	=> {
+	NAME           => "Crypt::Rijndael",
+    VERSION_FROM   => "Rijndael.pm",
+	LICENSE        => 'gpl',
+	AUTHOR         => 'Rafael R. Sevilla (maintained by brian d foy <bdfoy at cpan.org>)',
+	
+	'PREREQ_PM'    => { 
+			'Test::More'         => '0',
+			},
+
+
+	'MAN3PODS'     => {
+			'Rijndael.pm' => '$(INST_MAN3DIR)/Crypt::Rijndael.3',
+			},
+
+	clean          => { FILES    => q|*.bak Crypt-*| },
+
+	dist	       => {
 	            PREOP	=> 'pod2text Rijndael.pm | tee README >$(DISTVNAME)/README; chmod -R u=rwX,go=rX . ;',
 	            COMPRESS	=> 'gzip -9v',
 	            SUFFIX	=> '.gz',
 	           },
-    NAME => "Crypt::Rijndael",
-    OBJECT => q[_rijndael$(OBJ_EXT) Rijndael$(OBJ_EXT)],
-    VERSION_FROM => "Rijndael.pm",
-);
 
+    OBJECT       => q[_rijndael$(OBJ_EXT) Rijndael$(OBJ_EXT)],
+); 

Modified: trunk/libcrypt-rijndael-perl/README
URL: http://svn.debian.org/wsvn/trunk/libcrypt-rijndael-perl/README?rev=6996&op=diff
==============================================================================
--- trunk/libcrypt-rijndael-perl/README (original)
+++ trunk/libcrypt-rijndael-perl/README Mon Aug 20 11:50:21 2007
@@ -1,46 +1,82 @@
-This is Crypt::Rijndael version 0.05, an XS-based implementation of
-the newly-selected Advanced Encryption Standard algorithm Rijndael,
-designed by Joan Daemen and Vincent Rijmen.
+NAME
+    Crypt::Rijndael - Crypt::CBC compliant Rijndael encryption module
 
-Installing Crypt::Rijndael
---------------------------
+SYNOPSIS
+     use Crypt::Rijndael;
 
-The usual:
+     # keysize() is 32, but 24 and 16 are also possible
+     # blocksize() is 16
 
-	1. perl Makefile.PL
-	2. make
-	3. make test
-	4. make install
+     $cipher = Crypt::Rijndael->new( "a" x 32, Crypt::Rijndael::MODE_CBC );
 
-Notes
------
+     $cipher->set_iv($iv);
+     $crypted = $cipher->encrypt($plaintext);
+            # - OR -
+     $plaintext = $cipher->decrypt($crypted);
 
-This module has been tested successfully on:
+DESCRIPTION
+    This module implements the Rijndael cipher, which has just been selected
+    as the Advanced Encryption Standard.
 
-Linux 2.2.x (x86)
-Linux 2.4.x (x86)
-Win95/VC++ (x86)
-Linux/PPC
-Solaris/Sparc
+    keysize
+        Returns the keysize, which is 32 (bytes). The Rijndael cipher
+        actually supports keylengths of 16, 24 or 32 bytes, but there is no
+        way to communicate this to "Crypt::CBC".
 
-Perl 5.005_03, 5.004_02, 5.6.0
+    blocksize
+        The blocksize for Rijndael is 16 bytes (128 bits), although the
+        algorithm actually supports any blocksize that is any multiple of
+        our bytes. 128 bits, is however, the AES-specified block size, so
+        this is all we support.
 
-Kindly report any other successful platform/architecture successes.
+    $cipher = new $key [, $mode]
+        Create a new "Crypt::Rijndael" cipher object with the given key
+        (which must be 128, 192 or 256 bits long). The additional $mode
+        argument is the encryption mode, either "MODE_ECB" (electronic
+        codebook mode, the default), "MODE_CBC" (cipher block chaining, the
+        same that "Crypt::CBC" does), "MODE_CFB" (128-bit cipher feedback),
+        "MODE_OFB" (128-bit output feedback), or "MODE_CTR" (counter mode).
 
-Tests from the draft FIPS for AES Modes of Operation (as of July
-2001) have also been added.
+        ECB mode is very insecure (read a book on cryptography if you dont
+        know why!), so you should probably use CBC mode.
 
-Thanks to Mike Blazer <blazer at mail.nevalink.ru> for fixes involving
-Win32 and older Perl version compatibility.
+    $cipher->set_iv($iv)
+        This allows you to change the initial value vector used by the
+        chaining modes. It is not relevant for ECB mode.
 
-For more information on Rijndael, see NIST's page on the Advanced
-Encryption Standard:
+    $cipher->encrypt($data)
+        Encrypt data. The size of $data must be a multiple of "blocksize"
+        (16 bytes), otherwise this function will croak. Apart from that, it
+        can be of (almost) any length.
 
-http://csrc.nist.gov/encryption/aes/
+    $cipher->decrypt($data)
+        Decrypts $data.
 
-or the original Rijndael page at
+  Encryption modes
+    Use these constants to select the cipher type:
 
-http://www.esat.kuleuven.ac.be/~rijmen/rijndael/
+    MODE_CBC - Cipher Block Chaining
+    MODE_CFB - Cipher feedback
+    MODE_CTR - Counter mode
+    MODE_ECB - Electronic cookbook mode
+    MODE_OFB - Output feedback
 
-Rafael R. Sevilla - Inter.Net Philippines
-<sevillar at team.ph.inter.net>
+SEE ALSO
+    Crypt::CBC, http://www.csrc.nist.gov/encryption/aes/
+
+BUGS
+    Should EXPORT or EXPORT_OK the MODE constants.
+
+AUTHOR
+    Currently maintained by brian d foy, "<bdfoy at cpan.org>".
+
+    Original code by Rafael R. Sevilla.
+
+    The Rijndael Algorithm was developed by Vincent Rijmen and Joan Daemen,
+    and has been selected as the US Government's Advanced Encryption
+    Standard.
+
+LICENSE
+    This software is licensed under the GNU Public License. See the included
+    COPYING file for details.
+

Modified: trunk/libcrypt-rijndael-perl/Rijndael.pm
URL: http://svn.debian.org/wsvn/trunk/libcrypt-rijndael-perl/Rijndael.pm?rev=6996&op=diff
==============================================================================
--- trunk/libcrypt-rijndael-perl/Rijndael.pm (original)
+++ trunk/libcrypt-rijndael-perl/Rijndael.pm Mon Aug 20 11:50:21 2007
@@ -9,11 +9,11 @@
  # keysize() is 32, but 24 and 16 are also possible
  # blocksize() is 16
 
- $cipher = new Crypt::Rijndael "a" x 32, Crypt::Rijndael::MODE_CBC;
+ $cipher = Crypt::Rijndael->new( "a" x 32, Crypt::Rijndael::MODE_CBC );
 
  $cipher->set_iv($iv);
  $crypted = $cipher->encrypt($plaintext);
- # - OR -
+ 	# - OR -
  $plaintext = $cipher->decrypt($crypted);
 
 =head1 DESCRIPTION
@@ -26,10 +26,12 @@
 =cut
 
 package Crypt::Rijndael;
+use strict;
+use vars qw( $VERSION @ISA );
 
 require DynaLoader;
 
-$VERSION = 0.04;
+$VERSION = '1.04';
 @ISA = qw/DynaLoader/;
 
 bootstrap Crypt::Rijndael $VERSION;
@@ -76,9 +78,27 @@
 
 =back
 
+=head2 Encryption modes
+
+Use these constants to select the cipher type:
+
+=over 4
+
+=item MODE_CBC - Cipher Block Chaining
+
+=item MODE_CFB - Cipher feedback
+
+=item MODE_CTR - Counter mode
+
+=item MODE_ECB - Electronic cookbook mode
+
+=item MODE_OFB - Output feedback
+
+=back
+
 =head1 SEE ALSO
 
-  L<Crypt::CBC>, http://www.csrc.nist.gov/encryption/aes/
+L<Crypt::CBC>, http://www.csrc.nist.gov/encryption/aes/
 
 =head1 BUGS
 
@@ -86,10 +106,17 @@
 
 =head1 AUTHOR
 
- Rafael R. Sevilla <sevillar at team.ph.inter.net>
+Currently maintained by brian d foy, C<< <bdfoy at cpan.org> >>.
 
- The Rijndael Algorithm was developed by Vincent Rijmen and Joan Daemen,
- and has been selected as the US Government's Advanced Encryption Standard.
+Original code by  Rafael R. Sevilla.
+
+The Rijndael Algorithm was developed by Vincent Rijmen and Joan Daemen,
+and has been selected as the US Government's Advanced Encryption Standard.
+
+=head1 LICENSE
+
+This software is licensed under the GNU Public License. See the included
+COPYING file for details.
 
 =cut
 

Modified: trunk/libcrypt-rijndael-perl/Rijndael.xs
URL: http://svn.debian.org/wsvn/trunk/libcrypt-rijndael-perl/Rijndael.xs?rev=6996&op=diff
==============================================================================
--- trunk/libcrypt-rijndael-perl/Rijndael.xs (original)
+++ trunk/libcrypt-rijndael-perl/Rijndael.xs Mon Aug 20 11:50:21 2007
@@ -134,6 +134,8 @@
 	  STRLEN size;
 	  void *rawbytes = SvPV(data,size);
 
+	  if( size !=  RIJNDAEL_BLOCKSIZE )
+	  	croak( "set_iv: initial value must be the blocksize (%d bytes), but was %d bytes", RIJNDAEL_BLOCKSIZE, size );
 	  memcpy(self->iv, rawbytes, RIJNDAEL_BLOCKSIZE);
 	}
 

Modified: trunk/libcrypt-rijndael-perl/_rijndael.c
URL: http://svn.debian.org/wsvn/trunk/libcrypt-rijndael-perl/_rijndael.c?rev=6996&op=diff
==============================================================================
--- trunk/libcrypt-rijndael-perl/_rijndael.c (original)
+++ trunk/libcrypt-rijndael-perl/_rijndael.c Mon Aug 20 11:50:21 2007
@@ -1,5 +1,7 @@
 /* rijndael - An implementation of the Rijndael cipher.
  * Copyright (C) 2000, 2001 Rafael R. Sevilla <sevillar at team.ph.inter.net>
+ *
+ * Currently maintained by brian d foy, <bdfoy at cpan.org>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public

Modified: trunk/libcrypt-rijndael-perl/debian/changelog
URL: http://svn.debian.org/wsvn/trunk/libcrypt-rijndael-perl/debian/changelog?rev=6996&op=diff
==============================================================================
--- trunk/libcrypt-rijndael-perl/debian/changelog (original)
+++ trunk/libcrypt-rijndael-perl/debian/changelog Mon Aug 20 11:50:21 2007
@@ -1,3 +1,11 @@
+libcrypt-rijndael-perl (1.04-1) unstable; urgency=low
+
+  * New upstream release.
+  * Added myself to uploaders.
+  * Enabled tests, and added build dependencies to fully run the tests.
+
+ -- Martín Ferrari <martin.ferrari at gmail.com>  Mon, 20 Aug 2007 12:50:55 +0100
+
 libcrypt-rijndael-perl (0.05-7) unstable; urgency=medium
 
   * Use $(CURDIR) [make] instead of $(PWD) [sh] to fix sudo issues.

Modified: trunk/libcrypt-rijndael-perl/debian/control
URL: http://svn.debian.org/wsvn/trunk/libcrypt-rijndael-perl/debian/control?rev=6996&op=diff
==============================================================================
--- trunk/libcrypt-rijndael-perl/debian/control (original)
+++ trunk/libcrypt-rijndael-perl/debian/control Mon Aug 20 11:50:21 2007
@@ -2,8 +2,10 @@
 Section: perl
 Priority: optional
 Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
-Uploaders: Gustavo Franco <stratus at debian.org>, Niko Tyni <ntyni at iki.fi>
-Build-Depends: debhelper (>= 5), perl (>= 5.8)
+Uploaders: Gustavo Franco <stratus at debian.org>, Niko Tyni <ntyni at iki.fi>,
+ Martín Ferrari <martin.ferrari at gmail.com>
+Build-Depends: debhelper (>= 5), perl (>= 5.8), libtest-pod-coverage-perl,
+ libtest-pod-perl
 Standards-Version: 3.7.2
 XS-Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libcrypt-rijndael-perl/
 XS-Vcs-Browser: http://svn.debian.org/wsvn/pkg-perl/trunk/libcrypt-rijndael-perl/

Modified: trunk/libcrypt-rijndael-perl/debian/rules
URL: http://svn.debian.org/wsvn/trunk/libcrypt-rijndael-perl/debian/rules?rev=6996&op=diff
==============================================================================
--- trunk/libcrypt-rijndael-perl/debian/rules (original)
+++ trunk/libcrypt-rijndael-perl/debian/rules Mon Aug 20 11:50:21 2007
@@ -21,6 +21,7 @@
 build: Makefile
 	dh_testdir
 	${MAKE} OPTIMIZE="${CFLAGS} -g -Wall" LD_RUN_PATH=
+	${MAKE} test
 
 clean:	checkroot
 	rm -f build-stamp

Modified: trunk/libcrypt-rijndael-perl/rijndael.h
URL: http://svn.debian.org/wsvn/trunk/libcrypt-rijndael-perl/rijndael.h?rev=6996&op=diff
==============================================================================
--- trunk/libcrypt-rijndael-perl/rijndael.h (original)
+++ trunk/libcrypt-rijndael-perl/rijndael.h Mon Aug 20 11:50:21 2007
@@ -1,5 +1,7 @@
 /* rijndael - An implementation of the Rijndael cipher.
  * Copyright (C) 2000 Rafael R. Sevilla <sevillar at team.ph.inter.net>
+ *
+ * Currently maintained by brian d foy, <bdfoy at cpan.org>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -26,19 +28,58 @@
 #define RIJNDAEL_H
 
 #include <stdlib.h>
+#include <sys/types.h>
 
-/* typedef unsigned long UINT32; */
+#ifdef _CRYPT_RIJNDAEL_H_TYPES
+	#undef _CRYPT_RIJNDAEL_H_TYPES
+#endif
 
-/* u_long to u_int because the 64bit archs */
-/* By: Andreas Trottmann and Gustavo Franco */
-typedef unsigned int UINT32;
+/* Solaris has sys/types.h, but doesn't act like everyone else 
+ * GCC defines __sun__ and __sun (report from Tom Ross)
+ * Solaris cc defines __sun
+ */
+#if defined( __sun__ ) || defined( __sun )
+	#define _CRYPT_RIJNDAEL_H_TYPES
+	typedef uint32_t UINT32;
+	typedef uint8_t  UINT8;
+#endif
 
-typedef unsigned char UINT8;
+/* I expect this to be the usual case */
+#if ! defined(_CRYPT_RIJNDAEL_H_TYPES) && ( defined(_SYS_TYPES_H) || defined(_SYS_TYPES_H_) )   
+	#define _CRYPT_RIJNDAEL_H_TYPES
+	typedef __uint32_t UINT32;
+	typedef __uint8_t  UINT8;
+#endif
+
+#if defined(__CYGWIN__) && ! defined(_CRYPT_RIJNDAEL_H_TYPES)
+	#define _CRYPT_RIJNDAEL_H_TYPES
+	typedef unsigned int  UINT32;
+	typedef unsigned char UINT8;
+#endif
+
+#if defined(__MINGW32__) && ! defined(_CRYPT_RIJNDAEL_H_TYPES)
+	#define _CRYPT_RIJNDAEL_H_TYPES
+	typedef unsigned int  UINT32;
+	typedef unsigned char UINT8;
+#endif
+
+#if defined(WIN32) && ! defined(_CRYPT_RIJNDAEL_H_TYPES)
+	#define _CRYPT_RIJNDAEL_H_TYPES
+	typedef unsigned int  UINT32;
+	typedef unsigned char UINT8;
+#endif
+
+#if ! defined(_CRYPT_RIJNDAEL_H_TYPES)
+	#define _CRYPT_RIJNDAEL_H_TYPES
+	typedef unsigned int  UINT32;
+	typedef unsigned char UINT8;
+#endif	
 
 /* Other block sizes and key lengths are possible, but in the context of
- * the ssh protocols, 256 bits is the default. */
+ * the ssh protocols, 256 bits is the default. 
+ */
 #define RIJNDAEL_BLOCKSIZE 16
-#define RIJNDAEL_KEYSIZE 32
+#define RIJNDAEL_KEYSIZE   32
 
 #define     MODE_ECB        1    /*  Are we ciphering in ECB mode?   */
 #define     MODE_CBC        2    /*  Are we ciphering in CBC mode?   */
@@ -65,7 +106,8 @@
  * bits).  If a value other than these three is specified, the key will be
  * truncated to the closest value less than the key size specified, e.g.
  * specifying 7 will use only the first 6 bytes of the key given.  DO NOT
- * PASS A VALUE LESS THAN 16 TO KEYSIZE! */
+ * PASS A VALUE LESS THAN 16 TO KEYSIZE! 
+ */
 void
 rijndael_setup(RIJNDAEL_context *ctx, size_t keysize, const UINT8 *key);
 




More information about the Pkg-perl-cvs-commits mailing list