Skip to content

Commit 0d34877

Browse files
committed
Add ML-KEM with Curve25519 and NISTp384
1. Add GitHub action to test wolfSSL against OpenSSH using MLKEM.
1 parent 303cafc commit 0d34877

File tree

1 file changed

+105
-0
lines changed

1 file changed

+105
-0
lines changed
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
name: ML-KEM Interop Tests
2+
3+
on:
4+
pull_request:
5+
branches: [ '*' ]
6+
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: true
10+
11+
env:
12+
wolfssl: v5.8.4-stable
13+
openssh: V_10_2_P1
14+
15+
jobs:
16+
build_wolfssl:
17+
name: Build wolfSSL
18+
runs-on: ubuntu-latest
19+
timeout-minutes: 4
20+
steps:
21+
- name: Checking cache for wolfSSL
22+
uses: actions/cache@v4
23+
id: cache-wolfssl
24+
with:
25+
path: build-dir/
26+
key: wolfssh-mlkem-wolfssl-${{ env.wolfssl }}
27+
lookup-only: true
28+
29+
- name: Checkout, build, and install wolfSSL
30+
if: steps.cache-wolfssl.outputs.cache-hit != 'true'
31+
uses: wolfSSL/actions-build-autotools-project@v1
32+
with:
33+
repository: wolfSSL/wolfssl
34+
ref: ${{ env.wolfssl }}
35+
path: wolfssl
36+
configure: --enable-wolfssh --enable-mlkem --enable-ed25519 --enable-ed25519-stream --enable-curve25519 --enable-base64encode --enable-cryptonly --disable-examples --disable-crypttests
37+
check: false
38+
install: true
39+
40+
build_openssh:
41+
name: Build OpenSSH
42+
runs-on: ubuntu-latest
43+
timeout-minutes: 4
44+
steps:
45+
- name: Checking cache for OpenSSH
46+
uses: actions/cache@v4
47+
id: cache-openssh
48+
with:
49+
path: build-dir/
50+
key: wolfssh-mlkem-openssh-${{ env.openssh }}
51+
lookup-only: true
52+
53+
- name: Checkout, build, and install wolfSSL
54+
if: steps.cache-openssh.outputs.cache-hit != 'true'
55+
uses: wolfSSL/actions-build-autotools-project@v1
56+
with:
57+
repository: openssh/openssh-portable
58+
ref: ${{ env.openssh }}
59+
path: openssh
60+
configure: --with-privsep-path=/tmp/empty
61+
check: false
62+
install: true
63+
64+
build_wolfssh:
65+
name: Build and test wolfSSH
66+
runs-on: ubuntu-latest
67+
timeout-minutes: 4
68+
needs: [build_wolfssl, build_openssh]
69+
env:
70+
build_dir: ${{ github.workspace }}/build-dir
71+
steps:
72+
- name: Checking cache for wolfSSL
73+
uses: actions/cache@v4
74+
with:
75+
path: build-dir/
76+
key: wolfssh-mlkem-wolfssl-${{ env.wolfssl }}
77+
fail-on-cache-miss: true
78+
79+
- name: Checking cache for OpenSSH
80+
uses: actions/cache@v4
81+
with:
82+
path: build-dir/
83+
key: wolfssh-mlkem-openssh-${{ env.openssh }}
84+
fail-on-cache-miss: true
85+
86+
- name: Checkout, build, and test wolfSSH
87+
uses: wolfSSL/actions-build-autotools-project@v1
88+
with:
89+
repository: wolfSSL/wolfssh
90+
path: wolfssh
91+
configure: --with-wolfssl=${{ env.build_dir }}
92+
check: true
93+
94+
- name: Make test key
95+
working-directory: ./wolfssh/
96+
run: |
97+
${{ env.build_dir }}/bin/ssh-keygen -f $HOME/.ssh/id_ed25519 -N "" -t ed25519
98+
cp $HOME/.ssh/id_ed25519.pub $HOME/.ssh/authorized_keys
99+
100+
- name: Run connect wolfSSH client to OpenSSH server test
101+
working-directory: ./wolfssh/
102+
run: |
103+
mkdir -p /tmp/empty
104+
${{ env.build_dir }}/sbin/sshd -p 22222 -o KbdInteractiveAuthentication=no -o PasswordAuthentication=no -o KexAlgorithms=mlkem768x25519-sha256
105+
./examples/client/client -u $USER -i $HOME/.ssh/id_ed25519 -j $HOME/.ssh/id_ed25519.pub -c "ls /"

0 commit comments

Comments
 (0)