<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/include/crypto/gf128mul.h, branch linux-5.11.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.11.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.11.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2020-08-07T18:33:22Z</updated>
<entry>
<title>mm, treewide: rename kzfree() to kfree_sensitive()</title>
<updated>2020-08-07T18:33:22Z</updated>
<author>
<name>Waiman Long</name>
<email>longman@redhat.com</email>
</author>
<published>2020-08-07T06:18:13Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=453431a54934d917153c65211b2dabf45562ca88'/>
<id>urn:sha1:453431a54934d917153c65211b2dabf45562ca88</id>
<content type='text'>
As said by Linus:

  A symmetric naming is only helpful if it implies symmetries in use.
  Otherwise it's actively misleading.

  In "kzalloc()", the z is meaningful and an important part of what the
  caller wants.

  In "kzfree()", the z is actively detrimental, because maybe in the
  future we really _might_ want to use that "memfill(0xdeadbeef)" or
  something. The "zero" part of the interface isn't even _relevant_.

The main reason that kzfree() exists is to clear sensitive information
that should not be leaked to other future users of the same memory
objects.

Rename kzfree() to kfree_sensitive() to follow the example of the recently
added kvfree_sensitive() and make the intention of the API more explicit.
In addition, memzero_explicit() is used to clear the memory to make sure
that it won't get optimized away by the compiler.

The renaming is done by using the command sequence:

  git grep -w --name-only kzfree |\
  xargs sed -i 's/kzfree/kfree_sensitive/'

followed by some editing of the kfree_sensitive() kerneldoc and adding
a kzfree backward compatibility macro in slab.h.

[akpm@linux-foundation.org: fs/crypto/inline_crypt.c needs linux/slab.h]
[akpm@linux-foundation.org: fix fs/crypto/inline_crypt.c some more]

Suggested-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: Waiman Long &lt;longman@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Acked-by: David Howells &lt;dhowells@redhat.com&gt;
Acked-by: Michal Hocko &lt;mhocko@suse.com&gt;
Acked-by: Johannes Weiner &lt;hannes@cmpxchg.org&gt;
Cc: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
Cc: James Morris &lt;jmorris@namei.org&gt;
Cc: "Serge E. Hallyn" &lt;serge@hallyn.com&gt;
Cc: Joe Perches &lt;joe@perches.com&gt;
Cc: Matthew Wilcox &lt;willy@infradead.org&gt;
Cc: David Rientjes &lt;rientjes@google.com&gt;
Cc: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Cc: "Jason A . Donenfeld" &lt;Jason@zx2c4.com&gt;
Link: http://lkml.kernel.org/r/20200616154311.12314-3-longman@redhat.com
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>crypto: gf128mul - The x8_ble multiplication functions</title>
<updated>2017-11-03T13:50:43Z</updated>
<author>
<name>Harsh Jain</name>
<email>harsh@chelsio.com</email>
</author>
<published>2017-10-08T08:07:20Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=acfc587810bea08fdd62c9d5ed7cefe8be874a4f'/>
<id>urn:sha1:acfc587810bea08fdd62c9d5ed7cefe8be874a4f</id>
<content type='text'>
It multiply GF(2^128) elements in the ble format.
It will be used by chelsio driver to speed up gf multiplication.

Signed-off-by: Harsh Jain &lt;harsh@chelsio.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: gf128mul - switch gf128mul_x_ble to le128</title>
<updated>2017-04-05T13:58:37Z</updated>
<author>
<name>Ondrej Mosnáček</name>
<email>omosnacek@gmail.com</email>
</author>
<published>2017-04-02T19:19:14Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e55318c84f199d6056a0bcd98bc4612d01ccfe80'/>
<id>urn:sha1:e55318c84f199d6056a0bcd98bc4612d01ccfe80</id>
<content type='text'>
Currently, gf128mul_x_ble works with pointers to be128, even though it
actually interprets the words as little-endian. Consequently, it uses
cpu_to_le64/le64_to_cpu on fields of type __be64, which is incorrect.

This patch fixes that by changing the function to accept pointers to
le128 and updating all users accordingly.

Signed-off-by: Ondrej Mosnacek &lt;omosnacek@gmail.com&gt;
Reviewd-by: Eric Biggers &lt;ebiggers@google.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: gf128mul - define gf128mul_x_* in gf128mul.h</title>
<updated>2017-04-05T13:58:35Z</updated>
<author>
<name>Ondrej Mosnáček</name>
<email>omosnacek@gmail.com</email>
</author>
<published>2017-04-02T19:19:13Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=acb9b159c784dc0033ede0dadde876ebd93aca4c'/>
<id>urn:sha1:acb9b159c784dc0033ede0dadde876ebd93aca4c</id>
<content type='text'>
The gf128mul_x_ble function is currently defined in gf128mul.c, because
it depends on the gf128mul_table_be multiplication table.

However, since the function is very small and only uses two values from
the table, it is better for it to be defined as inline function in
gf128mul.h. That way, the function can be inlined by the compiler for
better performance.

For consistency, the other gf128mul_x_* functions are also moved to the
header file. In addition, the code is rewritten to be constant-time.

After this change, the speed of the generic 'xts(aes)' implementation
increased from ~225 MiB/s to ~235 MiB/s (measured using 'cryptsetup
benchmark -c aes-xts-plain64' on an Intel system with CRYPTO_AES_X86_64
and CRYPTO_AES_NI_INTEL disabled).

Signed-off-by: Ondrej Mosnacek &lt;omosnacek@gmail.com&gt;
Reviewd-by: Eric Biggers &lt;ebiggers@google.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: gf128mul - constify 4k and 64k multiplication tables</title>
<updated>2017-03-09T10:34:16Z</updated>
<author>
<name>Eric Biggers</name>
<email>ebiggers@google.com</email>
</author>
<published>2017-02-14T21:43:30Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3ea996ddfb1756658523f371c7ed1137841facaa'/>
<id>urn:sha1:3ea996ddfb1756658523f371c7ed1137841facaa</id>
<content type='text'>
Constify the multiplication tables passed to the 4k and 64k
multiplication functions, as they are not modified by these functions.

Cc: Alex Cope &lt;alexcope@google.com&gt;
Signed-off-by: Eric Biggers &lt;ebiggers@google.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: gf128mul - fix some comments</title>
<updated>2017-03-09T10:34:14Z</updated>
<author>
<name>Eric Biggers</name>
<email>ebiggers@google.com</email>
</author>
<published>2017-02-14T21:43:27Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=63be5b53b6d15f7706ad21e9801dae5b723e8340'/>
<id>urn:sha1:63be5b53b6d15f7706ad21e9801dae5b723e8340</id>
<content type='text'>
Fix incorrect references to GF(128) instead of GF(2^128), as these are
two entirely different fields, and fix a few other incorrect comments.

Cc: Alex Cope &lt;alexcope@google.com&gt;
Signed-off-by: Eric Biggers &lt;ebiggers@google.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: gf128mul - Zero memory when freeing multiplication table</title>
<updated>2016-11-17T15:34:59Z</updated>
<author>
<name>Alex Cope</name>
<email>alexcope@google.com</email>
</author>
<published>2016-11-14T19:02:54Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=75aa0a7cafe951538c7cb7c5ed457a3371ec5bcd'/>
<id>urn:sha1:75aa0a7cafe951538c7cb7c5ed457a3371ec5bcd</id>
<content type='text'>
GF(2^128) multiplication tables are typically used for secret
information, so it's a good idea to zero them on free.

Signed-off-by: Alex Cope &lt;alexcope@google.com&gt;
Signed-off-by: Eric Biggers &lt;ebiggers@google.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: gf128mul - remove dead gf128mul_64k_lle code</title>
<updated>2016-11-13T09:45:06Z</updated>
<author>
<name>Alex Cope</name>
<email>alexcope@google.com</email>
</author>
<published>2016-11-09T01:16:58Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d266f44b5b517025249c4200eaa4bb892facc9a5'/>
<id>urn:sha1:d266f44b5b517025249c4200eaa4bb892facc9a5</id>
<content type='text'>
This code is unlikely to be useful in the future because transforms
don't know how often keys will be changed, new algorithms are unlikely
to use lle representation, and tables should be replaced with
carryless multiplication instructions when available.

Signed-off-by: Alex Cope &lt;alexcope@google.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>Update broken web addresses in the kernel.</title>
<updated>2010-10-18T09:03:14Z</updated>
<author>
<name>Justin P. Mattock</name>
<email>justinmattock@gmail.com</email>
</author>
<published>2010-10-18T09:03:14Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=631dd1a885b6d7e9f6f51b4e5b311c2bb04c323c'/>
<id>urn:sha1:631dd1a885b6d7e9f6f51b4e5b311c2bb04c323c</id>
<content type='text'>
The patch below updates broken web addresses in the kernel

Signed-off-by: Justin P. Mattock &lt;justinmattock@gmail.com&gt;
Cc: Maciej W. Rozycki &lt;macro@linux-mips.org&gt;
Cc: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Cc: Finn Thain &lt;fthain@telegraphics.com.au&gt;
Cc: Randy Dunlap &lt;rdunlap@xenotime.net&gt;
Cc: Matt Turner &lt;mattst88@gmail.com&gt;
Cc: Dimitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Cc: Mike Frysinger &lt;vapier.adi@gmail.com&gt;
Acked-by: Ben Pfaff &lt;blp@cs.stanford.edu&gt;
Acked-by: Hans J. Koch &lt;hjk@linutronix.de&gt;
Reviewed-by: Finn Thain &lt;fthain@telegraphics.com.au&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>[CRYPTO] xts: XTS blockcipher mode implementation without partial blocks</title>
<updated>2007-10-10T23:55:45Z</updated>
<author>
<name>Rik Snel</name>
<email>rsnel@cube.dyndns.org</email>
</author>
<published>2007-09-19T12:23:13Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f19f5111c94053ba4931892f5c01c806de33942e'/>
<id>urn:sha1:f19f5111c94053ba4931892f5c01c806de33942e</id>
<content type='text'>
XTS currently considered to be the successor of the LRW mode by the IEEE1619
workgroup. LRW was discarded, because it was not secure if the encyption key
itself is encrypted with LRW.

XTS does not have this problem. The implementation is pretty straightforward,
a new function was added to gf128mul to handle GF(128) elements in ble format.
Four testvectors from the specification
	http://grouper.ieee.org/groups/1619/email/pdf00086.pdf
were added, and they verify on my system.

Signed-off-by: Rik Snel &lt;rsnel@cube.dyndns.org&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
</feed>
