Re: attempt to use an empty IV with mcrypt
| From: | Christian Reiniger | Date: | Mon, 05 Feb 2001 10:35:07 +0000 |
| Subject: | Re: attempt to use an empty IV with mcrypt | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-38201@lists.php.net to get a copy of this message | ||
On Monday 05 February 2001 06:13, twm139@its.to wrote:
> I get the following warning when I turn on logging...
>
>
> Warning: attempt to use an empty IV, which is NOT recommend in
> /home/local/apache/htdocs/encrypt.php on line 21
>
>
> Here is the code
and which line is Nr. 21?
> $key = "testing";
> $input = "Secret data";
>
> $encrypted_data = mcrypt_ecb (MCRYPT_DES, $key, $input,
> MCRYPT_ENCRYPT);
>
> print "The CypherText in DES ECB is <BR>".bin2hex
> ($encrypted_data)."\n<br>";
>
>
> $encrypted_data = mcrypt_ecb (MCRYPT_TWOFISH, $key, $input,
> MCRYPT_ENCRYPT);
>
> print "The CypherText in TWOFISH ECB is <BR>".bin2hex
> ($encrypted_data)."\n<br>";
>
> $encrypted_data = mcrypt_cbc (MCRYPT_TWOFISH, $key, $input,
> MCRYPT_ENCRYPT);
>
> print "The CypherText in TWOFISH CBC is <BR>".bin2hex
> ($encrypted_data)."\n<br>";
>
> ?>
--
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)
Pretty cool, the kind of power information technology puts in our hands
these days.
- Securityfocus on probing 36000000 hosts for known problems in 3 weeks