openssl: fix VIA Padlock AES-192 and 256 encryption
authorValdikSS ValdikSS <iam@valdikss.org.ru>
Fri, 20 Jan 2023 11:41:35 +0000 (14:41 +0300)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 22 Jan 2023 00:33:33 +0000 (01:33 +0100)
commit2fc170cc21e5ae3cc5ffaf6d0522903a5cbe4f2a
tree73851b302487d631f74f5a6cad3a8cb0978b9524
parent614bba095845cb58f64f5cb82c1710d42a338b61
openssl: fix VIA Padlock AES-192 and 256 encryption

Byte swapping code incorrectly uses the number of AES rounds to swap expanded
AES key, while swapping only a single dword in a loop, resulting in swapped
key and partially swapped expanded keys, breaking AES encryption and
decryption on VIA Padlock hardware.

This commit correctly sets the number of swapping loops to be done.

Upstream: https://github.com/openssl/openssl/commit/2bcf8e69bd92e33d84c48e7d108d3d46b22f8a6d

Acked-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
Signed-off-by: ValdikSS ValdikSS <iam@valdikss.org.ru>
package/libs/openssl/patches/010-padlock.patch [new file with mode: 0644]