Skip to content

Commit

Permalink
cts: initial crate
Browse files Browse the repository at this point in the history
  • Loading branch information
newpavlov committed Oct 31, 2024
1 parent 4c722db commit 2ea8b68
Show file tree
Hide file tree
Showing 24 changed files with 1,952 additions and 28 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/cts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: cts

on:
pull_request:
paths:
- "cts/**"
- "Cargo.*"
push:
branches: master

defaults:
run:
working-directory: cts

env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-Dwarnings"

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- 1.81.0 # MSRV
- stable
target:
- thumbv7em-none-eabi
- wasm32-unknown-unknown
steps:
- uses: actions/checkout@v4
- uses: RustCrypto/actions/cargo-cache@master
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
targets: ${{ matrix.target }}
- run: cargo build --no-default-features --release --target ${{ matrix.target }}

minimal-versions:
# disabled until belt-block gets published
if: false
uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master
with:
working-directory: ${{ github.workflow }}

test:
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- 1.81.0 # MSRV
- stable
steps:
- uses: actions/checkout@v4
- uses: RustCrypto/actions/cargo-cache@master
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- run: cargo test
- run: cargo test --all-features
130 changes: 103 additions & 27 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[workspace]
resolver = "2"
members = ["belt-ctr", "cbc", "cfb8", "cfb-mode", "ctr", "ige", "ofb", "pcbc"]
members = ["belt-ctr", "cbc", "cts", "cfb8", "cfb-mode", "ctr", "ige", "ofb", "pcbc"]

[profile.dev]
opt-level = 2
11 changes: 11 additions & 0 deletions cts/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# 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).

## 0.1.0 (2024-11-01)
- Initial release ([#70])

[#70]: https://github.com/RustCrypto/block-modes/pull/70
26 changes: 26 additions & 0 deletions cts/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[package]
name = "cts"
version = "0.1.0"
description = "Generic implementation of the ciphertext stealing block modes of operation"
authors = ["RustCrypto Developers"]
license = "MIT OR Apache-2.0"
edition = "2021"
rust-version = "1.81"
readme = "README.md"
documentation = "https://docs.rs/cts"
repository = "https://github.com/RustCrypto/block-modes"
keywords = ["crypto", "block-mode", "ciphers"]
categories = ["cryptography", "no-std"]

[dependencies]
cipher = "0.4.2"

[dev-dependencies]
cipher = { version = "0.4.2", features = ["dev"] }
hex-literal = "0.4"
aes = "0.8"
belt-block = "0.1"

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

0 comments on commit 2ea8b68

Please sign in to comment.