Function report |
Source Code:security\keys\encrypted-keys\encrypted.c |
Create Date:2022-07-28 18:33:07 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Derive authentication/encryption key from trusted key
Proto:static int get_derived_key(u8 *derived_key, enum derived_key_type key_type, const u8 *master_key, size_t master_keylen)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
u8 * | derived_key | |
enum derived_key_type | key_type | |
const u8 * | master_key | |
size_t | master_keylen |
369 | derived_buf_len = strlen - Find the length of a string*@s: The string to be sized + 1 + master_keylen |
370 | If derived_buf_len < HASH_SIZE Then derived_buf_len = HASH_SIZE |
373 | derived_buf = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc). |
374 | If Not derived_buf Then Return -ENOMEM |
377 | If key_type Then strcpy(derived_buf, "AUTH_KEY") |
379 | Else strcpy(derived_buf, "ENC_KEY") |
382 | memcpy(derived_buf + strlen - Find the length of a string*@s: The string to be sized + 1, master_key, master_keylen) |
384 | ret = calc_hash(hash_tfm, derived_key, derived_buf, derived_buf_len) |
386 | Return ret |
Name | Describe |
---|---|
datablob_hmac_append | |
datablob_hmac_verify | verify HMAC before decrypting encrypted key |
encrypted_key_decrypt | |
encrypted_read | rypted_read - format and copy the encrypted data to userspace* The resulting datablob format is:* |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |