00001
00011 #ifndef C4E_ECC2N_H
00012 #define C4E_ECC2N_H
00013
00014
00015
00016
00017 #include "c4e_ecgf2n.h"
00018
00019
00020 #ifdef __cplusplus
00021 extern "C" {
00022 #endif
00023
00024
00034
00035
00036
00037
00038
00039
00040
00051 #define C4E_ECC2N_ALGO_NONE (0U)
00052 #define C4E_ECC2N_ALGO_DH (1U)
00053 #define C4E_ECC2N_ALGO_DSA (2U)
00054 #define C4E_ECC2N_ALGO_ALL (~0U)
00078 #define C4E_ECC2N_TMPID_DOM_CHECK (2U)
00079
00083 #define C4E_ECC2N_TMPID_KEY_CHECK (2U)
00084
00088 #define C4E_ECC2N_TMPID_PT2OS (4U)
00089
00093 #define C4E_ECC2N_TMPID_OS2PT (5U)
00094
00102 #define C4E_ECC2N_TMPID_MAX C4E_ECC2N_TMPID_OS2PT
00103
00104
00105
00106
00107
00108
00109
00110
00150 #define C4E_ECC2N_TMP_NUM(tmpid, keylen) \
00151 ((tmpid) * C4E_GF2N_INV_SPACE(C4E_ELEM_DIGITS_NUM((keylen) + 1U)))
00152
00153
00159
00160
00161
00162
00244 C4eSysStatus c4e_ecc2n_domchk(C4eArchUint algos, C4E_CONST C4eEcDomain* dom,
00245 C4eArchDigit* C4E_RESTRICT tmp);
00246
00247
00248
00284 C4eSysStatus c4e_ecc2n_keychk_prv(C4eArchUint algos,
00285 C4E_CONST C4eEcDomain* C4E_RESTRICT dom,
00286 C4E_CONST C4eElement* C4E_RESTRICT d,
00287 C4eArchDigit tmp[C4E_RESTRICT]);
00288
00289
00290
00291
00336 C4eSysStatus c4e_ecc2n_keychk_pub(C4eArchUint algos,
00337 C4E_CONST C4eEcDomain* C4E_RESTRICT dom,
00338 C4E_CONST C4eEcPoint* C4E_RESTRICT q,
00339 C4eArchDigit tmp[C4E_RESTRICT]);
00340
00341
00342
00343
00392 C4eArchSize c4e_ecc2n_pt2os(C4E_CONST C4eEcDomain* C4E_RESTRICT dom,
00393 C4E_CONST C4eEcPoint* C4E_RESTRICT pt,
00394 C4eArchUint ptfmt,
00395 C4eArchDigit tmp[C4E_RESTRICT],
00396 C4eArchSize bufsize,
00397 C4eArchUint8* C4E_RESTRICT buf);
00398
00399
00400
00401
00449 C4eSysStatus c4e_ecc2n_os2pt(C4E_CONST C4eEcDomain* C4E_RESTRICT dom,
00450 C4E_CONST C4eArchUint8* C4E_RESTRICT osp,
00451 C4eArchSize len,
00452 C4eArchDigit tmp[C4E_RESTRICT],
00453 C4eEcPoint* C4E_RESTRICT pt);
00454
00459
00475 C4eArchDigit* c4e_ecc2n_asgn(C4eArchIdx size,
00476 C4eArchDigit* C4E_RESTRICT digits,
00477 C4eArchUint num,
00478 C4eEcPoint pt[C4E_RESTRICT]);
00479
00480
00481
00482 #ifdef __cplusplus
00483 }
00484 #endif
00485
00486
00487 #endif
00488
00489
00490
00491
00492