Lines Matching refs:decrypt

385     private $decrypt = false;
1656 $decrypt = self::array_intersect_first($s2c_encryption_algorithms, $this->encryption_algorithms_server_to_client);
1657 $decryptKeyLength = $this->encryption_algorithm_to_key_size($decrypt);
1954 $this->decrypt = self::encryption_algorithm_to_crypt_instance($decrypt);
1955 if ($this->decrypt) {
1957 $this->decrypt->setPreferredEngine(self::$crypto_engine);
1959 if ($this->decrypt->getBlockLengthInBytes()) {
1960 $this->decrypt_block_size = $this->decrypt->getBlockLengthInBytes();
1962 $this->decrypt->disablePadding();
1964 if ($this->decrypt->usesIV()) {
1969 $this->decrypt->setIV(substr($iv, 0, $this->decrypt_block_size));
1972 switch ($decrypt) {
1983 $this->decrypt->enableContinuousBuffer();
1990 switch ($decrypt) {
1993 $this->lengthDecrypt = self::encryption_algorithm_to_crypt_instance($decrypt);
1996 $this->decrypt->setKey(substr($key, 0, $decryptKeyLength));
1997 $this->decryptName = $decrypt;
2010 if ($decrypt == 'arcfour128' || $decrypt == 'arcfour256') {
2011 $this->decrypt->decrypt(str_repeat("\0", 1536));
2033 if (!$this->decrypt->usesNonce()) {
3484 $this->decrypt = $this->encrypt = false;
3576 if ($this->decrypt) {
3580 $this->decrypt->setNonce(
3585 $this->decrypt->setAAD($temp = Strings::shift($raw, 4));
3594 $this->decrypt->setTag($tag);
3595 $raw = $this->decrypt->decrypt($raw);
3601 if (!($this->decrypt instanceof ChaCha20)) {
3602 throw new \LogicException('$this->decrypt is not a ' . ChaCha20::class);
3608 $temp = $this->lengthDecrypt->decrypt($aad = Strings::shift($raw, 4));
3618 $this->decrypt->setNonce($nonce);
3619 $this->decrypt->setCounter(0);
3623 $this->decrypt->setPoly1305Key(
3624 $this->decrypt->encrypt(str_repeat("\0", 32))
3626 $this->decrypt->setAAD($aad);
3627 $this->decrypt->setCounter(1);
3628 $this->decrypt->setTag($tag);
3629 $raw = $this->decrypt->decrypt($raw);
3635 $raw = $this->decrypt->decrypt($raw);
3645 $raw = $temp . $this->decrypt->decrypt($raw);
3670 $raw .= $this->decrypt ? $this->decrypt->decrypt($buffer) : $buffer;
3765 if ($this->decrypt) {
3781 if (!$this->bad_key_size_fix && self::bad_algorithm_candidate($this->decrypt ? $this->decryptName : '') && !($this->bitmap & SSH2::MASK_LOGIN)) {