Lines Matching refs:v

151     const struct ige_test *const v = &ige_test_vectors[n];  in test_ige_vectors()  local
157 if (!TEST_int_le(v->length, MAX_VECTOR_SIZE)) in test_ige_vectors()
160 if (v->encrypt == AES_ENCRYPT) in test_ige_vectors()
161 AES_set_encrypt_key(v->key, 8 * sizeof(v->key), &key); in test_ige_vectors()
163 AES_set_decrypt_key(v->key, 8 * sizeof(v->key), &key); in test_ige_vectors()
164 memcpy(iv, v->iv, sizeof(iv)); in test_ige_vectors()
165 AES_ige_encrypt(v->in, buf, v->length, &key, iv, v->encrypt); in test_ige_vectors()
167 if (!TEST_mem_eq(v->out, v->length, buf, v->length)) { in test_ige_vectors()
169 test_output_memory("key", v->key, sizeof(v->key)); in test_ige_vectors()
170 test_output_memory("iv", v->iv, sizeof(v->iv)); in test_ige_vectors()
171 test_output_memory("in", v->in, v->length); in test_ige_vectors()
176 memcpy(iv, v->iv, sizeof(iv)); in test_ige_vectors()
177 memcpy(buf, v->in, v->length); in test_ige_vectors()
178 AES_ige_encrypt(buf, buf, v->length, &key, iv, v->encrypt); in test_ige_vectors()
180 if (!TEST_mem_eq(v->out, v->length, buf, v->length)) { in test_ige_vectors()
182 test_output_memory("key", v->key, sizeof(v->key)); in test_ige_vectors()
183 test_output_memory("iv", v->iv, sizeof(v->iv)); in test_ige_vectors()
184 test_output_memory("in", v->in, v->length); in test_ige_vectors()
193 const struct bi_ige_test *const v = &bi_ige_test_vectors[n]; in test_bi_ige_vectors() local
198 if (!TEST_int_le(v->length, MAX_VECTOR_SIZE)) in test_bi_ige_vectors()
201 if (v->encrypt == AES_ENCRYPT) { in test_bi_ige_vectors()
202 AES_set_encrypt_key(v->key1, 8 * v->keysize, &key1); in test_bi_ige_vectors()
203 AES_set_encrypt_key(v->key2, 8 * v->keysize, &key2); in test_bi_ige_vectors()
205 AES_set_decrypt_key(v->key1, 8 * v->keysize, &key1); in test_bi_ige_vectors()
206 AES_set_decrypt_key(v->key2, 8 * v->keysize, &key2); in test_bi_ige_vectors()
209 AES_bi_ige_encrypt(v->in, buf, v->length, &key1, &key2, v->iv, in test_bi_ige_vectors()
210 v->encrypt); in test_bi_ige_vectors()
212 if (!TEST_mem_eq(v->out, v->length, buf, v->length)) { in test_bi_ige_vectors()
213 test_output_memory("key 1", v->key1, sizeof(v->key1)); in test_bi_ige_vectors()
214 test_output_memory("key 2", v->key2, sizeof(v->key2)); in test_bi_ige_vectors()
215 test_output_memory("iv", v->iv, sizeof(v->iv)); in test_bi_ige_vectors()
216 test_output_memory("in", v->in, v->length); in test_bi_ige_vectors()