Skip to content

Commit

Permalink
Unify block-cipher and stream-cipher into cipher (#337)
Browse files Browse the repository at this point in the history
We are now owners of the `cipher` crate:

https://crates.io/crates/cipher

This commit unifies the existing `block-cipher` and `stream-cipher`
crates into the `cipher` crate, placing their code under the
`cipher::block` and `cipher::stream` modules respectively.

Ideally this means the crate is a drop-in replacement, and all end users
need to do is `s/block_cipher/cipher::block/` and
`s/stream_cipher/cipher::stream` to upgrade.
  • Loading branch information
tarcieri committed Oct 15, 2020
1 parent 6d9f88b commit 5fcffeb
Show file tree
Hide file tree
Showing 29 changed files with 104 additions and 639 deletions.
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
name: block-cipher
name: cipher

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

defaults:
run:
working-directory: block-cipher
working-directory: cipher

env:
CARGO_INCREMENTAL: 0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/crypto-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
toolchain: ${{ matrix.rust }}
- run: cargo check --all-features
- run: cargo test --release
- run: cargo test --features block-cipher --release
- run: cargo test --features cipher --release
- run: cargo test --features dev --release
- run: cargo test --features std --release
- run: cargo test --all-features --release
2 changes: 1 addition & 1 deletion .github/workflows/cryptography.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
override: true
- run: cargo build --no-default-features --release --target ${{ matrix.target }}
- run: cargo build --no-default-features --release --target ${{ matrix.target }}
--features aead,block-cipher,mac,digest,elliptic-curve,signature,stream-cipher,universal-hash
--features aead,cipher,mac,digest,elliptic-curve,signature,universal-hash
test:
runs-on: ubuntu-latest
strategy:
Expand Down
57 changes: 0 additions & 57 deletions .github/workflows/stream-cipher.yml

This file was deleted.

41 changes: 11 additions & 30 deletions Cargo.lock

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

3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
[workspace]
members = [
"aead",
"block-cipher",
"cipher",
"crypto-mac",
"cryptography",
"digest",
"elliptic-curve",
"signature",
"signature/async",
"stream-cipher",
"universal-hash",
]
24 changes: 11 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,16 @@ Collection of traits which describe functionality of cryptographic primitives.

## Crates

| Crate name | Algorithm | Crates.io | Docs | Build Status |
|---------------------|-------------------------------|-----------|-------|--------------|
| [`aead`] | [Authenticated encryption] | [![crates.io](https://img.shields.io/crates/v/aead.svg)](https://crates.io/crates/aead) | [![Documentation](https://docs.rs/aead/badge.svg)](https://docs.rs/aead) | ![build](https://github.com/RustCrypto/traits/workflows/aead/badge.svg?branch=master&event=push) |
| [`async-signature`] | [Digital signature] | [![crates.io](https://img.shields.io/crates/v/async-signature.svg)](https://crates.io/crates/async-signature) | [![Documentation](https://docs.rs/async-signature/badge.svg)](https://docs.rs/async-signature) | ![build](https://github.com/RustCrypto/traits/workflows/async-signature/badge.svg?branch=master&event=push) |
| [`block‑cipher`] | [Block cipher] | [![crates.io](https://img.shields.io/crates/v/block-cipher.svg)](https://crates.io/crates/block-cipher) | [![Documentation](https://docs.rs/block-cipher/badge.svg)](https://docs.rs/block-cipher) | ![build](https://github.com/RustCrypto/traits/workflows/block-cipher/badge.svg?branch=master&event=push) |
| [`crypto‑mac`] | [Message authentication code] | [![crates.io](https://img.shields.io/crates/v/crypto-mac.svg)](https://crates.io/crates/crypto-mac) | [![Documentation](https://docs.rs/crypto-mac/badge.svg)](https://docs.rs/crypto-mac) | ![build](https://github.com/RustCrypto/traits/workflows/crypto-mac/badge.svg?branch=master&event=push) |
| [`digest`] | [Cryptographic hash function] | [![crates.io](https://img.shields.io/crates/v/digest.svg)](https://crates.io/crates/digest) | [![Documentation](https://docs.rs/digest/badge.svg)](https://docs.rs/digest) | ![build](https://github.com/RustCrypto/traits/workflows/digest/badge.svg?branch=master&event=push) |
| [`elliptic-curve`] | [Elliptic curve cryptography] | [![crates.io](https://img.shields.io/crates/v/elliptic-curve.svg)](https://crates.io/crates/elliptic-curve) | [![Documentation](https://docs.rs/elliptic-curve/badge.svg)](https://docs.rs/elliptic-curve) | ![build](https://github.com/RustCrypto/traits/workflows/elliptic-curve/badge.svg?branch=master&event=push) |
| [`signature`] | [Digital signature] | [![crates.io](https://img.shields.io/crates/v/signature.svg)](https://crates.io/crates/signature) | [![Documentation](https://docs.rs/signature/badge.svg)](https://docs.rs/signature) | ![build](https://github.com/RustCrypto/traits/workflows/signature/badge.svg?branch=master&event=push) |
| [`stream‑cipher`] | [Stream cipher] | [![crates.io](https://img.shields.io/crates/v/stream-cipher.svg)](https://crates.io/crates/stream-cipher) | [![Documentation](https://docs.rs/stream-cipher/badge.svg)](https://docs.rs/stream-cipher) | ![build](https://github.com/RustCrypto/traits/workflows/stream-cipher/badge.svg?branch=master&event=push) |
| [`universal‑hash`] | [Universal hash function] | [![crates.io](https://img.shields.io/crates/v/universal-hash.svg)](https://crates.io/crates/universal-hash) | [![Documentation](https://docs.rs/universal-hash/badge.svg)](https://docs.rs/universal-hash) | ![build](https://github.com/RustCrypto/traits/workflows/universal-hash/badge.svg?branch=master&event=push) |
| Crate name | Algorithm | Crates.io | Docs | Build Status |
|---------------------|------------------------------------|-----------|-------|--------------|
| [`aead`] | [Authenticated encryption] | [![crates.io](https://img.shields.io/crates/v/aead.svg)](https://crates.io/crates/aead) | [![Documentation](https://docs.rs/aead/badge.svg)](https://docs.rs/aead) | ![build](https://github.com/RustCrypto/traits/workflows/aead/badge.svg?branch=master&event=push) |
| [`async-signature`] | [Digital signature] | [![crates.io](https://img.shields.io/crates/v/async-signature.svg)](https://crates.io/crates/async-signature) | [![Documentation](https://docs.rs/async-signature/badge.svg)](https://docs.rs/async-signature) | ![build](https://github.com/RustCrypto/traits/workflows/async-signature/badge.svg?branch=master&event=push) |
| [`cipher`] | [Block cipher] and [Stream cipher] | [![crates.io](https://img.shields.io/crates/v/cipher.svg)](https://crates.io/crates/cipher) | [![Documentation](https://docs.rs/cipher/badge.svg)](https://docs.rs/cipher) | ![build](https://github.com/RustCrypto/traits/workflows/cipher/badge.svg?branch=master&event=push) |
| [`crypto‑mac`] | [Message authentication code] | [![crates.io](https://img.shields.io/crates/v/crypto-mac.svg)](https://crates.io/crates/crypto-mac) | [![Documentation](https://docs.rs/crypto-mac/badge.svg)](https://docs.rs/crypto-mac) | ![build](https://github.com/RustCrypto/traits/workflows/crypto-mac/badge.svg?branch=master&event=push) |
| [`digest`] | [Cryptographic hash function] | [![crates.io](https://img.shields.io/crates/v/digest.svg)](https://crates.io/crates/digest) | [![Documentation](https://docs.rs/digest/badge.svg)](https://docs.rs/digest) | ![build](https://github.com/RustCrypto/traits/workflows/digest/badge.svg?branch=master&event=push) |
| [`elliptic-curve`] | [Elliptic curve cryptography] | [![crates.io](https://img.shields.io/crates/v/elliptic-curve.svg)](https://crates.io/crates/elliptic-curve) | [![Documentation](https://docs.rs/elliptic-curve/badge.svg)](https://docs.rs/elliptic-curve) | ![build](https://github.com/RustCrypto/traits/workflows/elliptic-curve/badge.svg?branch=master&event=push) |
| [`signature`] | [Digital signature] | [![crates.io](https://img.shields.io/crates/v/signature.svg)](https://crates.io/crates/signature) | [![Documentation](https://docs.rs/signature/badge.svg)](https://docs.rs/signature) | ![build](https://github.com/RustCrypto/traits/workflows/signature/badge.svg?branch=master&event=push) |
| [`universal‑hash`] | [Universal hash function] | [![crates.io](https://img.shields.io/crates/v/universal-hash.svg)](https://crates.io/crates/universal-hash) | [![Documentation](https://docs.rs/universal-hash/badge.svg)](https://docs.rs/universal-hash) | ![build](https://github.com/RustCrypto/traits/workflows/universal-hash/badge.svg?branch=master&event=push) |

### Additional crates

Expand Down Expand Up @@ -54,13 +53,12 @@ dual licensed as above, without any additional terms or conditions.

[`aead`]: https://github.com/RustCrypto/traits/tree/master/aead
[`async-signature`]: https://github.com/RustCrypto/traits/tree/master/signature/async
[`block‑cipher`]: https://github.com/RustCrypto/traits/tree/master/block-cipher
[`cipher`]: https://github.com/RustCrypto/traits/tree/master/cipher
[`crypto‑mac`]: https://github.com/RustCrypto/traits/tree/master/crypto-mac
[`cryptography`]: https://github.com/RustCrypto/traits/tree/master/cryptography
[`digest`]: https://github.com/RustCrypto/traits/tree/master/digest
[`elliptic-curve`]: https://github.com/RustCrypto/traits/tree/master/elliptic-curve
[`signature`]: https://github.com/RustCrypto/traits/tree/master/signature
[`stream‑cipher`]: https://github.com/RustCrypto/traits/tree/master/stream-cipher
[`universal‑hash`]: https://github.com/RustCrypto/traits/tree/master/universal-hash

[//]: # (algorithms)
Expand Down
58 changes: 0 additions & 58 deletions block-cipher/CHANGELOG.md

This file was deleted.

25 changes: 0 additions & 25 deletions block-cipher/LICENSE-MIT

This file was deleted.

59 changes: 0 additions & 59 deletions block-cipher/README.md

This file was deleted.

11 changes: 11 additions & 0 deletions cipher/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.1 (2015-06-25)

## 0.1.0 (2015-06-24)
- Initial release

0 comments on commit 5fcffeb

Please sign in to comment.