Home
last modified time | relevance | path

Searched refs:kbuf (Results 1 – 25 of 33) sorted by relevance

12

/freebsd-12.1/bin/ed/
H A Dcbc.c226 expand_des_key(char *obuf, char *kbuf) in expand_des_key() argument
234 if (kbuf[0] == '0' && (kbuf[1] == 'x' || kbuf[1] == 'X')) { in expand_des_key()
235 kbuf = &kbuf[2]; in expand_des_key()
239 for (i = 0; i < 16 && kbuf[i]; i++) in expand_des_key()
240 if ((nbuf[i] = hex_to_binary((int) kbuf[i], 16)) == -1) in expand_des_key()
254 if (kbuf[0] == '0' && (kbuf[1] == 'b' || kbuf[1] == 'B')) { in expand_des_key()
255 kbuf = &kbuf[2]; in expand_des_key()
259 for (i = 0; i < 16 && kbuf[i]; i++) in expand_des_key()
260 if ((nbuf[i] = hex_to_binary((int) kbuf[i], 2)) == -1) in expand_des_key()
274 (void)strncpy(obuf, kbuf, 8); in expand_des_key()
/freebsd-12.1/crypto/openssh/
H A Dkexecdhs.c71 u_char *kbuf = NULL; in input_kex_ecdh_init() local
125 if ((kbuf = malloc(klen)) == NULL || in input_kex_ecdh_init()
130 if (ECDH_compute_key(kbuf, klen, client_public, in input_kex_ecdh_init()
132 BN_bin2bn(kbuf, klen, shared_secret) == NULL) { in input_kex_ecdh_init()
138 dump_digest("shared secret", kbuf, klen); in input_kex_ecdh_init()
193 if (kbuf) { in input_kex_ecdh_init()
194 explicit_bzero(kbuf, klen); in input_kex_ecdh_init()
195 free(kbuf); in input_kex_ecdh_init()
H A Dkexecdhc.c106 u_char *kbuf = NULL; in input_kex_ecdh_reply() local
158 if ((kbuf = malloc(klen)) == NULL || in input_kex_ecdh_reply()
163 if (ECDH_compute_key(kbuf, klen, server_public, in input_kex_ecdh_reply()
165 BN_bin2bn(kbuf, klen, shared_secret) == NULL) { in input_kex_ecdh_reply()
171 dump_digest("shared secret", kbuf, klen); in input_kex_ecdh_reply()
211 if (kbuf) { in input_kex_ecdh_reply()
212 explicit_bzero(kbuf, klen); in input_kex_ecdh_reply()
213 free(kbuf); in input_kex_ecdh_reply()
H A Dkexdhc.c114 u_char *kbuf = NULL, *server_host_key_blob = NULL, *signature = NULL; in input_kex_dh() local
162 if ((kbuf = malloc(klen)) == NULL || in input_kex_dh()
167 if ((kout = DH_compute_key(kbuf, dh_server_pub, kex->dh)) < 0 || in input_kex_dh()
168 BN_bin2bn(kbuf, kout, shared_secret) == NULL) { in input_kex_dh()
173 dump_digest("shared secret", kbuf, kout); in input_kex_dh()
214 if (kbuf) { in input_kex_dh()
215 explicit_bzero(kbuf, klen); in input_kex_dh()
216 free(kbuf); in input_kex_dh()
H A Dkexdhs.c102 u_char *kbuf = NULL, *signature = NULL, *server_host_key_blob = NULL; in input_kex_dh_init() local
149 if ((kbuf = malloc(klen)) == NULL || in input_kex_dh_init()
154 if ((kout = DH_compute_key(kbuf, dh_client_pub, kex->dh)) < 0 || in input_kex_dh_init()
155 BN_bin2bn(kbuf, kout, shared_secret) == NULL) { in input_kex_dh_init()
160 dump_digest("shared secret", kbuf, kout); in input_kex_dh_init()
213 if (kbuf) { in input_kex_dh_init()
214 explicit_bzero(kbuf, klen); in input_kex_dh_init()
215 free(kbuf); in input_kex_dh_init()
H A Dkexgexs.c132 u_char *kbuf = NULL, *signature = NULL, *server_host_key_blob = NULL; in input_kex_dh_gex_init() local
181 if ((kbuf = malloc(klen)) == NULL || in input_kex_dh_gex_init()
186 if ((kout = DH_compute_key(kbuf, dh_client_pub, kex->dh)) < 0 || in input_kex_dh_gex_init()
187 BN_bin2bn(kbuf, kout, shared_secret) == NULL) { in input_kex_dh_gex_init()
192 dump_digest("shared secret", kbuf, kout); in input_kex_dh_gex_init()
246 if (kbuf) { in input_kex_dh_gex_init()
247 explicit_bzero(kbuf, klen); in input_kex_dh_gex_init()
248 free(kbuf); in input_kex_dh_gex_init()
H A Dkexgexc.c154 u_char *kbuf = NULL, *signature = NULL, *server_host_key_blob = NULL; in input_kex_dh_gex_reply() local
203 if ((kbuf = malloc(klen)) == NULL || in input_kex_dh_gex_reply()
208 if ((kout = DH_compute_key(kbuf, dh_server_pub, kex->dh)) < 0 || in input_kex_dh_gex_reply()
209 BN_bin2bn(kbuf, kout, shared_secret) == NULL) { in input_kex_dh_gex_reply()
214 dump_digest("shared secret", kbuf, kout); in input_kex_dh_gex_reply()
260 if (kbuf) { in input_kex_dh_gex_reply()
261 explicit_bzero(kbuf, klen); in input_kex_dh_gex_reply()
262 free(kbuf); in input_kex_dh_gex_reply()
H A Dssh-keygen.c2248 struct sshbuf *kbuf; in do_gen_krl() local
2284 if ((kbuf = sshbuf_new()) == NULL) in do_gen_krl()
2286 if (ssh_krl_to_blob(krl, kbuf, NULL, 0) != 0) in do_gen_krl()
2290 if (atomicio(vwrite, fd, sshbuf_mutable_ptr(kbuf), sshbuf_len(kbuf)) != in do_gen_krl()
2291 sshbuf_len(kbuf)) in do_gen_krl()
2294 sshbuf_free(kbuf); in do_gen_krl()
/freebsd-12.1/sys/dev/mlx5/mlx5_fpga_tools/
H A Dmlx5fpga_tools_char.c136 void *kbuf; in tools_char_read() local
151 kbuf = malloc(len, M_DEVBUF, M_WAITOK); in tools_char_read()
152 ret = mem_read(context->tdev, kbuf, len, uio->uio_offset, in tools_char_read()
155 ret = uiomove(kbuf, len1, uio); in tools_char_read()
156 free(kbuf, M_DEVBUF); in tools_char_read()
164 void *kbuf; in tools_char_write() local
180 kbuf = malloc(len, M_DEVBUF, M_WAITOK); in tools_char_write()
184 ret = uiomove(kbuf, len, uio); in tools_char_write()
187 ret = mem_write(context->tdev, kbuf, len, of, in tools_char_write()
190 free(kbuf, M_DEVBUF); in tools_char_write()
/freebsd-12.1/contrib/bearssl/src/ec/
H A Dec_pubkey.c64 void *kbuf, const br_ec_private_key *sk) in br_ec_compute_pub() argument
75 if (kbuf == NULL) { in br_ec_compute_pub()
78 len = impl->mulgen(kbuf, sk->x, sk->xlen, curve); in br_ec_compute_pub()
81 pk->q = kbuf; in br_ec_compute_pub()
H A Dec_keygen.c31 void *kbuf, int curve) in br_ec_keygen() argument
48 if (kbuf == NULL || len == 0) { in br_ec_keygen()
61 buf = kbuf; in br_ec_keygen()
/freebsd-12.1/sys/contrib/vchiq/interface/vchiq_arm/
H A Dvchiq_debugfs.c129 char kbuf[DEBUGFS_WRITE_BUF_SIZE + 1]; in debugfs_log_write() local
131 memset(kbuf, 0, DEBUGFS_WRITE_BUF_SIZE + 1); in debugfs_log_write()
135 if (copy_from_user(kbuf, buffer, count) != 0) in debugfs_log_write()
137 kbuf[count - 1] = 0; in debugfs_log_write()
139 if (strncmp("error", kbuf, strlen("error")) == 0) in debugfs_log_write()
141 else if (strncmp("warning", kbuf, strlen("warning")) == 0) in debugfs_log_write()
143 else if (strncmp("info", kbuf, strlen("info")) == 0) in debugfs_log_write()
145 else if (strncmp("trace", kbuf, strlen("trace")) == 0) in debugfs_log_write()
/freebsd-12.1/contrib/ntp/sntp/
H A Dcrypto.c223 char kbuf[200]; in auth_init() local
246 if (NULL == fgets(kbuf, sizeof(kbuf), keyf)) in auth_init()
249 kbuf[sizeof(kbuf) - 1] = '\0'; in auth_init()
250 octothorpe = strchr(kbuf, '#'); in auth_init()
255 scan_cnt = sscanf(kbuf, "%d %15s %128s", in auth_init()
/freebsd-12.1/contrib/ncurses/ncurses/base/
H A Dlib_mouse.c731 char kbuf[3]; in _nc_mouse_event() local
737 if (kbuf[i] != key_mouse[i]) in _nc_mouse_event()
860 unsigned char kbuf[4]; in _nc_mouse_inline() local
916 kbuf[3] = '\0'; in _nc_mouse_inline()
932 if (kbuf[0] & 0x40) { \ in _nc_mouse_inline()
947 switch (kbuf[0] & 0x3) { in _nc_mouse_inline()
949 if ((kbuf[0] & 96) == 96) { in _nc_mouse_inline()
960 if ((kbuf[0] & 96) == 96) { in _nc_mouse_inline()
1004 if (kbuf[0] & 4) { in _nc_mouse_inline()
1007 if (kbuf[0] & 8) { in _nc_mouse_inline()
[all …]
/freebsd-12.1/lib/libc/gen/
H A Dsetproctitle.c64 static char **oargv, *kbuf; in setproctitle_internal() local
105 kbuf = buf; in setproctitle_internal()
110 kbuf = obuf; in setproctitle_internal()
/freebsd-12.1/contrib/bearssl/src/mac/
H A Dhmac.c61 unsigned char kbuf[64]; in br_hmac_key_init() local
68 dig->out(&hc.vtable, kbuf); in br_hmac_key_init()
69 key = kbuf; in br_hmac_key_init()
/freebsd-12.1/sys/dev/xen/evtchn/
H A Devtchn_dev.c320 evtchn_port_t *kbuf; in evtchn_write() local
327 kbuf = malloc(PAGE_SIZE, M_EVTCHN, M_WAITOK); in evtchn_write()
340 error = uiomove(kbuf, count, uio); in evtchn_write()
347 evtchn_port_t port = kbuf[i]; in evtchn_write()
361 free(kbuf, M_EVTCHN); in evtchn_write()
/freebsd-12.1/contrib/bearssl/inc/
H A Dbearssl_ec.h930 void *kbuf, int curve);
961 void *kbuf, const br_ec_private_key *sk);
/freebsd-12.1/contrib/sendmail/src/
H A Dudb.c1237 char kbuf[MAXUDBKEY + 1]; local
1239 if (sm_strlcpy(kbuf, key->data, sizeof(kbuf)) >= sizeof(kbuf))
1241 name = kbuf;
/freebsd-12.1/contrib/compiler-rt/lib/sanitizer_common/
H A Dsanitizer_linux.cc317 struct kernel_stat kbuf; in internal_stat()
318 int res = internal_syscall(SYSCALL(stat), path, &kbuf); in internal_stat()
319 kernel_stat_to_stat(&kbuf, (struct stat *)buf); in internal_stat()
342 struct kernel_stat kbuf; in internal_lstat()
343 int res = internal_syscall(SYSCALL(lstat), path, &kbuf); in internal_lstat()
344 kernel_stat_to_stat(&kbuf, (struct stat *)buf); in internal_lstat()
362 struct kernel_stat kbuf; in internal_fstat() local
363 int res = internal_syscall(SYSCALL(fstat), fd, &kbuf); in internal_fstat()
364 kernel_stat_to_stat(&kbuf, (struct stat *)buf); in internal_fstat()
/freebsd-12.1/sys/netpfil/ipfw/nat64/
H A Dnat64stl_control.c188 olh = (ipfw_obj_lheader *)sd->kbuf; in nat64stl_create()
331 oh = (ipfw_obj_header *)sd->kbuf; in nat64stl_destroy()
479 oh = (ipfw_obj_header *)sd->kbuf; in nat64stl_reset_stats()
H A Dnat64clat_control.c156 olh = (ipfw_obj_lheader *)sd->kbuf; in nat64clat_create()
326 oh = (ipfw_obj_header *)sd->kbuf; in nat64clat_destroy()
474 oh = (ipfw_obj_header *)sd->kbuf; in nat64clat_reset_stats()
/freebsd-12.1/sys/dev/mlx/
H A Dmlx.c2054 void *kbuf; in mlx_user_command() local
2059 kbuf = NULL; in mlx_user_command()
2082 if (((kbuf = malloc(mu->mu_datasize, M_DEVBUF, M_WAITOK)) == NULL) || in mlx_user_command()
2083 (error = copyin(mu->mu_buf, kbuf, mu->mu_datasize))) { in mlx_user_command()
2107 mc->mc_data = kbuf; in mlx_user_command()
2119 error = copyout(kbuf, mu->mu_buf, mu->mu_datasize); in mlx_user_command()
2126 if (kbuf != NULL) in mlx_user_command()
2127 free(kbuf, M_DEVBUF); in mlx_user_command()
/freebsd-12.1/sys/netpfil/ipfw/
H A Dip_fw_sockopt.c3602 error = copyout(sd->kbuf, sopt->sopt_val, sz); in ipfw_flush_sopt_data()
3607 memset(sd->kbuf, 0, sd->ksize); in ipfw_flush_sopt_data()
3644 addr = sd->kbuf + sd->koff; in ipfw_get_sopt_space()
3667 memset(sd->kbuf + sd->koff, 0, sd->kavail); in ipfw_get_sopt_header()
3732 sdata.kbuf = xbuf; in ipfw_ctl3()
3763 sdata.kbuf = malloc(size, M_TEMP, M_WAITOK | M_ZERO); in ipfw_ctl3()
3778 if ((error = sooptcopyin(sopt, sdata.kbuf, sdata.ksize, in ipfw_ctl3()
3781 op3 = (ip_fw3_opheader *)sdata.kbuf; in ipfw_ctl3()
3799 if (sdata.kbuf != xbuf) in ipfw_ctl3()
3800 free(sdata.kbuf, M_TEMP); in ipfw_ctl3()
/freebsd-12.1/contrib/bearssl/test/
H A Dtest_speed.c856 unsigned char kbuf[BR_RSA_KBUF_PRIV_SIZE(1024)]; in test_speed_rsa_inner() local
858 kgen(&rng.vtable, &sk, kbuf, NULL, NULL, 1024, 0); in test_speed_rsa_inner()
880 unsigned char kbuf[BR_RSA_KBUF_PRIV_SIZE(2048)]; in test_speed_rsa_inner() local
882 kgen(&rng.vtable, &sk, kbuf, NULL, NULL, 2048, 0); in test_speed_rsa_inner()

12