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


Groups > linux.kernel > #1401035

Re: [PATCH RESEND v5 6/6] crypto: AF_ALG - add support for key_id

Path csiph.com!weretis.net!feeder4.news.weretis.net!news.mixmin.net!aioe.org!gothmog.csi.it!bofh.it!news.nic.it!robomod
From Mat Martineau <mathew.j.martineau@linux.intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH RESEND v5 6/6] crypto: AF_ALG - add support for key_id
Date Sat, 14 May 2016 01:40:02 +0200
Message-ID <ryuQy-59K-11@gated-at.bofh.it> (permalink)
References <rvxBf-6mz-3@gated-at.bofh.it> <rvxBg-6mz-27@gated-at.bofh.it>
X-Extloop1 1
X-Ironport-Av E=Sophos;i="5.24,615,1455004800"; d="scan'208";a="805921731"
X-X-Sender mjmartin@mjmartin-mac01.local
User-Agent Alpine 2.20 (OSX 67 2015-01-07)
MIME-Version 1.0
Content-Type text/plain; format=flowed; charset=US-ASCII
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 38
Organization linux.* mail to news gateway
X-Original-Cc dhowells@redhat.com, herbert@gondor.apana.org.au, smueller@chronox.de, linux-api@vger.kernel.org, marcel@holtmann.org, linux-kernel@vger.kernel.org, keyrings@vger.kernel.org, linux-crypto@vger.kernel.org, dwmw2@infradead.org, davem@davemloft.net
X-Original-Date Fri, 13 May 2016 16:32:35 -0700 (PDT)
X-Original-Message-ID <alpine.OSX.2.20.1605131616200.29074@mjmartin-mac01.local>
X-Original-References <20160505195048.1843.7817.stgit@tstruk-mobl1> <20160505195120.1843.35821.stgit@tstruk-mobl1>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1401035

Show key headers only | View raw


Tadeusz -

David updated the keys-asym-keyctl branch, and this patch set won't build 
any more.

On Thu, 5 May 2016, Tadeusz Struk wrote:

> diff --git a/crypto/algif_akcipher.c b/crypto/algif_akcipher.c
> index e00793d..f486b6d 100644
> --- a/crypto/algif_akcipher.c
> +++ b/crypto/algif_akcipher.c
> +static int asym_key_encrypt(const struct key *key, struct akcipher_request *req)
...
> +	params.data_len = req->src_len;
> +	params.enc_len = req->dst_len;

The params member names have changed (now in_len and out_len).

> +	ret = encrypt_blob(&params, in, out);

The encrypt function for the key can now be called with 
params.key->type->asym_eds_op(). This also allows you to factor out the 
duplication in asym_key_encrypt, asym_key_decrypt, and asym_key_sign. See 
keyctl_pkey_e_d_s() in keyctl_pkey.c

> +static int asym_key_verify(const struct key *key, struct akcipher_request *req)
...
> +	ret = verify_signature(key, NULL, &sig);

key->type->asym_verify_signature() is available as well.


Regards,

--
Mat Martineau
Intel OTC

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


Thread

Re: [PATCH RESEND v5 6/6] crypto: AF_ALG - add support for key_id Mat Martineau <mathew.j.martineau@linux.intel.com> - 2016-05-14 01:40 +0200
  Re: [PATCH RESEND v5 6/6] crypto: AF_ALG - add support for key_id Tadeusz Struk <tadeusz.struk@intel.com> - 2016-05-16 16:30 +0200

csiph-web