Home
last modified time | relevance | path

Searched refs:coord_len (Results 1 – 6 of 6) sorted by relevance

/freebsd/crypto/libecc/src/curves/
H A Daff_pt.c277 u16 coord_len; in aff_pt_import_from_buf() local
285 coord_len = (u16)BYTECEIL(ctx->p_bitlen); in aff_pt_import_from_buf()
287 MUST_HAVE((pt_buf_len == (2 * coord_len)), ret, err); in aff_pt_import_from_buf()
289 ret = fp_init_from_buf(&(pt->x), ctx, pt_buf, coord_len); EG(ret, err); in aff_pt_import_from_buf()
290 ret = fp_init_from_buf(&(pt->y), ctx, pt_buf + coord_len, coord_len); EG(ret, err); in aff_pt_import_from_buf()
327 u16 coord_len; in aff_pt_export_to_buf() local
337 coord_len = (u16)BYTECEIL(pt->crv->a.ctx->p_bitlen); in aff_pt_export_to_buf()
338 MUST_HAVE((pt_buf_len == (2 * coord_len)), ret, err); in aff_pt_export_to_buf()
341 ret = fp_export_to_buf(pt_buf, coord_len, &(pt->x)); EG(ret, err); in aff_pt_export_to_buf()
342 ret = fp_export_to_buf(pt_buf + coord_len, coord_len, &(pt->y)); in aff_pt_export_to_buf()
H A Daff_pt_montgomery.c216 u16 coord_len; in aff_pt_montgomery_import_from_buf() local
223 coord_len = (u16)BYTECEIL(ctx->p_bitlen); in aff_pt_montgomery_import_from_buf()
225 MUST_HAVE((pt_buf_len == (2 * coord_len)), ret, err); in aff_pt_montgomery_import_from_buf()
227 ret = fp_init_from_buf(&(pt->u), ctx, pt_buf, coord_len); EG(ret, err); in aff_pt_montgomery_import_from_buf()
228 ret = fp_init_from_buf(&(pt->v), ctx, pt_buf + coord_len, coord_len); EG(ret, err); in aff_pt_montgomery_import_from_buf()
261 u16 coord_len; in aff_pt_montgomery_export_to_buf() local
272 coord_len = (u16)BYTECEIL(ctx->p_bitlen); in aff_pt_montgomery_export_to_buf()
274 MUST_HAVE((pt_buf_len == (2 * coord_len)), ret, err); in aff_pt_montgomery_export_to_buf()
277 ret = fp_export_to_buf(pt_buf, coord_len, &(pt->u)); EG(ret, err); in aff_pt_montgomery_export_to_buf()
278 ret = fp_export_to_buf(pt_buf + coord_len, coord_len, &(pt->v)); in aff_pt_montgomery_export_to_buf()
H A Daff_pt_edwards.c230 u16 coord_len; in aff_pt_edwards_import_from_buf() local
237 coord_len = (u16)BYTECEIL(ctx->p_bitlen); in aff_pt_edwards_import_from_buf()
239 MUST_HAVE((pt_buf_len == (2 * coord_len)), ret, err); in aff_pt_edwards_import_from_buf()
241 ret = fp_init_from_buf(&(pt->x), ctx, pt_buf, coord_len); EG(ret, err); in aff_pt_edwards_import_from_buf()
242 ret = fp_init_from_buf(&(pt->y), ctx, pt_buf + coord_len, coord_len); EG(ret, err); in aff_pt_edwards_import_from_buf()
276 u16 coord_len; in aff_pt_edwards_export_to_buf() local
287 coord_len = (u16)BYTECEIL(ctx->p_bitlen); in aff_pt_edwards_export_to_buf()
289 MUST_HAVE((pt_buf_len == (2 * coord_len)), ret, err); in aff_pt_edwards_export_to_buf()
292 ret = fp_export_to_buf(pt_buf, coord_len, &(pt->x)); EG(ret, err); in aff_pt_edwards_export_to_buf()
293 ret = fp_export_to_buf(pt_buf + coord_len, coord_len, &(pt->y)); in aff_pt_edwards_export_to_buf()
H A Dprj_pt.c468 u16 coord_len; in prj_pt_import_from_buf() local
474 coord_len = (u16)BYTECEIL(ctx->p_bitlen); in prj_pt_import_from_buf()
475 MUST_HAVE((pt_buf_len == (3 * coord_len)), ret, err); in prj_pt_import_from_buf()
477 ret = fp_init_from_buf(&(pt->X), ctx, pt_buf, coord_len); EG(ret, err); in prj_pt_import_from_buf()
478 ret = fp_init_from_buf(&(pt->Y), ctx, pt_buf + coord_len, coord_len); EG(ret, err); in prj_pt_import_from_buf()
479 ret = fp_init_from_buf(&(pt->Z), ctx, pt_buf + (2 * coord_len), coord_len); EG(ret, err); in prj_pt_import_from_buf()
517 u16 coord_len; in prj_pt_import_from_aff_buf() local
523 coord_len = (u16)BYTECEIL(ctx->p_bitlen); in prj_pt_import_from_aff_buf()
524 MUST_HAVE((pt_buf_len == (2 * coord_len)), ret, err); in prj_pt_import_from_aff_buf()
526 ret = fp_init_from_buf(&(pt->X), ctx, pt_buf, coord_len); EG(ret, err); in prj_pt_import_from_aff_buf()
[all …]
/freebsd/contrib/wpa/src/crypto/
H A Dcrypto_module_tests.c2324 size_t coord_len; in run_hpke_test() local
2377 coord_len = 32; in run_hpke_test()
2379 coord_len = 48; in run_hpke_test()
2381 coord_len = 66; in run_hpke_test()
2383 coord_len = 32; in run_hpke_test()
2385 coord_len = 48; in run_hpke_test()
2387 coord_len = 64; in run_hpke_test()
2390 if (wpabuf_len(pk_r) != 1 + 2 * coord_len) { in run_hpke_test()
2392 wpabuf_len(pk_r), 1 + 2 * coord_len); in run_hpke_test()
2397 wpabuf_head_u8(pk_r) + 1 + coord_len, in run_hpke_test()
[all …]
/freebsd/crypto/libecc/src/tests/
H A Dec_utils.c1393 u16 coord_len; in ec_scalar_mult() local
1494 coord_len = (u16)(3 * BYTECEIL((Q.crv)->a.ctx->p_bitlen)); in ec_scalar_mult()
1495 if(coord_len > sizeof(buf)){ in ec_scalar_mult()
1500 if(prj_pt_export_to_buf(&Q, buf, coord_len)){ in ec_scalar_mult()
1514 if(fwrite(buf, 1, coord_len, out_file) != coord_len){ in ec_scalar_mult()