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


Groups > linux.kernel > #1163734 > unrolled thread

Re: [PATCH RFC v4 2/4] crypto: add PKE API

Started byHerbert Xu <herbert@gondor.apana.org.au>
First post2015-06-12 05:00 +0200
Last post2015-06-12 05:00 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH RFC v4 2/4] crypto: add PKE API Herbert Xu <herbert@gondor.apana.org.au> - 2015-06-12 05:00 +0200

#1163734 — Re: [PATCH RFC v4 2/4] crypto: add PKE API

FromHerbert Xu <herbert@gondor.apana.org.au>
Date2015-06-12 05:00 +0200
SubjectRe: [PATCH RFC v4 2/4] crypto: add PKE API
Message-ID<pAnmi-F3-13@gated-at.bofh.it>
On Thu, Jun 11, 2015 at 12:05:44PM -0700, Tadeusz Struk wrote:
>
> +int crypto_akcipher_setkey(struct crypto_akcipher *tfm,
> +			   const struct public_key *pkey)
> +{
> +	if (tfm->pkey)
> +		akcipher_free_key(tfm->pkey);
> +
> +	return akcipher_clone_key(tfm, pkey);
> +}

No please do not expose the struct public_key crap to the new
API.  The key should be completely opaque to entities outside
of the algorithm.  So make it raw and read out the MPIs from
it.

The contents of the function must go into the algorithm setkey
function, not the crypto API.  So RSA would read out however
many MPIs it needs and verify it, and so on.

Cheers,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web