/freebsd/crypto/libecc/src/curves/ |
H A D | curves.c | 36 MUST_HAVE((ec_name != NULL), ret, err); in ec_get_curve_params_by_name() 37 MUST_HAVE((ec_s_params != NULL), ret, err); in ec_get_curve_params_by_name() 38 MUST_HAVE(((ec_name_len > 2) && (ec_name_len <= MAX_CURVE_NAME_LEN)), ret, err); in ec_get_curve_params_by_name() 46 MUST_HAVE(((comp_len + 1) == ec_name_len), ret, err); in ec_get_curve_params_by_name() 54 MUST_HAVE((params != NULL), ret, err); in ec_get_curve_params_by_name() 55 MUST_HAVE((params->name != NULL), ret, err); in ec_get_curve_params_by_name() 56 MUST_HAVE((params->name->buf != NULL), ret, err); in ec_get_curve_params_by_name() 93 MUST_HAVE((ec_s_params != NULL), ret, err); in ec_get_curve_params_by_type() 100 MUST_HAVE((params != NULL), ret, err); in ec_get_curve_params_by_type() 104 MUST_HAVE((params->name != NULL), ret, err); in ec_get_curve_params_by_type() [all …]
|
H A D | aff_pt.c | 28 MUST_HAVE(((in != NULL) && (in->magic == AFF_PT_MAGIC)), ret, err); in aff_pt_check_initialized() 43 MUST_HAVE((in != NULL), ret, err); in aff_pt_init() 44 MUST_HAVE((curve != NULL), ret, err); in aff_pt_init() 106 MUST_HAVE((y1 != NULL) && (y2 != NULL), ret, err); in aff_pt_y_from_x() 110 MUST_HAVE((y1 != y2) && (y1 != x), ret, err); in aff_pt_y_from_x() 148 MUST_HAVE((on_curve != NULL), ret, err); in is_on_shortw_curve() 150 MUST_HAVE((x->ctx == y->ctx), ret, err); in is_on_shortw_curve() 151 MUST_HAVE((x->ctx == curve->a.ctx), ret, err); in is_on_shortw_curve() 188 MUST_HAVE((on_curve != NULL), ret, err); in aff_pt_is_on_curve() 222 MUST_HAVE((cmp != NULL), ret, err); in ec_shortw_aff_cmp() [all …]
|
H A D | ec_edwards.c | 30 MUST_HAVE((crv != NULL) && (crv->magic == EC_EDWARDS_CRV_MAGIC), ret, err); in ec_edwards_crv_check_initialized() 50 MUST_HAVE((a->ctx == d->ctx), ret, err); in ec_edwards_crv_init() 51 MUST_HAVE((crv != NULL), ret, err); in ec_edwards_crv_init() 54 MUST_HAVE((!fp_iszero(a, &iszero)) && (!iszero), ret, err); in ec_edwards_crv_init() 55 MUST_HAVE((!fp_iszero(d, &iszero)) && (!iszero), ret, err); in ec_edwards_crv_init() 56 MUST_HAVE((!fp_cmp(a, d, &cmp)) && cmp, ret, err); in ec_edwards_crv_init()
|
H A D | aff_pt_montgomery.c | 23 MUST_HAVE(((in != NULL) && (in->magic == AFF_PT_MONTGOMERY_MAGIC)), ret, err); in aff_pt_montgomery_check_initialized() 40 MUST_HAVE((in != NULL), ret, err); in aff_pt_montgomery_init() 106 MUST_HAVE((on_curve != NULL), ret, err); in is_on_montgomery_curve() 112 MUST_HAVE((u->ctx == v->ctx), ret, err); in is_on_montgomery_curve() 113 MUST_HAVE((u->ctx == curve->A.ctx), ret, err); in is_on_montgomery_curve() 188 MUST_HAVE((cmp != NULL), ret, err); in ec_montgomery_aff_cmp() 191 MUST_HAVE((in1->crv == in2->crv), ret, err); in ec_montgomery_aff_cmp() 220 MUST_HAVE((pt_buf != NULL) && (pt != NULL), ret, err); 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() 265 MUST_HAVE((pt_buf != NULL), ret, err); in aff_pt_montgomery_export_to_buf() [all …]
|
H A D | ec_montgomery.c | 22 MUST_HAVE((crv != NULL) && (crv->magic == EC_MONTGOMERY_CRV_MAGIC), ret, err); in ec_montgomery_crv_check_initialized() 41 MUST_HAVE((crv != NULL), ret, err); in ec_montgomery_crv_init() 46 MUST_HAVE(A->ctx == B->ctx, ret, err); in ec_montgomery_crv_init() 53 MUST_HAVE((!fp_iszero(&tmp, &iszero)) && (!iszero), ret, err); in ec_montgomery_crv_init() 57 MUST_HAVE((!fp_iszero(&tmp, &iszero)) && (!iszero), ret, err); in ec_montgomery_crv_init() 58 MUST_HAVE((!fp_iszero(B, &iszero)) && (!iszero), ret, err); in ec_montgomery_crv_init()
|
/freebsd/crypto/libecc/src/sig/ |
H A D | ec_key.c | 28 MUST_HAVE(((A != NULL) && (A->magic == PRIV_KEY_MAGIC) && (A->params != NULL)), ret, err); in priv_key_check_initialized() 43 MUST_HAVE(((A != NULL) && (A->magic == PRIV_KEY_MAGIC) && in priv_key_check_initialized_and_type() 63 MUST_HAVE((priv_key != NULL), ret, err); in ec_priv_key_import_from_buf() 93 MUST_HAVE(((8 * (u32)priv_key_buf_len) >= (u32)blen), ret, err); in ec_priv_key_export_to_buf() 110 MUST_HAVE(((A != NULL) && (A->magic == PUB_KEY_MAGIC) && (A->params != NULL)), ret, err); in pub_key_check_initialized() 125 MUST_HAVE(((A != NULL) && (A->magic == PUB_KEY_MAGIC) && in pub_key_check_initialized_and_type() 145 MUST_HAVE(((pub_key != NULL) && (pub_key_buf != NULL) && (params != NULL)), ret, err); in ec_pub_key_import_from_buf() 162 MUST_HAVE(check, ret, err); in ec_pub_key_import_from_buf() 187 MUST_HAVE(((pub_key != NULL) && (pub_key_buf != NULL) && (params != NULL)), ret, err); in ec_pub_key_import_from_aff_buf() 204 MUST_HAVE(check, ret, err); in ec_pub_key_import_from_aff_buf() [all …]
|
H A D | eddsa.c | 65 MUST_HAVE((h != NULL) && (h_ctx != NULL), ret, err); in dom() 67 MUST_HAVE((x <= 255) && (olen_y <= 255), ret, err); in dom() 220 MUST_HAVE((key_pair != NULL), ret, err); in eddsa_key_pair_sanity_check() 223 MUST_HAVE((key_pair->priv_key.key_type == key_pair->pub_key.key_type), ret, err); in eddsa_key_pair_sanity_check() 238 MUST_HAVE((buf != NULL), ret, err); in eddsa_decode_integer() 239 MUST_HAVE((sizeof(buf_little_endian) >= buf_size), ret, err); in eddsa_decode_integer() 268 MUST_HAVE((buf != NULL), ret, err); in eddsa_encode_integer() 273 MUST_HAVE((((u32)blen) <= (8 * (u32)buf_size)), ret, err); in eddsa_encode_integer() 298 MUST_HAVE((digest != NULL), ret, err); in eddsa_compute_s() 299 MUST_HAVE(((digest_size % 2) == 0), ret, err); in eddsa_compute_s() [all …]
|
H A D | sig_algs.c | 55 MUST_HAVE((sm->gen_priv_key != NULL), ret, err); in gen_priv_key() 88 MUST_HAVE((sm->init_pub_key != NULL), ret, err); in init_pubkey_from_privkey() 110 MUST_HAVE((ec_sig_name != NULL), ret, err); in get_sig_by_name() 111 MUST_HAVE((sig_mapping != NULL), ret, err); in get_sig_by_name() 139 MUST_HAVE((sig_mapping != NULL), ret, err); in get_sig_by_type() 166 MUST_HAVE((sig != NULL), ret, err); in ec_sig_mapping_callbacks_sanity_check() 216 MUST_HAVE((sig_ctx != NULL) && (sig_ctx->ctx_magic == SIG_SIGN_MAGIC), ret, err); in ec_sig_ctx_callbacks_sanity_check() 233 MUST_HAVE((verify_ctx != NULL) && (verify_ctx->ctx_magic == SIG_VERIFY_MAGIC), ret, err); in ec_verify_ctx_callbacks_sanity_check() 258 MUST_HAVE(((params != NULL) && (siglen != NULL)), ret, err); in ec_get_sig_len() 270 MUST_HAVE((sm->siglen != NULL), ret, err); in ec_get_sig_len() [all …]
|
H A D | bign_common.c | 79 MUST_HAVE((buf != NULL), ret, err); in _reverse_endianness() 102 MUST_HAVE((adata != NULL) && (oid_ptr != NULL) && (oid_len != NULL), ret, err); in bign_get_oid_from_adata() 103 MUST_HAVE((adata_len >= 4), ret, err); in bign_get_oid_from_adata() 108 MUST_HAVE(((*oid_len) + t_len) >= (t_len), ret, err); in bign_get_oid_from_adata() 109 MUST_HAVE(((*oid_len) + t_len) <= (adata_len - 4), ret, err); in bign_get_oid_from_adata() 128 MUST_HAVE((adata != NULL) && (t_ptr != NULL) && (t_len != NULL), ret, err); in bign_get_t_from_adata() 129 MUST_HAVE((adata_len >= 4), ret, err); in bign_get_t_from_adata() 134 MUST_HAVE((oid_len + (*t_len)) >= (oid_len), ret, err); in bign_get_t_from_adata() 135 MUST_HAVE((oid_len + (*t_len)) <= (adata_len - 4), ret, err); in bign_get_t_from_adata() 153 MUST_HAVE((adata != NULL), ret, err); in bign_set_adata() [all …]
|
H A D | ecfsdsa.c | 37 MUST_HAVE((out_pub != NULL), ret, err); in ecfsdsa_init_pub_key() 46 MUST_HAVE(!nn_cmp(&(in_priv->x), q, &cmp) && (cmp < 0), ret, err); in ecfsdsa_init_pub_key() 65 MUST_HAVE((siglen != NULL), ret, err); in ecfsdsa_siglen() 66 MUST_HAVE((p_bit_len <= CURVES_MAX_P_BIT_LEN) && in ecfsdsa_siglen() 117 MUST_HAVE((((void *)(A)) != NULL) && \ 141 MUST_HAVE((ctx->h != NULL) && (ctx->h->digest_size <= MAX_DIGEST_SIZE) && in _ecfsdsa_sign_init() 151 MUST_HAVE(((u32)BYTECEIL(p_bit_len) <= NN_MAX_BYTE_LEN), ret, err); in _ecfsdsa_sign_init() 170 MUST_HAVE((ctx->rand == nn_get_random_mod), ret, err); in _ecfsdsa_sign_init() 172 MUST_HAVE((ctx->rand != NULL), ret, err); in _ecfsdsa_sign_init() 280 MUST_HAVE((sig != NULL), ret, err); in _ecfsdsa_sign_finalize() [all …]
|
H A D | bip0340.c | 52 MUST_HAVE((h_ctx != NULL), ret, err); in _bip0340_hash() 87 MUST_HAVE((isone), ret, err); in _bip0340_set_scalar() 112 MUST_HAVE((out_pub != NULL), ret, err); in bip0340_init_pub_key() 140 MUST_HAVE((siglen != NULL), ret, err); in bip0340_siglen() 141 MUST_HAVE(((p_bit_len <= CURVES_MAX_P_BIT_LEN) && in bip0340_siglen() 190 MUST_HAVE((key_pair != NULL) && (sig != NULL) && (adata == NULL), ret, err); in _bip0340_sign() 193 MUST_HAVE((sig_type == BIP0340), ret, err); in _bip0340_sign() 200 MUST_HAVE((hm != NULL), ret, err); in _bip0340_sign() 225 MUST_HAVE((siglen == BIP0340_SIGLEN(p_bit_len, q_bit_len)), ret, err); in _bip0340_sign() 226 MUST_HAVE((p_len == BIP0340_R_LEN(p_bit_len)), ret, err); in _bip0340_sign() [all …]
|
H A D | fuzzing_ecdsa.c | 39 MUST_HAVE((((void *)(A)) != NULL) && ((A)->magic == ECDSA_SIGN_MAGIC), ret, err) 69 MUST_HAVE((input != NULL) && (sig != NULL), ret, err); in ecdsa_sign_raw() 90 MUST_HAVE((siglen == ECDSA_SIGLEN(q_bit_len)), ret, err); in ecdsa_sign_raw() 99 MUST_HAVE(((u32)inputlen <= sizeof(hash)), ret, err); in ecdsa_sign_raw() 142 MUST_HAVE((noncelen <= (u8)(BYTECEIL(q_bit_len))), ret, err); in ecdsa_sign_raw() 178 MUST_HAVE((!iszero), ret, err); in ecdsa_sign_raw() 200 MUST_HAVE(cmp, ret, err); in ecdsa_sign_raw() 232 MUST_HAVE((!iszero), ret, err); in ecdsa_sign_raw() 275 MUST_HAVE((((void *)(A)) != NULL) && ((A)->magic == ECDSA_VERIFY_MAGIC), ret, err) 304 MUST_HAVE((input != NULL), ret, err); in ecdsa_verify_raw() [all …]
|
H A D | ecsdsa_common.c | 41 MUST_HAVE((out_pub != NULL), ret, err); in __ecsdsa_init_pub_key() 76 MUST_HAVE((siglen != NULL), ret, err); in __ecsdsa_siglen() 77 MUST_HAVE(((p_bit_len <= CURVES_MAX_P_BIT_LEN) && in __ecsdsa_siglen() 134 MUST_HAVE((((void *)(A)) != NULL) && \ 164 MUST_HAVE((ctx->h != NULL) && (ctx->h->digest_size <= MAX_DIGEST_SIZE) && in __ecsdsa_sign_init() 187 MUST_HAVE((ctx->rand == nn_get_random_mod), ret, err); in __ecsdsa_sign_init() 189 MUST_HAVE((ctx->rand != NULL), ret, err); in __ecsdsa_sign_init() 296 MUST_HAVE((sig != NULL), ret, err); in __ecsdsa_sign_finalize() 307 MUST_HAVE((siglen == ECSDSA_SIGLEN(hsize, q_bit_len)), ret, err); in __ecsdsa_sign_finalize() 333 MUST_HAVE(!nn_iszero(&e, &iszero) && !iszero, ret, err); in __ecsdsa_sign_finalize() [all …]
|
H A D | ecgdsa.c | 39 MUST_HAVE((out_pub != NULL), ret, err); in ecgdsa_init_pub_key() 48 MUST_HAVE((!nn_cmp(&(in_priv->x), q, &cmp)) && (cmp < 0), ret, err); in ecgdsa_init_pub_key() 73 MUST_HAVE((siglen != NULL), ret, err); in ecgdsa_siglen() 74 MUST_HAVE((p_bit_len <= CURVES_MAX_P_BIT_LEN) && in ecgdsa_siglen() 129 MUST_HAVE((((void *)(A)) != NULL) && \ 141 MUST_HAVE((ctx->h != NULL) && (ctx->h->digest_size <= MAX_DIGEST_SIZE) && in _ecgdsa_sign_init() 209 MUST_HAVE((sig != NULL), ret, err); in _ecgdsa_sign_finalize() 221 MUST_HAVE(((u32)BYTECEIL(p_bit_len) <= NN_MAX_BYTE_LEN), ret, err); in _ecgdsa_sign_finalize() 231 MUST_HAVE((cmp < 0), ret, err); in _ecgdsa_sign_finalize() 233 MUST_HAVE((siglen == ECGDSA_SIGLEN(q_bit_len)), ret, err); in _ecgdsa_sign_finalize() [all …]
|
/freebsd/crypto/libecc/src/examples/sig/rsa/ |
H A D | rsa_tests.h | 70 MUST_HAVE((num_tests > 1) && (i < (num_tests - 1)), ret, err); in perform_rsa_tests() 73 MUST_HAVE((t_->dP != NULL), ret, err); in perform_rsa_tests() 96 MUST_HAVE((clen == t->reslen), ret, err1); in perform_rsa_tests() 98 MUST_HAVE(cmp, ret, err1); in perform_rsa_tests() 104 MUST_HAVE((clen == t->mlen), ret, err1); in perform_rsa_tests() 106 MUST_HAVE(cmp, ret, err1); in perform_rsa_tests() 111 MUST_HAVE((clen == t->mlen), ret, err1); in perform_rsa_tests() 113 MUST_HAVE(cmp, ret, err1); in perform_rsa_tests() 123 MUST_HAVE((clen == t->reslen), ret, err1); in perform_rsa_tests() 125 MUST_HAVE(cmp, ret, err1); in perform_rsa_tests() [all …]
|
H A D | rsa.c | 86 MUST_HAVE((pub != NULL), ret, err); in rsa_import_pub_key() 106 MUST_HAVE((priv != NULL), ret, err); in rsa_import_simple_priv_key() 108 MUST_HAVE(((p != NULL) && (q != NULL)) || ((p == NULL) && (q == NULL)), ret, err); in rsa_import_simple_priv_key() 142 MUST_HAVE((priv != NULL), ret, err); in rsa_import_crt_priv_key() 158 MUST_HAVE((coeffslens != NULL), ret, err); in rsa_import_crt_priv_key() 159 MUST_HAVE((u > 0) && (u < MAX_CRT_COEFFS), ret, err); in rsa_import_crt_priv_key() 187 MUST_HAVE((buflen <= 0xffff), ret, err); in rsa_i2osp() 202 MUST_HAVE((buflen <= 0xffff), ret, err); in rsa_os2ip() 220 MUST_HAVE((pub != NULL), ret, err); in rsaep() 231 MUST_HAVE((!nn_cmp(m, n, &cmp)) && (cmp < 0), ret, err); in rsaep() [all …]
|
/freebsd/crypto/libecc/src/ecdh/ |
H A D | ecccdh.c | 29 MUST_HAVE((params != NULL) && (size != NULL), ret, err); in ecccdh_shared_secret_size() 30 MUST_HAVE((BYTECEIL(params->ec_fp.p_bitlen) <= 255), ret, err); in ecccdh_shared_secret_size() 46 MUST_HAVE((params != NULL) && (size != NULL), ret, err); in ecccdh_serialized_pub_key_size() 47 MUST_HAVE(((2 * BYTECEIL(params->ec_fp.p_bitlen)) <= 255), ret, err); in ecccdh_serialized_pub_key_size() 66 MUST_HAVE((out_pub != NULL), ret, err); in ecccdh_init_pub_key() 75 MUST_HAVE((!nn_cmp(&(in_priv->x), q, &cmp)) && (cmp < 0), ret, err); in ecccdh_init_pub_key() 97 MUST_HAVE((kp != NULL) && (params != NULL), ret, err); in ecccdh_gen_key_pair() 125 MUST_HAVE((kp != NULL), ret, err); in ecccdh_import_key_pair_from_priv_key_buf() 149 MUST_HAVE((!iszero), ret, err); in ecccdh_serialize_pub_key() 177 MUST_HAVE((shared_secret != NULL), ret, err); in ecccdh_derive_secret() [all …]
|
H A D | x25519_448.c | 59 MUST_HAVE((scalar != scalar_decoded), ret, err); in decode_scalar() 61 MUST_HAVE((len > 0), ret, err); in decode_scalar() 97 MUST_HAVE((u != u_decoded), ret, err); in decode_u_coordinate() 99 MUST_HAVE((len > 0), ret, err); in decode_u_coordinate() 172 MUST_HAVE((k != NULL) && (u != NULL) && (res != NULL), ret, err); in x25519_448_core() 174 MUST_HAVE(((len == X25519_SIZE) || (len == X448_SIZE)), ret, err); in x25519_448_core() 175 MUST_HAVE(((sizeof(k_) >= len) && (sizeof(u_) >= len)), ret, err); in x25519_448_core() 196 MUST_HAVE((loaded == 1), ret, err); in x25519_448_core() 220 MUST_HAVE((cmp < 0), ret, err); in x25519_448_core() 260 MUST_HAVE((!cmp), ret, err); in x25519_448_core() [all …]
|
/freebsd/crypto/libecc/src/nn/ |
H A D | nn.c | 68 MUST_HAVE((A != NULL), ret, err); in nn_check_initialized() 69 MUST_HAVE((A->magic == NN_MAGIC), ret, err); in nn_check_initialized() 70 MUST_HAVE((A->wlen <= NN_MAX_WORD_LEN), ret, err); in nn_check_initialized() 89 MUST_HAVE(((A != NULL) && (len <= NN_MAX_BYTE_LEN)), ret, err); in nn_init() 185 MUST_HAVE((in1->wlen <= NN_MAX_WORD_LEN), ret, err); in nn_cnd_swap() 186 MUST_HAVE((in2->wlen <= NN_MAX_WORD_LEN), ret, err); in nn_cnd_swap() 227 MUST_HAVE((new_wlen <= NN_MAX_WORD_LEN), ret, err); in nn_set_wlen() 228 MUST_HAVE((A->wlen <= NN_MAX_WORD_LEN), ret, err); in nn_set_wlen() 253 MUST_HAVE((A->wlen <= NN_MAX_WORD_LEN), ret, err); in nn_iszero() 254 MUST_HAVE((iszero != NULL), ret, err); in nn_iszero() [all …]
|
H A D | nn_div.c | 48 MUST_HAVE((in1->wlen >= (in2->wlen + shift)), ret, err); in _nn_cmp_shift() 49 MUST_HAVE((cmp != NULL), ret, err); in _nn_cmp_shift() 83 MUST_HAVE((out->wlen >= (in->wlen + shift)), ret, err); in _nn_cnd_sub_shift() 84 MUST_HAVE((borrow != NULL), ret, err); in _nn_cnd_sub_shift() 121 MUST_HAVE((out->wlen >= (in->wlen + shift)), ret, err); in _nn_submul_word_shift() 122 MUST_HAVE((borrow != NULL), ret, err); in _nn_submul_word_shift() 201 MUST_HAVE(!(b->wlen <= 0), ret, err); in _nn_divrem_normalized() 202 MUST_HAVE(!(a->wlen <= b->wlen), ret, err); in _nn_divrem_normalized() 203 MUST_HAVE(!(!((b->val[b->wlen - 1] >> (WORD_BITS - 1)) == WORD(1))), ret, err); in _nn_divrem_normalized() 204 MUST_HAVE(!_nn_cmp_shift(a, b, (u8)(a->wlen - b->wlen), &cmp) && (cmp < 0), ret, err); in _nn_divrem_normalized() [all …]
|
/freebsd/crypto/libecc/src/examples/sig/dsa/ |
H A D | dsa.c | 61 MUST_HAVE((priv != NULL), ret, err); in dsa_import_priv_key() 62 MUST_HAVE((p != NULL) && (q != NULL) && (g != NULL) && (x != NULL), ret, err); in dsa_import_priv_key() 72 MUST_HAVE((cmp < 0), ret, err); in dsa_import_priv_key() 75 MUST_HAVE((cmp < 0), ret, err); in dsa_import_priv_key() 78 MUST_HAVE((cmp < 0), ret, err); in dsa_import_priv_key() 97 MUST_HAVE((pub != NULL), ret, err); in dsa_import_pub_key() 98 MUST_HAVE((p != NULL) && (q != NULL) && (g != NULL) && (y != NULL), ret, err); in dsa_import_pub_key() 108 MUST_HAVE((cmp < 0), ret, err); in dsa_import_pub_key() 111 MUST_HAVE((cmp < 0), ret, err); in dsa_import_pub_key() 114 MUST_HAVE((cmp < 0), ret, err); in dsa_import_pub_key() [all …]
|
/freebsd/crypto/libecc/src/utils/ |
H A D | utils.c | 30 MUST_HAVE((a != NULL) && (b != NULL) && (check != NULL), ret, err); in are_equal() 56 MUST_HAVE((dst != NULL) && (src != NULL), ret, err); in local_memcpy() 80 MUST_HAVE((v != NULL), ret, err); in local_memset() 103 MUST_HAVE((s1 != NULL) && (s2 != NULL) && (check != NULL), ret, err); in are_str_equal() 129 MUST_HAVE((s1 != NULL) && (s2 != NULL) && (check != NULL), ret, err); in are_str_equal_nlen() 156 MUST_HAVE((s != NULL) && (len != NULL), ret, err); in local_strlen() 179 MUST_HAVE((s != NULL) && (len != NULL), ret, err); in local_strnlen() 200 MUST_HAVE((dst != NULL) && (src != NULL), ret, err); in local_strncpy() 222 MUST_HAVE((dst != NULL) && (src != NULL), ret, err); in local_strncat()
|
/freebsd/crypto/libecc/src/fp/ |
H A D | fp.c | 35 MUST_HAVE(((ctx != NULL) && (ctx->magic == FP_CTX_MAGIC)), ret, err); in fp_ctx_check_initialized() 61 MUST_HAVE((ctx != NULL), ret, err); in fp_ctx_init() 95 MUST_HAVE((ctx != NULL), ret, err); in fp_ctx_init_from_p() 140 …MUST_HAVE(((in != NULL) && (in->magic == FP_MAGIC) && (in->ctx != NULL) && (in->ctx->magic == FP_C… in fp_check_initialized() 154 MUST_HAVE((in != NULL), ret, err); in fp_init() 215 MUST_HAVE((cmp < 0), ret, err); in fp_set_nn() 274 MUST_HAVE((cmp > 0), ret, err); in fp_set_word_value() 301 MUST_HAVE((in1->ctx == in2->ctx), ret, err); in fp_cmp() 336 MUST_HAVE((out != NULL), ret, err); in fp_copy() 339 MUST_HAVE((out->ctx == in->ctx), ret, err); in fp_copy() [all …]
|
H A D | fp_add.c | 33 MUST_HAVE(((&(in1->ctx->p)) == (&(in2->ctx->p))), ret, err); in fp_add() 34 MUST_HAVE(((&(in1->ctx->p)) == (&(out->ctx->p))), ret, err); in fp_add() 59 MUST_HAVE(((&(in->ctx->p)) == (&(out->ctx->p))), ret, err); in fp_inc() 83 MUST_HAVE(((&(in1->ctx->p)) == (&(in2->ctx->p))), ret, err); in fp_sub() 84 MUST_HAVE(((&(in1->ctx->p)) == (&(out->ctx->p))), ret, err); in fp_sub() 109 MUST_HAVE(((&(in->ctx->p)) == (&(out->ctx->p))), ret, err); in fp_dec() 132 MUST_HAVE(((&(in->ctx->p)) == (&(out->ctx->p))), ret, err); in fp_neg()
|
/freebsd/crypto/libecc/src/tests/ |
H A D | ec_utils.c | 63 MUST_HAVE(file != NULL, ret, err); in export_private_key() 85 MUST_HAVE(name != NULL, ret, err); in export_private_key() 120 MUST_HAVE(file != NULL, ret, err); in export_public_key() 141 MUST_HAVE(name != NULL, ret, err); in export_public_key() 245 MUST_HAVE(ec_name != NULL, ret, err); in generate_and_export_key_pair() 246 MUST_HAVE(fname_prefix != NULL, ret, err); in generate_and_export_key_pair() 247 MUST_HAVE(ec_sig_name != NULL, ret, err); in generate_and_export_key_pair() 274 MUST_HAVE(len <= 0xffff, ret, err); in generate_and_export_key_pair() 381 MUST_HAVE((in_fname != NULL), ret, err); in store_sig() 382 MUST_HAVE((out_fname != NULL), ret, err); in store_sig() [all …]
|