Home
last modified time | relevance | path

Searched refs:key_bytes (Results 1 – 3 of 3) sorted by relevance

/illumos-gate/usr/src/lib/pkcs11/pkcs11_tpm/common/
H A Dmech_md5.c336 CK_ULONG key_bytes, hash_len, hmac_len; in md5_hmac_sign() local
371 key_bytes = attr->ulValueLen; in md5_hmac_sign()
375 if (key_bytes > MD5_BLOCK_SIZE) { in md5_hmac_sign()
408 for (i = 0; i < key_bytes; i++) { in md5_hmac_sign()
413 (void) memset(&k_ipad[i], 0x36, MD5_BLOCK_SIZE - key_bytes); in md5_hmac_sign()
414 (void) memset(&k_opad[i], 0x5C, MD5_BLOCK_SIZE - key_bytes); in md5_hmac_sign()
H A Dmech_sha.c70 CK_ULONG key_bytes, hash_len, hmac_len; in sha1_hmac_sign() local
104 key_bytes = attr->ulValueLen; in sha1_hmac_sign()
107 if (key_bytes > SHA1_BLOCK_SIZE) { in sha1_hmac_sign()
139 for (i = 0; i < key_bytes; i++) { in sha1_hmac_sign()
144 (void) memset(&k_ipad[i], 0x36, SHA1_BLOCK_SIZE - key_bytes); in sha1_hmac_sign()
145 (void) memset(&k_opad[i], 0x5C, SHA1_BLOCK_SIZE - key_bytes); in sha1_hmac_sign()
/illumos-gate/usr/src/uts/common/crypto/io/
H A Dcrypto.c2397 size_t key_bytes = 0; in copyin_key() local
2418 key_bytes = CRYPTO_BITS2BYTES(key_bits); in copyin_key()
2420 rv = CRYPTO_BUFFER_CHECK(sp, key_bytes, in copyin_key()
2425 rctl_bytes = key_bytes; in copyin_key()
2427 out_key->ck_data = kmem_alloc(key_bytes, KM_SLEEP); in copyin_key()
2430 out_key->ck_data, key_bytes) != 0) { in copyin_key()
2431 kmem_free(out_key->ck_data, key_bytes); in copyin_key()