Lines Matching refs:cipher
60 const struct sshcipher *cipher; member
233 if (cc == NULL || cc->cipher == NULL) in cipher_warning_message()
240 cipher_init(struct sshcipher_ctx **ccp, const struct sshcipher *cipher, in cipher_init() argument
255 cc->plaintext = (cipher->flags & CFLAG_NONE) != 0; in cipher_init()
258 if (keylen < cipher->key_len || in cipher_init()
259 (iv != NULL && ivlen < cipher_ivlen(cipher))) { in cipher_init()
264 cc->cipher = cipher; in cipher_init()
265 if ((cc->cipher->flags & CFLAG_CHACHAPOLY) != 0) { in cipher_init()
270 if ((cc->cipher->flags & CFLAG_NONE) != 0) { in cipher_init()
275 if ((cc->cipher->flags & CFLAG_AESCTR) != 0) { in cipher_init()
284 type = (*cipher->evptype)(); in cipher_init()
294 if (cipher_authlen(cipher) && in cipher_init()
342 if ((cc->cipher->flags & CFLAG_CHACHAPOLY) != 0) { in cipher_crypt()
346 if ((cc->cipher->flags & CFLAG_NONE) != 0) { in cipher_crypt()
351 if ((cc->cipher->flags & CFLAG_AESCTR) != 0) { in cipher_crypt()
363 if (authlen != cipher_authlen(cc->cipher)) in cipher_crypt()
381 if (len % cc->cipher->block_size) in cipher_crypt()
405 if ((cc->cipher->flags & CFLAG_CHACHAPOLY) != 0) in cipher_get_length()
419 if ((cc->cipher->flags & CFLAG_CHACHAPOLY) != 0) { in cipher_free()
422 } else if ((cc->cipher->flags & CFLAG_AESCTR) != 0) in cipher_free()
435 const struct sshcipher *c = cc->cipher; in cipher_get_keyiv()
439 if ((cc->cipher->flags & CFLAG_CHACHAPOLY) != 0) { in cipher_get_keyiv()
444 if ((cc->cipher->flags & CFLAG_AESCTR) != 0) { in cipher_get_keyiv()
450 if ((cc->cipher->flags & CFLAG_NONE) != 0) in cipher_get_keyiv()
474 const struct sshcipher *c = cc->cipher; in cipher_set_keyiv()
478 if ((cc->cipher->flags & CFLAG_CHACHAPOLY) != 0) in cipher_set_keyiv()
480 if ((cc->cipher->flags & CFLAG_NONE) != 0) in cipher_set_keyiv()