API参考
载入中...
搜索中...
未找到
x25519_asm.h
1
/*
2
* This file is part of the openHiTLS project.
3
*
4
* openHiTLS is licensed under the Mulan PSL v2.
5
* You can use this software according to the terms and conditions of the Mulan PSL v2.
6
* You may obtain a copy of Mulan PSL v2 at:
7
*
8
* http://license.coscl.org.cn/MulanPSL2
9
*
10
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
11
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
12
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
13
* See the Mulan PSL v2 for more details.
14
*/
15
16
#ifndef X25519_ASM_H
17
#define X25519_ASM_H
18
19
#include "hitls_build.h"
20
#ifdef HITLS_CRYPTO_X25519
21
22
#include "curve25519_local.h"
23
24
#ifdef __cplusplus
25
extern
"C"
{
26
#endif
27
39
void
Fp51Mul(Fp51 *out,
const
Fp51 *f,
const
Fp51 *g);
40
51
void
Fp51Square(Fp51 *out,
const
Fp51 *f);
52
63
void
Fp51MulScalar(Fp51 *out,
const
Fp51 *in);
64
65
#ifdef HITLS_CRYPTO_X25519_X8664
66
67
typedef
uint64_t Fp64[4];
68
80
void
Fp64Mul(Fp64 out,
const
Fp64 f,
const
Fp64 g);
81
92
void
Fp64Sqr(Fp64 out,
const
Fp64 f);
93
104
void
Fp64MulScalar(Fp64 out, Fp64 f);
105
117
void
Fp64Add(Fp64 out,
const
Fp64 f,
const
Fp64 g);
118
130
void
Fp64Sub(Fp64 out,
const
Fp64 f,
const
Fp64 g);
131
142
void
Fp64PolyToData(uint8_t *out,
const
Fp64 f);
143
144
#endif
145
146
#ifdef __cplusplus
147
}
148
#endif
149
150
#endif
/* HITLS_CRYPTO_X25519 */
151
152
#endif
// X25519_ASM_H
crypto
curve25519
src
x25519_asm.h
制作者
1.15.0