Aditya Deshpande | 045b370 | 2023-02-20 17:08:30 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Driver entry points for p256-m |
| 3 | */ |
| 4 | /* |
| 5 | * Copyright The Mbed TLS Contributors |
| 6 | * SPDX-License-Identifier: Apache-2.0 |
| 7 | * |
| 8 | * Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 9 | * not use this file except in compliance with the License. |
| 10 | * You may obtain a copy of the License at |
| 11 | * |
| 12 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 13 | * |
| 14 | * Unless required by applicable law or agreed to in writing, software |
| 15 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 16 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 17 | * See the License for the specific language governing permissions and |
| 18 | * limitations under the License. |
| 19 | */ |
| 20 | |
Aditya Deshpande | e41f7e4 | 2023-01-12 16:29:02 +0000 | [diff] [blame] | 21 | #include "mbedtls/platform.h" |
| 22 | #include "p256-m_driver_entrypoints.h" |
| 23 | #include "p256-m/p256-m.h" |
| 24 | #include "psa/crypto.h" |
| 25 | #include "psa_crypto_driver_wrappers.h" |
Aditya Deshpande | 7b9934d | 2023-04-18 17:00:17 +0100 | [diff] [blame] | 26 | #include <stddef.h> |
Manuel Pégourié-Gonnard | 5424cf2 | 2023-08-07 10:56:12 +0200 | [diff] [blame] | 27 | #include <string.h> |
Aditya Deshpande | e41f7e4 | 2023-01-12 16:29:02 +0000 | [diff] [blame] | 28 | |
| 29 | #if defined(MBEDTLS_P256M_EXAMPLE_DRIVER_ENABLED) |
| 30 | |
Aditya Deshpande | 641cb89 | 2023-04-19 03:31:10 +0100 | [diff] [blame] | 31 | /* INFORMATION ON PSA KEY EXPORT FORMATS: |
| 32 | * |
| 33 | * PSA exports SECP256R1 keys in two formats: |
| 34 | * 1. Keypair format: 32 byte string which is just the private key (public key |
| 35 | * can be calculated from the private key) |
| 36 | * 2. Public Key format: A leading byte 0x04 (indicating uncompressed format), |
| 37 | * followed by the 64 byte public key. This results in a |
| 38 | * total of 65 bytes. |
| 39 | * |
| 40 | * p256-m's internal format for private keys matches PSA. Its format for public |
| 41 | * keys is only 64 bytes; the same as PSA but without the leading byte (0x04). |
| 42 | * Hence, when passing public keys from PSA to p256-m, the leading byte is |
| 43 | * removed. |
| 44 | */ |
| 45 | |
| 46 | /* Convert between p256-m and PSA error codes */ |
| 47 | static psa_status_t p256_to_psa_error(int ret) |
Aditya Deshpande | e41f7e4 | 2023-01-12 16:29:02 +0000 | [diff] [blame] | 48 | { |
Aditya Deshpande | ac363d8 | 2023-03-21 18:56:31 +0000 | [diff] [blame] | 49 | switch (ret) { |
Aditya Deshpande | e41f7e4 | 2023-01-12 16:29:02 +0000 | [diff] [blame] | 50 | case P256_SUCCESS: |
Aditya Deshpande | ac363d8 | 2023-03-21 18:56:31 +0000 | [diff] [blame] | 51 | return PSA_SUCCESS; |
Aditya Deshpande | e41f7e4 | 2023-01-12 16:29:02 +0000 | [diff] [blame] | 52 | case P256_INVALID_PUBKEY: |
| 53 | case P256_INVALID_PRIVKEY: |
Aditya Deshpande | ac363d8 | 2023-03-21 18:56:31 +0000 | [diff] [blame] | 54 | return PSA_ERROR_INVALID_ARGUMENT; |
Aditya Deshpande | e41f7e4 | 2023-01-12 16:29:02 +0000 | [diff] [blame] | 55 | case P256_INVALID_SIGNATURE: |
Aditya Deshpande | ac363d8 | 2023-03-21 18:56:31 +0000 | [diff] [blame] | 56 | return PSA_ERROR_INVALID_SIGNATURE; |
Aditya Deshpande | e41f7e4 | 2023-01-12 16:29:02 +0000 | [diff] [blame] | 57 | case P256_RANDOM_FAILED: |
| 58 | default: |
Aditya Deshpande | ac363d8 | 2023-03-21 18:56:31 +0000 | [diff] [blame] | 59 | return PSA_ERROR_GENERIC_ERROR; |
Aditya Deshpande | e41f7e4 | 2023-01-12 16:29:02 +0000 | [diff] [blame] | 60 | } |
| 61 | } |
| 62 | |
Manuel Pégourié-Gonnard | 5424cf2 | 2023-08-07 10:56:12 +0200 | [diff] [blame] | 63 | psa_status_t p256_transparent_import_key(const psa_key_attributes_t *attributes, |
| 64 | const uint8_t *data, |
| 65 | size_t data_length, |
| 66 | uint8_t *key_buffer, |
| 67 | size_t key_buffer_size, |
| 68 | size_t *key_buffer_length, |
| 69 | size_t *bits) |
| 70 | { |
| 71 | /* Check the key size */ |
| 72 | if (*bits != 0 && *bits != 256) { |
| 73 | return PSA_ERROR_NOT_SUPPORTED; |
| 74 | } |
| 75 | |
| 76 | /* Validate the key (and its type and size) */ |
| 77 | psa_key_type_t type = psa_get_key_type(attributes); |
| 78 | if (type == PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECP_R1)) { |
| 79 | if (data_length != 65) { |
| 80 | return *bits == 0 ? PSA_ERROR_NOT_SUPPORTED : PSA_ERROR_INVALID_ARGUMENT; |
| 81 | } |
| 82 | if (p256_validate_pubkey(data + 1) != P256_SUCCESS) { |
| 83 | return PSA_ERROR_INVALID_ARGUMENT; |
| 84 | } |
| 85 | } else if (type == PSA_KEY_TYPE_ECC_KEY_PAIR(PSA_ECC_FAMILY_SECP_R1)) { |
| 86 | if (data_length != 32) { |
| 87 | return *bits == 0 ? PSA_ERROR_NOT_SUPPORTED : PSA_ERROR_INVALID_ARGUMENT; |
| 88 | } |
| 89 | if (p256_validate_privkey(data) != P256_SUCCESS) { |
| 90 | return PSA_ERROR_INVALID_ARGUMENT; |
| 91 | } |
| 92 | } else { |
| 93 | return PSA_ERROR_NOT_SUPPORTED; |
| 94 | } |
| 95 | *bits = 256; |
| 96 | |
| 97 | /* We only support the export format for input, so just copy. */ |
| 98 | if (key_buffer_size < data_length) { |
| 99 | return PSA_ERROR_BUFFER_TOO_SMALL; |
| 100 | } |
| 101 | memcpy(key_buffer, data, data_length); |
| 102 | *key_buffer_length = data_length; |
| 103 | |
| 104 | return PSA_SUCCESS; |
| 105 | } |
| 106 | |
Manuel Pégourié-Gonnard | 18d7142 | 2023-08-07 11:18:05 +0200 | [diff] [blame] | 107 | psa_status_t p256_transparent_export_public_key(const psa_key_attributes_t *attributes, |
| 108 | const uint8_t *key_buffer, |
| 109 | size_t key_buffer_size, |
| 110 | uint8_t *data, |
| 111 | size_t data_size, |
| 112 | size_t *data_length) |
| 113 | { |
| 114 | /* Is this the right curve? */ |
| 115 | size_t bits = psa_get_key_bits(attributes); |
| 116 | psa_key_type_t type = psa_get_key_type(attributes); |
| 117 | if (bits != 256 || type != PSA_KEY_TYPE_ECC_KEY_PAIR(PSA_ECC_FAMILY_SECP_R1)) { |
| 118 | return PSA_ERROR_NOT_SUPPORTED; |
| 119 | } |
| 120 | |
| 121 | /* Validate input and output sizes */ |
| 122 | if (key_buffer_size != 32) { |
| 123 | return PSA_ERROR_INVALID_ARGUMENT; |
| 124 | } |
| 125 | if (data_size < 65) { |
| 126 | return PSA_ERROR_BUFFER_TOO_SMALL; |
| 127 | } |
| 128 | |
| 129 | /* Output public key in the PSA export format */ |
| 130 | data[0] = 0x04; |
| 131 | int ret = p256_public_from_private(data + 1, key_buffer); |
| 132 | if (ret != P256_SUCCESS) { |
| 133 | /* The only possible error is the private key was invalid */ |
| 134 | return PSA_ERROR_INVALID_ARGUMENT; |
| 135 | } |
| 136 | *data_length = 65; |
| 137 | |
| 138 | return PSA_SUCCESS; |
| 139 | } |
| 140 | |
Aditya Deshpande | 695e44b | 2023-01-23 14:59:29 +0000 | [diff] [blame] | 141 | psa_status_t p256_transparent_generate_key( |
Aditya Deshpande | e41f7e4 | 2023-01-12 16:29:02 +0000 | [diff] [blame] | 142 | const psa_key_attributes_t *attributes, |
| 143 | uint8_t *key_buffer, |
| 144 | size_t key_buffer_size, |
Aditya Deshpande | ac363d8 | 2023-03-21 18:56:31 +0000 | [diff] [blame] | 145 | size_t *key_buffer_length) |
Aditya Deshpande | e41f7e4 | 2023-01-12 16:29:02 +0000 | [diff] [blame] | 146 | { |
| 147 | /* We don't use this argument, but the specification mandates the signature |
| 148 | * of driver entry-points. (void) used to avoid compiler warning. */ |
| 149 | (void) attributes; |
| 150 | |
| 151 | psa_status_t status = PSA_ERROR_NOT_SUPPORTED; |
| 152 | |
| 153 | /* |
| 154 | * p256-m generates a 32 byte private key, and expects to write to a buffer |
| 155 | * that is of that size. */ |
Aditya Deshpande | ac363d8 | 2023-03-21 18:56:31 +0000 | [diff] [blame] | 156 | if (key_buffer_size != 32) { |
| 157 | return status; |
| 158 | } |
Aditya Deshpande | e41f7e4 | 2023-01-12 16:29:02 +0000 | [diff] [blame] | 159 | |
| 160 | /* |
| 161 | * p256-m's keypair generation function outputs both public and private |
| 162 | * keys. Allocate a buffer to which the public key will be written. The |
| 163 | * private key will be written to key_buffer, which is passed to this |
| 164 | * function as an argument. */ |
Aditya Deshpande | 7b9934d | 2023-04-18 17:00:17 +0100 | [diff] [blame] | 165 | uint8_t public_key_buffer[64]; |
Aditya Deshpande | e41f7e4 | 2023-01-12 16:29:02 +0000 | [diff] [blame] | 166 | |
Aditya Deshpande | 695e44b | 2023-01-23 14:59:29 +0000 | [diff] [blame] | 167 | status = p256_to_psa_error( |
Aditya Deshpande | ac363d8 | 2023-03-21 18:56:31 +0000 | [diff] [blame] | 168 | p256_gen_keypair(key_buffer, public_key_buffer)); |
| 169 | if (status == PSA_SUCCESS) { |
Aditya Deshpande | e41f7e4 | 2023-01-12 16:29:02 +0000 | [diff] [blame] | 170 | *key_buffer_length = 32; |
Aditya Deshpande | ac363d8 | 2023-03-21 18:56:31 +0000 | [diff] [blame] | 171 | } |
Aditya Deshpande | e41f7e4 | 2023-01-12 16:29:02 +0000 | [diff] [blame] | 172 | |
Aditya Deshpande | e41f7e4 | 2023-01-12 16:29:02 +0000 | [diff] [blame] | 173 | return status; |
| 174 | } |
| 175 | |
Aditya Deshpande | 695e44b | 2023-01-23 14:59:29 +0000 | [diff] [blame] | 176 | psa_status_t p256_transparent_key_agreement( |
Aditya Deshpande | e41f7e4 | 2023-01-12 16:29:02 +0000 | [diff] [blame] | 177 | const psa_key_attributes_t *attributes, |
| 178 | const uint8_t *key_buffer, |
| 179 | size_t key_buffer_size, |
| 180 | psa_algorithm_t alg, |
| 181 | const uint8_t *peer_key, |
| 182 | size_t peer_key_length, |
| 183 | uint8_t *shared_secret, |
| 184 | size_t shared_secret_size, |
Aditya Deshpande | ac363d8 | 2023-03-21 18:56:31 +0000 | [diff] [blame] | 185 | size_t *shared_secret_length) |
Aditya Deshpande | e41f7e4 | 2023-01-12 16:29:02 +0000 | [diff] [blame] | 186 | { |
| 187 | /* We don't use these arguments, but the specification mandates the |
| 188 | * sginature of driver entry-points. (void) used to avoid compiler |
| 189 | * warning. */ |
| 190 | (void) attributes; |
| 191 | (void) alg; |
| 192 | |
| 193 | /* |
| 194 | * Check that private key = 32 bytes, peer public key = 65 bytes, |
| 195 | * and that the shared secret buffer is big enough. */ |
Valerio Setti | 983923c | 2023-08-03 15:33:24 +0200 | [diff] [blame] | 196 | psa_status_t status = PSA_ERROR_INVALID_ARGUMENT; |
Aditya Deshpande | ac363d8 | 2023-03-21 18:56:31 +0000 | [diff] [blame] | 197 | if (key_buffer_size != 32 || shared_secret_size < 32 || |
| 198 | peer_key_length != 65) { |
| 199 | return status; |
| 200 | } |
Aditya Deshpande | e41f7e4 | 2023-01-12 16:29:02 +0000 | [diff] [blame] | 201 | |
Aditya Deshpande | 641cb89 | 2023-04-19 03:31:10 +0100 | [diff] [blame] | 202 | /* We add 1 to peer_key pointer to omit the leading byte of the public key |
| 203 | * representation (0x04). See information about PSA key formats at the top |
| 204 | * of the file. */ |
Aditya Deshpande | 695e44b | 2023-01-23 14:59:29 +0000 | [diff] [blame] | 205 | status = p256_to_psa_error( |
Aditya Deshpande | ac363d8 | 2023-03-21 18:56:31 +0000 | [diff] [blame] | 206 | p256_ecdh_shared_secret(shared_secret, key_buffer, peer_key+1)); |
| 207 | if (status == PSA_SUCCESS) { |
Aditya Deshpande | e41f7e4 | 2023-01-12 16:29:02 +0000 | [diff] [blame] | 208 | *shared_secret_length = 32; |
Aditya Deshpande | ac363d8 | 2023-03-21 18:56:31 +0000 | [diff] [blame] | 209 | } |
Aditya Deshpande | e41f7e4 | 2023-01-12 16:29:02 +0000 | [diff] [blame] | 210 | |
| 211 | return status; |
| 212 | } |
| 213 | |
Aditya Deshpande | 695e44b | 2023-01-23 14:59:29 +0000 | [diff] [blame] | 214 | psa_status_t p256_transparent_sign_hash( |
Aditya Deshpande | e41f7e4 | 2023-01-12 16:29:02 +0000 | [diff] [blame] | 215 | const psa_key_attributes_t *attributes, |
| 216 | const uint8_t *key_buffer, |
| 217 | size_t key_buffer_size, |
| 218 | psa_algorithm_t alg, |
| 219 | const uint8_t *hash, |
| 220 | size_t hash_length, |
| 221 | uint8_t *signature, |
| 222 | size_t signature_size, |
Aditya Deshpande | ac363d8 | 2023-03-21 18:56:31 +0000 | [diff] [blame] | 223 | size_t *signature_length) |
Aditya Deshpande | e41f7e4 | 2023-01-12 16:29:02 +0000 | [diff] [blame] | 224 | { |
| 225 | /* We don't use these arguments, but the specification mandates the |
| 226 | * sginature of driver entry-points. (void) used to avoid compiler |
| 227 | * warning. */ |
| 228 | (void) attributes; |
| 229 | (void) alg; |
| 230 | |
| 231 | psa_status_t status = PSA_ERROR_NOT_SUPPORTED; |
Valerio Setti | 983923c | 2023-08-03 15:33:24 +0200 | [diff] [blame] | 232 | if (key_buffer_size != 32 || signature_size < 64) { |
Aditya Deshpande | ac363d8 | 2023-03-21 18:56:31 +0000 | [diff] [blame] | 233 | return status; |
| 234 | } |
Aditya Deshpande | e41f7e4 | 2023-01-12 16:29:02 +0000 | [diff] [blame] | 235 | |
Aditya Deshpande | 695e44b | 2023-01-23 14:59:29 +0000 | [diff] [blame] | 236 | status = p256_to_psa_error( |
Aditya Deshpande | ac363d8 | 2023-03-21 18:56:31 +0000 | [diff] [blame] | 237 | p256_ecdsa_sign(signature, key_buffer, hash, hash_length)); |
| 238 | if (status == PSA_SUCCESS) { |
Aditya Deshpande | e41f7e4 | 2023-01-12 16:29:02 +0000 | [diff] [blame] | 239 | *signature_length = 64; |
Aditya Deshpande | ac363d8 | 2023-03-21 18:56:31 +0000 | [diff] [blame] | 240 | } |
Aditya Deshpande | e41f7e4 | 2023-01-12 16:29:02 +0000 | [diff] [blame] | 241 | |
| 242 | return status; |
| 243 | } |
| 244 | |
| 245 | /* This function expects the key buffer to contain a 65 byte public key, |
| 246 | * as exported by psa_export_public_key() */ |
Aditya Deshpande | 695e44b | 2023-01-23 14:59:29 +0000 | [diff] [blame] | 247 | static psa_status_t p256_verify_hash_with_public_key( |
Aditya Deshpande | e41f7e4 | 2023-01-12 16:29:02 +0000 | [diff] [blame] | 248 | const uint8_t *key_buffer, |
| 249 | size_t key_buffer_size, |
| 250 | const uint8_t *hash, |
| 251 | size_t hash_length, |
| 252 | const uint8_t *signature, |
Aditya Deshpande | ac363d8 | 2023-03-21 18:56:31 +0000 | [diff] [blame] | 253 | size_t signature_length) |
Aditya Deshpande | e41f7e4 | 2023-01-12 16:29:02 +0000 | [diff] [blame] | 254 | { |
| 255 | psa_status_t status = PSA_ERROR_NOT_SUPPORTED; |
Aditya Deshpande | ac363d8 | 2023-03-21 18:56:31 +0000 | [diff] [blame] | 256 | if (key_buffer_size != 65 || signature_length != 64 || *key_buffer != 0x04) { |
Aditya Deshpande | e41f7e4 | 2023-01-12 16:29:02 +0000 | [diff] [blame] | 257 | return status; |
Aditya Deshpande | ac363d8 | 2023-03-21 18:56:31 +0000 | [diff] [blame] | 258 | } |
Aditya Deshpande | e41f7e4 | 2023-01-12 16:29:02 +0000 | [diff] [blame] | 259 | |
Aditya Deshpande | 641cb89 | 2023-04-19 03:31:10 +0100 | [diff] [blame] | 260 | /* We add 1 to public_key_buffer pointer to omit the leading byte of the |
| 261 | * public key representation (0x04). See information about PSA key formats |
| 262 | * at the top of the file. */ |
Aditya Deshpande | e41f7e4 | 2023-01-12 16:29:02 +0000 | [diff] [blame] | 263 | const uint8_t *public_key_buffer = key_buffer + 1; |
Aditya Deshpande | 695e44b | 2023-01-23 14:59:29 +0000 | [diff] [blame] | 264 | status = p256_to_psa_error( |
Aditya Deshpande | ac363d8 | 2023-03-21 18:56:31 +0000 | [diff] [blame] | 265 | p256_ecdsa_verify(signature, public_key_buffer, hash, hash_length)); |
Aditya Deshpande | e41f7e4 | 2023-01-12 16:29:02 +0000 | [diff] [blame] | 266 | |
| 267 | return status; |
| 268 | } |
| 269 | |
Aditya Deshpande | 695e44b | 2023-01-23 14:59:29 +0000 | [diff] [blame] | 270 | psa_status_t p256_transparent_verify_hash( |
Aditya Deshpande | e41f7e4 | 2023-01-12 16:29:02 +0000 | [diff] [blame] | 271 | const psa_key_attributes_t *attributes, |
| 272 | const uint8_t *key_buffer, |
| 273 | size_t key_buffer_size, |
| 274 | psa_algorithm_t alg, |
| 275 | const uint8_t *hash, |
| 276 | size_t hash_length, |
| 277 | const uint8_t *signature, |
Aditya Deshpande | ac363d8 | 2023-03-21 18:56:31 +0000 | [diff] [blame] | 278 | size_t signature_length) |
Aditya Deshpande | e41f7e4 | 2023-01-12 16:29:02 +0000 | [diff] [blame] | 279 | { |
| 280 | /* We don't use this argument, but the specification mandates the signature |
| 281 | * of driver entry-points. (void) used to avoid compiler warning. */ |
| 282 | (void) alg; |
| 283 | |
| 284 | psa_status_t status; |
Aditya Deshpande | 7b9934d | 2023-04-18 17:00:17 +0100 | [diff] [blame] | 285 | uint8_t public_key_buffer[65]; |
Aditya Deshpande | e41f7e4 | 2023-01-12 16:29:02 +0000 | [diff] [blame] | 286 | size_t public_key_buffer_size = 65; |
Aditya Deshpande | 7b9934d | 2023-04-18 17:00:17 +0100 | [diff] [blame] | 287 | |
| 288 | size_t public_key_length = 65; |
| 289 | /* As p256-m doesn't require dynamic allocation, we want to avoid it in |
| 290 | * the entrypoint functions as well. psa_driver_wrapper_export_public_key() |
| 291 | * requires size_t*, so we use a pointer to a stack variable. */ |
| 292 | size_t *public_key_length_ptr = &public_key_length; |
Aditya Deshpande | e41f7e4 | 2023-01-12 16:29:02 +0000 | [diff] [blame] | 293 | |
Aditya Deshpande | 641cb89 | 2023-04-19 03:31:10 +0100 | [diff] [blame] | 294 | /* The contents of key_buffer may either be the 32 byte private key |
| 295 | * (keypair format), or 0x04 followed by the 64 byte public key (public |
| 296 | * key format). To ensure the key is in the latter format, the public key |
| 297 | * is exported. */ |
Aditya Deshpande | e41f7e4 | 2023-01-12 16:29:02 +0000 | [diff] [blame] | 298 | status = psa_driver_wrapper_export_public_key( |
Aditya Deshpande | ac363d8 | 2023-03-21 18:56:31 +0000 | [diff] [blame] | 299 | attributes, |
| 300 | key_buffer, |
| 301 | key_buffer_size, |
| 302 | public_key_buffer, |
| 303 | public_key_buffer_size, |
Aditya Deshpande | 7b9934d | 2023-04-18 17:00:17 +0100 | [diff] [blame] | 304 | public_key_length_ptr); |
Aditya Deshpande | ac363d8 | 2023-03-21 18:56:31 +0000 | [diff] [blame] | 305 | if (status != PSA_SUCCESS) { |
Aditya Deshpande | e41f7e4 | 2023-01-12 16:29:02 +0000 | [diff] [blame] | 306 | goto exit; |
Aditya Deshpande | ac363d8 | 2023-03-21 18:56:31 +0000 | [diff] [blame] | 307 | } |
Aditya Deshpande | e41f7e4 | 2023-01-12 16:29:02 +0000 | [diff] [blame] | 308 | |
Aditya Deshpande | 695e44b | 2023-01-23 14:59:29 +0000 | [diff] [blame] | 309 | status = p256_verify_hash_with_public_key( |
Aditya Deshpande | ac363d8 | 2023-03-21 18:56:31 +0000 | [diff] [blame] | 310 | public_key_buffer, |
| 311 | public_key_buffer_size, |
| 312 | hash, |
| 313 | hash_length, |
| 314 | signature, |
| 315 | signature_length); |
Aditya Deshpande | e41f7e4 | 2023-01-12 16:29:02 +0000 | [diff] [blame] | 316 | |
| 317 | exit: |
Aditya Deshpande | ac363d8 | 2023-03-21 18:56:31 +0000 | [diff] [blame] | 318 | return status; |
Aditya Deshpande | e41f7e4 | 2023-01-12 16:29:02 +0000 | [diff] [blame] | 319 | } |
| 320 | |
| 321 | #endif /* MBEDTLS_P256M_EXAMPLE_DRIVER_ENABLED */ |