/src/nss/lib/freebl/ecl/curve25519_64.c
| Line | Count | Source | 
| 1 |  | /* This Source Code Form is subject to the terms of the Mozilla Public | 
| 2 |  |  * License, v. 2.0. If a copy of the MPL was not distributed with this | 
| 3 |  |  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | 
| 4 |  |  | 
| 5 |  | #include "ecl-priv.h" | 
| 6 |  |  | 
| 7 |  | #if HACL_CAN_COMPILE_INLINE_ASM | 
| 8 |  | #include "../verified/Hacl_Curve25519_64.h" | 
| 9 |  | #else | 
| 10 |  | #include "../verified/Hacl_Curve25519_51.h" | 
| 11 |  | #endif | 
| 12 |  |  | 
| 13 |  | SECStatus | 
| 14 |  | ec_Curve25519_mul(uint8_t *mypublic, const uint8_t *secret, const uint8_t *basepoint) | 
| 15 | 20.7k | { | 
| 16 |  | // Note: this cast is safe because HaCl* state has a post-condition that only "mypublic" changed. | 
| 17 |  | #if defined HACL_CAN_COMPILE_INLINE_ASM | 
| 18 |  |     Hacl_Curve25519_64_ecdh(mypublic, (uint8_t *)secret, (uint8_t *)basepoint); | 
| 19 |  | #else | 
| 20 | 20.7k |     Hacl_Curve25519_51_ecdh(mypublic, (uint8_t *)secret, (uint8_t *)basepoint); | 
| 21 | 20.7k | #endif | 
| 22 |  |  | 
| 23 | 20.7k |     return 0; | 
| 24 | 20.7k | } |