Lines Matching refs:blocksize

101     size_t i, blocksize;  in _krb5_evp_encrypt_cts()  local
109 blocksize = EVP_CIPHER_CTX_block_size(c); in _krb5_evp_encrypt_cts()
111 if (len < blocksize) { in _krb5_evp_encrypt_cts()
115 } else if (len == blocksize) { in _krb5_evp_encrypt_cts()
129 i = ((len - 1) / blocksize) * blocksize; in _krb5_evp_encrypt_cts()
131 p += i - blocksize; in _krb5_evp_encrypt_cts()
133 memcpy(ivec2, p, blocksize); in _krb5_evp_encrypt_cts()
136 tmp[i] = p[i + blocksize] ^ ivec2[i]; in _krb5_evp_encrypt_cts()
137 for (; i < blocksize; i++) in _krb5_evp_encrypt_cts()
141 EVP_Cipher(c, p, tmp, blocksize); in _krb5_evp_encrypt_cts()
143 memcpy(p + blocksize, ivec2, len); in _krb5_evp_encrypt_cts()
145 memcpy(ivec, p, blocksize); in _krb5_evp_encrypt_cts()
150 if (len > blocksize * 2) { in _krb5_evp_encrypt_cts()
152 i = ((((len - blocksize * 2) + blocksize - 1) / blocksize) * blocksize); in _krb5_evp_encrypt_cts()
153 memcpy(ivec2, p + i - blocksize, blocksize); in _krb5_evp_encrypt_cts()
156 len -= i + blocksize; in _krb5_evp_encrypt_cts()
159 memcpy(ivec2, ivec, blocksize); in _krb5_evp_encrypt_cts()
161 memcpy(ivec2, zero_ivec, blocksize); in _krb5_evp_encrypt_cts()
162 len -= blocksize; in _krb5_evp_encrypt_cts()
165 memcpy(tmp, p, blocksize); in _krb5_evp_encrypt_cts()
167 EVP_Cipher(c, tmp2, p, blocksize); in _krb5_evp_encrypt_cts()
169 memcpy(tmp3, p + blocksize, len); in _krb5_evp_encrypt_cts()
170 memcpy(tmp3 + len, tmp2 + len, blocksize - len); /* xor 0 */ in _krb5_evp_encrypt_cts()
173 p[i + blocksize] = tmp2[i] ^ tmp3[i]; in _krb5_evp_encrypt_cts()
176 EVP_Cipher(c, p, tmp3, blocksize); in _krb5_evp_encrypt_cts()
178 for (i = 0; i < blocksize; i++) in _krb5_evp_encrypt_cts()
181 memcpy(ivec, tmp, blocksize); in _krb5_evp_encrypt_cts()