Skip to content

Commit

Permalink
migrate to cipher v0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
newpavlov committed Jan 18, 2022
1 parent f253d53 commit bebaf08
Show file tree
Hide file tree
Showing 178 changed files with 4,117 additions and 6,701 deletions.
66 changes: 40 additions & 26 deletions .github/workflows/aes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,12 @@ jobs:
target: ${{ matrix.target }}
profile: minimal
override: true
- run: cargo check --features compact,ctr,force-soft
- run: cargo check --features compact,force-soft
- run: cargo build --release --target ${{ matrix.target }}
- run: cargo build --release --target ${{ matrix.target }} --features compact
- run: cargo build --release --target ${{ matrix.target }} --features ctr
- run: cargo build --release --target ${{ matrix.target }} --features force-soft
- run: cargo build --release --target ${{ matrix.target }} --features hazmat
- run: cargo build --release --target ${{ matrix.target }} --features compact,ctr,force-soft
- run: cargo build --release --target ${{ matrix.target }} --features compact,force-soft

# Tests for the AES-NI backend
aesni:
Expand Down Expand Up @@ -78,7 +77,6 @@ jobs:
- run: ${{ matrix.deps }}
- run: cargo test --release --target ${{ matrix.target }}
- run: cargo test --release --target ${{ matrix.target }} --features compact
- run: cargo test --release --target ${{ matrix.target }} --features ctr
- run: cargo test --release --target ${{ matrix.target }} --features force-soft
- run: cargo test --release --target ${{ matrix.target }} --features hazmat
- run: cargo test --release --target ${{ matrix.target }} --all-features
Expand Down Expand Up @@ -113,7 +111,6 @@ jobs:
- run: ${{ matrix.deps }}
- run: cargo test --release --target ${{ matrix.target }}
- run: cargo test --release --target ${{ matrix.target }} --features compact
- run: cargo test --release --target ${{ matrix.target }} --features ctr
- run: cargo test --release --target ${{ matrix.target }} --features hazmat
- run: cargo test --release --target ${{ matrix.target }} --all-features

Expand All @@ -125,15 +122,15 @@ jobs:
include:
# 32-bit Linux
- target: i686-unknown-linux-gnu
rust: 1.41.0 # MSRV (temporarily lower than with CPU feature auto-detection)
rust: 1.49.0 # MSRV
deps: sudo apt update && sudo apt install gcc-multilib
- target: i686-unknown-linux-gnu
rust: stable
deps: sudo apt update && sudo apt install gcc-multilib

# 64-bit Linux
- target: x86_64-unknown-linux-gnu
rust: 1.41.0 # MSRV (temporarily lower than with CPU feature auto-detection)
rust: 1.49.0 # MSRV
- target: x86_64-unknown-linux-gnu
rust: stable
steps:
Expand All @@ -147,26 +144,31 @@ jobs:
- run: ${{ matrix.deps }}
- run: cargo test --release --target ${{ matrix.target }} --features force-soft
- run: cargo test --release --target ${{ matrix.target }} --features force-soft,compact
- run: cargo test --release --target ${{ matrix.target }} --features force-soft,ctr
- run: cargo test --release --target ${{ matrix.target }} --features force-soft,compact,ctr


# Cross-compiled tests
cross:
strategy:
matrix:
# note that on 1.49-1.50 cargo returns an error when `--features` is
# used inside virtual manifest, so we test 1.51 here
include:
# ARM64
- target: aarch64-unknown-linux-gnu
rust: 1.49.0 # MSRV
rust: 1.51.0 # MSRV
- target: aarch64-unknown-linux-gnu
rust: stable

# PPC32
- target: powerpc-unknown-linux-gnu
rust: 1.49.0 # MSRV
rust: 1.51.0 # MSRV
- target: powerpc-unknown-linux-gnu
rust: stable
runs-on: ubuntu-latest
# Cross mounts only current package, i.e. by default it ignores workspace's Cargo.toml
defaults:
run:
working-directory: .
steps:
- uses: actions/checkout@v1
- run: ${{ matrix.deps }}
Expand All @@ -176,13 +178,17 @@ jobs:
target: ${{ matrix.target }}
profile: minimal
override: true
- run: cargo install cross
- run: cross test --release --target ${{ matrix.target }}
- run: cross test --release --target ${{ matrix.target }} --features compact
- run: cross test --release --target ${{ matrix.target }} --features ctr
- run: cross test --release --target ${{ matrix.target }} --features force-soft
- run: cross test --release --target ${{ matrix.target }} --features hazmat
- run: cross test --release --target ${{ matrix.target }} --features compact,ctr,force-soft,hazmat
- name: Install pre-compiled cross
run: |
export URL=$(curl -s https://api.github.com/repos/rust-embedded/cross/releases/latest | jq -r '.assets[] | select(.name | contains("x86_64-unknown-linux-gnu.tar.gz")) | .browser_download_url')
wget -O /tmp/binaries.tar.gz $URL
tar -C /tmp -xzf /tmp/binaries.tar.gz
mv /tmp/cross ~/.cargo/bin
- run: cross test --package aes --release --target ${{ matrix.target }}
- run: cross test --package aes --release --target ${{ matrix.target }} --features compact
- run: cross test --package aes --release --target ${{ matrix.target }} --features force-soft
- run: cross test --package aes --release --target ${{ matrix.target }} --features hazmat
- run: cross test --package aes --release --target ${{ matrix.target }} --features compact,force-soft,hazmat

# ARMv8 cross-compiled tests for AES intrinsics (nightly-only)
armv8:
Expand All @@ -192,6 +198,10 @@ jobs:
- target: aarch64-unknown-linux-gnu
rust: nightly
runs-on: ubuntu-latest
# Cross mounts only current package, i.e. by default it ignores workspace's Cargo.toml
defaults:
run:
working-directory: .
steps:
- uses: actions/checkout@v1
- run: ${{ matrix.deps }}
Expand All @@ -201,13 +211,17 @@ jobs:
target: ${{ matrix.target }}
profile: minimal
override: true
- run: cargo install cross
- run: cross test --release --target ${{ matrix.target }} --features armv8
- run: cross test --release --target ${{ matrix.target }} --features armv8,compact
- run: cross test --release --target ${{ matrix.target }} --features armv8,ctr
- run: cross test --release --target ${{ matrix.target }} --features armv8,force-soft
- run: cross test --release --target ${{ matrix.target }} --features armv8,hazmat
- run: cross test --release --target ${{ matrix.target }} --all-features
- name: Install pre-compiled cross
run: |
export URL=$(curl -s https://api.github.com/repos/rust-embedded/cross/releases/latest | jq -r '.assets[] | select(.name | contains("x86_64-unknown-linux-gnu.tar.gz")) | .browser_download_url')
wget -O /tmp/binaries.tar.gz $URL
tar -C /tmp -xzf /tmp/binaries.tar.gz
mv /tmp/cross ~/.cargo/bin
- run: cross test --package aes --release --target ${{ matrix.target }} --features armv8
- run: cross test --package aes --release --target ${{ matrix.target }} --features armv8,compact
- run: cross test --package aes --release --target ${{ matrix.target }} --features armv8,force-soft
- run: cross test --package aes --release --target ${{ matrix.target }} --features armv8,hazmat
- run: cross test --package aes --release --target ${{ matrix.target }} --all-features

clippy:
runs-on: ubuntu-latest
Expand All @@ -219,4 +233,4 @@ jobs:
components: clippy
override: true
profile: minimal
- run: cargo clippy --features compact,ctr,hazmat -- -D warnings
- run: cargo clippy --features compact,hazmat -- -D warnings
56 changes: 0 additions & 56 deletions .github/workflows/block-modes.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/blowfish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
strategy:
matrix:
rust:
- 1.41.0 # MSRV
- 1.49.0 # MSRV
- stable
target:
- thumbv7em-none-eabi
Expand All @@ -42,7 +42,7 @@ jobs:
strategy:
matrix:
rust:
- 1.41.0 # MSRV
- 1.49.0 # MSRV
- stable
steps:
- uses: actions/checkout@v1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cast5.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
strategy:
matrix:
rust:
- 1.41.0 # MSRV
- 1.49.0 # MSRV
- stable
target:
- thumbv7em-none-eabi
Expand All @@ -42,7 +42,7 @@ jobs:
strategy:
matrix:
rust:
- 1.41.0 # MSRV
- 1.49.0 # MSRV
- stable
steps:
- uses: actions/checkout@v1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/des.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
strategy:
matrix:
rust:
- 1.41.0 # MSRV
- 1.49.0 # MSRV
- stable
target:
- thumbv7em-none-eabi
Expand All @@ -42,7 +42,7 @@ jobs:
strategy:
matrix:
rust:
- 1.41.0 # MSRV
- 1.49.0 # MSRV
- stable
steps:
- uses: actions/checkout@v1
Expand Down
55 changes: 0 additions & 55 deletions .github/workflows/gost-modes.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/idea.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
strategy:
matrix:
rust:
- 1.41.0 # MSRV
- 1.49.0 # MSRV
- stable
target:
- thumbv7em-none-eabi
Expand All @@ -42,7 +42,7 @@ jobs:
strategy:
matrix:
rust:
- 1.41.0 # MSRV
- 1.49.0 # MSRV
- stable
steps:
- uses: actions/checkout@v1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/kuznyechik.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
strategy:
matrix:
rust:
- 1.41.0 # MSRV
- 1.49.0 # MSRV
- stable
target:
- thumbv7em-none-eabi
Expand All @@ -42,7 +42,7 @@ jobs:
strategy:
matrix:
rust:
- 1.41.0 # MSRV
- 1.49.0 # MSRV
- stable
steps:
- uses: actions/checkout@v1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/magma.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
strategy:
matrix:
rust:
- 1.41.0 # MSRV
- 1.49.0 # MSRV
- stable
target:
- thumbv7em-none-eabi
Expand All @@ -42,7 +42,7 @@ jobs:
strategy:
matrix:
rust:
- 1.41.0 # MSRV
- 1.49.0 # MSRV
- stable
steps:
- uses: actions/checkout@v1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/rc2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
strategy:
matrix:
rust:
- 1.41.0 # MSRV
- 1.49.0 # MSRV
- stable
target:
- thumbv7em-none-eabi
Expand All @@ -42,7 +42,7 @@ jobs:
strategy:
matrix:
rust:
- 1.41.0 # MSRV
- 1.49.0 # MSRV
- stable
steps:
- uses: actions/checkout@v1
Expand Down
Loading

0 comments on commit bebaf08

Please sign in to comment.