nrfxlib API 2.8.99
Loading...
Searching...
No Matches
ocrypto_curve_p224.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2016 - 2024 Nordic Semiconductor ASA
3 * Copyright (c) since 2013 Oberon microsystems AG
4 *
5 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
6 */
7
16#ifndef OCRYPTO_CURVE_P224_H
17#define OCRYPTO_CURVE_P224_H
18
19#include "ocrypto_sc_p224.h"
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
25
26// (x,y) only jacobian coordinates
28typedef struct {
29 ocrypto_mod_p224 x;
30 ocrypto_mod_p224 y;
31} ocrypto_cp_p224;
43int ocrypto_curve_p224_from28bytes(ocrypto_cp_p224 *r, const uint8_t p[28]);
44
53int ocrypto_curve_p224_from56bytes(ocrypto_cp_p224 *r, const uint8_t p[56]);
54
60void ocrypto_curve_p224_to28bytes(uint8_t r[28], ocrypto_cp_p224 *p);
61
67void ocrypto_curve_p224_to56bytes(uint8_t r[56], ocrypto_cp_p224 *p);
68
82int ocrypto_curve_p224_scalarmult(ocrypto_cp_p224 *r, const ocrypto_cp_p224 *p, const ocrypto_sc_p224 *s);
83
96int ocrypto_curve_p224_scalarmult_base(ocrypto_cp_p224 *r, const ocrypto_sc_p224 *s);
97
112int ocrypto_curve_p224_add(ocrypto_cp_p224 *r, const ocrypto_cp_p224 *p, const ocrypto_cp_p224 *q);
113
114
115#ifdef __cplusplus
116}
117#endif
118
119#endif /* #ifndef OCRYPTO_CURVE_P224_H */
120
int ocrypto_curve_p224_from56bytes(ocrypto_cp_p224 *r, const uint8_t p[56])
void ocrypto_curve_p224_to56bytes(uint8_t r[56], ocrypto_cp_p224 *p)
void ocrypto_curve_p224_to28bytes(uint8_t r[28], ocrypto_cp_p224 *p)
int ocrypto_curve_p224_add(ocrypto_cp_p224 *r, const ocrypto_cp_p224 *p, const ocrypto_cp_p224 *q)
int ocrypto_curve_p224_scalarmult_base(ocrypto_cp_p224 *r, const ocrypto_sc_p224 *s)
int ocrypto_curve_p224_from28bytes(ocrypto_cp_p224 *r, const uint8_t p[28])
int ocrypto_curve_p224_scalarmult(ocrypto_cp_p224 *r, const ocrypto_cp_p224 *p, const ocrypto_sc_p224 *s)