lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1522639.tMShRcNLPc@positron.chronox.de>
Date:   Wed, 11 Jan 2017 13:39:33 +0100
From:   Stephan Müller <smueller@...onox.de>
To:     George Cherian <gcherian@...iumnetworks.com>
Cc:     George Cherian <george.cherian@...ium.com>,
        herbert@...dor.apana.org.au, davem@...emloft.net,
        david.daney@...ium.com, clabbe.montjoie@...il.com,
        linux-kernel@...r.kernel.org, linux-crypto@...r.kernel.org
Subject: Re: [PATCH v4 2/3] drivers: crypto: Add the Virtual Function driver for CPT

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ