SSH protocol implementation in Ada
  • Ada 57.4%
  • C++ 40.8%
  • C 1.7%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-08-10 09:31:30 +00:00
.githooks fix pre-commit hook 2026-06-08 23:35:24 +08:00
backends replace all Decode_{Byte,Uint32,Uint64} to the contract version 2026-08-09 15:15:17 +08:00
doc replace all Decode_{Byte,Uint32,Uint64} to the contract version 2026-08-09 15:15:17 +08:00
examples replace all Decode_{Byte,Uint32,Uint64} to the contract version 2026-08-09 15:15:17 +08:00
src message_format: [WIP] proof 2026-08-09 19:43:30 +08:00
tests replace all Decode_{Byte,Uint32,Uint64} to the contract version 2026-08-09 15:15:17 +08:00
util add util/check_ascii.py 2026-06-06 11:25:20 +08:00
.gitignore add AGENTS.md 2026-05-23 17:39:11 +08:00
.gitmodules add docs 2026-05-23 18:13:54 +08:00
AGENTS.md update AGENTS.md 2026-06-13 22:50:56 +08:00
alire.toml alire.toml: change website to code.wehack.space 2026-08-07 18:08:16 +08:00
LICENSE use Apache 2.0 license 2026-07-11 10:26:22 +08:00
README.md update README and alire.toml 2026-07-15 11:03:34 +08:00
run_tests.sh run_tests.sh: use `set -e` 2026-08-02 12:02:47 +08:00
ssh_protocol.gpr implement secure_clear like OpenSSH explicit_bzero 2026-07-11 10:58:37 +08:00

ssh_protocol-ada

SSH protocol implementation in Ada. It's a core library without I/O, cryptography, or RNG.

Backends

To use this library in an SSH application, developers need to use a cryptography backend to provide cryptography primitives and RNG support.

This project has implemented two backends:

  • libsodium: use libsodium to provide Curve25519 KEX, Ed25519 signing and Chacha20-Poly1305 AEAD cipher, which is compatible to most SSH servers
  • openssh-libcrypto: use cryptography primitives from OpenSSH and OpenSSL libcrypto, which supports a safe subset of the cipher suite from OpenSSH, compatible to all the SSH servers I have seen

Examples

A client example is implemented in ssh_apps.

SPARK

The code is written in the SPARK subset. The source code can now pass the stone level.

Disclaimer

Most of the code is generated by DeepSeek V4 models.

The code in the main branch is reviewed by a human, and the code in the dev branch is not fully reviewed.

License

The core library uses Apache 2.0 license. The backends may use different licenses.