summaryrefslogtreecommitdiff
path: root/firmware/2lib/2sha256_arm.c
blob: 556cd5c125833a9f61c28f527249df289b14be44 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* Copyright 2023 The ChromiumOS Authors
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 *
 * SHA256 implementation using ARMv8 Cryptography Extension.
 */

#include "2common.h"
#include "2sha.h"
#include "2sha_private.h"
#include "2api.h"

const uint32_t vb2_hash_seq[8] = {0, 1, 2, 3, 4, 5, 6, 7};

int sha256_ce_transform(uint32_t *state, const unsigned char *buf, int blocks);

void vb2_sha256_transform_hwcrypto(const uint8_t *message,
				   unsigned int block_nb)
{
	sha256_ce_transform(vb2_sha_ctx.h, message, block_nb);
}