/freebsd/sys/kgssapi/krb5/ |
H A D | kcrypto_aes.c | 179 size_t blocklen = 16, plen; in aes_encrypt() local 197 plen = len % blocklen; in aes_encrypt() 198 if (len == blocklen) { in aes_encrypt() 212 off = skip + len - 2 * blocklen; in aes_encrypt() 213 m_copydata(inout, off, 2 * blocklen, (void*) &last2); in aes_encrypt() 214 m_copyback(inout, off, blocklen, last2.cn); in aes_encrypt() 215 m_copyback(inout, off + blocklen, blocklen, last2.cn_1); in aes_encrypt() 235 off = skip + len - blocklen - plen; in aes_encrypt() 236 m_copydata(inout, off, blocklen + plen, (void*) &last2); in aes_encrypt() 237 for (i = plen; i < blocklen; i++) in aes_encrypt() [all …]
|
/freebsd/crypto/openssl/test/recipes/30-test_evp_data/ |
H A D | evpmac_common.txt | 48 Input = "Sample message for keylen=blocklen" 56 Input = "Sample message for keylen<blocklen" 63 Input = "Sample message for keylen=blocklen" 72 Input = "Sample message for keylen=blocklen" 80 Input = "Sample message for keylen<blocklen" 86 Input = "Sample message for keylen=blocklen" 92 Input = "Sample message for keylen=blocklen" 100 Input = "Sample message for keylen<blocklen" 106 Input = "Sample message for keylen=blocklen" 112 Input = "Sample message for keylen=blocklen" [all …]
|
H A D | evpmac_blake.txt | 149 Input = "Sample input for keylen<blocklen and custom" 155 Input = "Sample input for keylen<blocklen and custom" 161 Input = "Sample input for keylen<blocklen and salt" 167 Input = "Sample input for keylen<blocklen and salt" 174 Input = "Sample input for keylen<blocklen, salt and custom" 205 Input = "Sample input for keylen<blocklen and custom" 211 Input = "Sample input for keylen<blocklen and custom" 217 Input = "Sample input for keylen<blocklen and salt" 223 Input = "Sample input for keylen<blocklen and salt" 230 Input = "Sample input for keylen<blocklen, salt and custom"
|
/freebsd/crypto/openssl/providers/implementations/rands/ |
H A D | drbg_hmac.c | 38 size_t blocklen; member 64 if (!EVP_MAC_init(ctx, hmac->K, hmac->blocklen, NULL) in do_hmac() 66 || !EVP_MAC_update(ctx, hmac->V, hmac->blocklen) in do_hmac() 75 return EVP_MAC_init(ctx, hmac->K, hmac->blocklen, NULL) in do_hmac() 76 && EVP_MAC_update(ctx, hmac->V, hmac->blocklen) in do_hmac() 135 memset(hmac->K, 0x00, hmac->blocklen); in drbg_hmac_instantiate() 137 memset(hmac->V, 0x01, hmac->blocklen); in drbg_hmac_instantiate() 216 if (!EVP_MAC_init(ctx, hmac->K, hmac->blocklen, NULL) in drbg_hmac_generate() 217 || !EVP_MAC_update(ctx, temp, hmac->blocklen)) in drbg_hmac_generate() 220 if (outlen > hmac->blocklen) { in drbg_hmac_generate() [all...] |
H A D | drbg_hash.c | 51 size_t blocklen; member 110 if (outlen < hash->blocklen) { in hash_df() 114 OPENSSL_cleanse(vtmp, hash->blocklen); in hash_df() 120 outlen -= hash->blocklen; in hash_df() 125 out += hash->blocklen; in hash_df() 186 && add_bytes(drbg, hash->V, hash->vtmp, hash->blocklen); in add_hash_to_v() 221 if (outlen < hash->blocklen) { in hash_gen() 229 outlen -= hash->blocklen; in hash_gen() 232 out += hash->blocklen; in hash_gen() 478 hash->blocklen in drbg_hash_set_ctx_params() [all...] |
/freebsd/crypto/openssl/crypto/cms/ |
H A D | cms_pwri.c | 193 size_t blocklen = EVP_CIPHER_CTX_get_block_size(ctx); in kek_unwrap_key() local 196 if (inlen < 2 * blocklen) { in kek_unwrap_key() 200 if (inlen % blocklen) { in kek_unwrap_key() 209 if (!EVP_DecryptUpdate(ctx, tmp + inlen - 2 * blocklen, &outl, in kek_unwrap_key() 210 in + inlen - 2 * blocklen, blocklen * 2) in kek_unwrap_key() 217 tmp + inlen - blocklen, blocklen) in kek_unwrap_key() 219 || !EVP_DecryptUpdate(ctx, tmp, &outl, in, inlen - blocklen) in kek_unwrap_key() 248 size_t blocklen = EVP_CIPHER_CTX_get_block_size(ctx); in kek_wrap_key() local 255 olen = (inlen + 4 + blocklen - 1) / blocklen; in kek_wrap_key() 256 olen *= blocklen; in kek_wrap_key() [all …]
|
/freebsd/sys/crypto/openssl/ |
H A D | ossl_aes.c | 87 int blocklen, error; in ossl_aes_cbc() local 93 blocklen = cipher->blocksize; in ossl_aes_cbc() 95 if (plen % blocklen) in ossl_aes_cbc() 128 while (plen >= blocklen) { in ossl_aes_cbc() 129 if (inlen < blocklen) { in ossl_aes_cbc() 130 crypto_cursor_copydata(&cc_in, blocklen, block); in ossl_aes_cbc() 132 inlen = blocklen; in ossl_aes_cbc() 136 if (outlen < blocklen) { in ossl_aes_cbc() 138 outlen = blocklen; in ossl_aes_cbc() 144 seglen = rounddown(MIN(plen, MIN(inlen, outlen)), blocklen); in ossl_aes_cbc() [all …]
|
/freebsd/sys/netinet/ |
H A D | sctp_auth.c | 916 uint32_t blocklen; in sctp_hmac() local 934 blocklen = sctp_get_hmac_block_len(hmac_algo); in sctp_hmac() 935 if (keylen > blocklen) { in sctp_hmac() 944 memset(ipad, 0, blocklen); in sctp_hmac() 945 memset(opad, 0, blocklen); in sctp_hmac() 950 for (i = 0; i < blocklen; i++) { in sctp_hmac() 957 sctp_hmac_update(hmac_algo, &ctx, ipad, blocklen); in sctp_hmac() 963 sctp_hmac_update(hmac_algo, &ctx, opad, blocklen); in sctp_hmac() 976 uint32_t blocklen; in sctp_hmac_m() local 994 blocklen = sctp_get_hmac_block_len(hmac_algo); in sctp_hmac_m() [all …]
|
/freebsd/sys/contrib/libsodium/src/libsodium/crypto_aead/aes256gcm/aesni/ |
H A D | aead_aes256gcm_aesni.c | 560 unsigned int blocklen = 16; in crypto_aead_aes256gcm_encrypt_detached_afternm() local 562 if (i + (unsigned long long) blocklen > adlen) { in crypto_aead_aes256gcm_encrypt_detached_afternm() 563 blocklen = (unsigned int) (adlen - i); in crypto_aead_aes256gcm_encrypt_detached_afternm() 565 addmul(accum, ad + i, blocklen, H); in crypto_aead_aes256gcm_encrypt_detached_afternm() 700 unsigned int blocklen = 16; in crypto_aead_aes256gcm_decrypt_detached_afternm() local 701 if (i + (unsigned long long) blocklen > adlen) { in crypto_aead_aes256gcm_decrypt_detached_afternm() 702 blocklen = (unsigned int) (adlen - i); in crypto_aead_aes256gcm_decrypt_detached_afternm() 704 addmul(accum, ad + i, blocklen, H); in crypto_aead_aes256gcm_decrypt_detached_afternm()
|
/freebsd/contrib/unbound/sldns/ |
H A D | str2wire.c | 2043 int i, blocklen = 0; in sldns_str2wire_nsec_buf() local 2048 blocklen = i+1; in sldns_str2wire_nsec_buf() 2050 if(blocklen == 0) in sldns_str2wire_nsec_buf() 2052 if(used+blocklen+2 > *len) in sldns_str2wire_nsec_buf() 2055 rd[used+1] = (uint8_t)blocklen; in sldns_str2wire_nsec_buf() 2056 for(i=0; i<blocklen; i++) { in sldns_str2wire_nsec_buf() 2059 used += blocklen+2; in sldns_str2wire_nsec_buf()
|