From d20b09e533f7190284df1f60c60b9430f7ba0dd5 Mon Sep 17 00:00:00 2001 From: Yi Chou Date: Fri, 5 May 2023 10:18:41 +0800 Subject: boringssl: Add elliptic curve key helpers BUG=b:248508087 TEST=make V=1 BOARD=bloonchipper -j TEST=./test/run_device_tests.py --board bloonchipper -t boringssl_crypto => PASS TEST=./test/run_device_tests.py --board dartmonkey -t boringssl_crypto => PASS Change-Id: Ifdca7743c09910d413407be986e9d959e5b90479 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4505560 Tested-by: Yi Chou Commit-Queue: Yi Chou Reviewed-by: Tom Hughes --- include/crypto/elliptic_curve_key.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 include/crypto/elliptic_curve_key.h (limited to 'include/crypto/elliptic_curve_key.h') diff --git a/include/crypto/elliptic_curve_key.h b/include/crypto/elliptic_curve_key.h new file mode 100644 index 0000000000..1e56f5d428 --- /dev/null +++ b/include/crypto/elliptic_curve_key.h @@ -0,0 +1,20 @@ +/* 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. + */ + +/* Helpers for the boringssl elliptic curve key interface. */ + +#ifndef __CROS_EC_ELLIPTIC_CURVE_KEY_H +#define __CROS_EC_ELLIPTIC_CURVE_KEY_H + +#include "openssl/ec_key.h" +#include "openssl/mem.h" + +/** + * Generate a p256 ECC key. + * @return key on success, nullptr on failure + */ +bssl::UniquePtr generate_elliptic_curve_key(); + +#endif /* __CROS_EC_ELLIPTIC_CURVE_KEY_H */ -- cgit v1.2.1