Public bug reported:

GPG is broken on RISC-V when vector length (VLEN) doesn't equal 128B.

This has been fixed upstream:
https://github.com/gpg/libgcrypt/commit/3f684fc6ab3ac98320e245a06b3563ad37ec56f5

Test:

head -c 10000 /dev/urandom > in.bin
PW="testpw-correct-horse-battery-staple"
gpg --batch --pinentry-mode loopback --passphrase "$PW" --yes --symmetric \
    --cipher-algo AES256 --output out.gpg in.bin 
gpg --batch --pinentry-mode loopback --passphrase "$PW" --yes \
   --decrypt --output dec.bin out.gpg
if cmp -s in.bin dec.bin; then
  echo "PASS encrypt/decrypt"
else
  echo "MISMATCH"
fi

Run this on x86 it works fine but run it on SpacemiT K3 with VLEN=256 it
fails.

ProblemType: Bug
DistroRelease: Ubuntu 26.04
Package: gpg 2.4.8-4ubuntu3
Uname: Linux 6.18.3-5-spacemit-generic riscv64
ApportVersion: 2.34.0-0ubuntu2
Architecture: riscv64
CasperMD5CheckResult: unknown
CloudArchitecture: riscv64
CloudID: nocloud
CloudName: unknown
CloudPlatform: nocloud
CloudSubPlatform: config-disk (/dev/sda2)
Date: Sun May 24 10:40:29 2026
ProcEnviron:
 LANG=C.UTF-8
 PATH=(custom, no user)
 SHELL=/bin/bash
 TERM=tmux-256color
 XDG_RUNTIME_DIR=<set>
SourcePackage: gnupg2
UpgradeStatus: No upgrade log present (probably fresh install)

** Affects: gnupg2 (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: apport-bug resolute riscv64

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2154120

Title:
  gpg bugging on RISC-V when vector length /= 128B

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gnupg2/+bug/2154120/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to