Home
last modified time | relevance | path

Searched full:ks (Results 1 – 25 of 257) sorted by relevance

1234567891011

/freebsd/sys/security/mac/
H A Dmac_posix_sem.c67 mac_posixsem_init(struct ksem *ks) in mac_posixsem_init() argument
71 ks->ks_label = mac_posixsem_label_alloc(); in mac_posixsem_init()
73 ks->ks_label = NULL; in mac_posixsem_init()
85 mac_posixsem_destroy(struct ksem *ks) in mac_posixsem_destroy() argument
88 if (ks->ks_label != NULL) { in mac_posixsem_destroy()
89 mac_posixsem_label_free(ks->ks_label); in mac_posixsem_destroy()
90 ks->ks_label = NULL; in mac_posixsem_destroy()
95 mac_posixsem_create(struct ucred *cred, struct ksem *ks) in mac_posixsem_create() argument
98 MAC_POLICY_PERFORM_NOSLEEP(posixsem_create, cred, ks, ks->ks_label); in mac_posixsem_create()
105 mac_posixsem_check_open(struct ucred *cred, struct ksem *ks) in mac_posixsem_check_open() argument
[all …]
/freebsd/sys/contrib/openzfs/module/icp/algs/skein/
H A Dskein_block.c54 #define ks (kw + KW_KEY_BASE) macro
110 ks[0] = ctx->X[0]; in Skein_256_Process_Block()
111 ks[1] = ctx->X[1]; in Skein_256_Process_Block()
112 ks[2] = ctx->X[2]; in Skein_256_Process_Block()
113 ks[3] = ctx->X[3]; in Skein_256_Process_Block()
114 ks[4] = ks[0] ^ ks[1] ^ ks[2] ^ ks[3] ^ SKEIN_KS_PARITY; in Skein_256_Process_Block()
121 Skein_Show_Block(BLK_BITS, &ctx->h, ctx->X, blkPtr, w, ks, ts); in Skein_256_Process_Block()
123 X0 = w[0] + ks[0]; /* do the first full key injection */ in Skein_256_Process_Block()
124 X1 = w[1] + ks[1] + ts[0]; in Skein_256_Process_Block()
125 X2 = w[2] + ks[2] + ts[1]; in Skein_256_Process_Block()
[all …]
/freebsd/sys/crypto/skein/
H A Dskein_block.c40 #define ks (kw + KW_KEY_BASE) macro
95 ks[0] = ctx->X[0]; in Skein_256_Process_Block()
96 ks[1] = ctx->X[1]; in Skein_256_Process_Block()
97 ks[2] = ctx->X[2]; in Skein_256_Process_Block()
98 ks[3] = ctx->X[3]; in Skein_256_Process_Block()
99 ks[4] = ks[0] ^ ks[1] ^ ks[2] ^ ks[3] ^ SKEIN_KS_PARITY; in Skein_256_Process_Block()
105 Skein_Show_Block(BLK_BITS,&ctx->h,ctx->X,blkPtr,w,ks,ts); in Skein_256_Process_Block()
107 X0 = w[0] + ks[0]; /* do the first full key injection */ in Skein_256_Process_Block()
108 X1 = w[1] + ks[1] + ts[0]; in Skein_256_Process_Block()
109 X2 = w[2] + ks[2] + ts[1]; in Skein_256_Process_Block()
[all …]
/freebsd/sys/kern/
H A Duipc_sem.c119 static int ksem_access(struct ksem *ks, struct ucred *ucred);
125 static void ksem_drop(struct ksem *ks);
128 static struct ksem *ksem_hold(struct ksem *ks);
129 static void ksem_insert(char *path, Fnv32_t fnv, struct ksem *ks);
165 struct ksem *ks; in ksem_stat() local
170 ks = fp->f_data; in ksem_stat()
173 error = mac_posixsem_check_stat(active_cred, fp->f_cred, ks); in ksem_stat()
185 sb->st_atim = ks->ks_atime; in ksem_stat()
186 sb->st_ctim = ks->ks_ctime; in ksem_stat()
187 sb->st_mtim = ks->ks_mtime; in ksem_stat()
[all …]
/freebsd/crypto/heimdal/doc/doxyout/hcrypto/man/man3/
H A Dhcrypto_des.319 .RI "int HC_DEPRECATED \fBDES_set_key\fP (DES_cblock *key, DES_key_schedule *ks)"
22 .RI "int \fBDES_set_key_unchecked\fP (DES_cblock *key, DES_key_schedule *ks)"
25 .RI "int \fBDES_set_key_checked\fP (DES_cblock *key, DES_key_schedule *ks)"
28 .RI "int \fBDES_key_sched\fP (DES_cblock *key, DES_key_schedule *ks)"
31 .RI "void \fBDES_encrypt\fP (uint32_t u[2], DES_key_schedule *ks, int encp)"
34 .RI "void \fBDES_ecb_encrypt\fP (DES_cblock *input, DES_cblock *output, DES_key_schedule *ks, int e…
37 .RI "void \fBDES_cbc_encrypt\fP (const void *in, void *out, long length, DES_key_schedule *ks, DES_…
40 .RI "void \fBDES_pcbc_encrypt\fP (const void *in, void *out, long length, DES_key_schedule *ks, DES…
49 .RI "void \fBDES_cfb64_encrypt\fP (const void *in, void *out, long length, DES_key_schedule *ks, DE…
52 …c_cksum\fP (const void *in, DES_cblock *output, long length, DES_key_schedule *ks, DES_cblock *iv)"
[all …]
/freebsd/sys/kgssapi/krb5/
H A Dkcrypto.h61 typedef void init_func(struct krb5_key_state *ks);
62 typedef void destroy_func(struct krb5_key_state *ks);
63 typedef void set_key_func(struct krb5_key_state *ks, const void *in);
64 typedef void random_to_key_func(struct krb5_key_state *ks, const void *in);
65 typedef void encrypt_func(const struct krb5_key_state *ks,
67 typedef void checksum_func(const struct krb5_key_state *ks, int usage,
100 krb5_set_key(struct krb5_key_state *ks, const void *keydata) in krb5_set_key() argument
103 ks->ks_class->ec_set_key(ks, keydata); in krb5_set_key()
107 krb5_random_to_key(struct krb5_key_state *ks, const void *keydata) in krb5_random_to_key() argument
110 ks->ks_class->ec_random_to_key(ks, keydata); in krb5_random_to_key()
[all …]
H A Dkcrypto_aes.c50 aes_init(struct krb5_key_state *ks) in aes_init() argument
56 ks->ks_priv = as; in aes_init()
60 aes_destroy(struct krb5_key_state *ks) in aes_destroy() argument
62 struct aes_state *as = ks->ks_priv; in aes_destroy()
69 free(ks->ks_priv, M_GSSAPI); in aes_destroy()
73 aes_set_key(struct krb5_key_state *ks, const void *in) in aes_set_key() argument
75 void *kp = ks->ks_key; in aes_set_key()
76 struct aes_state *as = ks->ks_priv; in aes_set_key()
80 bcopy(in, kp, ks->ks_class->ec_keylen); in aes_set_key()
93 csp.csp_auth_klen = ks->ks_class->ec_keybits / 8; in aes_set_key()
[all …]
H A Dkcrypto.c62 struct krb5_key_state *ks; in krb5_create_key() local
64 ks = malloc(sizeof(struct krb5_key_state), M_GSSAPI, M_WAITOK); in krb5_create_key()
65 ks->ks_class = ec; in krb5_create_key()
66 refcount_init(&ks->ks_refs, 1); in krb5_create_key()
67 ks->ks_key = malloc(ec->ec_keylen, M_GSSAPI, M_WAITOK); in krb5_create_key()
68 ec->ec_init(ks); in krb5_create_key()
70 return (ks); in krb5_create_key()
74 krb5_free_key(struct krb5_key_state *ks) in krb5_free_key() argument
77 if (refcount_release(&ks->ks_refs)) { in krb5_free_key()
78 ks->ks_class->ec_destroy(ks); in krb5_free_key()
[all …]
/freebsd/contrib/llvm-project/openmp/runtime/src/
H A Dkmp_debug.h114 int ks; \
115 __kmp_disable(&ks); \
117 __kmp_enable(ks); \
121 int ks; \
122 __kmp_disable(&ks); \
124 __kmp_enable(ks); \
128 int ks; \
129 __kmp_disable(&ks); \
131 __kmp_enable(ks); \
135 int ks; \
[all …]
/freebsd/crypto/openssl/providers/implementations/ciphers/
H A Dcipher_aes_hw_aesni.inc26 AES_KEY *ks = &adat->ks.ks;
28 dat->ks = ks;
32 ret = aesni_set_decrypt_key(key, keylen * 8, ks);
37 ret = aesni_set_encrypt_key(key, keylen * 8, ks);
58 const AES_KEY *ks = ctx->ks;
60 aesni_cbc_encrypt(in, out, len, ks, ctx->iv, ctx->enc);
71 aesni_ecb_encrypt(in, out, len, ctx->ks, ctx->enc);
H A Dcipher_aes_hw.c24 AES_KEY *ks = &adat->ks.ks; in cipher_hw_aes_initkey() local
26 dat->ks = ks; in cipher_hw_aes_initkey()
32 ret = HWAES_set_decrypt_key(key, keylen * 8, ks); in cipher_hw_aes_initkey()
47 ret = AES_set_decrypt_key(key, keylen * 8, ks); in cipher_hw_aes_initkey()
54 ret = vpaes_set_decrypt_key(key, keylen * 8, ks); in cipher_hw_aes_initkey()
61 ret = AES_set_decrypt_key(key, keylen * 8, ks); in cipher_hw_aes_initkey()
69 ret = HWAES_set_encrypt_key(key, keylen * 8, ks); in cipher_hw_aes_initkey()
92 ret = AES_set_encrypt_key(key, keylen * 8, ks); in cipher_hw_aes_initkey()
99 ret = vpaes_set_encrypt_key(key, keylen * 8, ks); in cipher_hw_aes_initkey()
106 ret = AES_set_encrypt_key(key, keylen * 8, ks); in cipher_hw_aes_initkey()
H A Dcipher_aes_ccm.h20 * Padding is chosen so that s390x.kmac.k overlaps with ks.ks and
21 * fc with ks.ks.rounds. Remember that on s390x, an AES_KEY's
27 AES_KEY ks; member
28 } ks; member
42 unsigned int fc; /* fc has same offset as ks.ks.rounds */
H A Dciphercommon_hw.c20 (*dat->stream.cbc) (in, out, len, dat->ks, dat->iv, dat->enc); in ossl_cipher_hw_generic_cbc()
22 CRYPTO_cbc128_encrypt(in, out, len, dat->ks, dat->iv, dat->block); in ossl_cipher_hw_generic_cbc()
24 CRYPTO_cbc128_decrypt(in, out, len, dat->ks, dat->iv, dat->block); in ossl_cipher_hw_generic_cbc()
38 (*dat->stream.ecb) (in, out, len, dat->ks, dat->enc); in ossl_cipher_hw_generic_ecb()
42 (*dat->block) (in + i, out + i, dat->ks); in ossl_cipher_hw_generic_ecb()
53 CRYPTO_ofb128_encrypt(in, out, len, dat->ks, dat->iv, &num, dat->block); in ossl_cipher_hw_generic_ofb128()
64 CRYPTO_cfb128_encrypt(in, out, len, dat->ks, dat->iv, &num, dat->enc, in ossl_cipher_hw_generic_cfb128()
76 CRYPTO_cfb128_8_encrypt(in, out, len, dat->ks, dat->iv, &num, dat->enc, in ossl_cipher_hw_generic_cfb8()
89 CRYPTO_cfb128_1_encrypt(in, out, len, dat->ks, dat->iv, &num, in ossl_cipher_hw_generic_cfb1()
96 CRYPTO_cfb128_1_encrypt(in, out, MAXBITCHUNK * 8, dat->ks, in ossl_cipher_hw_generic_cfb1()
[all …]
H A Dcipher_aria_hw.c18 ARIA_KEY *ks = &adat->ks.ks; in cipher_hw_aria_initkey() local
21 ret = ossl_aria_set_encrypt_key(key, keylen * 8, ks); in cipher_hw_aria_initkey()
23 ret = ossl_aria_set_decrypt_key(key, keylen * 8, ks); in cipher_hw_aria_initkey()
28 dat->ks = ks; in cipher_hw_aria_initkey()
H A Dcipher_des_hw.c24 DES_key_schedule *ks = &dctx->dks.ks; in cipher_hw_des_initkey() local
30 des_t4_key_expand(&deskey[0], ks); in cipher_hw_des_initkey()
37 DES_set_key_unchecked(deskey, ks); in cipher_hw_des_initkey()
48 dst->ks = &dctx->dks.ks; in cipher_hw_des_copyctx()
55 DES_key_schedule *key = &(((PROV_DES_CTX *)ctx)->dks.ks); in cipher_hw_des_ecb_cipher()
69 DES_key_schedule *key = &(dctx->dks.ks); in cipher_hw_des_cbc_cipher()
93 DES_key_schedule *key = &(((PROV_DES_CTX *)ctx)->dks.ks); in cipher_hw_des_ofb64_cipher()
112 DES_key_schedule *key = &(((PROV_DES_CTX *)ctx)->dks.ks); in cipher_hw_des_cfb64_cipher()
138 DES_key_schedule *key = &(((PROV_DES_CTX *)ctx)->dks.ks); in cipher_hw_des_cfb1_cipher()
165 DES_key_schedule *key = &(((PROV_DES_CTX *)ctx)->dks.ks); in cipher_hw_des_cfb8_cipher()
H A Dcipher_rc4_hmac_md5_hw.c40 RC4_set_key(&ctx->ks.ks, keylen, key); in cipher_hw_rc4_hmac_md5_initkey()
54 RC4_KEY *ks = &ctx->ks.ks; in cipher_hw_rc4_hmac_md5_cipher() local
57 size_t rc4_off = MOD - 1 - (ks->x & (MOD - 1)); in cipher_hw_rc4_hmac_md5_cipher()
78 RC4(ks, rc4_off, in, out); in cipher_hw_rc4_hmac_md5_cipher()
80 rc4_md5_enc(ks, in + rc4_off, out + rc4_off, in cipher_hw_rc4_hmac_md5_cipher()
106 RC4(ks, len - rc4_off, out + rc4_off, out + rc4_off); in cipher_hw_rc4_hmac_md5_cipher()
108 RC4(ks, len - rc4_off, in + rc4_off, out + rc4_off); in cipher_hw_rc4_hmac_md5_cipher()
123 RC4(ks, rc4_off, in, out); in cipher_hw_rc4_hmac_md5_cipher()
126 rc4_md5_enc(ks, in + rc4_off, out + rc4_off, in cipher_hw_rc4_hmac_md5_cipher()
142 RC4(ks, len - rc4_off, in + rc4_off, out + rc4_off); in cipher_hw_rc4_hmac_md5_cipher()
H A Dcipher_idea_hw.c23 IDEA_KEY_SCHEDULE *ks = &(ictx->ks.ks); in cipher_hw_idea_initkey() local
28 IDEA_set_encrypt_key(key, ks); in cipher_hw_idea_initkey()
33 IDEA_set_decrypt_key(&tmp, ks); in cipher_hw_idea_initkey()
61 #define IDEA2_ecb_encrypt(in, out, ks, enc) IDEA_ecb_encrypt(in, out, ks) argument
H A Dcipher_aes_gcm_hw.c24 AES_KEY *ks = &actx->ks.ks; in aes_gcm_initkey() local
29 GCM_HW_SET_KEY_CTR_FN(ks, HWAES_set_encrypt_key, HWAES_encrypt, in aes_gcm_initkey()
32 GCM_HW_SET_KEY_CTR_FN(ks, HWAES_set_encrypt_key, HWAES_encrypt, NULL); in aes_gcm_initkey()
39 GCM_HW_SET_KEY_CTR_FN(ks, AES_set_encrypt_key, AES_encrypt, in aes_gcm_initkey()
46 GCM_HW_SET_KEY_CTR_FN(ks, vpaes_set_encrypt_key, vpaes_encrypt, NULL); in aes_gcm_initkey()
52 GCM_HW_SET_KEY_CTR_FN(ks, AES_set_encrypt_key, AES_encrypt, in aes_gcm_initkey()
55 GCM_HW_SET_KEY_CTR_FN(ks, AES_set_encrypt_key, AES_encrypt, NULL); in aes_gcm_initkey()
/freebsd/crypto/openssl/test/
H A Ddestest.c310 DES_key_schedule ks; in test_des_ecb() local
314 DES_set_key_unchecked(&key_data[i], &ks); in test_des_ecb()
318 DES_ecb_encrypt(&in, &out, &ks, DES_ENCRYPT); in test_des_ecb()
319 DES_ecb_encrypt(&out, &outin, &ks, DES_DECRYPT); in test_des_ecb()
337 DES_key_schedule ks, ks2, ks3; in test_des_ede_ecb() local
340 DES_set_key_unchecked(&key_data[i], &ks); in test_des_ede_ecb()
346 DES_ecb3_encrypt(&in, &out, &ks, &ks2, &ks, DES_ENCRYPT); in test_des_ede_ecb()
347 DES_ecb3_encrypt(&out, &outin, &ks, &ks2, &ks, DES_DECRYPT); in test_des_ede_ecb()
367 DES_key_schedule ks; in test_des_cbc() local
370 if (!TEST_int_eq(DES_set_key_checked(&cbc_key, &ks), 0)) in test_des_cbc()
[all …]
/freebsd/crypto/openssl/crypto/des/
H A Dstr2key.c21 DES_key_schedule ks; in DES_string_to_key() local
40 DES_set_key_unchecked(key, &ks); in DES_string_to_key()
41 DES_cbc_cksum((const unsigned char *)str, key, length, &ks, key); in DES_string_to_key()
42 OPENSSL_cleanse(&ks, sizeof(ks)); in DES_string_to_key()
48 DES_key_schedule ks; in DES_string_to_2keys() local
76 DES_set_key_unchecked(key1, &ks); in DES_string_to_2keys()
77 DES_cbc_cksum((const unsigned char *)str, key1, length, &ks, key1); in DES_string_to_2keys()
78 DES_set_key_unchecked(key2, &ks); in DES_string_to_2keys()
79 DES_cbc_cksum((const unsigned char *)str, key2, length, &ks, key2); in DES_string_to_2keys()
80 OPENSSL_cleanse(&ks, sizeof(ks)); in DES_string_to_2keys()
/freebsd/contrib/netbsd-tests/lib/libdes/
H A Dt_des.c387 des_key_schedule ks; in cfb_test() local
389 des_set_key_checked(&cfb_key, ks); in cfb_test()
391 des_cfb_encrypt(plain, cfb_buf1, bits, sizeof(plain), ks, &cfb_tmp, in cfb_test()
396 des_cfb_encrypt(cfb_buf1, cfb_buf2, bits, sizeof(plain), ks, &cfb_tmp, in cfb_test()
408 des_key_schedule ks; in cfb64_test() local
410 des_set_key_checked(&cfb_key, ks); in cfb64_test()
413 des_cfb64_encrypt(plain, cfb_buf1, 12, ks, &cfb_tmp, &n, DES_ENCRYPT); in cfb64_test()
414 des_cfb64_encrypt(&(plain[12]), &(cfb_buf1[12]), sizeof(plain) - 12, ks, in cfb64_test()
420 des_cfb64_encrypt(cfb_buf1, cfb_buf2, 17, ks, &cfb_tmp, &n, DES_DECRYPT); in cfb64_test()
422 sizeof(plain) - 17, ks, &cfb_tmp, &n, DES_DECRYPT); in cfb64_test()
[all …]
/freebsd/share/i18n/csmapper/KS/
H A Dmapper.dir.KS.src1 # $NetBSD: mapper.dir.KS.src,v 1.2 2006/10/18 17:54:55 tnozaki Exp $
3 JOHAB/UCS mapper_std KS/JOHAB%UCS.mps
4 KSC5601HANGUL/UCS mapper_std KS/KSC5601HANGUL%UCS.mps
5 KSC5601HANJA/UCS mapper_std KS/KSC5601HANJA%UCS.mps
7 UCS/JOHAB mapper_std KS/UCS%JOHAB.mps
8 UCS/KSC5601HANGUL mapper_std KS/UCS%KSC5601HANGUL.mps
9 UCS/KSC5601HANJA mapper_std KS/UCS%KSC5601HANJA.mps
/freebsd/sys/vm/
H A Dvm_glue.c281 static vm_pindex_t vm_kstack_pindex(vm_offset_t ks, int npages);
449 vm_offset_t ks; in vm_thread_stack_create() local
460 ks = vm_thread_alloc_kstack_kva(ptoa(pages + KSTACK_GUARD_PAGES), in vm_thread_stack_create()
462 if (ks == 0) in vm_thread_stack_create()
464 ks += ptoa(KSTACK_GUARD_PAGES); in vm_thread_stack_create()
469 if (vm_thread_stack_back(ks, ma, pages, req, domain) != 0) { in vm_thread_stack_create()
470 vm_thread_free_kstack_kva(ks - ptoa(KSTACK_GUARD_PAGES), in vm_thread_stack_create()
475 pmap_qremove(ks - ptoa(KSTACK_GUARD_PAGES), in vm_thread_stack_create()
480 pmap_qenter(ks, ma, pages); in vm_thread_stack_create()
481 return (ks); in vm_thread_stack_create()
[all …]
/freebsd/contrib/llvm-project/compiler-rt/lib/orc/
H A Dinterval_map.h88 // Erase [KS, KE), which must be entirely containing within one existing
90 void erase(KeyT KS, KeyT KE) { in erase() argument
94 auto J = Impl.upper_bound(KS); in erase()
99 if (KS >= I->first.second) in erase()
116 if (KS > Tmp.first.first) in erase()
118 J, std::make_pair(std::make_pair(Tmp.first.first, KS), Tmp.second)); in erase()
133 void insert(KeyT KS, KeyT KE, ValT V) { in insert() argument
134 auto J = this->Impl.upper_bound(KS); in insert()
147 if (I->first.second == KS && I->second == V) { in insert()
148 KS = I->first.first; in insert()
[all …]
/freebsd/crypto/openssl/crypto/evp/
H A De_aes.c35 AES_KEY ks; member
36 } ks; member
47 AES_KEY ks; member
48 } ks; /* AES key schedule to use */ member
65 AES_KEY ks; member
83 AES_KEY ks; member
84 } ks; /* AES key schedule to use */ member
99 AES_KEY ks; member
103 AES_KEY ks; member
155 &dat->ks.ks); in aesni_init_key()
[all …]

1234567891011