<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/include/crypto/public_key.h, branch linux-5.1.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.1.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.1.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2018-10-26T08:30:46Z</updated>
<entry>
<title>KEYS: Allow the public_key struct to hold a private key [ver #2]</title>
<updated>2018-10-26T08:30:46Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2018-10-09T16:47:31Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f7c4e06e066c3df282e6e3d4e7d8c498be9e1e46'/>
<id>urn:sha1:f7c4e06e066c3df282e6e3d4e7d8c498be9e1e46</id>
<content type='text'>
Put a flag in the public_key struct to indicate if the structure is holding
a private key.  The private key must be held ASN.1 encoded in the format
specified in RFC 3447 A.1.2.  This is the form required by crypto/rsa.c.

The software encryption subtype's verification and query functions then
need to select the appropriate crypto function to set the key.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Tested-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Reviewed-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Reviewed-by: Denis Kenzior &lt;denkenz@gmail.com&gt;
Tested-by: Denis Kenzior &lt;denkenz@gmail.com&gt;
Signed-off-by: James Morris &lt;james.morris@microsoft.com&gt;
</content>
</entry>
<entry>
<title>KEYS: Provide missing asymmetric key subops for new key type ops [ver #2]</title>
<updated>2018-10-26T08:30:46Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2018-10-09T16:47:07Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=5a30771832aab228e0863e414f9182f86797429e'/>
<id>urn:sha1:5a30771832aab228e0863e414f9182f86797429e</id>
<content type='text'>
Provide the missing asymmetric key subops for new key type ops.  This
include query, encrypt, decrypt and create signature.  Verify signature
already exists.  Also provided are accessor functions for this:

	int query_asymmetric_key(const struct key *key,
				 struct kernel_pkey_query *info);

	int encrypt_blob(struct kernel_pkey_params *params,
			 const void *data, void *enc);
	int decrypt_blob(struct kernel_pkey_params *params,
			 const void *enc, void *data);
	int create_signature(struct kernel_pkey_params *params,
			     const void *data, void *enc);

The public_key_signature struct gains an encoding field to carry the
encoding for verify_signature().

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Tested-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Reviewed-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Reviewed-by: Denis Kenzior &lt;denkenz@gmail.com&gt;
Tested-by: Denis Kenzior &lt;denkenz@gmail.com&gt;
Signed-off-by: James Morris &lt;james.morris@microsoft.com&gt;
</content>
</entry>
<entry>
<title>KEYS: Keyring asymmetric key restrict method with chaining</title>
<updated>2017-04-04T21:10:13Z</updated>
<author>
<name>Mat Martineau</name>
<email>mathew.j.martineau@linux.intel.com</email>
</author>
<published>2016-10-04T23:42:45Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=8e323a02e866014091180443ccb186fee1e3d30d'/>
<id>urn:sha1:8e323a02e866014091180443ccb186fee1e3d30d</id>
<content type='text'>
Add a restrict_link_by_key_or_keyring_chain link restriction that
searches for signing keys in the destination keyring in addition to the
signing key or keyring designated when the destination keyring was
created. Userspace enables this behavior by including the "chain" option
in the keyring restriction:

  keyctl(KEYCTL_RESTRICT_KEYRING, keyring, "asymmetric",
         "key_or_keyring:&lt;signing key&gt;:chain");

Signed-off-by: Mat Martineau &lt;mathew.j.martineau@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>KEYS: Restrict asymmetric key linkage using a specific keychain</title>
<updated>2017-04-04T21:10:13Z</updated>
<author>
<name>Mat Martineau</name>
<email>mathew.j.martineau@linux.intel.com</email>
</author>
<published>2016-06-27T23:45:16Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=7e3c4d22083f6e7316c5229b6197ca2d5335aa35'/>
<id>urn:sha1:7e3c4d22083f6e7316c5229b6197ca2d5335aa35</id>
<content type='text'>
Adds restrict_link_by_signature_keyring(), which uses the restrict_key
member of the provided destination_keyring data structure as the
key or keyring to search for signing keys.

Signed-off-by: Mat Martineau &lt;mathew.j.martineau@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>KEYS: Split role of the keyring pointer for keyring restrict functions</title>
<updated>2017-04-03T17:24:56Z</updated>
<author>
<name>Mat Martineau</name>
<email>mathew.j.martineau@linux.intel.com</email>
</author>
<published>2016-08-30T18:33:13Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=aaf66c883813f0078e3dafe7d20d1461321ac14f'/>
<id>urn:sha1:aaf66c883813f0078e3dafe7d20d1461321ac14f</id>
<content type='text'>
The first argument to the restrict_link_func_t functions was a keyring
pointer. These functions are called by the key subsystem with this
argument set to the destination keyring, but restrict_link_by_signature
expects a pointer to the relevant trusted keyring.

Restrict functions may need something other than a single struct key
pointer to allow or reject key linkage, so the data used to make that
decision (such as the trust keyring) is moved to a new, fourth
argument. The first argument is now always the destination keyring.

Signed-off-by: Mat Martineau &lt;mathew.j.martineau@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>KEYS: Move the point of trust determination to __key_link()</title>
<updated>2016-04-11T21:43:43Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2016-04-06T15:14:26Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a511e1af8b12f44c6e55786c463c9f093c214fb6'/>
<id>urn:sha1:a511e1af8b12f44c6e55786c463c9f093c214fb6</id>
<content type='text'>
Move the point at which a key is determined to be trustworthy to
__key_link() so that we use the contents of the keyring being linked in to
to determine whether the key being linked in is trusted or not.

What is 'trusted' then becomes a matter of what's in the keyring.

Currently, the test is done when the key is parsed, but given that at that
point we can only sensibly refer to the contents of the system trusted
keyring, we can only use that as the basis for working out the
trustworthiness of a new key.

With this change, a trusted keyring is a set of keys that once the
trusted-only flag is set cannot be added to except by verification through
one of the contained keys.

Further, adding a key into a trusted keyring, whilst it might grant
trustworthiness in the context of that keyring, does not automatically
grant trustworthiness in the context of a second keyring to which it could
be secondarily linked.

To accomplish this, the authentication data associated with the key source
must now be retained.  For an X.509 cert, this means the contents of the
AuthorityKeyIdentifier and the signature data.


If system keyrings are disabled then restrict_link_by_builtin_trusted()
resolves to restrict_link_reject().  The integrity digital signature code
still works correctly with this as it was previously using
KEY_FLAG_TRUSTED_ONLY, which doesn't permit anything to be added if there
is no system keyring against which trust can be determined.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
</content>
</entry>
<entry>
<title>KEYS: Move x509_request_asymmetric_key() to asymmetric_type.c</title>
<updated>2016-04-11T21:41:28Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2016-04-06T15:14:25Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=983023f28bff62b4462fd3575a86a8947ac592d8'/>
<id>urn:sha1:983023f28bff62b4462fd3575a86a8947ac592d8</id>
<content type='text'>
Move x509_request_asymmetric_key() to asymmetric_type.c so that it can be
generalised.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
</content>
</entry>
<entry>
<title>KEYS: Generalise system_verify_data() to provide access to internal content</title>
<updated>2016-04-06T15:14:24Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2016-04-06T15:14:24Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e68503bd6836ba765dc8e0ee77ea675fedc07e41'/>
<id>urn:sha1:e68503bd6836ba765dc8e0ee77ea675fedc07e41</id>
<content type='text'>
Generalise system_verify_data() to provide access to internal content
through a callback.  This allows all the PKCS#7 stuff to be hidden inside
this function and removed from the PE file parser and the PKCS#7 test key.

If external content is not required, NULL should be passed as data to the
function.  If the callback is not required, that can be set to NULL.

The function is now called verify_pkcs7_signature() to contrast with
verify_pefile_signature() and the definitions of both have been moved into
linux/verification.h along with the key_being_used_for enum.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
</content>
</entry>
<entry>
<title>KEYS: Add identifier pointers to public_key_signature struct</title>
<updated>2016-04-06T15:13:33Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2016-04-06T15:13:33Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a022ec02691cf68e1fe237d5f79d54aa95446cc6'/>
<id>urn:sha1:a022ec02691cf68e1fe237d5f79d54aa95446cc6</id>
<content type='text'>
Add key identifier pointers to public_key_signature struct so that they can
be used to retain the identifier of the key to be used to verify the
signature in both PKCS#7 and X.509.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
</content>
</entry>
<entry>
<title>KEYS: Allow authentication data to be stored in an asymmetric key</title>
<updated>2016-04-06T15:13:33Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2016-04-06T15:13:33Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3b764563177c1e435ef3e2608271c07955f73ea6'/>
<id>urn:sha1:3b764563177c1e435ef3e2608271c07955f73ea6</id>
<content type='text'>
Allow authentication data to be stored in an asymmetric key in the 4th
element of the key payload and provide a way for it to be destroyed.

For the public key subtype, this will be a public_key_signature struct.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
</content>
</entry>
</feed>
