Skip to content

Commit

Permalink
Add inout crate and prepare block-padding v0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
newpavlov committed Feb 10, 2022
1 parent b08d7c2 commit fc123e8
Show file tree
Hide file tree
Showing 17 changed files with 1,220 additions and 50 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/block-padding.yml
Expand Up @@ -22,7 +22,7 @@ jobs:
strategy:
matrix:
rust:
- 1.41.0 # MSRV
- 1.56.0 # MSRV
- stable
target:
- thumbv7em-none-eabi
Expand All @@ -35,13 +35,13 @@ jobs:
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
override: true
- run: cargo build --release --target ${{ matrix.target }}
- run: cargo build --target ${{ matrix.target }}
test:
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- 1.41.0 # MSRV
- 1.56.0 # MSRV
- stable
steps:
- uses: actions/checkout@v1
Expand All @@ -50,4 +50,4 @@ jobs:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- run: cargo test --release
- run: cargo test
56 changes: 56 additions & 0 deletions .github/workflows/inout.yml
@@ -0,0 +1,56 @@
name: inout

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

defaults:
run:
working-directory: inout

env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-Dwarnings"

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- 1.56.0 # MSRV
- stable
target:
- thumbv7em-none-eabi
- wasm32-unknown-unknown
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
override: true
- run: cargo build --target ${{ matrix.target }}
- run: cargo build --features block-padding --target ${{ matrix.target }}
test:
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- 1.56.0 # MSRV
- stable
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- run: cargo test
- run: cargo test --features block-padding
- run: cargo test --all-features
47 changes: 20 additions & 27 deletions Cargo.lock

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

1 change: 0 additions & 1 deletion Cargo.toml
Expand Up @@ -2,7 +2,6 @@
members = [
"blobby",
"block-buffer",
"block-padding",
"collectable",
"cpufeatures",
"dbl",
Expand Down
37 changes: 24 additions & 13 deletions README.md
@@ -1,23 +1,26 @@
# RustCrypto: Utilities

[![Project Chat][chat-image]][chat-link] [![dependency status][deps-image]][deps-link] ![Apache2/MIT licensed][license-image]
[![Project Chat][chat-image]][chat-link]
[![dependency status][deps-image]][deps-link]
![Apache2/MIT licensed][license-image]

This repository contains various utility crates used in the RustCrypto project.

## Crates

| Name | crates.io | Docs | Description |
|------|:---------:|:----:|--------------|
| [`blobby`] | [![crates.io](https://img.shields.io/crates/v/blobby.svg)](https://crates.io/crates/blobby) | [![Documentation](https://docs.rs/blobby/badge.svg)](https://docs.rs/blobby) | Decoder of the simple de-duplicated binary blob storage format |
| [`block-buffer`] | [![crates.io](https://img.shields.io/crates/v/block-buffer.svg)](https://crates.io/crates/block-buffer) | [![Documentation](https://docs.rs/block-buffer/badge.svg)](https://docs.rs/block-buffer) | Fixed size buffer for block processing of data |
| [`block‑padding`] | [![crates.io](https://img.shields.io/crates/v/block-padding.svg)](https://crates.io/crates/block-padding) | [![Documentation](https://docs.rs/block-padding/badge.svg)](https://docs.rs/block-padding) | Padding and unpadding of messages divided into blocks |
| [`collectable`] | [![crates.io](https://img.shields.io/crates/v/collectable.svg)](https://crates.io/crates/collectable) | [![Documentation](https://docs.rs/collectable/badge.svg)](https://docs.rs/collectable) | Fallible, `no_std`-friendly collection traits |
| [`cpufeatures`] | [![crates.io](https://img.shields.io/crates/v/cpufeatures.svg)](https://crates.io/crates/cpufeatures) | [![Documentation](https://docs.rs/cpufeatures/badge.svg)](https://docs.rs/cpufeatures) | Lightweight and efficient alternative to the `is_x86_feature_detected!` macro |
| [`dbl`] | [![crates.io](https://img.shields.io/crates/v/dbl.svg)](https://crates.io/crates/dbl) | [![Documentation](https://docs.rs/dbl/badge.svg)](https://docs.rs/dbl) | Double operation in Galois Field (GF) |
| [`hex-literal`] | [![crates.io](https://img.shields.io/crates/v/hex-literal.svg)](https://crates.io/crates/hex-literal) | [![Documentation](https://docs.rs/hex-literal/badge.svg)](https://docs.rs/hex-literal) | Procedural macro for converting hexadecimal string to byte array at compile time |
| [`opaque-debug`] | [![crates.io](https://img.shields.io/crates/v/opaque-debug.svg)](https://crates.io/crates/opaque-debug) | [![Documentation](https://docs.rs/opaque-debug/badge.svg)](https://docs.rs/opaque-debug) | Macro for opaque `Debug` trait implementation |
| [`wycheproof2blb`] | | | Utility for converting [Wycheproof] test vectors to the blobby format |
| [`zeroize`] | [![crates.io](https://img.shields.io/crates/v/zeroize.svg)](https://crates.io/crates/zeroize) | [![Documentation](https://docs.rs/zeroize/badge.svg)](https://docs.rs/zeroize) | Securely zero memory while avoiding compiler optimizations |
| Name | crates.io | Docs | MSRV | Description |
|------|:---------:|:----:|:----:|-------------|
| [`blobby`] | [![crates.io](https://img.shields.io/crates/v/blobby.svg)](https://crates.io/crates/blobby) | [![Documentation](https://docs.rs/blobby/badge.svg)](https://docs.rs/blobby) | ![MSRV 1.39][msrv-1.39] | Decoder of the simple de-duplicated binary blob storage format |
| [`block-buffer`] | [![crates.io](https://img.shields.io/crates/v/block-buffer.svg)](https://crates.io/crates/block-buffer) | [![Documentation](https://docs.rs/block-buffer/badge.svg)](https://docs.rs/block-buffer) | ![MSRV 1.41][msrv-1.41] | Fixed size buffer for block processing of data |
| [`block‑padding`] | [![crates.io](https://img.shields.io/crates/v/block-padding.svg)](https://crates.io/crates/block-padding) | [![Documentation](https://docs.rs/block-padding/badge.svg)](https://docs.rs/block-padding) | ![MSRV 1.56][msrv-1.56] | Padding and unpadding of messages divided into blocks |
| [`collectable`] | [![crates.io](https://img.shields.io/crates/v/collectable.svg)](https://crates.io/crates/collectable) | [![Documentation](https://docs.rs/collectable/badge.svg)](https://docs.rs/collectable) | ![MSRV 1.41][msrv-1.41] | Fallible, `no_std`-friendly collection traits |
| [`cpufeatures`] | [![crates.io](https://img.shields.io/crates/v/cpufeatures.svg)](https://crates.io/crates/cpufeatures) | [![Documentation](https://docs.rs/cpufeatures/badge.svg)](https://docs.rs/cpufeatures) | ![MSRV 1.40][msrv-1.40] | Lightweight and efficient alternative to the `is_x86_feature_detected!` macro |
| [`dbl`] | [![crates.io](https://img.shields.io/crates/v/dbl.svg)](https://crates.io/crates/dbl) | [![Documentation](https://docs.rs/dbl/badge.svg)](https://docs.rs/dbl) | ![MSRV 1.41][msrv-1.41] | Double operation in Galois Field (GF) |
| [`hex-literal`] | [![crates.io](https://img.shields.io/crates/v/hex-literal.svg)](https://crates.io/crates/hex-literal) | [![Documentation](https://docs.rs/hex-literal/badge.svg)](https://docs.rs/hex-literal) | ![MSRV 1.45][msrv-1.45] | Procedural macro for converting hexadecimal string to byte array at compile time |
| [`inout`] | [![crates.io](https://img.shields.io/crates/v/inout.svg)](https://crates.io/crates/inout) | [![Documentation](https://docs.rs/inout/badge.svg)](https://docs.rs/inout) | ![MSRV 1.56][msrv-1.56] | Custom reference types for code generic over in-place and buffer-to-buffer modes of operation. |
| [`opaque-debug`] | [![crates.io](https://img.shields.io/crates/v/opaque-debug.svg)](https://crates.io/crates/opaque-debug) | [![Documentation](https://docs.rs/opaque-debug/badge.svg)](https://docs.rs/opaque-debug) | ![MSRV 1.41][msrv-1.41] | Macro for opaque `Debug` trait implementation |
| [`wycheproof2blb`] | | | | Utility for converting [Wycheproof] test vectors to the blobby format |
| [`zeroize`] | [![crates.io](https://img.shields.io/crates/v/zeroize.svg)](https://crates.io/crates/zeroize) | [![Documentation](https://docs.rs/zeroize/badge.svg)](https://docs.rs/zeroize) | ![MSRV 1.51][msrv-1.51] | Securely zero memory while avoiding compiler optimizations |

## License

Expand All @@ -40,6 +43,13 @@ Unless you explicitly state otherwise, any contribution intentionally submitted
[deps-image]: https://deps.rs/repo/github/RustCrypto/utils/status.svg
[deps-link]: https://deps.rs/repo/github/RustCrypto/utils

[msrv-1.39]: https://img.shields.io/badge/rustc-1.39.0+-blue.svg
[msrv-1.40]: https://img.shields.io/badge/rustc-1.40.0+-blue.svg
[msrv-1.41]: https://img.shields.io/badge/rustc-1.41.0+-blue.svg
[msrv-1.45]: https://img.shields.io/badge/rustc-1.45.0+-blue.svg
[msrv-1.51]: https://img.shields.io/badge/rustc-1.51.0+-blue.svg
[msrv-1.56]: https://img.shields.io/badge/rustc-1.56.0+-blue.svg

[//]: # (crates)

[`blobby`]: ./blobby
Expand All @@ -49,6 +59,7 @@ Unless you explicitly state otherwise, any contribution intentionally submitted
[`cpufeatures`]: ./cpufeatures
[`dbl`]: ./dbl
[`hex-literal`]: ./hex-literal
[`inout`]: ./inout
[`opaque-debug`]: ./opaque-debug
[`wycheproof2blb`]: ./wycheproof2blb
[`zeroize`]: ./zeroize
Expand Down
5 changes: 4 additions & 1 deletion block-padding/CHANGELOG.md
Expand Up @@ -4,15 +4,18 @@ 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).

## [UNRELEASED]
## 0.3.0 (2022-02-10)
### Added
- `Iso10126` padding algorithm ([#643])
- `PadType` enum, `Padding::TYPE` associated constant, and `Padding::unpad_blocks` method ([#675])

### Changed
- The `Padding` trait methods now work with blocks instead of byte slices. ([#113])
- Bump MSRV to 1.56 and edition to 2021 ([#675])

[#113]: https://github.com/RustCrypto/utils/pull/113
[#643]: https://github.com/RustCrypto/utils/pull/643
[#675]: https://github.com/RustCrypto/utils/pull/675

## 0.2.1 (2020-08-14)
### Added
Expand Down
15 changes: 12 additions & 3 deletions block-padding/Cargo.toml
@@ -1,17 +1,26 @@
[package]
name = "block-padding"
version = "0.3.0-pre" # Also update html_root_url in lib.rs when bumping this
version = "0.3.0" # Also update html_root_url in lib.rs when bumping this
description = "Padding and unpadding of messages divided into blocks."
authors = ["RustCrypto Developers"]
license = "MIT OR Apache-2.0"
description = "Padding and unpadding of messages divided into blocks."
edition = "2021"
rust-version = "1.56"
documentation = "https://docs.rs/block-padding"
repository = "https://github.com/RustCrypto/utils"
keywords = ["padding", "pkcs7", "ansix923", "iso7816"]
categories = ["cryptography", "no-std"]
edition = "2018"

# Hack to allow this crate to coexist with pre-2021 edition crates
[workspace]
members = ["."]

[dependencies]
generic-array = "0.14"

[features]
std = []

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

0 comments on commit fc123e8

Please sign in to comment.