Feranor PQC Suite releases
The release certificate
Every version is one archive, the same for every customer, whose checksums are signed with Feranor's release certificate. The archive carries it as feranor-release.pem (SLH-DSA-SHA2-256s, valid until 8 October 2036). Before trusting it, compare its SHA-256 fingerprint with this one:
07:F1:60:E8:CE:C5:C5:CF:A9:F8:DC:44:E5:6F:09:19:9C:63:C1:79:E9:7D:6C:AF:C5:76:C2:E5:CA:E8:77:C1
Checking an archive
You need the archive, its two signatures feranor-pqc-suite-<version>.zip.p7s and SHA256SUMS.p7s, and OpenSSL 3.5 or later. Run the first two steps where you downloaded them, then the others in order, from the archive's folder: each says what it must print. They are the checks of the archive's README.txt; the customer guide in the archive gives them for Windows and for older systems.
-
Check the archive's signature
Before unpacking anything: the fingerprint printed must be the one above, and the last line feranor-pqc-suite-<version>.zip: OK, printed only when the signature verified and signs your copy of the archive. The signature is checked against the certificate it carries, whose fingerprint you compared, alone.
check=$(mktemp -d) cp feranor-pqc-suite-<version>.zip feranor-pqc-suite-<version>.zip.p7s "$check"/ openssl cms -cmsout -inform DER -in "$check/feranor-pqc-suite-<version>.zip.p7s" \ -certsout "$check/archive-certificates.pem" -noout awk '/-----BEGIN CERTIFICATE-----/{f=1;next} /-----END CERTIFICATE-----/{exit} f' "$check/archive-certificates.pem" \ | base64 -d > "$check/release-certificate.der" sha256sum "$check/release-certificate.der" openssl x509 -inform DER -in "$check/release-certificate.der" -out "$check/release-anchor.pem" openssl cms -verify -binary -inform DER -in "$check/feranor-pqc-suite-<version>.zip.p7s" \ -CAfile "$check/release-anchor.pem" -no-CApath -no-CAstore -purpose any -out "$check/ARCHIVE.new" \ && mv "$check/ARCHIVE.new" "$check/ARCHIVE" (cd "$check" && sha256sum feranor-pqc-suite-<version>.zip) | cmp - "$check/ARCHIVE" \ && echo 'feranor-pqc-suite-<version>.zip: OK' -
Unpack it
Unpack it in a new folder only you can enter, under your home: never in /tmp, where the .NET commands of the guide would read files others put there, nor straight in your home, where an entry the archive's maker put beside its folder would be written.
u=$(mktemp -d "$HOME/feranor.XXXXXX") unzip -q "$check/feranor-pqc-suite-<version>.zip" -d "$u" mv SHA256SUMS.p7s "$u/feranor-pqc-suite-<version>/" cd "$u/feranor-pqc-suite-<version>" -
Decode the archive's certificate
Into your folder, never the archive's.
awk '/-----BEGIN CERTIFICATE-----/{f=1;next} /-----END CERTIFICATE-----/{exit} f' feranor-release.pem \ | base64 -d > "$check/release-certificate.der" -
Compare its fingerprint
It must print the fingerprint above, in lowercase and without its colons.
sha256sum "$check/release-certificate.der" -
Verify the signature
It must print CMS Verification successful. It checks copies made in your folder, which the next steps read. This certificate alone is trusted: not another one the file may carry, nor those of your system.
cp release/SHA256SUMS SHA256SUMS.p7s "$check"/ openssl x509 -inform DER -in "$check/release-certificate.der" -out "$check/release-anchor.pem" openssl cms -verify -binary -inform DER -in "$check/SHA256SUMS.p7s" -content "$check/SHA256SUMS" \ -CAfile "$check/release-anchor.pem" -no-CApath -no-CAstore -purpose any -out /dev/null -
Check the archive's folder
It must print nothing. It shows the archive's folder if it is a link, anything the archive put beside it, and the folder made for it if anyone else can enter it; a name beside release that the archive does not give, release as a link, anything that is not a regular file, what another user owns or others can write (unzip keeps the modes an archive gives); and in the folders above, a global.json, nuget.config or Directory.Build.* file, or a folder others can write, your own group included.
{ [ ! -L "$PWD" ] || echo 'this folder is a link' diff <(printf '%s\n' "${PWD##*/}") <(find .. -mindepth 1 -maxdepth 1 | sed 's|^\.\./||') find .. -maxdepth 0 \( ! -user "$(id -u)" -o -perm -010 -o -perm -001 \) ls -ld .. | grep '^.\{10\}[+@]' } | cat -v { { [ -d release ] && [ ! -L release ]; } || echo 'release is not a directory' diff <(printf '%s\n' README.txt SHA256SUMS.p7s feranor-release.pem release | LC_ALL=C sort) \ <(find . -mindepth 1 -maxdepth 1 | sed 's|^\./||' | LC_ALL=C sort) find . ! -type d ! -type f find . \( ! -user "$(id -u)" -o -perm -002 -o -perm -020 ! -group "$(id -g)" \) } | cat -v d=$(pwd -P) while [ "$d" != / ]; do d=$(dirname "$d") find "$d" -mindepth 1 -maxdepth 1 \( -iname global.json -o -iname nuget.config \ -o -iname 'directory.build.*' -o -iname directory.packages.props \) find "$d" -maxdepth 0 \( ! -user 0 ! -user "$(id -u)" -o -perm -002 \ -o -perm -020 ! -group 0 \) done | cat -v -
Check the files
Every file must be OK.
cd release && sha256sum -c "$check/SHA256SUMS" -
Check the names
Still in release, it must print nothing. It shows a file that SHA256SUMS does not list, and a SHA256SUMS that is not the copy checked.
{ diff <(cut -c67- "$check/SHA256SUMS" | LC_ALL=C sort) \ <(find . ! -type d ! -path ./SHA256SUMS | sed 's|^\./||' | LC_ALL=C sort) cmp SHA256SUMS "$check/SHA256SUMS" } | cat -v
Published versions
The first version listed here will be 1.0.0.