Lines Matching defs:header
44 static inline int is_valid_header(struct fw_enc_hdr *header)
46 if (header->magic == ENC_HEADER_MAGIC)
142 * Encryption header is attached at the beginning of the encrypted file
157 struct fw_enc_hdr header;
168 result = io_read(backend_handle, (uintptr_t)&header, sizeof(header),
171 WARN("Failed to read encryption header (%i)\n", result);
175 if (!is_valid_header(&header)) {
176 WARN("Encryption header check failed.\n");
180 VERBOSE("Encryption header looks OK.\n");
181 fw_enc_status = header.flags & FW_ENC_STATUS_FLAG_MASK;
183 if ((header.iv_len > ENC_MAX_IV_SIZE) ||
184 (header.tag_len > ENC_MAX_TAG_SIZE)) {
205 result = crypto_mod_auth_decrypt(header.dec_algo,
207 key_len, key_flags, header.iv,
208 header.iv_len, header.tag,
209 header.tag_len);