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 #include "../verified/Hacl_Curve25519_51.h"
7 
8 SECStatus
ec_Curve25519_mul(uint8_t * mypublic,const uint8_t * secret,const uint8_t * basepoint)9 ec_Curve25519_mul(uint8_t *mypublic, const uint8_t *secret, const uint8_t *basepoint)
10 {
11     // Note: this cast is safe because HaCl* state has a post-condition that only "mypublic" changed.
12     Hacl_Curve25519_51_ecdh(mypublic, (uint8_t *)secret, (uint8_t *)basepoint);
13     return 0;
14 }
15