Skip to content

Commit f82d071

Browse files
committed
No longer creating a non-0-length initialization
vector for the DES-ECB cipher
1 parent 5dced2b commit f82d071

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

src/Robin/Ntlm/Message/NtlmV1AuthenticateMessageEncoder.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -322,14 +322,11 @@ public function calculateChallengeResponseData(HashCredentialInterface $hash_cre
322322
$binary_data = array_reduce(
323323
$key_blocks,
324324
function ($result, $key_block) use ($data) {
325-
// Generate an initialization vector equal to the length of the nonce
326-
$initialization_vector = $this->random_byte_generator->generate(strlen($data));
327-
328325
return $result . $this->des_encrypter->encrypt(
329326
$key_block,
330327
$data,
331328
CipherMode::ECB,
332-
$initialization_vector
329+
'' // DES-ECB expects a 0-byte-length initialization vector
333330
);
334331
},
335332
''

0 commit comments

Comments
 (0)