Vendor: Gitea and Forgejo projects · https://forgejo.org/ · Last reviewed 2026-12-05 · History
Summary
- Both forges can serve Git over SSH with a built-in Go server (
START_SSH_SERVER, defaultfalse) or through the system SSH daemon; the algorithm settings apply to the built-in server only.12 - Forgejo: hybrid mlkem768x25519-sha256 is first in the default key exchange list since v12.0.0.34
- Gitea: the built-in server uses the Go library defaults since 1.25.0, whose first entry is mlkem768x25519-sha256; the configuration cheat sheet still lists a default without it.567
ssh-mldsa44-ed25519user keys: merged in Gitea for the unreleased 29.0.0, in progress in Forgejo.89- Classical key exchange can be disabled by listing only the wanted algorithms in
SSH_SERVER_KEY_EXCHANGES.12
No released Forgejo or Gitea version accepts
ssh-mldsa44-ed25519user keys; Gitea’s change is on main for 29.0.0 and Forgejo’s pull request 15521 is open (checked 2026-12-05).89
To choose key exchange algorithms for the built-in server, set
SSH_SERVER_KEY_EXCHANGESin the[server]section ofapp.ini.2
Cryptographic operations
The forge is the SSH server when START_SSH_SERVER is true, using golang.org/x/crypto/ssh; otherwise the system daemon serves SSH and authorized_keys forwards to the forge; see OpenSSH. For the system daemon, the cheat sheets say each of these settings “has no effect”.12
Key exchange, ciphers and MACs (built-in server)
Setting in [server] |
Forgejo default | Gitea default |
|---|---|---|
SSH_SERVER_KEY_EXCHANGES |
mlkem768x25519-sha256, curve25519-sha256, ecdh-sha2-nistp256, ecdh-sha2-nistp384, ecdh-sha2-nistp521, diffie-hellman-group14-sha256, diffie-hellman-group14-sha124 |
unset: x/crypto defaults, same list;610 cheat sheet lists the same without mlkem768x25519-sha2561 |
SSH_SERVER_CIPHERS |
chacha20-poly1305@openssh.com, aes128-ctr, aes192-ctr, aes256-ctr, aes128-gcm@openssh.com, aes256-gcm@openssh.com24 |
unset on main and 1.25.0; cheat sheet lists the same six16 |
SSH_SERVER_MACS |
hmac-sha2-256-etm@openssh.com, hmac-sha2-256, hmac-sha124 |
unset on main and 1.25.0; cheat sheet lists the same three16 |
- Gitea 1.24.0 had a hard-coded key exchange list without any ML-KEM method; the list was dropped for library defaults by pull request 34667, merged 2025-06-09 for 1.25.0.711
- The cheat sheet and the source disagree for Gitea; the source at the pinned commit was relied on, and the cheat sheet was not dated.16
- x/crypto
defaultKexAlgosis identical at v0.42.0, v0.58.0 and v0.60.0 (mlkem768x25519-sha256 first, then curve25519-sha256, three ECDH curves,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1).10 - First x/crypto tag with the hybrid: v0.38.0, which needs Go 1.24.12
Host keys
| Forge | Default SSH_SERVER_HOST_KEYS |
Generated if none exist |
|---|---|---|
| Forgejo (docs and code) | ssh/gitea.rsa, ssh/gogs.rsa |
4096-bit RSA24 |
| Gitea 1.25.0 | ssh/gitea.rsa, ssh/gogs.rsa6 |
not checked |
| Gitea main | ssh/gitea.rsa, ssh/gitea.ed25519, ssh/gitea.ecdsa, ssh/gogs.rsa; docs: 4096-bit RSA, 256-bit ECDSA and Ed25519113 |
as listed |
- All host keys are classical. No post-quantum host key type is documented in either project (checked 2026-12-05).
User keys
| Setting | Value |
|---|---|
[ssh.minimum_key_sizes] ED25519, ECDSA |
256 |
RSA |
3071 (“an otherwise valid 3072 RSA key can be reported as 3071 length”) |
DSA |
-1, disabled by default; -1 disables a type |
MINIMUM_KEY_SIZE_CHECK |
true |
- Gitea main adds a
mldsa44-ed25519entry to the minimum sizes map; the pull request says installs that restrict key types needMLDSA44-ED25519 = -1to keep it disabled.813 - Forgejo parses keys with
golang.org/x/crypto/sshbefore usingSSH_KEYGEN_PATH, so a key type the library lacks is rejected, which commenters on the issue give as the reasonssh-mldsa44-ed25519keys fail today.9 - ssh-mldsa44-ed25519 is in x/crypto v0.60.0 (tag commit 988db5b, 2026-12-04) and not in v0.59.0.14
Versions
| Change | Version | Package URL | Source |
|---|---|---|---|
| Forgejo default list includes mlkem768x25519-sha256 | 12.0.0 (2025-07-17); not in 11.0.0 | pkg:generic/forgejo@12.0.0 |
source at tags1516 |
| Gitea built-in server uses library defaults | 1.25.0 (2025-10-29) | pkg:github/go-gitea/gitea@1.25.0 |
PR 34667711 |
Gitea ssh-mldsa44-ed25519 user keys, x/crypto v0.60.0 |
29.0.0, unreleased; latest release 28.4.0 (2026-11-15) | pkg:github/go-gitea/gitea |
PR 406608 |
Forgejo ssh-mldsa44-ed25519 user keys |
pull request 15521, open | pkg:generic/forgejo |
PR9 |
Configuration
- Enabling: Forgejo and Gitea 1.25.0 or later need no setting for mlkem768x25519-sha256 on the built-in server; the client must offer it. On the system daemon the algorithms are those of the installed OpenSSH.
- Disabling classical: list only the wanted algorithms in
SSH_SERVER_KEY_EXCHANGES; clients that offer none of them cannot connect. A setting that leaves out every post-quantum option is the subject of open Gitea pull request 40633, which would log a startup warning.218 - Disabling user key types: set the type to
-1under[ssh.minimum_key_sizes].12
Vendor commitments
- Forgejo, 2026-12-03, on a request for
ssh-mldsa44-ed25519: “Forgejo is a volunteer-run project. There are no product managers, no roadmaps, and no priorities.”9 - Nothing published by Gitea beyond the pull requests above (checked 2026-12-05).
References
-
Gitea Documentation, “Configuration Cheat Sheet”. https://docs.gitea.com/administration/config-cheat-sheet (accessed 2026-12-05) ↩ ↩2 ↩3 ↩4 ↩5 ↩6 ↩7 ↩8 ↩9 ↩10
-
Forgejo Documentation, “Configuration Cheat Sheet”. https://forgejo.org/docs/latest/admin/config-cheat-sheet/ (accessed 2026-12-05) ↩ ↩2 ↩3 ↩4 ↩5 ↩6 ↩7 ↩8 ↩9 ↩10 ↩11
-
Forgejo,
modules/setting/ssh.goat tag v11.0.0, commit 308810cdd17e3edf928d38c5d410acf2c7aa7618: no ML-KEM entry. https://codeberg.org/forgejo/forgejo/src/commit/308810cdd17e3edf928d38c5d410acf2c7aa7618/modules/setting/ssh.go (accessed 2026-12-05) ↩ -
Forgejo,
modules/setting/ssh.goat commit 98d35f4bb2a48d09788030fb21d2e2140fec5144, andgo.mod. https://codeberg.org/forgejo/forgejo/src/commit/98d35f4bb2a48d09788030fb21d2e2140fec5144/modules/setting/ssh.go#L59-L65 (accessed 2026-12-05) ↩ ↩2 ↩3 ↩4 ↩5 ↩6 -
Gitea,
go.modat tag v1.25.0, commit cf644d565d09d1592526919f7eabbb683f5d83ae. https://github.com/go-gitea/gitea/blob/cf644d565d09d1592526919f7eabbb683f5d83ae/go.mod (accessed 2026-12-05) ↩ ↩2 -
Gitea,
modules/setting/ssh.goat tag v1.25.0, commit cf644d565d09d1592526919f7eabbb683f5d83ae. https://github.com/go-gitea/gitea/blob/cf644d565d09d1592526919f7eabbb683f5d83ae/modules/setting/ssh.go#L113-L119 (accessed 2026-12-05) ↩ ↩2 ↩3 ↩4 ↩5 ↩6 -
Gitea,
modules/setting/ssh.goat tag v1.24.0, commit 7ed1e8987eb5da50b3ad5e3e863903cce45565b6, with the hard-coded list. https://github.com/go-gitea/gitea/blob/7ed1e8987eb5da50b3ad5e3e863903cce45565b6/modules/setting/ssh.go#L54-L56 (accessed 2026-12-05) ↩ ↩2 ↩3 -
Gitea pull request 40660, “feat(ssh): support ssh-mldsa44-ed25519 keys”, merged 2026-12-05, milestone 29.0.0. https://github.com/go-gitea/gitea/pull/40660 (accessed 2026-12-05) ↩ ↩2 ↩3 ↩4
-
Forgejo issue 14049, “bug: ssh-mldsa44-ed25519 public key: ssh: unknown key algorithm”, and pull request 15521. https://codeberg.org/forgejo/forgejo/issues/14049 (accessed 2026-12-05) ↩ ↩2 ↩3 ↩4 ↩5 ↩6
-
golang.org/x/crypto,
ssh/common.goat v0.58.0, commit 8fdf07b3114278fb3b78c1cf1814e08bd851eb4c; the same list at v0.42.0 and v0.60.0. https://github.com/golang/crypto/blob/8fdf07b3114278fb3b78c1cf1814e08bd851eb4c/ssh/common.go#L96-L105 (accessed 2026-12-05) ↩ ↩2 -
Gitea pull request 34667, “Update x/crypto package and make builtin SSH use default parameters”, merged 2025-06-09, milestone 1.25.0. https://github.com/go-gitea/gitea/pull/34667 (accessed 2026-12-05) ↩ ↩2
-
golang.org/x/crypto,
ssh/mlkem.goat v0.38.0, commit aae6e61070421a51c1ba3bd9bba4b9b3979ed488. https://github.com/golang/crypto/blob/aae6e61070421a51c1ba3bd9bba4b9b3979ed488/ssh/mlkem.go#L22-L32 (accessed 2026-12-05) ↩ -
Gitea,
modules/setting/ssh.goat commit bc2fd40b783cc419b24877dc3a1160dcf5dbef20. https://github.com/go-gitea/gitea/blob/bc2fd40b783cc419b24877dc3a1160dcf5dbef20/modules/setting/ssh.go#L55-L57 (accessed 2026-12-05) ↩ ↩2 -
golang.org/x/crypto,
ssh/common.goat v0.60.0, commit 988db5b9fb6ef97414c924ef49936378bcf0ca9c:KeyAlgoMLDSA44Ed25519 = "ssh-mldsa44-ed25519"; absent at v0.59.0, commit 6c966a7517bfc4fa0f268afb1fe663013ed932a5. https://github.com/golang/crypto/blob/988db5b9fb6ef97414c924ef49936378bcf0ca9c/ssh/common.go#L58-L60 (accessed 2026-12-05) ↩ -
Forgejo,
modules/setting/ssh.goandgo.modat tag v12.0.0, commit 0bbef2d58162695bb043772d7d1913a67767d9d4. https://codeberg.org/forgejo/forgejo/src/commit/0bbef2d58162695bb043772d7d1913a67767d9d4/modules/setting/ssh.go (accessed 2026-12-05) ↩ ↩2 -
Forgejo release v12.0.0, published 2025-07-17. https://codeberg.org/forgejo/forgejo/releases/tag/v12.0.0 (accessed 2026-12-05) ↩
-
Gitea,
go.modat tag v1.24.0 (commit 7ed1e8987eb5da50b3ad5e3e863903cce45565b6, x/crypto v0.37.0) and at commit bc2fd40b783cc419b24877dc3a1160dcf5dbef20 (x/crypto v0.60.0). https://github.com/go-gitea/gitea/blob/bc2fd40b783cc419b24877dc3a1160dcf5dbef20/go.mod (accessed 2026-12-05) ↩ -
Gitea pull request 40633, “enhance: warn when post-quantum key exchange is disabled”. https://github.com/go-gitea/gitea/pull/40633 (accessed 2026-12-05) ↩ ↩2
-
Forgejo pull request 14482, “feat: verify pubkeys with ssh-keygen to support more keytypes”. https://codeberg.org/forgejo/forgejo/pulls/14482 (accessed 2026-12-05) ↩