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.7 by root, Sat Jan 10 09:20:24 2015 UTC vs.
Revision 1.8 by root, Sat Jan 10 09:36:01 2015 UTC

442These methods are provided for L<Crypt::CBC> compatibility and simply 442These methods are provided for L<Crypt::CBC> compatibility and simply
443return C<32> and C<64>, respectively. 443return C<32> and C<64>, respectively.
444 444
445Note that it is pointless to use Spritz with L<Crypt::CBC>, as Spritz is 445Note that it is pointless to use Spritz with L<Crypt::CBC>, as Spritz is
446not a block cipher and already provides an appropriate mode. 446not a block cipher and already provides an appropriate mode.
447
448=back
449
450
451=head2 THE Crypt::Spritz::Cipher CLASS
452
453This class is pretty much the same as the C<Crypt::Spritz::Cipher::XOR>
454class, with two differences: first, it implements the "standard" Spritz
455encryption algorithm, and second, while this variant is easier to analyze
456mathematically, there is little else to recommend it for, as it is slower,
457and requires lots of code duplication code.
458
459So unless you need to be compatible with another implementation that does
460not offer the XOR variant, stick to C<Crypt::Spritz::Cipher::XOR>.
461
462All the methods from C<Crypt::Spritz::Cipher::XOR> are available, except
463C<crypt>, which has been replaced by separate C<encrypt> and C<decrypt>
464methods:
465
466=over 4
467
468=item $encrypted = $cipher->encrypt ($cleartext)
469
470=item $cleartext = $cipher->decrypt ($encrypted)
471
472Really the same as C<Crypt::Spritz::Cipher::XOR>, except you need separate
473calls and code for encryption and decryption.
447 474
448=back 475=back
449 476
450 477
451=head2 THE Crypt::Spritz::AEAD::XOR CLASS 478=head2 THE Crypt::Spritz::AEAD::XOR CLASS
582 } 609 }
583 610
584=back 611=back
585 612
586 613
614=head2 THE Crypt::Spritz::AEAD CLASS
615
616This class is pretty much the same as the C<Crypt::Spritz::AEAD::XOR>
617class, with two differences: first, it implements the "standard" Spritz
618encryption algorithm, and second, while this variant is easier to analyze
619mathematically, there is little else to recommend it for, as it is slower,
620and requires lots of code duplication code.
621
622So unless you need to be compatible with another implementation that does
623not offer the XOR variant, stick to C<Crypt::Spritz::AEAD::XOR>.
624
625All the methods from C<Crypt::Spritz::AEAD::XOR> are available, except
626C<crypt>, which has been replaced by separate C<encrypt> and C<decrypt>
627methods:
628
629=over 4
630
631=item $encrypted = $cipher->encrypt ($cleartext)
632
633=item $cleartext = $cipher->decrypt ($encrypted)
634
635Really the same as C<Crypt::Spritz::AEAD::XOR>, except you need separate
636calls and code for encryption and decryption, but you have the same
637limitations on usage.
638
639=back
640
641
587=head1 SEE ALSO 642=head1 SEE ALSO
588 643
589L<http://people.csail.mit.edu/rivest/pubs/RS14.pdf>. 644L<http://people.csail.mit.edu/rivest/pubs/RS14.pdf>.
590 645
591=head1 SECURITY CONSIDERATIONS 646=head1 SECURITY CONSIDERATIONS

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines