1Crypt::Stream::Sober128U(s3e)r Contributed Perl DocumentaCtriyopnt::Stream::Sober128(3)
2
3
4

NAME

6       Crypt::Stream::Sober128 - Stream cipher Sober128
7

SYNOPSIS

9          use Crypt::Stream::Sober128;
10
11          # encrypt
12          $key = "1234567890123456";
13          $iv  = "123456789012";
14          $stream = Crypt::Stream::Sober128->new($key, $iv);
15          $ct = $stream->crypt("plain message");
16
17          # decrypt
18          $key = "1234567890123456";
19          $iv  = "123456789012";
20          $stream = Crypt::Stream::Sober128->new($key, $iv);
21          $pt = $stream->crypt($ct);
22

DESCRIPTION

24       Provides an interface to the Sober128 stream cipher.
25

METHODS

27   new
28        $stream = Crypt::Stream::Sober128->new($key, $iv);
29        # $key .. keylen must be multiple of 4 bytes
30        # $iv  .. ivlen must be multiple of 4 bytes
31
32   crypt
33        $ciphertext = $stream->crypt($plaintext);
34        #or
35        $plaintext = $stream->crypt($ciphertext);
36
37   keystream
38        $random_key = $stream->keystream($length);
39
40   clone
41        $stream->clone();
42

SEE ALSO

44       •   Crypt::Stream::RC4, Crypt::Stream::ChaCha, Crypt::Stream::Salsa20,
45           Crypt::Stream::Sosemanuk
46
47       •   <https://en.wikipedia.org/wiki/SOBER-128>
48
49
50
51perl v5.36.1                      2023-10-04        Crypt::Stream::Sober128(3)
Impressum