Loading...
Searching...
No Matches
psa_ecc.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2021 HAW Hamburg
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser
5 * General Public License v2.1. See the file LICENSE in the top level
6 * directory for more details.
7 */
8
21#ifndef PSA_ECC_H
22#define PSA_ECC_H
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28#include "psa/crypto.h"
29#include "kernel_defines.h"
30
44 uint8_t *priv_key_buffer, uint8_t *pub_key_buffer,
45 size_t *priv_key_buffer_length,
46 size_t *pub_key_buffer_length);
47
66 const uint8_t *key_buffer, size_t key_buffer_size,
67 const uint8_t *hash, size_t hash_length,
68 uint8_t *signature, size_t signature_size,
69 size_t *signature_length);
70
89 const uint8_t *key_buffer, size_t key_buffer_size,
90 const uint8_t *input, size_t input_length,
91 uint8_t *signature, size_t signature_size,
92 size_t *signature_length);
93
110 psa_algorithm_t alg,
111 const uint8_t *key_buffer, size_t key_buffer_size,
112 const uint8_t *hash, size_t hash_length,
113 const uint8_t *signature, size_t signature_length);
114
131 psa_algorithm_t alg,
132 const uint8_t *key_buffer, size_t key_buffer_size,
133 const uint8_t *input, size_t input_length,
134 const uint8_t *signature, size_t signature_length);
135
149 uint8_t *priv_key_buffer, uint8_t *pub_key_buffer,
150 size_t *priv_key_buffer_length,
151 size_t *pub_key_buffer_length);
152
170 psa_algorithm_t alg,
171 const uint8_t *key_buffer, size_t key_buffer_size,
172 const uint8_t *hash, size_t hash_length,
173 uint8_t *signature, size_t signature_size,
174 size_t *signature_length);
175
193 psa_algorithm_t alg,
194 const uint8_t *key_buffer, size_t key_buffer_size,
195 const uint8_t *input, size_t input_length,
196 uint8_t *signature, size_t signature_size,
197 size_t *signature_length);
198
215 psa_algorithm_t alg,
216 const uint8_t *key_buffer, size_t key_buffer_size,
217 const uint8_t *hash, size_t hash_length,
218 const uint8_t *signature, size_t signature_length);
219
236 psa_algorithm_t alg,
237 const uint8_t *key_buffer, size_t key_buffer_size,
238 const uint8_t *input, size_t input_length,
239 const uint8_t *signature, size_t signature_length);
240
252psa_status_t psa_generate_ecc_ed25519_key_pair( uint8_t *priv_key_buffer, uint8_t *pub_key_buffer,
253 size_t *priv_key_buffer_length,
254 size_t *pub_key_buffer_length);
255
265psa_status_t psa_derive_ecc_ed25519_public_key( const uint8_t *priv_key_buffer, uint8_t *pub_key_buffer,
266 size_t priv_key_buffer_length,
267 size_t *pub_key_buffer_length);
268
285psa_status_t psa_ecc_ed25519_sign_message(const uint8_t *priv_key_buffer,
286 size_t priv_key_buffer_size,
287 const uint8_t *pub_key_buffer,
288 size_t pub_key_buffer_size,
289 const uint8_t *input, size_t input_length,
290 uint8_t *signature, size_t signature_size,
291 size_t *signature_length);
292
306psa_status_t psa_ecc_ed25519_verify_message(const uint8_t *key_buffer, size_t key_buffer_size,
307 const uint8_t *input, size_t input_length,
308 const uint8_t *signature, size_t signature_length);
309
310#ifdef __cplusplus
311}
312#endif
313
314#endif /* PSA_ECC_H */
uint32_t psa_algorithm_t
Encoding of a cryptographic algorithm.
Definition algorithm.h:39
Function declarations for PSA Crypto.
psa_status_t psa_ecc_p192r1_sign_message(const psa_key_attributes_t *attributes, psa_algorithm_t alg, const uint8_t *key_buffer, size_t key_buffer_size, const uint8_t *input, size_t input_length, uint8_t *signature, size_t signature_size, size_t *signature_length)
Low level wrapper function to call a driver for an ECC hash signature with a SECP 192 R1 key.
psa_status_t psa_ecc_p256r1_verify_message(const psa_key_attributes_t *attributes, psa_algorithm_t alg, const uint8_t *key_buffer, size_t key_buffer_size, const uint8_t *input, size_t input_length, const uint8_t *signature, size_t signature_length)
Low level wrapper function to call a driver for an ECC hash verification with a SECP 256 R1 key.
psa_status_t psa_generate_ecc_p256r1_key_pair(const psa_key_attributes_t *attributes, uint8_t *priv_key_buffer, uint8_t *pub_key_buffer, size_t *priv_key_buffer_length, size_t *pub_key_buffer_length)
Low level wrapper function to call a driver for an ECC key generation with a SECP 192 R1 key.
psa_status_t psa_ecc_p256r1_sign_message(const psa_key_attributes_t *attributes, psa_algorithm_t alg, const uint8_t *key_buffer, size_t key_buffer_size, const uint8_t *input, size_t input_length, uint8_t *signature, size_t signature_size, size_t *signature_length)
Low level wrapper function to call a driver for an ECC hash signature with a SECP 256 R1 key.
psa_status_t psa_generate_ecc_ed25519_key_pair(uint8_t *priv_key_buffer, uint8_t *pub_key_buffer, size_t *priv_key_buffer_length, size_t *pub_key_buffer_length)
Low level wrapper function to call a driver for an ECC key generation with an ed25519 key.
psa_status_t psa_ecc_p192r1_verify_message(const psa_key_attributes_t *attributes, psa_algorithm_t alg, const uint8_t *key_buffer, size_t key_buffer_size, const uint8_t *input, size_t input_length, const uint8_t *signature, size_t signature_length)
Low level wrapper function to call a driver for an ECC hash verification with a SECP 192 R1 key.
psa_status_t psa_generate_ecc_p192r1_key_pair(const psa_key_attributes_t *attributes, uint8_t *priv_key_buffer, uint8_t *pub_key_buffer, size_t *priv_key_buffer_length, size_t *pub_key_buffer_length)
Low level wrapper function to call a driver for an ECC key generation with a SECP 192 R1 key.
psa_status_t psa_ecc_p192r1_sign_hash(const psa_key_attributes_t *attributes, psa_algorithm_t alg, const uint8_t *key_buffer, size_t key_buffer_size, const uint8_t *hash, size_t hash_length, uint8_t *signature, size_t signature_size, size_t *signature_length)
Low level wrapper function to call a driver for an ECC hash signature with a SECP 192 R1 key.
psa_status_t psa_ecc_ed25519_sign_message(const uint8_t *priv_key_buffer, size_t priv_key_buffer_size, const uint8_t *pub_key_buffer, size_t pub_key_buffer_size, const uint8_t *input, size_t input_length, uint8_t *signature, size_t signature_size, size_t *signature_length)
Low level wrapper function to call a driver for an ECC hash signature with an ed25519 key.
psa_status_t psa_ecc_p256r1_sign_hash(const psa_key_attributes_t *attributes, psa_algorithm_t alg, const uint8_t *key_buffer, size_t key_buffer_size, const uint8_t *hash, size_t hash_length, uint8_t *signature, size_t signature_size, size_t *signature_length)
Low level wrapper function to call a driver for an ECC hash signature with a SECP 256 R1 key.
psa_status_t psa_ecc_p256r1_verify_hash(const psa_key_attributes_t *attributes, psa_algorithm_t alg, const uint8_t *key_buffer, size_t key_buffer_size, const uint8_t *hash, size_t hash_length, const uint8_t *signature, size_t signature_length)
Low level wrapper function to call a driver for an ECC hash verification with a SECP 256 R1 key.
psa_status_t psa_ecc_ed25519_verify_message(const uint8_t *key_buffer, size_t key_buffer_size, const uint8_t *input, size_t input_length, const uint8_t *signature, size_t signature_length)
Low level wrapper function to call a driver for an ECC hash verification with a ed25519 key.
psa_status_t psa_ecc_p192r1_verify_hash(const psa_key_attributes_t *attributes, psa_algorithm_t alg, const uint8_t *key_buffer, size_t key_buffer_size, const uint8_t *hash, size_t hash_length, const uint8_t *signature, size_t signature_length)
Low level wrapper function to call a driver for an ECC hash verification with a SECP 192 R1 key.
psa_status_t psa_derive_ecc_ed25519_public_key(const uint8_t *priv_key_buffer, uint8_t *pub_key_buffer, size_t priv_key_buffer_length, size_t *pub_key_buffer_length)
Low level wrapper function to call a driver for deriving an ed25519 public key from the private key.
Common macros and compiler attributes/pragmas configuration.
int32_t psa_status_t
Status code type used for all PSA Certified APIs.
Definition error.h:41
Structure storing key attributes.
Definition attributes.h:52