Home
last modified time | relevance | path

Searched refs:ks (Results 1 – 25 of 118) sorted by relevance

12345

/openbsd/lib/libssl/
H A Dtls_key_share.c54 ks->nid = nid; in tls_key_share_new_internal()
56 return ks; in tls_key_share_new_internal()
99 freezero(ks, sizeof(*ks)); in tls_key_share_free()
125 if (ks->dhe != NULL || ks->dhe_peer != NULL) in tls_key_share_set_dh_params()
162 return ssl_kex_generate_dhe(ks->dhe, ks->dhe); in tls_key_share_generate_dhe()
165 if (ks->dhe != NULL || ks->dhe_peer != NULL) in tls_key_share_generate_dhe()
172 if ((ks->dhe_peer = DHparams_dup(ks->dhe)) == NULL) in tls_key_share_generate_dhe()
306 if (ks->dhe != NULL || ks->dhe_peer != NULL) in tls_key_share_peer_params_dhe()
314 if ((ks->dhe = DHparams_dup(ks->dhe_peer)) == NULL) in tls_key_share_peer_params_dhe()
409 if (ks->dhe == NULL || ks->dhe_peer == NULL) in tls_key_share_derive_dhe()
[all …]
H A Dtls_internal.h81 void tls_key_share_free(struct tls_key_share *ks);
83 uint16_t tls_key_share_group(struct tls_key_share *ks);
84 int tls_key_share_nid(struct tls_key_share *ks);
86 int tls_key_share_set_dh_params(struct tls_key_share *ks, DH *dh_params);
87 int tls_key_share_peer_pkey(struct tls_key_share *ks, EVP_PKEY *pkey);
88 int tls_key_share_generate(struct tls_key_share *ks);
89 int tls_key_share_params(struct tls_key_share *ks, CBB *cbb);
90 int tls_key_share_public(struct tls_key_share *ks, CBB *cbb);
91 int tls_key_share_peer_params(struct tls_key_share *ks, CBS *cbs,
93 int tls_key_share_peer_public(struct tls_key_share *ks, CBS *cbs,
[all …]
/openbsd/sbin/isakmpd/
H A Dcrypto.c178 memcpy(ks->liv, ks->riv, ks->xf->blocksize); in cast1_encrypt()
238 ks = calloc(1, sizeof *ks); in crypto_init()
248 ks->riv = ks->iv; in crypto_init()
249 ks->liv = ks->iv2; in crypto_init()
269 ks->riv = ks->liv; in crypto_update_iv()
317 ks = malloc(sizeof *ks); in crypto_clone_keystate()
323 memcpy(ks, oks, sizeof *ks); in crypto_clone_keystate()
325 ks->riv = ks->iv; in crypto_clone_keystate()
326 ks->liv = ks->iv2; in crypto_clone_keystate()
328 ks->riv = ks->iv2; in crypto_clone_keystate()
[all …]
/openbsd/sys/dev/
H A Dkstat.c214 if (ks == NULL) { in kstatioc_leave()
248 kstat_enter(ks); in kstatioc_leave()
249 error = (*ks->ks_read)(ks); in kstatioc_leave()
257 error = (*ks->ks_copy)(ks, buf); in kstatioc_leave()
269 panic("ks %p unexpected state %u", ks, ks->ks_state); in kstatioc_leave()
525 ks->ks_updated = ks->ks_created; in kstat_create()
556 return (ks); in kstat_create()
618 KASSERTMSG(ks->ks_copy != NULL || ks->ks_data != NULL, in kstat_install()
620 ks->ks_provider, ks->ks_instance, ks->ks_name, ks->ks_unit); in kstat_install()
635 ks->ks_provider, ks->ks_instance, ks->ks_name, ks->ks_unit); in kstat_remove()
[all …]
/openbsd/regress/lib/libcrypto/des/
H A Ddestest.c415 DES_ecb3_encrypt(&in,&out,&ks,&ks2,&ks,DES_ENCRYPT); in main()
416 DES_ecb3_encrypt(&out,&outin,&ks,&ks2,&ks,DES_DECRYPT); in main()
667 DES_ede3_ofb64_encrypt(&(plain[i]),&(ofb_buf1[i]),1,&ks,&ks, in main()
677 DES_ede3_ofb64_encrypt(ofb_buf1,ofb_buf2,sizeof(ofb_buf1),&ks,&ks,&ks, in main()
789 DES_key_schedule ks; in cfb_test() local
818 DES_key_schedule ks; in cfb64_test() local
851 DES_key_schedule ks; in ede_cfb64_test() local
857 DES_ede3_cfb64_encrypt(plain,cfb_buf1,12,&ks,&ks,&ks,&cfb_tmp,&n, in ede_cfb64_test()
860 sizeof(plain)-12,&ks,&ks,&ks, in ede_cfb64_test()
871 DES_ede3_cfb64_encrypt(cfb_buf1,cfb_buf2,(long)17,&ks,&ks,&ks, in ede_cfb64_test()
[all …]
/openbsd/regress/sbin/isakmpd/crypto/
H A Dcryptotest.c80 struct keystate *ks; in special_test_blf() local
91 ks = crypto_init (xf, key, 16, &err); in special_test_blf()
92 if (!ks) in special_test_blf()
98 crypto_init_iv (ks, iv, xf->blocksize); in special_test_blf()
99 crypto_encrypt (ks, data, 32); in special_test_blf()
109 free (ks); in special_test_blf()
147 struct keystate *ks; in test_crypto() local
155 if (!ks) in test_crypto()
162 crypto_encrypt (ks, buf, sizeof (buf)); in test_crypto()
164 crypto_decrypt (ks, buf, sizeof (buf)); in test_crypto()
[all …]
/openbsd/lib/libkeynote/
H A Denvironment.c388 ks != NULL; in keynote_find_session()
389 ks = ks->ks_next) in keynote_find_session()
391 return ks; in keynote_find_session()
405 if (ks->ks_next != NULL) in keynote_add_session()
406 ks->ks_next->ks_prev = ks; in keynote_add_session()
506 keynote_sessions[ks->ks_id % SESSIONTABLESIZE] = ks->ks_next; in kn_close()
507 if (ks->ks_next != NULL) in kn_close()
513 ks->ks_prev->ks_next = ks->ks_next; in kn_close()
514 if (ks->ks_next != NULL) in kn_close()
515 ks->ks_next->ks_prev = ks->ks_prev; in kn_close()
[all …]
/openbsd/lib/libcrypto/des/
H A Ddes_key.c348 k = &schedule->ks->deslong[0]; in DES_set_key_unchecked()
420 DES_key_schedule ks; in DES_string_to_key() local
447 DES_set_key(key, &ks); in DES_string_to_key()
449 DES_set_key_unchecked(key, &ks); in DES_string_to_key()
452 explicit_bzero(&ks, sizeof(ks)); in DES_string_to_key()
460 DES_key_schedule ks; in DES_string_to_2keys() local
506 DES_set_key(key1, &ks); in DES_string_to_2keys()
508 DES_set_key_unchecked(key1, &ks); in DES_string_to_2keys()
514 DES_set_key(key2, &ks); in DES_string_to_2keys()
516 DES_set_key_unchecked(key2, &ks); in DES_string_to_2keys()
[all …]
/openbsd/sys/arch/loongson/dev/
H A Dstsec.c254 struct ksensor *ks; in stsec_sensors_update() local
275 ks = &sc->sc_sensors[STSEC_SENSOR_AC_PRESENCE]; in stsec_sensors_update()
276 ks->value = !!ISSET(status, STS_AC_AVAILABLE); in stsec_sensors_update()
277 ks->flags &= ~SENSOR_FINVALID; in stsec_sensors_update()
288 ks->value = batuv > 500000; in stsec_sensors_update()
290 ks->value = 1; in stsec_sensors_update()
296 ks->flags &= ~SENSOR_FINVALID; in stsec_sensors_update()
299 ks->value = !!ISSET(control, STC_CHARGE_ENABLE); in stsec_sensors_update()
300 ks->flags &= ~SENSOR_FINVALID; in stsec_sensors_update()
303 ks->value = (int64_t)batuv; in stsec_sensors_update()
[all …]
/openbsd/lib/libcrypto/idea/
H A Didea.h83 IDEA_KEY_SCHEDULE *ks);
84 void idea_set_encrypt_key(const unsigned char *key, IDEA_KEY_SCHEDULE *ks);
87 long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv, int enc);
89 long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv,
92 long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv, int *num);
93 void idea_encrypt(unsigned long *in, IDEA_KEY_SCHEDULE *ks);
/openbsd/sys/dev/i2c/
H A Dadt7462.c145 struct ksensor *ks; in adtfsm_refresh() local
155 ks = &sc->sc_sensor[ADTFSM_TEMP0 + i]; in adtfsm_refresh()
163 ks->value = 273150000 + t * 250000; in adtfsm_refresh()
164 ks->flags &= ~SENSOR_FINVALID; in adtfsm_refresh()
166 ks->flags |= SENSOR_FINVALID; in adtfsm_refresh()
172 ks = &sc->sc_sensor[ADTFSM_TACH1 + i]; in adtfsm_refresh()
181 ks->flags |= SENSOR_FINVALID; in adtfsm_refresh()
183 ks->value = 90000 * 60 / ut; in adtfsm_refresh()
184 ks->flags &= ~SENSOR_FINVALID; in adtfsm_refresh()
187 ks->flags |= SENSOR_FINVALID; in adtfsm_refresh()
/openbsd/lib/libcrypto/evp/
H A De_camellia.c69 CAMELLIA_KEY ks; member
95 …Camellia_cbc_encrypt(in, out, EVP_MAXCHUNK, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, … in camellia_128_cbc_cipher()
102 …Camellia_cbc_encrypt(in, out, inl, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, ctx->encr… in camellia_128_cbc_cipher()
140 Camellia_ecb_encrypt(in + i, out + i, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->encrypt); in camellia_128_ecb_cipher()
156 …Camellia_ofb128_encrypt(in, out, inl, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->… in camellia_128_ofb_cipher()
260 …Camellia_cbc_encrypt(in, out, inl, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, ctx->encr… in camellia_192_cbc_cipher()
298 Camellia_ecb_encrypt(in + i, out + i, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->encrypt); in camellia_192_ecb_cipher()
314 …Camellia_ofb128_encrypt(in, out, inl, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->… in camellia_192_ofb_cipher()
418 …Camellia_cbc_encrypt(in, out, inl, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, ctx->encr… in camellia_256_cbc_cipher()
456 Camellia_ecb_encrypt(in + i, out + i, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->encrypt); in camellia_256_ecb_cipher()
[all …]
H A De_bf.c73 BF_KEY ks; member
82 BF_set_key(&data(ctx)->ks, EVP_CIPHER_CTX_key_length(ctx), key); in bf_init_key()
92 …BF_cbc_encrypt(in, out, (long)chunk, &((EVP_BF_KEY *)ctx->cipher_data)->ks, ctx->iv, ctx->encrypt); in bf_cbc_cipher()
99 BF_cbc_encrypt(in, out, (long)inl, &((EVP_BF_KEY *)ctx->cipher_data)->ks, ctx->iv, ctx->encrypt); in bf_cbc_cipher()
113 …BF_cfb64_encrypt(in, out, (long)chunk, &((EVP_BF_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, … in bf_cfb64_cipher()
137 BF_ecb_encrypt(in + i, out + i, &((EVP_BF_KEY *)ctx->cipher_data)->ks, ctx->encrypt); in bf_ecb_cipher()
148 BF_ofb64_encrypt(in, out, (long)chunk, &((EVP_BF_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num); in bf_ofb_cipher()
155 BF_ofb64_encrypt(in, out, (long)inl, &((EVP_BF_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num); in bf_ofb_cipher()
H A De_cast.c73 CAST_KEY ks; member
82 CAST_set_key(&data(ctx)->ks, EVP_CIPHER_CTX_key_length(ctx), key); in cast_init_key()
92 …CAST_cbc_encrypt(in, out, (long)chunk, &((EVP_CAST_KEY *)ctx->cipher_data)->ks, ctx->iv, ctx->encr… in cast5_cbc_cipher()
99 …CAST_cbc_encrypt(in, out, (long)inl, &((EVP_CAST_KEY *)ctx->cipher_data)->ks, ctx->iv, ctx->encryp… in cast5_cbc_cipher()
113 …CAST_cfb64_encrypt(in, out, (long)chunk, &((EVP_CAST_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->n… in cast5_cfb64_cipher()
137 CAST_ecb_encrypt(in + i, out + i, &((EVP_CAST_KEY *)ctx->cipher_data)->ks, ctx->encrypt); in cast5_ecb_cipher()
148 …CAST_ofb64_encrypt(in, out, (long)chunk, &((EVP_CAST_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->n… in cast5_ofb_cipher()
155 …CAST_ofb64_encrypt(in, out, (long)inl, &((EVP_CAST_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num… in cast5_ofb_cipher()
H A De_aes.c69 AES_KEY ks; member
2273 AES_KEY ks; member
2274 } ks; member
2306 aesni_set_encrypt_key(key, key_bits, &gcm_ctx->ks.ks); in aead_aes_gcm_init()
2307 CRYPTO_gcm128_init(&gcm_ctx->gcm, &gcm_ctx->ks.ks, in aead_aes_gcm_init()
2469 AES_KEY ks; member
2470 } ks; member
2486 &wctx->ks.ks); in aes_wrap_init_key()
2489 &wctx->ks.ks); in aes_wrap_init_key()
2534 ret = AES_wrap_key(&wctx->ks.ks, wctx->iv, out, in, in aes_wrap_cipher()
[all …]
H A De_sm4.c28 SM4_KEY ks; member
81 …sm4_cbc_encrypt(in, out, EVP_MAXCHUNK, &((EVP_SM4_KEY *)ctx->cipher_data)->ks, ctx->iv, ctx->encry… in sm4_cbc_cipher()
88 sm4_cbc_encrypt(in, out, inl, &((EVP_SM4_KEY *)ctx->cipher_data)->ks, ctx->iv, ctx->encrypt); in sm4_cbc_cipher()
102 …sm4_cfb128_encrypt(in, out, chunk, &((EVP_SM4_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx… in sm4_cfb128_cipher()
126 sm4_ecb_encrypt(in + i, out + i, &((EVP_SM4_KEY *)ctx->cipher_data)->ks, ctx->encrypt); in sm4_ecb_cipher()
135 …sm4_ofb128_encrypt(in, out, EVP_MAXCHUNK, &((EVP_SM4_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->n… in sm4_ofb_cipher()
142 sm4_ofb128_encrypt(in, out, inl, &((EVP_SM4_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num); in sm4_ofb_cipher()
241 CRYPTO_ctr128_encrypt(in, out, len, &key->ks, ctx->iv, ctx->buf, in sm4_ctr_cipher()
H A De_idea.c120 IDEA_KEY_SCHEDULE ks; member
129 …idea_cbc_encrypt(in, out, (long)chunk, &((EVP_IDEA_KEY *)ctx->cipher_data)->ks, ctx->iv, ctx->encr… in idea_cbc_cipher()
136 …idea_cbc_encrypt(in, out, (long)inl, &((EVP_IDEA_KEY *)ctx->cipher_data)->ks, ctx->iv, ctx->encryp… in idea_cbc_cipher()
147 …idea_ofb64_encrypt(in, out, (long)chunk, &((EVP_IDEA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->n… in idea_ofb_cipher()
154 …idea_ofb64_encrypt(in, out, (long)inl, &((EVP_IDEA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num… in idea_ofb_cipher()
168 …idea_cfb64_encrypt(in, out, (long)chunk, &((EVP_IDEA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->n… in idea_cfb64_cipher()
/openbsd/sys/dev/pci/
H A Dif_ixv.c1394 struct kstat *ks; in ixv_kstats() local
1403 if (ks == NULL) in ixv_kstats()
1417 ks->ks_softc = sc; in ixv_kstats()
1418 ks->ks_data = kvs; in ixv_kstats()
1422 sc->sc_kstat = ks; in ixv_kstats()
1430 struct kstat *ks; in ixv_rxq_kstats() local
1434 if (ks == NULL) in ixv_rxq_kstats()
1446 rxr->kstat = ks; in ixv_rxq_kstats()
1454 struct kstat *ks; in ixv_txq_kstats() local
1458 if (ks == NULL) in ixv_txq_kstats()
[all …]
/openbsd/usr.bin/sort/
H A Dsort.c514 if (ks->f2 == 0) { in parse_pos()
523 if (ks->f1 == 0) { in parse_pos()
546 if (ks->c1 == 0) { in parse_pos()
553 ks->c2 = 0; in parse_pos()
555 ks->c1 = 1; in parse_pos()
565 ks->pos2b = true; in parse_pos()
567 ks->pos1b = true; in parse_pos()
1066 struct key_specs *ks; in main() local
1068 ks = &(keys[i]); in main()
1072 if (!(ks->pos1b) && !(ks->pos2b)) { in main()
[all …]
/openbsd/lib/libcrypto/chacha/
H A Dchacha-merged.c21 u8 ks[CHACHA_BLOCKLEN]; member
201 U32TO8_LITTLE(x->ks + 0, x0); in chacha_encrypt_bytes()
202 U32TO8_LITTLE(x->ks + 4, x1); in chacha_encrypt_bytes()
203 U32TO8_LITTLE(x->ks + 8, x2); in chacha_encrypt_bytes()
204 U32TO8_LITTLE(x->ks + 12, x3); in chacha_encrypt_bytes()
205 U32TO8_LITTLE(x->ks + 16, x4); in chacha_encrypt_bytes()
206 U32TO8_LITTLE(x->ks + 20, x5); in chacha_encrypt_bytes()
207 U32TO8_LITTLE(x->ks + 24, x6); in chacha_encrypt_bytes()
208 U32TO8_LITTLE(x->ks + 28, x7); in chacha_encrypt_bytes()
209 U32TO8_LITTLE(x->ks + 32, x8); in chacha_encrypt_bytes()
[all …]
/openbsd/lib/libcrypto/sm4/
H A Dsm4.c153 struct sm4_key *ks = (struct sm4_key *)k; in SM4_set_key() local
197 ks->rk[i] = K[i % 4]; in SM4_set_key()
206 B0 ^= F(B1 ^ B2 ^ B3 ^ ks->rk[k0]); \
207 B1 ^= F(B0 ^ B2 ^ B3 ^ ks->rk[k1]); \
208 B2 ^= F(B0 ^ B1 ^ B3 ^ ks->rk[k2]); \
209 B3 ^= F(B0 ^ B1 ^ B2 ^ ks->rk[k3]); \
215 struct sm4_key *ks = (struct sm4_key *)k; in SM4_encrypt() local
244 struct sm4_key *ks = (struct sm4_key *)k; in SM4_decrypt() local
H A Dsm4.h43 int SM4_set_key(const uint8_t *key, SM4_KEY *ks);
44 void SM4_decrypt(const uint8_t *in, uint8_t *out, const SM4_KEY *ks);
45 void SM4_encrypt(const uint8_t *in, uint8_t *out, const SM4_KEY *ks);
/openbsd/usr.bin/x99token/
H A Dx99token.c38 DES_key_schedule ks; in main() local
156 DES_key_sched(&key, &ks); in main()
170 predict(ks, buf, cnt); in main()
172 explicit_bzero(&ks, sizeof(ks)); in main()
179 predict(DES_key_schedule ks, const char *chal, int cnt) in predict() argument
187 DES_ecb_encrypt(&cb, &cb, &ks, DES_ENCRYPT); in predict()
/openbsd/gnu/usr.bin/perl/win32/
H A Dfcrypt.c22 } ks; member
23 #define _ ks._
333 des_key_schedule ks,
483 des_key_schedule ks; in des_fcrypt() local
515 des_set_key((des_cblock *)(key),ks); in des_fcrypt()
516 body(&out[0],&out[1],ks,Eswap0,Eswap1); in des_fcrypt()
546 des_key_schedule ks, in body() argument
561 s=(unsigned long *)ks; in body()
/openbsd/sys/dev/ofw/
H A Dofw_thermal.c570 if (ks == NULL) in thermal_zone_kstat_update()
573 tzk = ks->ks_data; in thermal_zone_kstat_update()
606 getnanouptime(&ks->ks_updated); in thermal_zone_kstat_update()
613 struct kstat *ks; in thermal_zone_kstat_attach() local
618 if (ks == NULL) { in thermal_zone_kstat_attach()
640 ks->ks_softc = tz; in thermal_zone_kstat_attach()
641 ks->ks_data = tzk; in thermal_zone_kstat_attach()
642 ks->ks_datalen = sizeof(*tzk); in thermal_zone_kstat_attach()
643 ks->ks_read = kstat_read_nop; in thermal_zone_kstat_attach()
646 tz->tz_kstat = ks; in thermal_zone_kstat_attach()
[all …]

12345