Lines Matching refs:key

27  *    $key = \phpseclib3\Crypt\PublicKeyLoader::load('...', '(optional) password');
30 * if (!$ssh->login('username', $key)) {
63 use phpseclib3\Crypt\TripleDES; // Used to do Diffie-Hellman key exchange and DSA/RSA signature verification.
274 * some servers (eg. Azure) will support rsa-sha2-512 as a server host key algorithm but
275 * not a private key algorithm
528 * "The exchange hash H from the first key exchange is additionally
985 * Send the key exchange initiation packet first?
992 * Some versions of OpenSSH incorrectly calculate the key size
1274 * https://tools.ietf.org/html/rfc4253#section-7.1 says "key exchange begins by each sending
1287 * https://tools.ietf.org/html/rfc4253#section-7.1 says "key exchange begins by each sending
1652 // we need to decide upon the symmetric encryption algorithms before we do the diffie-hellman key exchange
1655 // diffie-hellman key exchange as fast as possible
1670 // through diffie-hellman key exchange a symmetric key is obtained
1674 throw new NoSupportedAlgorithmsException('No compatible key exchange algorithms found');
1680 throw new NoSupportedAlgorithmsException('No compatible server host key algorithms found');
1940 $key = $kexHash->hash($keyBytes . $this->exchange_hash . 'C' . $this->session_id);
1941 while ($encryptKeyLength > strlen($key)) {
1942 $key .= $kexHash->hash($keyBytes . $this->exchange_hash . $key);
1948 $this->lengthEncrypt->setKey(substr($key, 32, 32));
1950 $this->encrypt->setKey(substr($key, 0, $encryptKeyLength));
1986 $key = $kexHash->hash($keyBytes . $this->exchange_hash . 'D' . $this->session_id);
1987 while ($decryptKeyLength > strlen($key)) {
1988 $key .= $kexHash->hash($keyBytes . $this->exchange_hash . $key);
1994 $this->lengthDecrypt->setKey(substr($key, 32, 32));
1996 $this->decrypt->setKey(substr($key, 0, $decryptKeyLength));
2001 [SCHNEIER], using a 128-bit key. The first 1536 bytes of keystream
2024 $key = $kexHash->hash($keyBytes . $this->exchange_hash . 'E' . $this->session_id);
2025 while ($createKeyLength > strlen($key)) {
2026 $key .= $kexHash->hash($keyBytes . $this->exchange_hash . $key);
2028 $this->hmac_create->setKey(substr($key, 0, $createKeyLength));
2045 $key = $kexHash->hash($keyBytes . $this->exchange_hash . 'F' . $this->session_id);
2046 while ($checkKeyLength > strlen($key)) {
2047 $key .= $kexHash->hash($keyBytes . $this->exchange_hash . $key);
2049 $this->hmac_check->setKey(substr($key, 0, $checkKeyLength));
2060 * Maps an encryption algorithm name to the number of key bytes.
2277 foreach ($args as $key => $arg) {
2280 unset($args[$key]);
2298 foreach ($args as $key => $arg) {
2307 foreach ($args as $key => $arg) {
2309 unset($args[$key]);
2547 foreach ($responses[$i] as $key => $value) {
2548 $this->keyboard_requests_responses[$key] = $value;
2561 foreach ($this->keyboard_requests_responses as $key => $value) {
2562 if (substr($prompt, 0, strlen($key)) == $key) {
2617 * Login with an ssh-agent provided key
2627 foreach ($keys as $key) {
2628 if ($this->privatekey_login($username, $key)) {
2637 * Login with an RSA private key
2703 throw new UnsupportedAlgorithmException('Please use either an RSA key, an EC one or a DSA key');
2734 // we'll just take it on faith that the public key blob and the public key algorithm name are as
3840 // this is here for key re-exchanges after the initial key exchange
4659 foreach ($arg as $key => $value) {
4661 define($value, $key);
4865 * Returns a list of host key algorithms that phpseclib supports
4884 * Returns a list of symmetric key algorithms that phpseclib supports
4899 //'arcfour', // OPTIONAL the ARCFOUR stream cipher with a 128-bit key
4902 'aes128-ctr', // RECOMMENDED AES (Rijndael) in SDCTR mode, with 128-bit key
4903 'aes192-ctr', // RECOMMENDED AES with 192-bit key
4904 'aes256-ctr', // RECOMMENDED AES with 256-bit key
4916 'twofish128-ctr', // OPTIONAL Twofish in SDCTR mode, with 128-bit key
4917 'twofish192-ctr', // OPTIONAL Twofish with 192-bit key
4918 'twofish256-ctr', // OPTIONAL Twofish with 256-bit key
4920 'aes128-cbc', // RECOMMENDED AES with a 128-bit key
4921 'aes192-cbc', // OPTIONAL AES with a 192-bit key
4922 'aes256-cbc', // OPTIONAL AES in CBC mode, with a 256-bit key
4924 'twofish128-cbc', // OPTIONAL Twofish with a 128-bit key
4925 'twofish192-cbc', // OPTIONAL Twofish with a 192-bit key
4934 '3des-ctr', // RECOMMENDED Three-key 3DES in SDCTR mode
4936 '3des-cbc', // REQUIRED three-key 3DES in CBC mode
5002 'hmac-sha2-256',// RECOMMENDED HMAC-SHA256 (digest length = key length = 32)
5003 'hmac-sha2-512',// OPTIONAL HMAC-SHA512 (digest length = key length = 64)
5009 'hmac-sha1-96', // RECOMMENDED first 96 bits of HMAC-SHA1 (digest length = 12, key length = 20)
5010 'hmac-sha1', // REQUIRED HMAC-SHA1 (digest length = key length = 20)
5011 'hmac-md5-96', // OPTIONAL first 96 bits of HMAC-MD5 (digest length = 12, key length = 16)
5012 'hmac-md5', // OPTIONAL HMAC-MD5 (digest length = key length = 16)
5108 foreach ($keys as $key) {
5109 if (isset($preferred[$key])) {
5110 $a = &$preferred[$key];
5142 foreach ($keys as $key) {
5146 $subkeys = explode('/', $key);
5181 * Returns the server public host key.
5184 * is recommended. Returns false if the server signature is not signed correctly with the public host key.
5188 * @throws \phpseclib3\Exception\NoSupportedAlgorithmsException when the key isn't in a supported format
5212 $key = EC::loadFormat('OpenSSH', $server_public_host_key)
5227 $key = $key->withHash($hash);
5230 $key = DSA::loadFormat('OpenSSH', $server_public_host_key)
5242 $key = RSA::loadFormat('OpenSSH', $server_public_host_key)
5255 $key = $key->withHash($hash);
5262 if (!$key->verify($this->exchange_hash, $signature)) {
5387 foreach (self::$connections as $key => $ref) {
5388 $temp[$key] = $ref->get();