Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions .github/workflows/ssh-cipher.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: ssh-cipher

on:
pull_request:
paths:
- ".github/workflows/ssh-cipher.yml"
- "ssh-cipher/**"
- "ssh-encoding/**"
- "Cargo.*"
push:
branches: master

defaults:
run:
working-directory: ssh-cipher

env:
RUSTFLAGS: "-Dwarnings"

jobs:
minimal-versions:
uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master
with:
working-directory: ${{ github.workflow }}

no_std:
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- 1.60.0 # MSRV
- stable
target:
- thumbv7em-none-eabi
- wasm32-unknown-unknown
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
- uses: RustCrypto/actions/cargo-hack-install@master
- run: cargo hack build --target ${{ matrix.target }} --feature-powerset --exclude-features default,std

test:
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- 1.60.0 # MSRV
- stable
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
- uses: RustCrypto/actions/cargo-hack-install@master
- run: cargo hack test --feature-powerset
2 changes: 1 addition & 1 deletion .github/workflows/ssh-encoding.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
- uses: RustCrypto/actions/cargo-hack-install@master
- run: cargo hack build --target ${{ matrix.target }} --feature-powerset --exclude-features default,getrandom,std
- run: cargo hack build --target ${{ matrix.target }} --feature-powerset --exclude-features default,std

test:
runs-on: ubuntu-latest
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/ssh-key.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
pull_request:
paths:
- ".github/workflows/ssh-key.yml"
- "ssh-cipher/**"
- "ssh-encoding/**"
- "ssh-key/**"
- "Cargo.*"
push:
Expand Down Expand Up @@ -84,9 +86,8 @@ jobs:
with:
toolchain: ${{ matrix.rust }}
- uses: RustCrypto/actions/cargo-hack-install@master
- run: cargo hack test --feature-powerset --exclude-features aes-gcm,crypto,default,encryption,getrandom,std --release
- run: cargo hack test --feature-powerset --exclude-features crypto,default,encryption,getrandom,std --release
- run: cargo test --release
- run: cargo test --release --features aes-gcm
- run: cargo test --release --features crypto
- run: cargo test --release --features encryption
- run: cargo test --release --features getrandom
Expand Down
24 changes: 17 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[workspace]
resolver = "2"
members = [
"ssh-cipher",
"ssh-encoding",
"ssh-key"
]
Expand Down
5 changes: 5 additions & 0 deletions ssh-cipher/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
45 changes: 45 additions & 0 deletions ssh-cipher/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
[package]
name = "ssh-cipher"
version = "0.1.0-pre"
description = """
Pure Rust implementation of SSH symmetric encryption including support for the
modern aes128-gcm@openssh.com/aes256-gcm@openssh.com and
chacha20-poly1305@openssh.com algorithms as well as legacy support for older
ciphers. Built on the pure Rust cryptography implementations maintained by the
RustCrypto organization.
"""
authors = ["RustCrypto Developers"]
license = "Apache-2.0 OR MIT"
repository = "https://github.com/RustCrypto/SSH/tree/master/ssh-cipher"
categories = ["cryptography", "no-std"]
keywords = ["crypto", "encryption", "openssh", "ssh"]
readme = "README.md"
edition = "2021"
rust-version = "1.60"

[dependencies]
cipher = "0.4"
encoding = { package = "ssh-encoding", version = "=0.2.0-pre", path = "../ssh-encoding" }

# optional dependencies
aes = { version = "0.8", optional = true, default-features = false }
aes-gcm = { version = "0.10", optional = true, default-features = false, features = ["aes"] }
cbc = { version = "0.1", optional = true }
ctr = { version = "0.9", optional = true, default-features = false }
chacha20 = { version = "0.9", optional = true, default-features = false }
des = { version = "0.8", optional = true, default-features = false }
poly1305 = { version = "0.8", optional = true, default-features = false }
subtle = { version = "2", optional = true, default-features = false }

[features]
std = []

aes-cbc = ["dep:aes", "dep:cbc"]
aes-ctr = ["dep:aes", "dep:ctr"]
aes-gcm = ["dep:aes", "dep:aes-gcm"]
chacha20poly1305 = ["dep:chacha20", "dep:poly1305", "dep:subtle"]
tdes = ["dep:des", "dep:cbc"]

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
Loading