Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Eric Biggers and committed by
Mikulas Patocka
025e138e b7c18b17

+4
+4
block/blk-crypto-profile.c
··· 501 501 blk_crypto_hw_exit(profile); 502 502 return err; 503 503 } 504 + EXPORT_SYMBOL_GPL(blk_crypto_derive_sw_secret); 504 505 505 506 int blk_crypto_import_key(struct blk_crypto_profile *profile, 506 507 const u8 *raw_key, size_t raw_key_size, ··· 521 520 blk_crypto_hw_exit(profile); 522 521 return ret; 523 522 } 523 + EXPORT_SYMBOL_GPL(blk_crypto_import_key); 524 524 525 525 int blk_crypto_generate_key(struct blk_crypto_profile *profile, 526 526 u8 lt_key[BLK_CRYPTO_MAX_HW_WRAPPED_KEY_SIZE]) ··· 539 537 blk_crypto_hw_exit(profile); 540 538 return ret; 541 539 } 540 + EXPORT_SYMBOL_GPL(blk_crypto_generate_key); 542 541 543 542 int blk_crypto_prepare_key(struct blk_crypto_profile *profile, 544 543 const u8 *lt_key, size_t lt_key_size, ··· 559 556 blk_crypto_hw_exit(profile); 560 557 return ret; 561 558 } 559 + EXPORT_SYMBOL_GPL(blk_crypto_prepare_key); 562 560 563 561 /** 564 562 * blk_crypto_intersect_capabilities() - restrict supported crypto capabilities