Skip to content

Commit aa1ea29

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 aa1ea29

File tree

1 file changed

+116
-0
lines changed

1 file changed

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

0 commit comments

Comments
 (0)