Home
last modified time | relevance | path

Searched refs:BYTECEIL (Results 1 – 25 of 37) sorted by relevance

12

/freebsd/crypto/libecc/src/examples/sig/kcdsa/
H A Dkcdsa.c193 if(hlen <= (u16)BYTECEIL(beta)){ in kcdsa_sign()
197 curr_rlen = (u16)BYTECEIL(beta); in kcdsa_sign()
199 curr_siglen = (u16)(curr_rlen + BYTECEIL(beta)); in kcdsa_sign()
231 MUST_HAVE((sizeof(pi_buf) >= (u16)BYTECEIL(alpha)), ret, err); in kcdsa_sign()
232 ret = _i2osp(pi, pi_buf, (u16)BYTECEIL(alpha)); EG(ret, err); in kcdsa_sign()
234 if(hlen <= (u16)BYTECEIL(beta)){ in kcdsa_sign()
238 ret = gen_hash_update(&hash_ctx, pi_buf, (u16)BYTECEIL(alpha), kcdsa_hash); EG(ret, err); in kcdsa_sign()
242 MUST_HAVE((block_size <= (u16)BYTECEIL(alpha)), ret, err); in kcdsa_sign()
243 ret = _i2osp(y, pi_buf, (u16)BYTECEIL(alpha)); EG(ret, err); in kcdsa_sign()
244 ret = buf_lshift(pi_buf, (u16)BYTECEIL(alpha), (u16)(BYTECEIL(alpha) - block_size)); EG(ret, err); in kcdsa_sign()
[all …]
/freebsd/crypto/libecc/include/libecc/sig/
H A Dec_key.h73 …PRIV_KEY_MAX_SIZE (LOCAL_MAX(MAX_DIGEST_SIZE, LOCAL_MAX(BYTECEIL(CURVES_MAX_Q_BIT_LEN), BYTECEIL(C…
76 …((u8)(LOCAL_MAX(MAX_DIGEST_SIZE, LOCAL_MAX(BYTECEIL((priv_key)->params->ec_gen_order_bitlen), BYTE…
80 #define EC_PRIV_KEY_MAX_SIZE (LOCAL_MAX(BYTECEIL(CURVES_MAX_Q_BIT_LEN), BYTECEIL(CURVES_MAX_P_BIT_L…
83 …((u8)(LOCAL_MAX(BYTECEIL((priv_key)->params->ec_gen_order_bitlen), BYTECEIL((priv_key)->params->ec…
133 #define EC_PUB_KEY_MAX_SIZE (3 * BYTECEIL(CURVES_MAX_P_BIT_LEN))
136 (3 * BYTECEIL((pub_key)->params->ec_curve.a.ctx->p_bitlen))
H A Decrdsa.h29 #define ECRDSA_R_LEN(q_bit_len) (BYTECEIL(q_bit_len))
30 #define ECRDSA_S_LEN(q_bit_len) (BYTECEIL(q_bit_len))
H A Decgdsa.h29 #define ECGDSA_R_LEN(q_bit_len) (BYTECEIL(q_bit_len))
30 #define ECGDSA_S_LEN(q_bit_len) (BYTECEIL(q_bit_len))
H A Deckcdsa.h28 #define ECKCDSA_R_LEN(hsize, q_bit_len) LOCAL_MIN(hsize, BYTECEIL(q_bit_len))
29 #define ECKCDSA_S_LEN(q_bit_len) (BYTECEIL(q_bit_len))
H A Dsm2.h25 #define SM2_R_LEN(q_bit_len) (BYTECEIL(q_bit_len))
26 #define SM2_S_LEN(q_bit_len) (BYTECEIL(q_bit_len))
H A Decdsa_common.h29 #define ECDSA_R_LEN(q_bit_len) (BYTECEIL(q_bit_len))
30 #define ECDSA_S_LEN(q_bit_len) (BYTECEIL(q_bit_len))
H A Dbip0340.h23 #define BIP0340_R_LEN(p_bit_len) (BYTECEIL(p_bit_len))
24 #define BIP0340_S_LEN(q_bit_len) (BYTECEIL(q_bit_len))
H A Decfsdsa.h28 #define ECFSDSA_R_LEN(p_bit_len) (2 * (BYTECEIL(p_bit_len)))
29 #define ECFSDSA_S_LEN(q_bit_len) (BYTECEIL(q_bit_len))
H A Dbign_common.h34 #define BIGN_S0_LEN(q_bit_len) (BYTECEIL(q_bit_len) / 2)
35 #define BIGN_S1_LEN(q_bit_len) (BYTECEIL(q_bit_len))
H A Decosdsa.h30 #define ECOSDSA_S_LEN(q_bit_len) (BYTECEIL(q_bit_len))
H A Decsdsa.h29 #define ECSDSA_S_LEN(q_bit_len) (BYTECEIL(q_bit_len))
/freebsd/crypto/libecc/src/ecdh/
H A Decccdh.c30 MUST_HAVE((BYTECEIL(params->ec_fp.p_bitlen) <= 255), ret, err); in ecccdh_shared_secret_size()
32 (*size) = (u8)(BYTECEIL(params->ec_fp.p_bitlen)); in ecccdh_shared_secret_size()
47 MUST_HAVE(((2 * BYTECEIL(params->ec_fp.p_bitlen)) <= 255), ret, err); in ecccdh_serialized_pub_key_size()
49 (*size) = (u8)(2 * BYTECEIL(params->ec_fp.p_bitlen)); in ecccdh_serialized_pub_key_size()
/freebsd/crypto/libecc/src/examples/sig/sdsa/
H A Dsdsa.c145 MUST_HAVE((siglen == (hlen + BYTECEIL(beta))), ret, err); in sdsa_sign()
172 ret = _i2osp(pi, pi_buf, (u16)BYTECEIL(alpha)); EG(ret, err); in sdsa_sign()
176 ret = gen_hash_update(&hash_ctx, pi_buf, (u16)BYTECEIL(alpha), sdsa_hash); EG(ret, err); in sdsa_sign()
302 MUST_HAVE((siglen == (hlen + BYTECEIL(beta))), ret, err); in sdsa_verify()
338 ret = _i2osp(&pi, pi_buf, (u16)BYTECEIL(alpha)); EG(ret, err); in sdsa_verify()
341 ret = gen_hash_update(&hash_ctx, pi_buf, (u16)BYTECEIL(alpha), sdsa_hash); EG(ret, err); in sdsa_verify()
/freebsd/crypto/libecc/src/sig/
H A Deckcdsa.c204 u8 tmp_buf[LOCAL_MAX(2 * BYTECEIL(CURVES_MAX_P_BIT_LEN), MAX_BLOCK_SIZE)]; in _eckcdsa_sign_init()
222 p_len = (u8)BYTECEIL(pub_key->params->ec_fp.p_bitlen); in _eckcdsa_sign_init()
304 u8 tmp_buf[BYTECEIL(CURVES_MAX_P_BIT_LEN)]; in _eckcdsa_sign_finalize()
336 p_len = (u8)BYTECEIL(priv_key->params->ec_fp.p_bitlen); in _eckcdsa_sign_finalize()
549 u8 tmp_buf[LOCAL_MAX(2 * BYTECEIL(CURVES_MAX_P_BIT_LEN), MAX_BLOCK_SIZE)]; in _eckcdsa_verify_init()
572 p_len = (u8)BYTECEIL(pub_key->params->ec_fp.p_bitlen); in _eckcdsa_verify_init()
694 u8 tmp_buf[BYTECEIL(CURVES_MAX_P_BIT_LEN)]; in _eckcdsa_verify_finalize()
737 p_len = (u8)BYTECEIL(p_bit_len); in _eckcdsa_verify_finalize()
H A Decsdsa_common.c144 u8 Wx[BYTECEIL(CURVES_MAX_P_BIT_LEN)]; in __ecsdsa_sign_init()
145 u8 Wy[BYTECEIL(CURVES_MAX_P_BIT_LEN)]; in __ecsdsa_sign_init()
172 p_len = (u8)BYTECEIL(p_bit_len); in __ecsdsa_sign_init()
435 u8 Wprimex[BYTECEIL(CURVES_MAX_P_BIT_LEN)]; in __ecsdsa_verify_init()
436 u8 Wprimey[BYTECEIL(CURVES_MAX_P_BIT_LEN)]; in __ecsdsa_verify_init()
466 p_len = (u8)BYTECEIL(pub_key->params->ec_fp.p_bitlen); in __ecsdsa_verify_init()
H A Decfsdsa.c151 MUST_HAVE(((u32)BYTECEIL(p_bit_len) <= NN_MAX_BYTE_LEN), ret, err); in _ecfsdsa_sign_init()
152 p_len = (u8)BYTECEIL(p_bit_len); in _ecfsdsa_sign_init()
442 p_len = (u8)BYTECEIL(p_bit_len); in _ecfsdsa_verify_init()
576 p_len = (u8)BYTECEIL(p_bit_len); in _ecfsdsa_verify_finalize()
720 p_len = (u8)BYTECEIL(p_bit_len); in _ecfsdsa_verify_batch_no_memory()
721 q_len = (u8)BYTECEIL(q_bit_len); in _ecfsdsa_verify_batch_no_memory()
940 p_len = (u8)BYTECEIL(p_bit_len); in _ecfsdsa_verify_batch()
941 q_len = (u8)BYTECEIL(q_bit_len); in _ecfsdsa_verify_batch()
H A Dbign_common.c206 u8 FE2OS_D[LOCAL_MAX(BYTECEIL(CURVES_MAX_Q_BIT_LEN), 2 * BELT_HASH_DIGEST_SIZE)]; in __bign_determinitic_nonce()
227 q_len = (u8)BYTECEIL(q_bit_len); in __bign_determinitic_nonce()
476 u8 FE2OS_W[LOCAL_MAX(2 * BYTECEIL(CURVES_MAX_P_BIT_LEN), 2 * BIGN_S0_LEN(CURVES_MAX_Q_BIT_LEN))]; in __bign_sign_finalize()
516 p_len = (u8)BYTECEIL(p_bit_len); in __bign_sign_finalize()
749 u8 TMP[BYTECEIL(CURVES_MAX_Q_BIT_LEN)]; in __bign_verify_init()
851 u8 FE2OS_W[LOCAL_MAX(2 * BYTECEIL(CURVES_MAX_P_BIT_LEN), 2 * BIGN_S0_LEN(CURVES_MAX_Q_BIT_LEN))]; in __bign_verify_finalize()
894 p_len = (u8)BYTECEIL(p_bit_len); in __bign_verify_finalize()
H A Dbip0340.c210 q_len = (u8)BYTECEIL(q_bit_len); in _bip0340_sign()
211 p_len = (u8)BYTECEIL(p_bit_len); in _bip0340_sign()
411 p_len = (u8)BYTECEIL(p_bit_len); in _bip0340_verify_init()
412 q_len = (u8)BYTECEIL(q_bit_len); in _bip0340_verify_init()
832 u8 chacha20_scalar[BYTECEIL(CURVES_MAX_Q_BIT_LEN)]; in _bip0340_verify_batch_no_memory()
880 p_len = (u8)BYTECEIL(p_bit_len); in _bip0340_verify_batch_no_memory()
881 q_len = (u8)BYTECEIL(q_bit_len); in _bip0340_verify_batch_no_memory()
1055 u8 chacha20_scalar[BYTECEIL(CURVES_MAX_Q_BIT_LEN)]; in _bip0340_verify_batch()
1137 p_len = (u8)BYTECEIL(p_bit_len); in _bip0340_verify_batch()
1138 q_len = (u8)BYTECEIL(q_bit_len); in _bip0340_verify_batch()
H A Dsm2.c134 #define Z_INPUT_MAX_LEN (2 + SM2_MAX_ID_LEN + (6 * BYTECEIL(CURVES_MAX_P_BIT_LEN)))
140 u8 buf[2 * BYTECEIL(CURVES_MAX_P_BIT_LEN)]; in sm2_compute_Z()
165 p_len = (u8)BYTECEIL(p_bit_len); in sm2_compute_Z()
346 q_len = (u8)BYTECEIL(q_bit_len); in _sm2_sign_finalize()
541 q_len = (u8)BYTECEIL(q_bit_len); in _sm2_verify_init()
H A Decdsa_common.c55 u8 T[BYTECEIL(CURVES_MAX_Q_BIT_LEN) + MAX_DIGEST_SIZE]; in __ecdsa_rfc6979_nonce()
69 q_len = (u8)BYTECEIL(q_bit_len); in __ecdsa_rfc6979_nonce()
142 ret = local_memcpy(&T[BYTECEIL(t_bit_len)], V, hmac_size); EG(ret, err); in __ecdsa_rfc6979_nonce()
360 q_len = (u8)BYTECEIL(q_bit_len); in __ecdsa_sign_finalize()
640 q_len = (u8)BYTECEIL(q_bit_len); in __ecdsa_verify_init()
895 q_len = (u8)BYTECEIL(q_bit_len); in __ecdsa_public_key_from_sig()
/freebsd/crypto/libecc/src/examples/basic/
H A Dcurve_ecdh.c180 (u32)(2 * BYTECEIL(curve_params.ec_fp.p_bitlen))); EG(ret, err); in ECDH_helper()
200 (u16)(2 * BYTECEIL(curve_params.ec_fp.p_bitlen)), in ECDH_helper()
/freebsd/crypto/libecc/src/examples/sig/rsa/
H A Drsa.c870 emlen = BYTECEIL(embits); in emsa_pss_encode()
1148 k = BYTECEIL(modbits); in rsaes_pkcs1_v1_5_encrypt()
1215 k = BYTECEIL(modbits); in _rsaes_pkcs1_v1_5_decrypt()
1329 k = BYTECEIL(modbits); in rsaes_oaep_encrypt()
1449 k = BYTECEIL(modbits); in _rsaes_oaep_decrypt()
1589 k = BYTECEIL(modbits); in _rsassa_pkcs1_v1_5_sign()
1662 k = BYTECEIL(modbits); in rsassa_pkcs1_v1_5_verify()
1713 k = BYTECEIL(modbits); in _rsassa_pss_sign()
1724 MUST_HAVE(emsize == BYTECEIL(modbits - 1), ret, err); in _rsassa_pss_sign()
1797 k = BYTECEIL(modbits); in rsassa_pss_verify()
[all …]
/freebsd/crypto/libecc/include/libecc/utils/
H A Dutils.h167 #define BYTECEIL(numbits) (((numbits) + 7) / 8) macro
/freebsd/crypto/libecc/src/nn/
H A Dnn_rand.c105 q_len = (bitcnt_t)BYTECEIL(q_bit_len); in nn_get_random_mod()

12