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]
Date:	Wed, 13 Jan 2016 13:31:22 +0000
From:	David Howells <dhowells@...hat.com>
To:	Tadeusz Struk <tstruk@...il.com>
Cc:	dhowells@...hat.com, herbert@...dor.apana.org.au,
	tadeusz.struk@...el.com, smueller@...onox.de,
	linux-api@...r.kernel.org, marcel@...tmann.org,
	linux-kernel@...r.kernel.org, keyrings@...r.kernel.org,
	linux-crypto@...r.kernel.org, zohar@...ux.vnet.ibm.com,
	dwmw2@...radead.org
Subject: Re: [PATCH v2] crypto: AF_ALG - add support for keys/asymmetric-type

Tadeusz Struk <tstruk@...il.com> wrote:

> +	pkey = keyring->payload.data[asym_crypto];
> +	if (!pkey) {
> +		key_put(keyring);
> +		goto out;
> +	}
> +
> +	err = setkey(private, pkey->key, pkey->keylen);
> +	key_put(keyring);

Note that you may not assume that there's data there that you can use in this
manner.  The key might be a pointer to some hardware device such as a TPM.  I
have a TPM asymmetric subtype in progress.

I think this really needs to be driven from a keyctl() because you need to let
the asymmetric subtype decide how it wants to handle this.  I would suggest
adding KEYCTL_{ASYM_GETINFO,SIGN,VERIFY,ENCRYPT,DECRYPT} - the problem is how
to pass sufficient arguments, how to decrypt the private key and what metadata
needs to be passed vs what is inline with the data.

David

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ