Home
last modified time | relevance | path

Searched refs:plen (Results 1 – 25 of 393) sorted by relevance

12345678910>>...16

/freebsd/sys/contrib/libsodium/test/default/
H A Dchacha20.c29 size_t plen; in tv() local
40 for (plen = 1U; plen < sizeof out; plen++) { in tv()
43 if (memcmp(part, zero, plen) != 0) { in tv()
50 for (plen = 1U; plen < 66; plen += 3) { in tv()
51 memset(out, (int) (plen & 0xff), sizeof out); in tv()
52 crypto_stream_chacha20(out, plen, nonce, key); in tv()
116 size_t plen; in tv_ietf() local
128 for (plen = 1U; plen < sizeof out; plen++) { in tv_ietf()
131 if (memcmp(part, zero, plen) != 0) { in tv_ietf()
138 for (plen = 1U; plen < 66; plen += 3) { in tv_ietf()
[all …]
/freebsd/crypto/openssl/providers/implementations/ciphers/
H A Dcipher_chacha20_poly1305_hw.c143 ctx->len.text = plen; in chacha20_poly1305_tls_cipher()
145 if (plen) { in chacha20_poly1305_tls_cipher()
151 in += plen; in chacha20_poly1305_tls_cipher()
152 out += plen; in chacha20_poly1305_tls_cipher()
168 ctx->len.text = plen; in chacha20_poly1305_tls_cipher()
212 in += plen; in chacha20_poly1305_tls_cipher()
213 out += plen; in chacha20_poly1305_tls_cipher()
318 plen = inl; in chacha20_poly1305_aead_cipher()
325 in += plen; in chacha20_poly1305_aead_cipher()
331 in += plen; in chacha20_poly1305_aead_cipher()
[all …]
H A Dcipher_rc4_hmac_md5_hw.c61 size_t plen = ctx->payload_length; in cipher_hw_rc4_hmac_md5_cipher() local
63 if (plen != NO_PAYLOAD_LENGTH && len != (plen + MD5_DIGEST_LENGTH)) in cipher_hw_rc4_hmac_md5_cipher()
67 if (plen == NO_PAYLOAD_LENGTH) in cipher_hw_rc4_hmac_md5_cipher()
68 plen = len; in cipher_hw_rc4_hmac_md5_cipher()
74 if (plen > md5_off in cipher_hw_rc4_hmac_md5_cipher()
75 && (blocks = (plen - md5_off) / MD5_CBLOCK) in cipher_hw_rc4_hmac_md5_cipher()
94 MD5_Update(&ctx->md, in + md5_off, plen - md5_off); in cipher_hw_rc4_hmac_md5_cipher()
96 if (plen != len) { /* "TLS" mode of operation */ in cipher_hw_rc4_hmac_md5_cipher()
101 MD5_Final(out + plen, &ctx->md); in cipher_hw_rc4_hmac_md5_cipher()
104 MD5_Final(out + plen, &ctx->md); in cipher_hw_rc4_hmac_md5_cipher()
[all …]
/freebsd/contrib/bearssl/src/rsa/
H A Drsa_i15_modulus.c34 size_t nlen, plen, qlen, tlen; in br_rsa_i15_compute_modulus() local
40 plen = sk->plen; in br_rsa_i15_compute_modulus()
41 while (plen > 0 && *pbuf == 0) { in br_rsa_i15_compute_modulus()
43 plen --; in br_rsa_i15_compute_modulus()
58 if ((15 * tlen) < (plen << 3) + 15) { in br_rsa_i15_compute_modulus()
61 br_i15_decode(t, pbuf, plen); in br_rsa_i15_compute_modulus()
63 plen = (p[0] + 31) >> 4; in br_rsa_i15_compute_modulus()
64 t += plen; in br_rsa_i15_compute_modulus()
65 tlen -= plen; in br_rsa_i15_compute_modulus()
83 if (tlen < (plen + qlen + 1)) { in br_rsa_i15_compute_modulus()
H A Drsa_i31_modulus.c34 size_t nlen, plen, qlen, tlen; in br_rsa_i31_compute_modulus() local
40 plen = sk->plen; in br_rsa_i31_compute_modulus()
41 while (plen > 0 && *pbuf == 0) { in br_rsa_i31_compute_modulus()
43 plen --; in br_rsa_i31_compute_modulus()
58 if ((31 * tlen) < (plen << 3) + 31) { in br_rsa_i31_compute_modulus()
61 br_i31_decode(t, pbuf, plen); in br_rsa_i31_compute_modulus()
63 plen = (p[0] + 63) >> 5; in br_rsa_i31_compute_modulus()
64 t += plen; in br_rsa_i31_compute_modulus()
65 tlen -= plen; in br_rsa_i31_compute_modulus()
83 if (tlen < (plen + qlen + 1)) { in br_rsa_i31_compute_modulus()
H A Drsa_i31_pubexp.c32 get_pubexp(const unsigned char *pbuf, size_t plen, in get_pubexp() argument
55 while (plen > 0 && *pbuf == 0) { in get_pubexp()
57 plen --; in get_pubexp()
59 if (plen == 0 || plen < 5 || plen > (BR_MAX_RSA_FACTOR / 8)) { in get_pubexp()
71 if (dplen > plen || dplen == 0 in get_pubexp()
72 || (dplen == plen && dpbuf[0] > pbuf[0])) in get_pubexp()
80 if ((pbuf[plen - 1] & 3) != 3 || (dpbuf[dplen - 1] & 1) != 1) { in get_pubexp()
88 br_i31_decode(p, pbuf, plen); in get_pubexp()
149 ep = get_pubexp(sk->p, sk->plen, sk->dp, sk->dplen); in br_rsa_i31_compute_pubexp()
H A Drsa_i15_pubexp.c32 get_pubexp(const unsigned char *pbuf, size_t plen, in get_pubexp() argument
55 while (plen > 0 && *pbuf == 0) { in get_pubexp()
57 plen --; in get_pubexp()
59 if (plen == 0 || plen < 5 || plen > (BR_MAX_RSA_FACTOR / 8)) { in get_pubexp()
71 if (dplen > plen || dplen == 0 in get_pubexp()
72 || (dplen == plen && dpbuf[0] > pbuf[0])) in get_pubexp()
80 if ((pbuf[plen - 1] & 3) != 3 || (dpbuf[dplen - 1] & 1) != 1) { in get_pubexp()
88 br_i15_decode(p, pbuf, plen); in get_pubexp()
149 ep = get_pubexp(sk->p, sk->plen, sk->dp, sk->dplen); in br_rsa_i15_compute_pubexp()
H A Drsa_i15_privexp.c64 size_t plen, qlen, u, len, dlen; in br_rsa_i15_compute_privexp() local
79 plen = sk->plen; in br_rsa_i15_compute_privexp()
80 while (plen > 0 && *pbuf == 0) { in br_rsa_i15_compute_privexp()
82 plen --; in br_rsa_i15_compute_privexp()
84 if (plen < 5 || plen > (BR_MAX_RSA_FACTOR / 8) in br_rsa_i15_compute_privexp()
85 || (pbuf[plen - 1] & 1) != 1) in br_rsa_i15_compute_privexp()
110 br_i15_decode(p, pbuf, plen); in br_rsa_i15_compute_privexp()
111 plen = (p[0] + 15) >> 4; in br_rsa_i15_compute_privexp()
112 q = p + 1 + plen; in br_rsa_i15_compute_privexp()
H A Drsa_i31_privexp.c64 size_t plen, qlen, u, len, dlen; in br_rsa_i31_compute_privexp() local
79 plen = sk->plen; in br_rsa_i31_compute_privexp()
80 while (plen > 0 && *pbuf == 0) { in br_rsa_i31_compute_privexp()
82 plen --; in br_rsa_i31_compute_privexp()
84 if (plen < 5 || plen > (BR_MAX_RSA_FACTOR / 8) in br_rsa_i31_compute_privexp()
85 || (pbuf[plen - 1] & 1) != 1) in br_rsa_i31_compute_privexp()
110 br_i31_decode(p, pbuf, plen); in br_rsa_i31_compute_privexp()
111 plen = (p[0] + 31) >> 5; in br_rsa_i31_compute_privexp()
112 q = p + 1 + plen; in br_rsa_i31_compute_privexp()
/freebsd/crypto/openssl/crypto/evp/
H A De_chacha20_poly1305.c241 if (plen) { in chacha20_poly1305_tls_cipher()
247 in += plen; in chacha20_poly1305_tls_cipher()
248 out += plen; in chacha20_poly1305_tls_cipher()
308 in += plen; in chacha20_poly1305_tls_cipher()
309 out += plen; in chacha20_poly1305_tls_cipher()
407 plen = len; in chacha20_poly1305_cipher()
414 in += plen; in chacha20_poly1305_cipher()
415 out += plen; in chacha20_poly1305_cipher()
420 in += plen; in chacha20_poly1305_cipher()
421 out += plen; in chacha20_poly1305_cipher()
[all …]
H A De_rc4_hmac_md5.c86 size_t plen = key->payload_length; in rc4_hmac_md5_cipher() local
88 if (plen != NO_PAYLOAD_LENGTH && len != (plen + MD5_DIGEST_LENGTH)) in rc4_hmac_md5_cipher()
92 if (plen == NO_PAYLOAD_LENGTH) in rc4_hmac_md5_cipher()
93 plen = len; in rc4_hmac_md5_cipher()
99 if (plen > md5_off && (blocks = (plen - md5_off) / MD5_CBLOCK) && in rc4_hmac_md5_cipher()
118 MD5_Update(&key->md, in + md5_off, plen - md5_off); in rc4_hmac_md5_cipher()
120 if (plen != len) { /* "TLS" mode of operation */ in rc4_hmac_md5_cipher()
125 MD5_Final(out + plen, &key->md); in rc4_hmac_md5_cipher()
127 MD5_Update(&key->md, out + plen, MD5_DIGEST_LENGTH); in rc4_hmac_md5_cipher()
128 MD5_Final(out + plen, &key->md); in rc4_hmac_md5_cipher()
[all …]
/freebsd/sys/dev/nvmf/
H A Dnvmf_tcp.h39 uint32_t data_len, plen; in nvmf_tcp_validate_pdu_header() local
43 plen = le32toh(ch->plen); in nvmf_tcp_validate_pdu_header()
75 if (plen < sizeof(struct nvme_tcp_term_req_hdr) || in nvmf_tcp_validate_pdu_header()
76 plen > NVME_TCP_TERM_REQ_PDU_MAX_SIZE) { in nvmf_tcp_validate_pdu_header()
210 if (full_hlen == plen && ch->pdo == 0) in nvmf_tcp_validate_pdu_header()
213 if (ch->pdo < full_hlen || ch->pdo > plen || in nvmf_tcp_validate_pdu_header()
225 if (plen < ch->hlen) { in nvmf_tcp_validate_pdu_header()
226 printf("NVMe/TCP: Invalid PDU length %u\n", plen); in nvmf_tcp_validate_pdu_header()
232 if (plen == full_hlen) in nvmf_tcp_validate_pdu_header()
235 data_len = plen - ch->pdo; in nvmf_tcp_validate_pdu_header()
[all …]
/freebsd/contrib/tcpdump/
H A Dprint-bgp.c592 if (32 < plen) in decode_prefix4()
631 if (24 > plen) in decode_labeled_prefix4()
636 if (32 < plen) in decode_labeled_prefix4()
650 plen, in decode_labeled_prefix4()
993 u_int plen; in decode_rt_routing_info() local
1050 u_int plen; in decode_labeled_vpn_prefix4() local
1059 if (32 < plen) in decode_labeled_vpn_prefix4()
1260 tlen = plen; in decode_labeled_vpn_l2()
1440 u_int plen; in decode_labeled_vpn_prefix6() local
1474 u_int plen; in decode_clnp_prefix() local
[all …]
H A Dprint-babel.c210 if(plen >= 0) in network_prefix()
211 pb = (plen + 7) / 8; in network_prefix()
538 u_char ae, plen; in babel_print_v2_tlvs() local
579 u_char prefix[16], ae, plen; in babel_print_v2_tlvs() local
600 u_char prefix[16], ae, plen; in babel_print_v2_tlvs() local
656 plen = GET_U_1(message + 4); in babel_print_v2_tlvs()
666 plen += 96; in babel_print_v2_tlvs()
696 plen = GET_U_1(message + 3); in babel_print_v2_tlvs()
702 plen += 96; in babel_print_v2_tlvs()
731 plen = GET_U_1(message + 3); in babel_print_v2_tlvs()
[all …]
/freebsd/contrib/wpa/src/tls/
H A Dtlsv1_record.c356 size_t plen; in tlsv1_record_receive() local
362 plen = in_len; in tlsv1_record_receive()
364 "data", out_data, plen); in tlsv1_record_receive()
388 plen -= rl->iv_size; in tlsv1_record_receive()
392 if (plen == 0) { in tlsv1_record_receive()
399 if (padlen >= plen) { in tlsv1_record_receive()
407 for (i = plen - padlen - 1; i < plen - 1; i++) { in tlsv1_record_receive()
419 plen -= padlen + 1; in tlsv1_record_receive()
434 plen -= rl->hash_size; in tlsv1_record_receive()
448 WPA_PUT_BE16(len, plen); in tlsv1_record_receive()
[all …]
/freebsd/sys/i386/i386/
H A Dcopyout.c97 int error, i, plen; in cp_slow0() local
106 if (i != plen) in cp_slow0()
162 size_t plen; in copyinstr() local
168 plen < maxlen && !ca.end; uc += ca.alen, plen += ca.alen) { in copyinstr()
183 *lencopied = plen; in copyinstr()
206 size_t plen; in copyin() local
215 plen < len; uc += ca.len, ca.kc += ca.len, plen += ca.len) { in copyin()
220 ca.len = len - plen; in copyin()
241 size_t plen; in copyout() local
250 plen < len; uc += ca.len, ca.kc += ca.len, plen += ca.len) { in copyout()
[all …]
/freebsd/sys/contrib/dpdk_rte_lpm/
H A Ddpdk_lpm6.c177 rt = rt_get_inet6_parent(dd->fibnum, addr6, plen); in pack_parent_rule()
183 if (plen > 0) { in pack_parent_rule()
187 *pplen = plen; in pack_parent_rule()
196 const struct in6_addr *addr6, int plen) in handle_gu_change() argument
218 abuf, plen, in handle_gu_change()
253 int plen; in handle_any_change() local
259 else if (plen == 0) in handle_any_change()
262 ret = handle_gu_change(dd, rc, &addr6, plen); in handle_any_change()
304 int plen; in add_route_cb() local
325 if (plen == 0) { in add_route_cb()
[all …]
H A Ddpdk_lpm.c142 rt = rt_get_inet_parent(dd->fibnum, addr, plen); in get_parent_rule()
162 const struct in_addr addr, int plen) in handle_gu_change() argument
184 ret = rte_lpm_add(dd->lpm, ip, plen, nhidx); in handle_gu_change()
187 abuf, plen, in handle_gu_change()
221 int plen; in handle_rtable_change_cb() local
226 if (plen != 0) in handle_rtable_change_cb()
227 ret = handle_gu_change(dd, rc, addr4, plen); in handle_rtable_change_cb()
251 int plen, ret; in add_route_cb() local
256 rt_get_inet_prefix_plen(rt, &addr4, &plen, &scopeid); in add_route_cb()
263 if (plen == 0) { in add_route_cb()
[all …]
/freebsd/sbin/ipfw/
H A Dnptv6.c192 int tcmd, flags, plen; in nptv6_create() local
195 plen = 0; in nptv6_create()
210 if (plen > 0) in nptv6_create()
221 if (plen > 0) in nptv6_create()
239 plen = strtol(*av, &p, 10); in nptv6_create()
241 if (*p != '\0' || plen < 8 || plen > 64) in nptv6_create()
244 if (cfg->plen > 0 && cfg->plen != plen) { in nptv6_create()
247 cfg->plen, plen, MAX(plen, cfg->plen)); in nptv6_create()
248 plen = MAX(plen, cfg->plen); in nptv6_create()
250 cfg->plen = plen; in nptv6_create()
[all …]
/freebsd/lib/libc/db/btree/
H A Dbt_overflow.c78 size_t nb, plen; in __ovfl_get() local
101 plen = t->bt_psize - BTDATAOFF; in __ovfl_get()
106 nb = MIN(sz, plen); in __ovfl_get()
133 size_t nb, plen; in __ovfl_put() local
140 plen = t->bt_psize - BTDATAOFF; in __ovfl_put()
142 p = (char *)p + plen, last = h) { in __ovfl_put()
151 nb = MIN(sz, plen); in __ovfl_put()
183 size_t plen; in __ovfl_delete() local
203 for (plen = t->bt_psize - BTDATAOFF;; sz -= plen) { in __ovfl_delete()
206 if (sz <= plen) in __ovfl_delete()
/freebsd/usr.sbin/ppp/
H A Dtcpmss.c156 size_t hlen, plen; in tcpmss_Check() local
162 plen = m_length(bp); in tcpmss_Check()
163 if (plen < sizeof(struct ip)) in tcpmss_Check()
175 ntohs(pip->ip_len) == plen && hlen <= plen && in tcpmss_Check()
176 plen >= sizeof(struct tcphdr) + hlen) in tcpmss_Check()
177 MSSFixup((struct tcphdr *)(MBUF_CTOP(bp) + hlen), plen - hlen, in tcpmss_Check()
187 if (plen < sizeof(struct ip6_hdr)) in tcpmss_Check()
190 if (ntohs(pip6->ip6_plen) + sizeof(struct ip6_hdr) != plen) in tcpmss_Check()
198 if (plen >= sizeof(struct ip6_frag) + sizeof(struct ip6_hdr)) { in tcpmss_Check()
206 if (hlen > 0 && plen >= sizeof(struct tcphdr) + hlen) in tcpmss_Check()
[all …]
/freebsd/contrib/libpcap/rpcapd/
H A Ddaemon.c133 uint32 plen);
314 plen = header.plen; in daemon_serviceloop()
559 plen = header.plen; in daemon_serviceloop()
805 plen = header.plen; in daemon_serviceloop()
1171 else if (plen == 0) in daemon_msg_err()
1190 remote_errbuf[plen] = '\0'; in daemon_msg_err()
1865 if (plen > sourcelen - 1) in daemon_msg_open_req()
1879 plen -= nread; in daemon_msg_open_req()
2929 headerp->plen = ntohl(headerp->plen); in rpcapd_recv_msg_header()
2948 if (toread > *plen) in rpcapd_recv()
[all …]
/freebsd/sys/netpfil/ipfw/nat64/
H A Dnat64_translate.c355 switch (plen) { in nat64_embed_ip4()
409 switch (plen) { in nat64_extract_ip4()
433 switch (plen) { in nat64_extract_ip4()
543 int plen; in nat64_fragment6() local
585 if (len > plen) in nat64_fragment6()
586 len = plen; in nat64_fragment6()
592 plen -= len; in nat64_fragment6()
593 if (plen > 0) { in nat64_fragment6()
795 int len, plen; in nat64_icmp_reflect() local
1234 int plen, hlen; in nat64_do_handle_ip4() local
[all …]
/freebsd/crypto/openssl/crypto/asn1/
H A Dbio_ndef.c45 static int ndef_prefix(BIO *b, unsigned char **pbuf, int *plen, void *parg);
46 static int ndef_prefix_free(BIO *b, unsigned char **pbuf, int *plen,
48 static int ndef_suffix(BIO *b, unsigned char **pbuf, int *plen, void *parg);
49 static int ndef_suffix_free(BIO *b, unsigned char **pbuf, int *plen,
129 static int ndef_prefix(BIO *b, unsigned char **pbuf, int *plen, void *parg) in ndef_prefix() argument
155 *plen = *ndef_aux->boundary - *pbuf; in ndef_prefix()
160 static int ndef_prefix_free(BIO *b, unsigned char **pbuf, int *plen, in ndef_prefix_free() argument
177 *plen = 0; in ndef_prefix_free()
181 static int ndef_suffix_free(BIO *b, unsigned char **pbuf, int *plen, in ndef_suffix_free() argument
185 if (!ndef_prefix_free(b, pbuf, plen, parg)) in ndef_suffix_free()
[all …]
/freebsd/sys/kgssapi/krb5/
H A Dkcrypto_aes.c179 size_t blocklen = 16, plen; in aes_encrypt() local
197 plen = len % blocklen; in aes_encrypt()
204 } else if (plen == 0) { in aes_encrypt()
235 off = skip + len - blocklen - plen; in aes_encrypt()
237 for (i = plen; i < blocklen; i++) in aes_encrypt()
242 m_copyback(inout, off + blocklen, plen, last2.cn_1); in aes_encrypt()
250 size_t blocklen = 16, plen; in aes_decrypt() local
267 plen = len % blocklen; in aes_decrypt()
274 } else if (plen == 0) { in aes_decrypt()
297 off = skip + len - plen - blocklen; in aes_decrypt()
[all …]

12345678910>>...16