| /netbsd-src/crypto/external/bsd/openssl.old/dist/crypto/rand/ |
| H A D | drbg_ctr.c | 23 static void inc_128(RAND_DRBG_CTR *ctr) in inc_128() argument 25 unsigned char *p = &ctr->V[0]; in inc_128() 36 static void ctr_XOR(RAND_DRBG_CTR *ctr, const unsigned char *in, size_t inlen) in ctr_XOR() argument 47 n = inlen < ctr->keylen ? inlen : ctr->keylen; in ctr_XOR() 49 ctr->K[i] ^= in[i]; in ctr_XOR() 50 if (inlen <= ctr->keylen) in ctr_XOR() 53 n = inlen - ctr->keylen; in ctr_XOR() 59 ctr->V[i] ^= in[i + ctr->keylen]; in ctr_XOR() 65 __owur static int ctr_BCC_block(RAND_DRBG_CTR *ctr, unsigned char *out, in ctr_BCC_block() argument 73 if (!EVP_CipherUpdate(ctr->ctx_df, out, &outlen, out, len) in ctr_BCC_block() [all …]
|
| /netbsd-src/crypto/external/bsd/openssl/dist/providers/implementations/rands/ |
| H A D | drbg_ctr.c | 58 static void inc_128(PROV_DRBG_CTR *ctr) in inc_128() argument 60 unsigned char *p = &ctr->V[0]; in inc_128() 71 static void ctr_XOR(PROV_DRBG_CTR *ctr, const unsigned char *in, size_t inlen) in ctr_XOR() argument 82 n = inlen < ctr->keylen ? inlen : ctr->keylen; in ctr_XOR() 84 ctr->K[i] ^= in[i]; in ctr_XOR() 85 if (inlen <= ctr->keylen) in ctr_XOR() 88 n = inlen - ctr->keylen; in ctr_XOR() 94 ctr->V[i] ^= in[i + ctr->keylen]; in ctr_XOR() 100 __owur static int ctr_BCC_block(PROV_DRBG_CTR *ctr, unsigned char *out, in ctr_BCC_block() argument 108 if (!EVP_CipherUpdate(ctr->ctx_df, out, &outlen, out, len) in ctr_BCC_block() [all …]
|
| /netbsd-src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/engine/pm/ |
| H A D | nouveau_nvkm_engine_pm_nv40.c | 33 struct nvkm_perfctr *ctr) in nv40_perfctr_init() argument 36 u32 log = ctr->logic_op; in nv40_perfctr_init() 41 src |= ctr->signal[i] << (i * 8); in nv40_perfctr_init() 44 nvkm_wr32(device, 0x00a400 + dom->addr + (ctr->slot * 0x40), src); in nv40_perfctr_init() 45 nvkm_wr32(device, 0x00a420 + dom->addr + (ctr->slot * 0x40), log); in nv40_perfctr_init() 50 struct nvkm_perfctr *ctr) in nv40_perfctr_read() argument 54 switch (ctr->slot) { in nv40_perfctr_read() 55 case 0: ctr->ctr = nvkm_rd32(device, 0x00a700 + dom->addr); break; in nv40_perfctr_read() 56 case 1: ctr->ctr = nvkm_rd32(device, 0x00a6c0 + dom->addr); break; in nv40_perfctr_read() 57 case 2: ctr->ctr = nvkm_rd32(device, 0x00a680 + dom->addr); break; in nv40_perfctr_read() [all …]
|
| H A D | nouveau_nvkm_engine_pm_base.c | 134 nvkm_perfsrc_enable(struct nvkm_pm *pm, struct nvkm_perfctr *ctr) in nvkm_perfsrc_enable() argument 145 for (j = 0; j < 8 && ctr->source[i][j]; j++) { in nvkm_perfsrc_enable() 146 sig = nvkm_perfsig_find(pm, ctr->domain, in nvkm_perfsrc_enable() 147 ctr->signal[i], &dom); in nvkm_perfsrc_enable() 151 src = nvkm_perfsrc_find(pm, sig, ctr->source[i][j]); in nvkm_perfsrc_enable() 160 value |= ((ctr->source[i][j] >> 32) << src->shift); in nvkm_perfsrc_enable() 173 nvkm_perfsrc_disable(struct nvkm_pm *pm, struct nvkm_perfctr *ctr) in nvkm_perfsrc_disable() argument 184 for (j = 0; j < 8 && ctr->source[i][j]; j++) { in nvkm_perfsrc_disable() 185 sig = nvkm_perfsig_find(pm, ctr->domain, in nvkm_perfsrc_disable() 186 ctr->signal[i], &dom); in nvkm_perfsrc_disable() [all …]
|
| H A D | nouveau_nvkm_engine_pm_gf100.c | 134 struct nvkm_perfctr *ctr) in gf100_perfctr_init() argument 137 u32 log = ctr->logic_op; in gf100_perfctr_init() 142 src |= ctr->signal[i] << (i * 8); in gf100_perfctr_init() 146 nvkm_wr32(device, dom->addr + 0x040 + (ctr->slot * 0x08), src); in gf100_perfctr_init() 147 nvkm_wr32(device, dom->addr + 0x044 + (ctr->slot * 0x08), log); in gf100_perfctr_init() 152 struct nvkm_perfctr *ctr) in gf100_perfctr_read() argument 156 switch (ctr->slot) { in gf100_perfctr_read() 157 case 0: ctr->ctr = nvkm_rd32(device, dom->addr + 0x08c); break; in gf100_perfctr_read() 158 case 1: ctr->ctr = nvkm_rd32(device, dom->addr + 0x088); break; in gf100_perfctr_read() 159 case 2: ctr->ctr = nvkm_rd32(device, dom->addr + 0x080); break; in gf100_perfctr_read() [all …]
|
| /netbsd-src/crypto/external/cpl/trousers/dist/src/tcs/ |
| H A D | tcs_counter.c | 34 UnloadBlob_COUNTER_VALUE(UINT64 *offset, BYTE *blob, TPM_COUNTER_VALUE *ctr) in UnloadBlob_COUNTER_VALUE() argument 36 if (!ctr) { in UnloadBlob_COUNTER_VALUE() 43 UnloadBlob_UINT16(offset, &ctr->tag, blob); in UnloadBlob_COUNTER_VALUE() 44 UnloadBlob(offset, 4, blob, (BYTE *)&ctr->label); in UnloadBlob_COUNTER_VALUE() 45 UnloadBlob_UINT32(offset, &ctr->counter, blob); in UnloadBlob_COUNTER_VALUE() 49 LoadBlob_COUNTER_VALUE(UINT64 *offset, BYTE *blob, TPM_COUNTER_VALUE *ctr) in LoadBlob_COUNTER_VALUE() argument 51 LoadBlob_UINT16(offset, ctr->tag, blob); in LoadBlob_COUNTER_VALUE() 52 LoadBlob(offset, 4, blob, (BYTE *)&ctr->label); in LoadBlob_COUNTER_VALUE() 53 LoadBlob_UINT32(offset, ctr->counter, blob); in LoadBlob_COUNTER_VALUE()
|
| /netbsd-src/crypto/external/bsd/openssl/dist/providers/implementations/ciphers/ |
| H A D | cipher_chacha20_poly1305_hw.c | 125 unsigned char *buf, *tohash, *ctr, storage[sizeof(zero) + 32]; in chacha20_poly1305_tls_cipher() local 130 ctr = buf + CHACHA_BLK_SIZE; in chacha20_poly1305_tls_cipher() 147 ctr = xor128_encrypt_n_pad(out, in, ctr, plen); in chacha20_poly1305_tls_cipher() 149 ctr = xor128_decrypt_n_pad(out, in, ctr, plen); in chacha20_poly1305_tls_cipher() 153 tohash_len = (size_t)(ctr - tohash); in chacha20_poly1305_tls_cipher() 172 out[i] = ctr[i] ^= in[i]; in chacha20_poly1305_tls_cipher() 177 out[i] = ctr[i] ^ c; in chacha20_poly1305_tls_cipher() 178 ctr[i] = c; in chacha20_poly1305_tls_cipher() 186 memset(ctr + i, 0, tail); in chacha20_poly1305_tls_cipher() 187 ctr += i + tail; in chacha20_poly1305_tls_cipher() [all …]
|
| H A D | cipher_aes_siv_hw.c | 29 EVP_CIPHER_free(ctx->ctr); in aes_siv_initkey() 31 ctx->ctr = NULL; in aes_siv_initkey() 36 ctx->ctr = EVP_CIPHER_fetch(libctx, "AES-128-CTR", propq); in aes_siv_initkey() 40 ctx->ctr = EVP_CIPHER_fetch(libctx, "AES-192-CTR", propq); in aes_siv_initkey() 44 ctx->ctr = EVP_CIPHER_fetch(libctx, "AES-256-CTR", propq); in aes_siv_initkey() 49 if (ctx->cbc == NULL || ctx->ctr == NULL) in aes_siv_initkey() 55 return ossl_siv128_init(sctx, key, klen, ctx->cbc, ctx->ctr, libctx, in aes_siv_initkey() 72 if (out->ctr != NULL) in aes_siv_dupctx() 73 EVP_CIPHER_up_ref(out->ctr); in aes_siv_dupctx() 100 EVP_CIPHER_free(ctx->ctr); in aes_siv_cleanup()
|
| /netbsd-src/crypto/external/bsd/openssl/dist/ssl/record/ |
| H A D | ssl3_record.c | 980 size_t bs, ctr, padnum, loop; in tls1_enc() local 1013 for (ctr = 0; ctr < n_recs; ctr++) { in tls1_enc() 1014 if (recs[ctr].data != recs[ctr].input) { in tls1_enc() 1021 } else if (RAND_bytes_ex(s->ctx->libctx, recs[ctr].input, in tls1_enc() 1045 for (ctr = 0; ctr < n_recs; ctr++) { in tls1_enc() 1046 memmove(recs[ctr].data, recs[ctr].input, recs[ctr].length); in tls1_enc() 1047 recs[ctr].input = recs[ctr].data; in tls1_enc() 1065 for (ctr = 0; ctr < n_recs; ctr++) { in tls1_enc() 1066 reclen[ctr] = recs[ctr].length; in tls1_enc() 1082 memcpy(buf[ctr], dtlsseq, 8); in tls1_enc() [all …]
|
| /netbsd-src/crypto/external/bsd/openssl.old/dist/ssl/record/ |
| H A D | ssl3_record.c | 943 size_t bs, mac_size = 0, ctr, padnum, loop; in tls1_enc() local 976 for (ctr = 0; ctr < n_recs; ctr++) { in tls1_enc() 977 if (recs[ctr].data != recs[ctr].input) { in tls1_enc() 985 } else if (RAND_bytes(recs[ctr].input, ivlen) <= 0) { in tls1_enc() 1010 for (ctr = 0; ctr < n_recs; ctr++) { in tls1_enc() 1011 memmove(recs[ctr].data, recs[ctr].input, recs[ctr].length); in tls1_enc() 1012 recs[ctr].input = recs[ctr].data; in tls1_enc() 1030 for (ctr = 0; ctr < n_recs; ctr++) { in tls1_enc() 1031 reclen[ctr] = recs[ctr].length; in tls1_enc() 1047 memcpy(buf[ctr], dtlsseq, 8); in tls1_enc() [all …]
|
| /netbsd-src/crypto/external/bsd/openssl/dist/crypto/modes/ |
| H A D | gcm128.c | 822 unsigned int ctr; local 838 ctr = 1; 881 ctr = BSWAP4(ctx->Xi.d[3]); 883 ctr = GETU32(ctx->Xi.c + 12); 886 ctr = ctx->Xi.d[3]; 897 ++ctr; 900 ctx->Yi.d[3] = BSWAP4(ctr); 902 PUTU32(ctx->Yi.c + 12, ctr); 905 ctx->Yi.d[3] = ctr; 974 unsigned int n, ctr, mres; local [all …]
|
| /netbsd-src/crypto/external/bsd/openssl.old/dist/crypto/modes/ |
| H A D | gcm128.c | 842 unsigned int ctr; local 858 ctr = 1; 901 ctr = BSWAP4(ctx->Xi.d[3]); 903 ctr = GETU32(ctx->Xi.c + 12); 906 ctr = ctx->Xi.d[3]; 917 ++ctr; 920 ctx->Yi.d[3] = BSWAP4(ctr); 922 PUTU32(ctx->Yi.c + 12, ctr); 925 ctx->Yi.d[3] = ctr; 997 unsigned int n, ctr, mres; local [all …]
|
| /netbsd-src/crypto/external/bsd/openssl.old/dist/crypto/evp/ |
| H A D | e_chacha20_poly1305.c | 217 unsigned char *buf, *tohash, *ctr, storage[sizeof(zero) + 32]; in chacha20_poly1305_tls_cipher() local 223 ctr = buf + CHACHA_BLK_SIZE; in chacha20_poly1305_tls_cipher() 241 ctr = xor128_encrypt_n_pad(out, in, ctr, plen); in chacha20_poly1305_tls_cipher() 243 ctr = xor128_decrypt_n_pad(out, in, ctr, plen); in chacha20_poly1305_tls_cipher() 247 tohash_len = (size_t)(ctr - tohash); in chacha20_poly1305_tls_cipher() 266 out[i] = ctr[i] ^= in[i]; in chacha20_poly1305_tls_cipher() 271 out[i] = ctr[i] ^ c; in chacha20_poly1305_tls_cipher() 272 ctr[i] = c; in chacha20_poly1305_tls_cipher() 280 memset(ctr + i, 0, tail); in chacha20_poly1305_tls_cipher() 281 ctr += i + tail; in chacha20_poly1305_tls_cipher() [all …]
|
| /netbsd-src/crypto/external/bsd/openssl/dist/crypto/evp/ |
| H A D | e_chacha20_poly1305.c | 219 unsigned char *buf, *tohash, *ctr, storage[sizeof(zero) + 32]; in chacha20_poly1305_tls_cipher() local 225 ctr = buf + CHACHA_BLK_SIZE; in chacha20_poly1305_tls_cipher() 243 ctr = xor128_encrypt_n_pad(out, in, ctr, plen); in chacha20_poly1305_tls_cipher() 245 ctr = xor128_decrypt_n_pad(out, in, ctr, plen); in chacha20_poly1305_tls_cipher() 249 tohash_len = (size_t)(ctr - tohash); in chacha20_poly1305_tls_cipher() 268 out[i] = ctr[i] ^= in[i]; in chacha20_poly1305_tls_cipher() 273 out[i] = ctr[i] ^ c; in chacha20_poly1305_tls_cipher() 274 ctr[i] = c; in chacha20_poly1305_tls_cipher() 282 memset(ctr + i, 0, tail); in chacha20_poly1305_tls_cipher() 283 ctr += i + tail; in chacha20_poly1305_tls_cipher() [all …]
|
| /netbsd-src/crypto/external/bsd/openssl/dist/test/ |
| H A D | tls13encryptiontest.c | 312 size_t ivlen, ctr; in test_tls13_encryption() local 348 for (ctr = 0; ctr < OSSL_NELEM(refdata); ctr++) { in test_tls13_encryption() 351 if (!load_record(&rec, &refdata[ctr], &key, s->read_iv, ivlen, in test_tls13_encryption() 372 TEST_info("Failed to encrypt record %zu", ctr); in test_tls13_encryption() 375 if (!TEST_true(test_record(&rec, &refdata[ctr], 1))) { in test_tls13_encryption() 376 TEST_info("Record %zu encryption test failed", ctr); in test_tls13_encryption() 382 TEST_info("Failed to decrypt record %zu", ctr); in test_tls13_encryption() 385 if (!TEST_true(test_record(&rec, &refdata[ctr], 0))) { in test_tls13_encryption() 386 TEST_info("Record %zu decryption test failed", ctr); in test_tls13_encryption() 400 TEST_note("PASS: %zu records tested", ctr); in test_tls13_encryption()
|
| /netbsd-src/crypto/external/bsd/openssl.old/dist/test/ |
| H A D | tls13encryptiontest.c | 323 size_t ivlen, ctr; in test_tls13_encryption() local 359 for (ctr = 0; ctr < OSSL_NELEM(refdata); ctr++) { in test_tls13_encryption() 362 if (!load_record(&rec, &refdata[ctr], &key, s->read_iv, ivlen, in test_tls13_encryption() 383 TEST_info("Failed to encrypt record %zu", ctr); in test_tls13_encryption() 386 if (!TEST_true(test_record(&rec, &refdata[ctr], 1))) { in test_tls13_encryption() 387 TEST_info("Record %zu encryption test failed", ctr); in test_tls13_encryption() 393 TEST_info("Failed to decrypt record %zu", ctr); in test_tls13_encryption() 396 if (!TEST_true(test_record(&rec, &refdata[ctr], 0))) { in test_tls13_encryption() 397 TEST_info("Record %zu decryption test failed", ctr); in test_tls13_encryption() 411 TEST_note("PASS: %zu records tested", ctr); in test_tls13_encryption()
|
| /netbsd-src/crypto/external/bsd/openssh/dist/ |
| H A D | cipher-aesctr.c | 32 aesctr_inc(u8 *ctr, u32 len) in aesctr_inc() argument 38 if (++ctr[i]) /* continue on overflow */ in aesctr_inc() 44 ctr[i] += add; in aesctr_inc() 46 x = ctr[i]; in aesctr_inc() 64 memcpy(x->ctr, iv, AES_BLOCK_SIZE); in aesctr_ivsetup() 75 rijndaelEncrypt(x->ek, x->rounds, x->ctr, buf); in aesctr_encrypt_bytes() 76 aesctr_inc(x->ctr, AES_BLOCK_SIZE); in aesctr_encrypt_bytes()
|
| H A D | cipher-ctr-mt.c | 118 u_char ctr[AES_BLOCK_SIZE]; member 145 ssh_ctr_inc(u_char *ctr, u_int len) in ssh_ctr_inc() argument 150 if (++ctr[i]) /* continue on overflow */ in ssh_ctr_inc() 158 ssh_ctr_add(u_char *ctr, uint32_t num, u_int len) in ssh_ctr_add() argument 164 n = ctr[i] + (num & 0xff) + n; in ssh_ctr_add() 166 ctr[i] = n & 0xff; in ssh_ctr_add() 213 AES_encrypt(q->ctr, q->keys[i], &key); in thread_loop() 214 ssh_ctr_inc(q->ctr, AES_BLOCK_SIZE); in thread_loop() 216 ssh_ctr_add(q->ctr, KQLEN * (NUMKQ - 1), AES_BLOCK_SIZE); in thread_loop() 264 AES_encrypt(q->ctr, q->keys[i], &key); in thread_loop() [all …]
|
| /netbsd-src/external/gpl3/binutils/dist/gprofng/src/ |
| H A D | ABS.h | 55 #define HWCVAL_SET_ERR(ctr) ((ctr) | HWCVAL_ERR_FLAG) argument 56 #define HWCVAL_HAS_ERR(ctr) (((ctr) & HWCVAL_ERR_FLAG) != 0) argument 57 #define HWCVAL_CLR_ERR(ctr) ((ctr) & ~HWCVAL_ERR_FLAG) argument
|
| H A D | parse.cc | 281 Experiment::register_metric (Hwcentry *ctr, const char* aux, const char* uname) in register_metric() argument 283 BaseMetric *mtr = dbeSession->register_metric (ctr, aux, uname); in register_metric() 296 Hwcentry *ctr; in process_hwcounter_cmd() local 345 ctr = new Hwcentry; in process_hwcounter_cmd() 346 dbeSession->append (ctr); in process_hwcounter_cmd() 347 hwc_post_lookup (ctr, counter, int_name, cpuver); in process_hwcounter_cmd() 348 ctr->sort_order = tag; in process_hwcounter_cmd() 349 ctr->memop = tpc; in process_hwcounter_cmd() 354 char *s = ctr->name; in process_hwcounter_cmd() 355 ctr->name = dbe_sprintf (NTXT ("%s%s"), modstr, s); in process_hwcounter_cmd() [all …]
|
| /netbsd-src/external/gpl3/binutils.old/dist/gprofng/src/ |
| H A D | ABS.h | 55 #define HWCVAL_SET_ERR(ctr) ((ctr) | HWCVAL_ERR_FLAG) argument 56 #define HWCVAL_HAS_ERR(ctr) ((ctr) & HWCVAL_ERR_FLAG ? 1 : 0) argument 57 #define HWCVAL_CLR_ERR(ctr) ((ctr) & ~HWCVAL_ERR_FLAG) argument
|
| H A D | parse.cc | 281 Experiment::register_metric (Hwcentry *ctr, const char* aux, const char* uname) in register_metric() argument 283 BaseMetric *mtr = dbeSession->register_metric (ctr, aux, uname); in register_metric() 296 Hwcentry *ctr; in process_hwcounter_cmd() local 345 ctr = new Hwcentry; in process_hwcounter_cmd() 346 dbeSession->append (ctr); in process_hwcounter_cmd() 347 hwc_post_lookup (ctr, counter, int_name, cpuver); in process_hwcounter_cmd() 348 ctr->sort_order = tag; in process_hwcounter_cmd() 349 ctr->memop = tpc; in process_hwcounter_cmd() 354 char *s = ctr->name; in process_hwcounter_cmd() 355 ctr->name = dbe_sprintf (NTXT ("%s%s"), modstr, s); in process_hwcounter_cmd() [all …]
|
| /netbsd-src/crypto/external/bsd/openssl.old/dist/crypto/dh/ |
| H A D | dh_kdf.c | 57 static unsigned char ctr[4] = { 0xF3, 0x17, 0x22, 0x53 }; in dh_sharedinfo_encode() local 63 ctr_oct.data = ctr; in dh_sharedinfo_encode() 92 if (CRYPTO_memcmp(p, ctr, 4)) in dh_sharedinfo_encode() 107 unsigned char *der = NULL, *ctr; in DH_KDF_X9_42() local 115 derlen = dh_sharedinfo_encode(&der, &ctr, key_oid, outlen, ukm, ukmlen); in DH_KDF_X9_42() 123 ctr[3] = i & 0xFF; in DH_KDF_X9_42() 124 ctr[2] = (i >> 8) & 0xFF; in DH_KDF_X9_42() 125 ctr[1] = (i >> 16) & 0xFF; in DH_KDF_X9_42() 126 ctr[0] = (i >> 24) & 0xFF; in DH_KDF_X9_42()
|
| /netbsd-src/crypto/external/bsd/openssl.old/dist/crypto/ec/ |
| H A D | ecdh_kdf.c | 28 unsigned char ctr[4]; in ecdh_KDF_X9_63() local 40 ctr[3] = i & 0xFF; in ecdh_KDF_X9_63() 41 ctr[2] = (i >> 8) & 0xFF; in ecdh_KDF_X9_63() 42 ctr[1] = (i >> 16) & 0xFF; in ecdh_KDF_X9_63() 43 ctr[0] = (i >> 24) & 0xFF; in ecdh_KDF_X9_63() 46 if (!EVP_DigestUpdate(mctx, ctr, sizeof(ctr))) in ecdh_KDF_X9_63()
|
| /netbsd-src/sys/arch/sgimips/hpc/ |
| H A D | pi1ppc.c | 1169 uint8_t ctr; in pi1ppc_nibble_read() local 1179 ctr = pi1ppc_r_ctr(pi1ppc); in pi1ppc_nibble_read() 1181 if (!(ctr & IRQENABLE)) { in pi1ppc_nibble_read() 1182 ctr |= IRQENABLE; in pi1ppc_nibble_read() 1183 pi1ppc_w_ctr(pi1ppc, ctr); in pi1ppc_nibble_read() 1200 ctr = pi1ppc_r_ctr(pi1ppc); in pi1ppc_nibble_read() 1202 ctr |= HOSTBUSY; in pi1ppc_nibble_read() 1203 pi1ppc_w_ctr(pi1ppc, ctr); in pi1ppc_nibble_read() 1217 ctr &= ~HOSTBUSY; in pi1ppc_nibble_read() 1218 pi1ppc_w_ctr(pi1ppc, ctr); in pi1ppc_nibble_read() [all …]
|