Lines Matching refs:cipher
64 const struct sshcipher *cipher; member
239 if (cc == NULL || cc->cipher == NULL) in cipher_warning_message()
246 cipher_init(struct sshcipher_ctx **ccp, const struct sshcipher *cipher, in cipher_init() argument
261 cc->plaintext = (cipher->flags & CFLAG_NONE) != 0; in cipher_init()
264 if (keylen < cipher->key_len || in cipher_init()
265 (iv != NULL && ivlen < cipher_ivlen(cipher))) { in cipher_init()
270 cc->cipher = cipher; in cipher_init()
271 if ((cc->cipher->flags & CFLAG_CHACHAPOLY) != 0) { in cipher_init()
276 if ((cc->cipher->flags & CFLAG_NONE) != 0) { in cipher_init()
281 if ((cc->cipher->flags & CFLAG_AESCTR) != 0) { in cipher_init()
290 type = (*cipher->evptype)(); in cipher_init()
300 if (cipher_authlen(cipher) && in cipher_init()
348 if ((cc->cipher->flags & CFLAG_CHACHAPOLY) != 0) { in cipher_crypt()
352 if ((cc->cipher->flags & CFLAG_NONE) != 0) { in cipher_crypt()
357 if ((cc->cipher->flags & CFLAG_AESCTR) != 0) { in cipher_crypt()
369 if (authlen != cipher_authlen(cc->cipher)) in cipher_crypt()
387 if (len % cc->cipher->block_size) in cipher_crypt()
411 if ((cc->cipher->flags & CFLAG_CHACHAPOLY) != 0) in cipher_get_length()
425 if ((cc->cipher->flags & CFLAG_CHACHAPOLY) != 0) { in cipher_free()
428 } else if ((cc->cipher->flags & CFLAG_AESCTR) != 0) in cipher_free()
441 const struct sshcipher *c = cc->cipher; in cipher_get_keyiv()
445 if ((cc->cipher->flags & CFLAG_CHACHAPOLY) != 0) { in cipher_get_keyiv()
450 if ((cc->cipher->flags & CFLAG_AESCTR) != 0) { in cipher_get_keyiv()
456 if ((cc->cipher->flags & CFLAG_NONE) != 0) in cipher_get_keyiv()
481 const struct sshcipher *c = cc->cipher; in cipher_set_keyiv()
485 if ((cc->cipher->flags & CFLAG_CHACHAPOLY) != 0) in cipher_set_keyiv()
487 if ((cc->cipher->flags & CFLAG_NONE) != 0) in cipher_set_keyiv()