mirror of
https://github.com/torvalds/linux.git
synced 2025-08-15 14:11:42 +02:00
blk-crypto: export wrapped key functions
Export blk_crypto_derive_sw_secret(), blk_crypto_import_key(), blk_crypto_generate_key(), and blk_crypto_prepare_key() so that they can be used by device-mapper when passing through wrapped key support. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
This commit is contained in:
parent
b7c18b17a1
commit
025e138eeb
1 changed files with 4 additions and 0 deletions
|
@ -501,6 +501,7 @@ int blk_crypto_derive_sw_secret(struct block_device *bdev,
|
||||||
blk_crypto_hw_exit(profile);
|
blk_crypto_hw_exit(profile);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(blk_crypto_derive_sw_secret);
|
||||||
|
|
||||||
int blk_crypto_import_key(struct blk_crypto_profile *profile,
|
int blk_crypto_import_key(struct blk_crypto_profile *profile,
|
||||||
const u8 *raw_key, size_t raw_key_size,
|
const u8 *raw_key, size_t raw_key_size,
|
||||||
|
@ -520,6 +521,7 @@ int blk_crypto_import_key(struct blk_crypto_profile *profile,
|
||||||
blk_crypto_hw_exit(profile);
|
blk_crypto_hw_exit(profile);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(blk_crypto_import_key);
|
||||||
|
|
||||||
int blk_crypto_generate_key(struct blk_crypto_profile *profile,
|
int blk_crypto_generate_key(struct blk_crypto_profile *profile,
|
||||||
u8 lt_key[BLK_CRYPTO_MAX_HW_WRAPPED_KEY_SIZE])
|
u8 lt_key[BLK_CRYPTO_MAX_HW_WRAPPED_KEY_SIZE])
|
||||||
|
@ -537,6 +539,7 @@ int blk_crypto_generate_key(struct blk_crypto_profile *profile,
|
||||||
blk_crypto_hw_exit(profile);
|
blk_crypto_hw_exit(profile);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(blk_crypto_generate_key);
|
||||||
|
|
||||||
int blk_crypto_prepare_key(struct blk_crypto_profile *profile,
|
int blk_crypto_prepare_key(struct blk_crypto_profile *profile,
|
||||||
const u8 *lt_key, size_t lt_key_size,
|
const u8 *lt_key, size_t lt_key_size,
|
||||||
|
@ -556,6 +559,7 @@ int blk_crypto_prepare_key(struct blk_crypto_profile *profile,
|
||||||
blk_crypto_hw_exit(profile);
|
blk_crypto_hw_exit(profile);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(blk_crypto_prepare_key);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* blk_crypto_intersect_capabilities() - restrict supported crypto capabilities
|
* blk_crypto_intersect_capabilities() - restrict supported crypto capabilities
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue