ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Crypt-Spritz/Spritz.pm
(Generate patch)

Comparing Crypt-Spritz/Spritz.pm (file contents):
Revision 1.8 by root, Sat Jan 10 09:36:01 2015 UTC vs.
Revision 1.13 by root, Tue Jun 30 01:24:43 2015 UTC

80 80
81package Crypt::Spritz; 81package Crypt::Spritz;
82 82
83use XSLoader; 83use XSLoader;
84 84
85$VERSION = '0.1'; 85$VERSION = 1.01;
86 86
87XSLoader::load __PACKAGE__, $VERSION; 87XSLoader::load __PACKAGE__, $VERSION;
88 88
89@Crypt::Spritz::ISA = Crypt::Spritz::Base::; 89@Crypt::Spritz::ISA = Crypt::Spritz::Base::;
90 90
117 117
118=head2 THE Crypt::Spritz CLASS 118=head2 THE Crypt::Spritz CLASS
119 119
120This class implements most of the Spritz primitives. To use it effectively 120This class implements most of the Spritz primitives. To use it effectively
121you should understand them, for example, by reading the L<Spritz 121you should understand them, for example, by reading the L<Spritz
122paper/http://people.csail.mit.edu/rivest/pubs/RS14.pdf>, especially 122paper|http://people.csail.mit.edu/rivest/pubs/RS14.pdf>, especially
123pp. 5-6. 123pp. 5-6.
124 124
125The Spritz primitive corresponding to the Perl method is given as 125The Spritz primitive corresponding to the Perl method is given as
126comment. 126comment.
127 127
637limitations on usage. 637limitations on usage.
638 638
639=back 639=back
640 640
641 641
642=head1 SECURITY CONSIDERATIONS
643
644At the time of this writing, Spritz has not been through a lot of
645cryptanalysis - it might get broken tomorrow. That's true for any crypto
646algo, but the probability is quite a bit higher with Spritz. Having said
647that, Spritz is almost certainly safer than RC4 at this time.
648
649Nevertheless, I wouldn't protect something very expensive with it. I also
650would be careful about timing attacks.
651
652Regarding key lengths - as has been pointed out, traditional symmetric key
653lengths (128 bit, 256 bit) work fine. Longer keys will be overkill, but
654you can expect keys up to about a kilobit to be effective. Longer keys are
655safe to use, they will simply be a waste of time.
656
657
658=head1 PERFORMANCE
659
660As a cipher/prng, Spritz is reasonably fast (about 100MB/s on 2014 era
661hardware, for comparison, AES will be more like 200MB/s).
662
663For key setup, ivs, hashing, nonces and so on, Spritz is very slow (about
6645MB/s on 2014 era hardware, which does SHA-256 at about 200MB/s).
665
666
667=head1 SUPPORT FOR THE PERL MULTICORE SPECIFICATION
668
669This module supports the perl multicore specification
670(L<http://perlmulticore.schmorp.de/>) for all encryption/decryption
671(non-aead > 4000 octets, aead > 400 octets), hashing/absorbing (> 400
672octets) and squeezing/prng (> 4000 octets) functions.
673
674
642=head1 SEE ALSO 675=head1 SEE ALSO
643 676
644L<http://people.csail.mit.edu/rivest/pubs/RS14.pdf>. 677L<http://people.csail.mit.edu/rivest/pubs/RS14.pdf>.
645 678
646=head1 SECURITY CONSIDERATIONS 679=head1 SECURITY CONSIDERATIONS

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines