commit perl-Crypt-Blowfish for openSUSE:Factory
Hello community, here is the log from the commit of package perl-Crypt-Blowfish for openSUSE:Factory checked in at Fri Mar 26 17:18:06 CET 2010. -------- --- perl-Crypt-Blowfish/perl-Crypt-Blowfish.changes 2010-01-10 15:55:49.000000000 +0100 +++ perl-Crypt-Blowfish/perl-Crypt-Blowfish.changes 2010-03-26 16:12:25.000000000 +0100 @@ -1,0 +2,9 @@ +Fri Mar 26 16:09:02 CET 2010 - anicka@suse.cz + +- update to 2.12 + * updated Changes to mesh with revision. + * patched _blowfish.c to stop spurious warnings. + * updated POD +- remove the patch (fixed in upstream) + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- Crypt-Blowfish-2.10.diff Crypt-Blowfish-2.10.tar.bz2 New: ---- Crypt-Blowfish-2.12.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Crypt-Blowfish.spec ++++++ --- /var/tmp/diff_new_pack.VasHWl/_old 2010-03-26 17:17:53.000000000 +0100 +++ /var/tmp/diff_new_pack.VasHWl/_new 2010-03-26 17:17:53.000000000 +0100 @@ -1,5 +1,5 @@ # -# spec file for package perl-Crypt-Blowfish (Version 2.10) +# spec file for package perl-Crypt-Blowfish (Version 2.12) # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -19,8 +19,8 @@ Name: perl-Crypt-Blowfish -Version: 2.10 -Release: 135 +Version: 2.12 +Release: 1 Provides: perl_bf Obsoletes: perl_bf Conflicts: perl_cpx perl-Cryptix @@ -31,7 +31,6 @@ Url: http://cpan.org/modules/by-module/Crypt/ Summary: Blowfish encryption for Perl Source: Crypt-Blowfish-%{version}.tar.bz2 -Patch: Crypt-Blowfish-%{version}.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -45,15 +44,15 @@ %prep %setup -n Crypt-Blowfish-%{version} -q -%patch %build perl Makefile.PL OPTIMIZE="$RPM_OPT_FLAGS -Wall" make %{?_smp_mflags} + +%check make test %install -rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install_vendor %perl_process_packlist ++++++ Crypt-Blowfish-2.10.tar.bz2 -> Crypt-Blowfish-2.12.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Crypt-Blowfish-2.10/Blowfish.pm new/Crypt-Blowfish-2.12/Blowfish.pm --- old/Crypt-Blowfish-2.10/Blowfish.pm 2005-12-02 13:37:57.000000000 +0100 +++ new/Crypt-Blowfish-2.12/Blowfish.pm 2010-03-04 20:40:38.000000000 +0100 @@ -16,7 +16,7 @@ new encrypt decrypt ); -$VERSION = '2.10'; +$VERSION = '2.12'; bootstrap Crypt::Blowfish $VERSION; use strict; @@ -31,43 +31,32 @@ sub blocksize { 8; } # /* byte my shiny metal.. */ -sub keysize { 0; } # /* we'll leave this at 8 .. for now. expect change. */ +sub keysize { 0; } # /* we'll leave this at 8 .. for now. */ sub min_keysize { 8; } sub max_keysize { 56; } sub new { usage("new Blowfish key") unless @_ == 2; - my $type = shift; my $self = {}; bless $self, $type; - $self->{'ks'} = Crypt::Blowfish::init(shift); - - $self; + return $self; } sub encrypt { usage("encrypt data[8 bytes]") unless @_ == 2; - - my $self = shift; - my $data = shift; - + my ($self,$data) = @_; Crypt::Blowfish::crypt($data, $data, $self->{'ks'}, 0); - - $data; + return $data; } sub decrypt { usage("decrypt data[8 bytes]") unless @_ == 2; - - my $self = shift; - my $data = shift; - + my ($self,$data) = @_; Crypt::Blowfish::crypt($data, $data, $self->{'ks'}, 1); - - $data; + return $data; } 1; @@ -75,7 +64,7 @@ __END__ # # Parts Copyright (C) 1995, 1996 Systemics Ltd (http://www.systemics.com/) -# New Parts Copyright (C) 2000, 2001 W3Works, LLC (http://www.w3works.com/) +# New Parts Copyright (C) 1999, 2001 W3Works, LLC (http://www.w3works.com/) # All rights reserved. # @@ -90,6 +79,9 @@ my $ciphertext = $cipher->encrypt($plaintext); my $plaintext = $cipher->decrypt($ciphertext); + You probably want to use this in conjunction with + a block chaining module like Crypt::CBC. + =head1 DESCRIPTION Blowfish is capable of strong encryption and can use key sizes up @@ -117,8 +109,8 @@ Returns the size (in bytes) of the block cipher. Crypt::Blowfish doesn't return a key size due to its ability -to use variable-length keys. (well, more accurately, it won't -as of 2.09 .. for now, it does. expect that to change) +to use variable-length keys. More accurately, it shouldn't, +but it does anyway to play nicely with others. =item new @@ -170,12 +162,7 @@ very good at this. If you're not going to encrypt more than eight bytes, your data B<must> be B<exactly> eight bytes long. If need be, do your own padding. "\0" as a null byte is perfectly -valid to use for this. Additionally, the current maintainer for -Crypt::Blowfish may or may not release Crypt::CBC_R which -replaces the default 'RandomIV' initialization vector in -Crypt::CBC with a random initialization vector. (to the limits -of /dev/urandom and associates) In either case, please email -amused@pobox.com for Crypt::CBC_R. +valid to use for this. =head1 SEE ALSO @@ -195,7 +182,7 @@ copyright of Systemics Ltd ( http://www.systemics.com/ ). Code revisions, updates, and standalone release are copyright -1999-2001 W3Works, LLC. +1999-2010 W3Works, LLC. =head1 AUTHOR diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Crypt-Blowfish-2.10/Changes new/Crypt-Blowfish-2.12/Changes --- old/Crypt-Blowfish-2.10/Changes 2005-12-02 13:43:50.000000000 +0100 +++ new/Crypt-Blowfish-2.12/Changes 2010-03-04 20:40:23.000000000 +0100 @@ -1,4 +1,12 @@ Revision history for Perl extension Crypt::Blowfish. + +2.12 04 Mar 2010 + - updated Changes to mesh with revision. + +2.11 Feb 2010 + - patched _blowfish.c to stop spurious warnings. + - updated POD + 2.10 Fri Dec 02 07:36:18 EST 2005 - updated the README file to remove the reference to CBC_R - no longer available. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Crypt-Blowfish-2.10/META.yml new/Crypt-Blowfish-2.12/META.yml --- old/Crypt-Blowfish-2.10/META.yml 2005-12-02 13:44:24.000000000 +0100 +++ new/Crypt-Blowfish-2.12/META.yml 2010-03-04 20:40:48.000000000 +0100 @@ -1,10 +1,12 @@ -# http://module-build.sourceforge.net/META-spec.html -#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX# -name: Crypt-Blowfish -version: 2.10 -version_from: Blowfish.pm -installdirs: site -requires: - -distribution_type: module -generated_by: ExtUtils::MakeMaker version 6.30 +--- #YAML:1.0 +name: Crypt-Blowfish +version: 2.12 +abstract: ~ +license: ~ +author: ~ +generated_by: ExtUtils::MakeMaker version 6.42 +distribution_type: module +requires: +meta-spec: + url: http://module-build.sourceforge.net/META-spec-v1.3.html + version: 1.3 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Crypt-Blowfish-2.10/README new/Crypt-Blowfish-2.12/README --- old/Crypt-Blowfish-2.10/README 2005-12-02 13:44:15.000000000 +0100 +++ new/Crypt-Blowfish-2.12/README 2010-02-15 19:21:13.000000000 +0100 @@ -1,4 +1,4 @@ -This is Crypt::Blowfish version 2.09, an XS-based implementation of the +This is Crypt::Blowfish version 2.11, an XS-based implementation of the Blowfish cryptography algorithm designed by Bruce Schneier. It's designed to take full advantage of Crypt::CBC when desired. Blowfish keys may be up to 448 bits (56 bytes) long. This module builds on nearly every platform @@ -55,10 +55,27 @@ Crypt::Blowfish_PP module - the Pure Perl implimentation. Thanks to Thomas Kratz for the Win32 fixup and VMS report. +Thanks to Sandro Bonazzola for prompting code cleanup. + Performance ----------- +Typical results on a P4 3.0GHz Linux machine: +Under: Perl-v5.10.0: +Running standard mode speed tests.. encrypting with non-cached cipher +5,000 cycles: 0 wallclock secs ( 0.36 usr + 0.00 sys = 0.36 CPU) + +Running standard mode speed tests.. decrypting with non-cached cipher +5,000 cycles: 1 wallclock secs ( 0.35 usr + 0.00 sys = 0.35 CPU) + +Running standard mode speed tests.. encrypting with cached cipher +10,000 cycles: 0 wallclock secs ( 0.05 usr + 0.00 sys = 0.05 CPU) + +Running standard mode speed tests.. decrypting with cached cipher +10,000 cycles: 0 wallclock secs ( 0.04 usr + 0.00 sys = 0.04 CPU) + + Typical results on a PII-400 Linux machine: Under Perl-5.005_03: Running standard mode speed tests.. encrypting with non-cached cipher diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Crypt-Blowfish-2.10/_blowfish.c new/Crypt-Blowfish-2.12/_blowfish.c --- old/Crypt-Blowfish-2.10/_blowfish.c 2000-02-12 10:26:12.000000000 +0100 +++ new/Crypt-Blowfish-2.12/_blowfish.c 2010-02-15 18:47:06.000000000 +0100 @@ -16,21 +16,20 @@ /* File: bf.c Blowfish cipher by Bruce Schneier, Code by Bryan Olson, based partly on Schneier's. + Improvements and ongoing mantenance by Dave Paris */ +#include <string.h> /* Define IntU32 to be an unsigned in 32 bits long */ typedef unsigned int IntU32 ; typedef unsigned char IntU8 ; #define NROUNDS 16 - - /* Define IntP to be an integer which is the same size as a pointer. */ typedef unsigned long IntP ; - typedef struct { IntU32 p[2][NROUNDS+2], @@ -324,8 +323,6 @@ r ^= ( (sub(S[0],l>>22 & 0x3fc) + sub(S[1],l>>14 & 0x3fc)) \ ^ sub(S[2],l>>6 & 0x3fc) ) +S[3][l & 0xff] - - /* This function requires the block to be two 32 bit integers, in whatever endian form the machine uses. On little endian machines use crypt_8bytes() on user data. make_bfkey should call crypt_block @@ -425,7 +422,7 @@ /* Test init data. */ if( checksum != 0x55861a61 ) { - strcpy((char *)bfkey, "Bad initialization data"); + strncpy((char *)bfkey, "Bad initialization data",24); return -1; } @@ -440,10 +437,9 @@ crypt_block( dspace, bfkey, 1 ) ; if( (checksum!=0xaafe4ebd) || dspace[0] || dspace[1] ) { - strcpy((char *)bfkey, "Error in crypt_block routine"); + strncpy((char *)bfkey, "Error in crypt_block routine",29); return -1; } - /* Xor key string into encryption key vector */ j = 0 ; @@ -456,7 +452,6 @@ (bfkey->p)[0][i] ^= data; } - for (i = 0 ; i<NROUNDS+2 ; i+=2) { crypt_block( dspace, bfkey, 0 ) ; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@Hilbert.suse.de