Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1556449

Re: [PATCH v4 2/3] drivers: crypto: Add the Virtual Function driver for CPT

From Stephan Müller <smueller@chronox.de>
Newsgroups linux.kernel
Subject Re: [PATCH v4 2/3] drivers: crypto: Add the Virtual Function driver for CPT
Date 2017-01-11 13:40 +0100
Message-ID <sYqm6-6WF-11@gated-at.bofh.it> (permalink)
References <sYp6G-6cY-31@gated-at.bofh.it> <sYp6G-6cY-29@gated-at.bofh.it> <sYqm6-6WF-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Am Mittwoch, 11. Januar 2017, 16:58:17 CET schrieb George Cherian:

Hi George,

> I will add a seperate function for xts setkey and make changes as following.
> > ...
> > 
> >> +
> >> +struct crypto_alg algs[] = { {
> >> +	.cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER | CRYPTO_ALG_ASYNC,
> >> +	.cra_blocksize = AES_BLOCK_SIZE,
> >> +	.cra_ctxsize = sizeof(struct cvm_enc_ctx),
> >> +	.cra_alignmask = 7,
> >> +	.cra_priority = 4001,
> >> +	.cra_name = "xts(aes)",
> >> +	.cra_driver_name = "cavium-xts-aes",
> >> +	.cra_type = &crypto_ablkcipher_type,
> >> +	.cra_u = {
> >> +		.ablkcipher = {
> >> +			.ivsize = AES_BLOCK_SIZE,
> >> +			.min_keysize = AES_MIN_KEY_SIZE,
> >> +			.max_keysize = AES_MAX_KEY_SIZE,
> >> +			.setkey = cvm_enc_dec_setkey,
> > 
> > May I ask how the setkey for XTS is intended to work? The XTS keys are
> > double in size than "normal" keys.
> 
> 		.ablkcipher = {
> 			.ivsize = AES_BLOCK_SIZE,
> 			.min_keysize = 2 * AES_MIN_KEY_SIZE,
> 			.max_keysize = 2 * AES_MAX_KEY_SIZE,
> 			.setkey = cvm_xts_setkey,
> 
> Hope this is fine?
> 
Sure, please do not forget to invoke xts_verify_key.

Ciao
Stephan

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH v4 2/3] drivers: crypto: Add the Virtual Function driver for CPT Stephan Müller <smueller@chronox.de> - 2017-01-11 12:20 +0100
  Re: [PATCH v4 2/3] drivers: crypto: Add the Virtual Function driver for CPT Stephan Müller <smueller@chronox.de> - 2017-01-11 13:40 +0100
    Re: [PATCH v4 2/3] drivers: crypto: Add the Virtual Function driver for CPT Stephan Müller <smueller@chronox.de> - 2017-01-12 12:30 +0100

csiph-web