[19.10 FEAT] openssl: SIMD implementation of poly1305

Bug #1736704 reported by bugproxy
16
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu on IBM z Systems
Fix Released
Wishlist
Canonical Foundations Team
openssl (Ubuntu)
Fix Released
Wishlist
Skipper Bug Screeners

Bug Description

Enable support for TLS 1.3 with chacha20poly1305 cipher suites
using SIMD instructions
Planned with openssl 1.2

bugproxy (bugproxy)
tags: added: architecture-s39064 bugnameltc-161600 severity-high targetmilestone-inin1804
Changed in ubuntu:
assignee: nobody → Skipper Bug Screeners (skipper-screen-team)
affects: ubuntu → openssl (Ubuntu)
Revision history for this message
Frank Heimes (fheimes) wrote :

setting - for now - to Incomplete until openssl 1.2 got released

Changed in ubuntu-z-systems:
importance: Undecided → High
status: New → Triaged
assignee: nobody → Canonical Foundations Team (canonical-foundations)
status: Triaged → Incomplete
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Next openssl series is expected to be 1.1.1, however it is unknown if that will be released in time for inclusion into 18.04 LTS. Please see ubuntu-devel mailing list discussion detailing outstanding concerns with shipping 1.1.0 or later.

Changed in ubuntu-z-systems:
importance: High → Wishlist
Changed in openssl (Ubuntu):
importance: Undecided → Wishlist
Changed in openssl (Ubuntu):
milestone: none → later
summary: - [18.04 FEAT] openssl: SIMD implementation of poly1305
+ [18.10 FEAT] openssl: SIMD implementation of poly1305
Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2018-01-17 07:10 EDT-------
New target 18.10 due to "not in time" integration .

tags: added: targetmilestone-inin1810
removed: targetmilestone-inin1804
Revision history for this message
Dimitri John Ledkov (xnox) wrote : Re: [18.10 FEAT] openssl: SIMD implementation of poly1305

As far as I understand the SIMD instructions for poly1305 are in 1.1.0 release and later. Thus an upgrade to 1.1.0 is sufficient to resolve this ticket. (Note that TLS v1.3 is not expected until OpenSSL 1.1.1+)

Changed in openssl (Ubuntu):
milestone: later → ubuntu-18.02
status: New → In Progress
Frank Heimes (fheimes)
Changed in ubuntu-z-systems:
status: Incomplete → In Progress
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Do you have commit ids for this feature?

592eef5c349b8f8ea6f4b7dba91d700f3a343e84 s390x assembly pack: add ChaCha20 and Poly1305 modules.

Is included in:
OpenSSL_1_1_0
OpenSSL_1_1_0-pre3
OpenSSL_1_1_0-pre4
OpenSSL_1_1_0-pre5
OpenSSL_1_1_0-pre6
OpenSSL_1_1_0a
OpenSSL_1_1_0b
OpenSSL_1_1_0c
OpenSSL_1_1_0d
OpenSSL_1_1_0e
OpenSSL_1_1_0f
OpenSSL_1_1_0g
OpenSSL_1_1_1-pre1

And thus is now available in Bionic, since we ship OpenSSL_1_1_0g by default now. Note that TLS 1.3 itself is not available, as that is not yet release upstream.

Should this ticket be closed as fix released?

Changed in openssl (Ubuntu):
milestone: ubuntu-18.02 → later
status: In Progress → Confirmed
Changed in ubuntu-z-systems:
status: In Progress → Confirmed
Changed in openssl (Ubuntu):
status: Confirmed → Incomplete
Changed in ubuntu-z-systems:
status: Confirmed → Incomplete
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Please provide commit ids for this feature request.

Changed in openssl (Ubuntu):
status: Incomplete → Invalid
Changed in ubuntu-z-systems:
status: Incomplete → Invalid
Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2018-02-28 11:06 EDT-------
Commit 592eef5c349b8f8ea6f4b7dba91d700f3a343e84 is not related to this ticket.

The patches corresponding to this ticket were submitted upstream for integration to master but are not accepted yet.

summary: - [18.10 FEAT] openssl: SIMD implementation of poly1305
+ [19.04 FEAT] openssl: SIMD implementation of poly1305
Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2018-08-29 08:33 EDT-------
Moved to 19.04, integration of openssl 1.1.1 will not happen with Cosmic

tags: added: targetmilestone-inin1904
removed: targetmilestone-inin1810
Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2018-10-25 06:43 EDT-------
Function did not make it into openssl 1.1.1 .

Revision history for this message
Frank Heimes (fheimes) wrote : Re: [19.04 FEAT] openssl: SIMD implementation of poly1305

Waiting for the function to land in a new openssl version > 1.1.1

Changed in openssl (Ubuntu):
status: Invalid → Incomplete
Changed in ubuntu-z-systems:
status: Invalid → Incomplete
summary: - [19.04 FEAT] openssl: SIMD implementation of poly1305
+ [19.10 FEAT] openssl: SIMD implementation of poly1305
Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2018-11-30 08:04 EDT-------
Moved to 19.10, openssl 1.2.0 will not make it into 19.04

tags: added: targetmilestone-inin1910
removed: targetmilestone-inin1904
Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2019-04-30 09:27 EDT-------
Feature will be provided with openssl 3.0

Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2019-05-09 03:59 EDT-------
Due to the fact, that openssl 3.0 is in the unplanned future.
Here are the upstream ids which can be applied to openssl 1.1.1:

"s390x assembly pack: perlasm support."
c66bb88cb08adbc848271dd388aa9695c7e200be

"crypto/poly1305/asm/poly1305-s390x.pl: add vx code path."
d6f4b0a8bfbe901c72294d8923eb5b6f54ca7732

s390x assembly pack: import poly from cryptogams repo"
2e6b615f795e8ca8ae830a00079c4ea064eaae42

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

I will evaluate cherrypicking those.

Frank Heimes (fheimes)
Changed in ubuntu-z-systems:
status: Incomplete → Triaged
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Browsing commits on master, I came up with more things to cherry-pick and end up with this:

e9964bdd90 (HEAD -> ubuntu) s390x assembly pack: fix restoring of SIGILL action
552d2f5e1e s390x assembly pack: update OPENSSL_s390xcap(3)
a37b2e7e29 Place return values after examples in doc
353796e486 Following the license change, modify the boilerplates in doc/man3/
ed27083494 s390x assembly pack: add support for pcc and kma instructions
aabd4c666a fix --strict-warnings build
e1d7cae6df s390x assembly pack: remove poly1305 dependency on non-base memnonics
8f951bc85e s390x assembly pack: remove chacha20 dependency on non-base memnonics
0ce8e36844 s390x assembly pack: update perlasm module
5a7c631364 s390x assembly pack: allow alignment hints for vector load/store
03a73fd418 s390x assembly pack: import poly from cryptogams repo
c1ee845711 s390x assembly pack: import chacha from cryptogams repo
ad51e41d94 s390x assembly pack: fix formal interface bug in chacha module
edb9ac0d33 crypto/poly1305/asm/poly1305-s390x.pl: add vx code path.
165a8e0bae crypto/evp/e_aes.c: build again on s390x
c8b56f12a6 crypto/chacha/asm/chacha-s390x.pl: add vx code path.
ba8deb0d2c s390x assembly pack: perlasm support.
a40c6f616e s390x assembly pack: add OPENSSL_s390xcap man page.
be67d2b1cb s390x assembly pack: add OPENSSL_s390xcap environment variable.

That cherrypicks assembly packs, updates to them, OPENSSL_s390xcap and bugfixes to those code paths.

The following is not picked up:
3ded2288a4 OPENSSL_s390xcap.pod: list msa9 facility bit (155)
58c35587ea s390x assembly pack: accelerate ECDSA
1461e66706 s390x assembly pack: accelerate scalar multiplication
9baa4d5f4c s390xcpuid.pl: fix comment
2b2eb210a1 Fix commit a672a02a s390x build breakage
5d00f46e15 s390x assembly pack: use getauxval to detect hw capabilities

As there are more changes needed from master / common-code to use those. But I fear that OpenSSL 3.0.0 will not be out prior to 20.04 release and thus I might need to backport these to 1.1.1 anyway.

Testing the build with the first set of cherrypicks.

Changed in ubuntu-z-systems:
status: Triaged → In Progress
information type: Private → Public
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package openssl - 1.1.1c-1ubuntu4

---------------
openssl (1.1.1c-1ubuntu4) eoan; urgency=medium

  * Cherrypick s390x SIMD acceleration patches for poly1305 and chacha20
    from master. LP: #1736705 LP: #1736704

 -- Dimitri John Ledkov <email address hidden> Tue, 20 Aug 2019 12:46:33 +0100

Changed in openssl (Ubuntu):
status: Incomplete → Fix Released
Frank Heimes (fheimes)
Changed in ubuntu-z-systems:
status: In Progress → Fix Released
Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2019-09-02 05:18 EDT-------
IBM Bugzilla status -> closed, Fix Released with Eoan

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.