Skip to content

Add mlkem1024nistp384-sha384 and mlkem768x25519-sha256 #23

Add mlkem1024nistp384-sha384 and mlkem768x25519-sha256

Add mlkem1024nistp384-sha384 and mlkem768x25519-sha256 #23

Workflow file for this run

name: ML-KEM Interop Tests
on:
pull_request:
branches: [ '*' ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
wolfssl: v5.8.4-stable
openssh: V_10_2_P1
jobs:
build_wolfssl:
name: Build wolfSSL
runs-on: ubuntu-latest
timeout-minutes: 4
steps:
- name: Checking cache for wolfSSL
uses: actions/cache@v4
id: cache-wolfssl
with:
path: build-dir/
key: wolfssh-mlkem-wolfssl-${{ env.wolfssl }}
lookup-only: true
- name: Checkout, build, and install wolfSSL
if: steps.cache-wolfssl.outputs.cache-hit != 'true'
uses: wolfSSL/actions-build-autotools-project@v1
with:
repository: wolfSSL/wolfssl
ref: ${{ env.wolfssl }}
path: wolfssl
configure: --enable-wolfssh --enable-mlkem --enable-ed25519 --enable-ed25519-stream --enable-curve25519 --enable-base64encode --enable-cryptonly --disable-examples --disable-crypttests
check: false
install: true
build_openssh:
name: Build OpenSSH
runs-on: ubuntu-latest
timeout-minutes: 4
steps:
- name: Checking cache for OpenSSH
uses: actions/cache@v4
id: cache-openssh
with:
path: build-dir/
key: wolfssh-mlkem-openssh-${{ env.openssh }}
lookup-only: true
- name: Checkout, build, and install wolfSSL
if: steps.cache-openssh.outputs.cache-hit != 'true'
uses: wolfSSL/actions-build-autotools-project@v1
with:
repository: openssh/openssh-portable
ref: ${{ env.openssh }}
path: openssh
configure: --with-privsep-path=/tmp/empty
check: false
install: true
build_wolfssh:
name: Build and test wolfSSH
runs-on: ubuntu-latest
timeout-minutes: 4
needs: [build_wolfssl, build_openssh]
env:
build_dir: ${{ github.workspace }}/build-dir
steps:
- name: Checking cache for wolfSSL
uses: actions/cache@v4
with:
path: build-dir/
key: wolfssh-mlkem-wolfssl-${{ env.wolfssl }}
fail-on-cache-miss: true
- name: Checking cache for OpenSSH
uses: actions/cache@v4
with:
path: build-dir/
key: wolfssh-mlkem-openssh-${{ env.openssh }}
fail-on-cache-miss: true
- name: Checkout, build, and test wolfSSH
uses: wolfSSL/actions-build-autotools-project@v1
with:
repository: wolfSSL/wolfssh
path: wolfssh
configure: --with-wolfssl=${{ env.build_dir }}
check: true
- name: Run connect test
working-directory: ./wolfssh/
run: |
mkdir -p /tmp/empty
${{ env.build_dir }}/bin/ssh-keygen -f ~/.ssh/id_ed25519 -N "" -t ed25519
cp ~/.ssh/id_ed25519.pub ~/.ssh/authorized_keys
${{ env.build_dir }}/sbin/sshd -p 22222 -o KbdInteractiveAuthentication=no -o PasswordAuthentication=no -o KexAlgorithms=mlkem768x25519-sha256
SSH_PID=$!
./examples/client/client -u $(whoami) -i ~/.ssh/id_ed25519 -j ~/.ssh/id_ed25519.pub -c "ls /"
kill -s KILL $SSH_PID
ps aux
./examples/echoserver/echoserver -p 22222 -x mlkem768x25519-sha256 -I runner:~/.ssh/authorized_keys &
ECHO_PID=$!
${{ env.build_dir }}/bin/ssh -p 22222 localhost ls /
kill -s KILL $ECHO_PID