<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/opencrypto/cryptodev.h, branch release/12.4.0</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>Convert cryptostats to a counter_u64 array.</title>
<updated>2021-09-16T11:20:54+00:00</updated>
<author>
<name>Mark Johnston</name>
<email>markj@FreeBSD.org</email>
</author>
<published>2020-06-30T22:01:21+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=bef0c20ec74e0aaa4f08bc879efa1a5ee8fed0f1'/>
<id>bef0c20ec74e0aaa4f08bc879efa1a5ee8fed0f1</id>
<content type='text'>
The global counters were not SMP-friendly.  Use per-CPU counters
instead.

Reviewed by:	jhb
Sponsored by:	Rubicon Communications, LLC (Netgate)
Differential Revision:	https://reviews.freebsd.org/D25466

(cherry picked from commit 7290cb47fced28b5d0654cd1de7cc721e214ea32)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The global counters were not SMP-friendly.  Use per-CPU counters
instead.

Reviewed by:	jhb
Sponsored by:	Rubicon Communications, LLC (Netgate)
Differential Revision:	https://reviews.freebsd.org/D25466

(cherry picked from commit 7290cb47fced28b5d0654cd1de7cc721e214ea32)
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove CRYPTO_TIMING.</title>
<updated>2021-09-16T11:20:44+00:00</updated>
<author>
<name>Mark Johnston</name>
<email>markj@FreeBSD.org</email>
</author>
<published>2020-06-30T15:56:54+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=16ffd822c8236b2b0dae3fb43ffe55043985d0c8'/>
<id>16ffd822c8236b2b0dae3fb43ffe55043985d0c8</id>
<content type='text'>
It was added a very long time ago.  It is single-threaded, so only
really useful for basic measurements, and in the meantime we've gotten
some more sophisticated profiling tools.

Reviewed by:	cem, delphij, jhb
Sponsored by:	Rubicon Communications, LLC (Netgate)
Differential Revision:	https://reviews.freebsd.org/D25464

(cherry picked from commit a5c053f5a78ca68f9dcace37186142266787eaa0)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It was added a very long time ago.  It is single-threaded, so only
really useful for basic measurements, and in the meantime we've gotten
some more sophisticated profiling tools.

Reviewed by:	cem, delphij, jhb
Sponsored by:	Rubicon Communications, LLC (Netgate)
Differential Revision:	https://reviews.freebsd.org/D25464

(cherry picked from commit a5c053f5a78ca68f9dcace37186142266787eaa0)
</pre>
</div>
</content>
</entry>
<entry>
<title>Add hmac_init_ipad() and hmac_init_opad()</title>
<updated>2020-11-09T14:15:06+00:00</updated>
<author>
<name>Mark Johnston</name>
<email>markj@FreeBSD.org</email>
</author>
<published>2020-11-09T14:15:06+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=a92dd5f9723882f422cb09e16d331e6723dd8461'/>
<id>a92dd5f9723882f422cb09e16d331e6723dd8461</id>
<content type='text'>
This is a merge of a small portion of r359374 which makes it easier
to maintain OpenCrypto drivers in stable/12.  No functional change
intended; this is a direct commit to stable/12.

Discussed with:	jhb
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a merge of a small portion of r359374 which makes it easier
to maintain OpenCrypto drivers in stable/12.  No functional change
intended; this is a direct commit to stable/12.

Discussed with:	jhb
</pre>
</div>
</content>
</entry>
<entry>
<title>MFC 361393: Correct the minimum key length for Camellia to 16 bytes (128 bits).</title>
<updated>2020-08-26T21:35:28+00:00</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2020-08-26T21:35:28+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=57c3b9669790fe42621335bda14b008866644262'/>
<id>57c3b9669790fe42621335bda14b008866644262</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>MFC r342024 (by mmacy): Generalize AES iov optimization</title>
<updated>2019-09-11T23:41:09+00:00</updated>
<author>
<name>Alexander Motin</name>
<email>mav@FreeBSD.org</email>
</author>
<published>2019-09-11T23:41:09+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=bc37c2432e21fbd738a32e3ac893f5637afb5521'/>
<id>bc37c2432e21fbd738a32e3ac893f5637afb5521</id>
<content type='text'>
Right now, aesni_cipher_alloc does a bit of special-casing
for CRYPTO_F_IOV, to not do any allocation if the first uio
is large enough for the requested size. While working on ZFS
crypto port, I ran into horrible performance because the code
uses scatter-gather, and many of the times the data to encrypt
was in the second entry. This code looks through the list, and
tries to see if there is a single uio that can contain the
requested data, and, if so, uses that.

This has a slight impact on the current consumers, in that the
check is a little more complicated for the ones that use
CRYPTO_F_IOV -- but none of them meet the criteria for testing
more than one.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Right now, aesni_cipher_alloc does a bit of special-casing
for CRYPTO_F_IOV, to not do any allocation if the first uio
is large enough for the requested size. While working on ZFS
crypto port, I ran into horrible performance because the code
uses scatter-gather, and many of the times the data to encrypt
was in the second entry. This code looks through the list, and
tries to see if there is a single uio that can contain the
requested data, and, if so, uses that.

This has a slight impact on the current consumers, in that the
check is a little more complicated for the ones that use
CRYPTO_F_IOV -- but none of them meet the criteria for testing
more than one.
</pre>
</div>
</content>
</entry>
<entry>
<title>MFC: r343979</title>
<updated>2019-06-16T10:46:02+00:00</updated>
<author>
<name>Marius Strobl</name>
<email>marius@FreeBSD.org</email>
</author>
<published>2019-06-16T10:46:02+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=aca179ccf351cf07ab7e14c5f6cd93806497855d'/>
<id>aca179ccf351cf07ab7e14c5f6cd93806497855d</id>
<content type='text'>
As struct cryptop is wrapped in #ifdef _KERNEL, userland doesn't
need to drag in &lt;sys/_task.h&gt; either.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As struct cryptop is wrapped in #ifdef _KERNEL, userland doesn't
need to drag in &lt;sys/_task.h&gt; either.
</pre>
</div>
</content>
</entry>
<entry>
<title>MFC r344140,r344141,r344142,r344143,r344388,r344547</title>
<updated>2019-03-14T02:46:03+00:00</updated>
<author>
<name>Sean Eric Fagan</name>
<email>sef@FreeBSD.org</email>
</author>
<published>2019-03-14T02:46:03+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=7f4deb98366ee78d84c76a310f48b59cb53f0bee'/>
<id>7f4deb98366ee78d84c76a310f48b59cb53f0bee</id>
<content type='text'>
r344140:
Add CBC-MAC authentication.

r344141:
Add AES-CCM encryption, and plumb into OCF.

r344142:
Pasting in a source control line missed the last quote.  Fixed.

r344143:
Fix another issue from r344141, having to do with size of a shift amount.
This did not show up in my testing.

r344388:
It turns out that setting the IV length is necessary with CCM in OpenSSL.
This adds that back.

r344547:
Fix another bug introduced during the review process of r344140:
the tag wasn't being computed properly due to chaning a &gt;= comparison
to an == comparison.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
r344140:
Add CBC-MAC authentication.

r344141:
Add AES-CCM encryption, and plumb into OCF.

r344142:
Pasting in a source control line missed the last quote.  Fixed.

r344143:
Fix another issue from r344141, having to do with size of a shift amount.
This did not show up in my testing.

r344388:
It turns out that setting the IV length is necessary with CCM in OpenSSL.
This adds that back.

r344547:
Fix another bug introduced during the review process of r344140:
the tag wasn't being computed properly due to chaning a &gt;= comparison
to an == comparison.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add xform-conforming auth_hash wrapper for Poly-1305</title>
<updated>2018-08-17T00:30:04+00:00</updated>
<author>
<name>Conrad Meyer</name>
<email>cem@FreeBSD.org</email>
</author>
<published>2018-08-17T00:30:04+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=01d5de8fca77a55ddd9bc79db3078c9f2ccdbab1'/>
<id>01d5de8fca77a55ddd9bc79db3078c9f2ccdbab1</id>
<content type='text'>
The wrapper is a thin shim around libsodium's Poly-1305 implementation.  For
now, we just use the C algorithm and do not attempt to build the
SSE-optimized variant for x86 processors.

The algorithm support has not yet been plumbed through cryptodev, or added
to cryptosoft.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The wrapper is a thin shim around libsodium's Poly-1305 implementation.  For
now, we just use the C algorithm and do not attempt to build the
SSE-optimized variant for x86 processors.

The algorithm support has not yet been plumbed through cryptodev, or added
to cryptosoft.
</pre>
</div>
</content>
</entry>
<entry>
<title>OpenCrypto: Convert sessions to opaque handles instead of integers</title>
<updated>2018-07-18T00:56:25+00:00</updated>
<author>
<name>Conrad Meyer</name>
<email>cem@FreeBSD.org</email>
</author>
<published>2018-07-18T00:56:25+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=1b0909d51a8aa8b5ec5a61c2dc1a69642976a732'/>
<id>1b0909d51a8aa8b5ec5a61c2dc1a69642976a732</id>
<content type='text'>
Track session objects in the framework, and pass handles between the
framework (OCF), consumers, and drivers.  Avoid redundancy and complexity in
individual drivers by allocating session memory in the framework and
providing it to drivers in ::newsession().

Session handles are no longer integers with information encoded in various
high bits.  Use of the CRYPTO_SESID2FOO() macros should be replaced with the
appropriate crypto_ses2foo() function on the opaque session handle.

Convert OCF drivers (in particular, cryptosoft, as well as myriad others) to
the opaque handle interface.  Discard existing session tracking as much as
possible (quick pass).  There may be additional code ripe for deletion.

Convert OCF consumers (ipsec, geom_eli, krb5, cryptodev) to handle-style
interface.  The conversion is largely mechnical.

The change is documented in crypto.9.

Inspired by
https://lists.freebsd.org/pipermail/freebsd-arch/2018-January/018835.html .

No objection from:	ae (ipsec portion)
Reported by:	jhb
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Track session objects in the framework, and pass handles between the
framework (OCF), consumers, and drivers.  Avoid redundancy and complexity in
individual drivers by allocating session memory in the framework and
providing it to drivers in ::newsession().

Session handles are no longer integers with information encoded in various
high bits.  Use of the CRYPTO_SESID2FOO() macros should be replaced with the
appropriate crypto_ses2foo() function on the opaque session handle.

Convert OCF drivers (in particular, cryptosoft, as well as myriad others) to
the opaque handle interface.  Discard existing session tracking as much as
possible (quick pass).  There may be additional code ripe for deletion.

Convert OCF consumers (ipsec, geom_eli, krb5, cryptodev) to handle-style
interface.  The conversion is largely mechnical.

The change is documented in crypto.9.

Inspired by
https://lists.freebsd.org/pipermail/freebsd-arch/2018-January/018835.html .

No objection from:	ae (ipsec portion)
Reported by:	jhb
</pre>
</div>
</content>
</entry>
<entry>
<title>OCF: Add a typedef for session identifiers</title>
<updated>2018-07-13T23:46:07+00:00</updated>
<author>
<name>Conrad Meyer</name>
<email>cem@FreeBSD.org</email>
</author>
<published>2018-07-13T23:46:07+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=2e08e39ff53a55f7ba5db298069b00a9e73f2dc3'/>
<id>2e08e39ff53a55f7ba5db298069b00a9e73f2dc3</id>
<content type='text'>
No functional change.

This should ease the transition from an integer session identifier model to
an opaque pointer model.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
No functional change.

This should ease the transition from an integer session identifier model to
an opaque pointer model.
</pre>
</div>
</content>
</entry>
</feed>
