git: libtcplay: Include rijndael-alg-fst.c to fix the static library

Michael Neumann mneumann at ntecs.de
Tue Apr 15 01:51:54 PDT 2025


On Tue, Apr 15, 2025 at 12:01:44AM -0700, Aaron LI wrote:
> 
> commit f6db75cab33d9cbed1a66af6457343ec043ae908
> Author: Aaron LI <aly at aaronly.me>
> Date:   Tue Apr 15 14:11:29 2025 +0800
> 
>     libtcplay: Include rijndael-alg-fst.c to fix the static library

Thanks for fixing this!

There needs to be more work done and I am working on it. E.g. in 
sbin/tcplay, as it does not link to libtcplay, so still uses the
old crypto-dev.c :).

Also it shows that we have an unnoticed bug in the software AES-XTS
implementation concerning the reinit function, which differs from the
hardware reinit. The software implementation is *never* used as
hardware implementations always have priority. But as cryptoapi uses the
software implementation in userland, this bug revealed while testing
tcplay with chained ciphers.


>     
>     The static library (libtcplay.a) is used by sbin/cryptdisks, which is
>     built as a static binary.  The missing source of 'rijndael-alg-fst.c' caused
>     sbin/cryptdisks to fail the linking with the following error:
>     
>         /usr/obj/srv/jenkins/workspace/DragonFlyBSD/ctools_x86_64_x86_64/usr/libexec/binutils234/elf/ld.bfd: /usr/obj/srv/jenkins/workspace/DragonFlyBSD/world_x86_64/usr/lib/libtcplay.a(rijndael-api.o): in function `rijndael_set_key':
>         rijndael-api.c:(.text+0x12): undefined reference to `rijndaelKeySetupEnc'
>         /usr/obj/srv/jenkins/workspace/DragonFlyBSD/ctools_x86_64_x86_64/usr/libexec/binutils234/elf/ld.bfd: rijndael-api.c:(.text+0x27): undefined reference to `rijndaelKeySetupDec'
>         /usr/obj/srv/jenkins/workspace/DragonFlyBSD/ctools_x86_64_x86_64/usr/libexec/binutils234/elf/ld.bfd: /usr/obj/srv/jenkins/workspace/DragonFlyBSD/world_x86_64/usr/lib/libtcplay.a(rijndael-api.o): in function `rijndael_decrypt':
>         rijndael-api.c:(.text+0x48): undefined reference to `rijndaelDecrypt'
>         /usr/obj/srv/jenkins/workspace/DragonFlyBSD/ctools_x86_64_x86_64/usr/libexec/binutils234/elf/ld.bfd: /usr/obj/srv/jenkins/workspace/DragonFlyBSD/world_x86_64/usr/lib/libtcplay.a(rijndael-api.o): in function `rijndael_encrypt':
>         rijndael-api.c:(.text+0x66): undefined reference to `rijndaelEncrypt'
>         collect2: error: ld returned 1 exit status
>     
>     Add 'rijndael-alg-fst.c' to SRCS to fix it.  Actually, this source is
>     also listed in sys/crypto/Makefile for rijndael.
> 
> Summary of changes:
>  lib/libtcplay/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/f6db75cab33d9cbed1a66af6457343ec043ae908
> 
> 
> -- 
> DragonFly BSD source repository

-- 
Michael Neumann
NTECS Consulting
www.ntecs.de


More information about the Commits mailing list