| /freebsd/sys/kgssapi/krb5/ |
| H A D | kcrypto_aes.c | 184 size_t blocklen = 16, plen; in aes_encrypt() local 202 plen = len % blocklen; in aes_encrypt() 203 if (len == blocklen) { in aes_encrypt() 217 off = skip + len - 2 * blocklen; in aes_encrypt() 218 m_copydata(inout, off, 2 * blocklen, (void*) &last2); in aes_encrypt() 219 m_copyback(inout, off, blocklen, last2.cn); in aes_encrypt() 220 m_copyback(inout, off + blocklen, blocklen, last2.cn_1); in aes_encrypt() 240 off = skip + len - blocklen - plen; in aes_encrypt() 241 m_copydata(inout, off, blocklen + plen, (void*) &last2); in aes_encrypt() 242 for (i = plen; i < blocklen; i++) in aes_encrypt() [all …]
|
| /freebsd/crypto/openssl/crypto/cms/ |
| H A D | cms_pwri.c | 203 size_t blocklen = EVP_CIPHER_CTX_get_block_size(ctx); in kek_unwrap_key() local 207 if (blocklen == 0) in kek_unwrap_key() 210 if (inlen < 2 * blocklen) { in kek_unwrap_key() 214 if (inlen % blocklen) { in kek_unwrap_key() 221 if (!EVP_DecryptUpdate(ctx, tmp + inlen - 2 * blocklen, &outl, in kek_unwrap_key() 222 in + inlen - 2 * blocklen, blocklen * 2) in kek_unwrap_key() 229 tmp + inlen - blocklen, blocklen) in kek_unwrap_key() 231 || !EVP_DecryptUpdate(ctx, tmp, &outl, in, inlen - blocklen) in kek_unwrap_key() 259 size_t blocklen = EVP_CIPHER_CTX_get_block_size(ctx); in kek_wrap_key() local 263 if (blocklen == 0) in kek_wrap_key() [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" 73 Input = "Sample message for keylen=blocklen" 82 Input = "Sample message for keylen<blocklen" 89 Input = "Sample message for keylen=blocklen" 95 Input = "Sample message for keylen=blocklen" 103 Input = "Sample message for keylen<blocklen" 109 Input = "Sample message for keylen=blocklen" 115 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/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/crypto/openssl/providers/implementations/rands/ |
| H A D | drbg_hmac.c | 61 if (!EVP_MAC_init(ctx, hmac->K, hmac->blocklen, NULL) in do_hmac() 63 || !EVP_MAC_update(ctx, hmac->V, hmac->blocklen) in do_hmac() 72 return EVP_MAC_init(ctx, hmac->K, hmac->blocklen, NULL) in do_hmac() 73 && EVP_MAC_update(ctx, hmac->V, hmac->blocklen) in do_hmac() 128 memset(hmac->K, 0x00, hmac->blocklen); in ossl_drbg_hmac_init() 130 memset(hmac->V, 0x01, hmac->blocklen); in ossl_drbg_hmac_init() 227 if (!EVP_MAC_init(ctx, hmac->K, hmac->blocklen, NULL) in ossl_drbg_hmac_generate() 228 || !EVP_MAC_update(ctx, temp, hmac->blocklen)) in ossl_drbg_hmac_generate() 231 if (outlen > hmac->blocklen) { in ossl_drbg_hmac_generate() 241 out += hmac->blocklen; in ossl_drbg_hmac_generate() [all …]
|
| H A D | drbg_hash.c | 56 size_t blocklen; member 115 if (outlen < hash->blocklen) { in hash_df() 119 OPENSSL_cleanse(vtmp, hash->blocklen); in hash_df() 125 outlen -= hash->blocklen; in hash_df() 130 out += hash->blocklen; in hash_df() 191 && add_bytes(drbg, hash->V, hash->vtmp, hash->blocklen); in add_hash_to_v() 226 if (outlen < hash->blocklen) { in hash_gen() 234 outlen -= hash->blocklen; in hash_gen() 237 out += hash->blocklen; in hash_gen() 586 hash->blocklen = md_size; in drbg_hash_set_ctx_params_locked() [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/crypto/openssl/providers/implementations/kdfs/ |
| H A D | hmacdrbg_kdf.c | 91 dst->blocklen = src->blocklen; in ossl_drbg_hmac_dup() 228 drbg->blocklen = (size_t)md_size; in hmac_drbg_kdf_set_ctx_params()
|
| /freebsd/crypto/openssl/providers/implementations/include/prov/ |
| H A D | hmac_drbg.h | 20 size_t blocklen; member
|
| /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 | 2046 int i, blocklen = 0; in sldns_str2wire_nsec_buf() local 2051 blocklen = i+1; in sldns_str2wire_nsec_buf() 2053 if(blocklen == 0) in sldns_str2wire_nsec_buf() 2055 if(used+blocklen+2 > *len) in sldns_str2wire_nsec_buf() 2058 rd[used+1] = (uint8_t)blocklen; in sldns_str2wire_nsec_buf() 2059 for(i=0; i<blocklen; i++) { in sldns_str2wire_nsec_buf() 2062 used += blocklen+2; in sldns_str2wire_nsec_buf()
|