| 1 | /* Copyright 2023 The ChromiumOS Authors |
| 2 | * Use of this source code is governed by a BSD-style license that can be |
| 3 | * found in the LICENSE file. |
| 4 | * |
| 5 | * SHA256 implementation using ARMv8 Cryptography Extension. |
| 6 | */ |
| 7 | |
| 8 | #include "2common.h" |
| 9 | #include "2sha.h" |
| 10 | #include "2sha_private.h" |
| 11 | #include "2api.h" |
| 12 | |
| 13 | const uint32_t vb2_hash_seq[8] = {0, 1, 2, 3, 4, 5, 6, 7}; |
| 14 | |
| 15 | int sha256_ce_transform(uint32_t *state, const unsigned char *buf, int blocks); |
| 16 | |
| 17 | void vb2_sha256_transform_hwcrypto(const uint8_t *message, |
| 18 | unsigned int block_nb) |
| 19 | { |
| 20 | if (block_nb) |
| 21 | sha256_ce_transform(vb2_sha_ctx.h, message, block_nb); |
| 22 | } |