Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from cryptocorrosion:master #2

Open
wants to merge 96 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
effb1f0
tweak Chacha and Blake diagonalization to hide latency on b
grafi-tt May 4, 2019
8608f02
tune diagonalization-tweak so it's fast on SSE2 too
kazcw Jan 22, 2020
bc2dc2e
forgo simd for non-performance-sensitive functions
kazcw Jan 16, 2020
f06ce94
add license files in workspace root
kazcw Jan 22, 2020
80655df
add narrow benchmark
kazcw Jan 22, 2020
5e04d6f
fix simplified ChaCha impl for non-amd64
kazcw Jan 22, 2020
3a2e74f
impl PartialEq, Eq for vecXXX_storage
kazcw May 16, 2020
3eaf0fa
ChaCha: derive PartialEq, Eq
kazcw May 16, 2020
ceb0775
ChaCha: position-independent stream comparison
kazcw May 16, 2020
9be43f5
ppv-lite86: target_feature-gate tests
kazcw May 16, 2020
785bfbe
replace `simd` feature with `no_simd`
kazcw May 16, 2020
3ee5be0
working toward 64-bit Blake support
kazcw May 16, 2020
8bd2124
officially increase MSRV to 1.32.0
kazcw May 16, 2020
5f35a9f
new c2-chacha and ppv-lite86 releases
kazcw May 16, 2020
88cad1d
use repr(C) for union; its correctness is clearer
kazcw Aug 19, 2020
99df5db
avoid u128 union members in portable code
kazcw Aug 19, 2020
8169f9f
enable simd by default
kazcw Sep 18, 2020
fae19dc
Increase MSRV to 1.41.0
str4d Jun 12, 2020
aad6294
c2-chacha: Migrate to stream-cipher 0.4
str4d Jun 12, 2020
d00e80b
skein: Migrate to digest 0.9
str4d Jun 12, 2020
35c26e2
blake-hash: Migrate to digest 0.9
str4d Jun 12, 2020
15e5c9b
groestl: Migrate to digest 0.9
str4d Jun 12, 2020
ec0bc35
jh: Migrate to digest 0.9
str4d Jun 12, 2020
7be1e53
docs: MSRV bump does not apply to support crates
kazcw Jun 15, 2020
affccb0
test different MSRVs by crate
kazcw Jun 15, 2020
e79eb66
maintain older MSRV for some crates
kazcw Jun 15, 2020
1e468bc
fix travis script
kazcw Jun 15, 2020
97a78c9
shell is hard
kazcw Jun 15, 2020
d84373e
Remove unnecessary GenericArray::as_mut_slice calls
str4d Jun 22, 2020
ede56ce
c2-chacha: Migrate to stream-cipher 0.6
str4d Jul 13, 2020
c622fec
threefish-cipher: Migrate to block-cipher 0.8
str4d Jul 13, 2020
e42d718
c2-chacha: Migrate to stream-cipher 0.7
str4d Aug 30, 2020
96bb212
remove broken function
kazcw Sep 18, 2020
0dec28b
eliminate build warnings
kazcw Sep 18, 2020
9f2a3c9
fmt
kazcw Oct 9, 2020
1eb8f4b
eliminate clippy warnings
kazcw Oct 9, 2020
9213f7e
Migrate to new cipher crate
roblabla Oct 26, 2020
3012849
release new versions
kazcw Nov 2, 2020
39493bd
fix unreleased-changes.sh for multi-digit version components
kazcw Nov 2, 2020
ffbe05c
c2-chacha: add XChaCha8 and XChaCha12
PaulGrandperrin Jan 5, 2021
99d9705
skein: fix build(mismatched types)
wakiyamap Jan 23, 2021
8e31b3c
release chacha 0.3.1
kazcw May 12, 2021
74ceab5
release skein-hash 0.3.1
kazcw May 12, 2021
92d4041
ppv-lite86: fix missed #inlines
kazcw Oct 13, 2021
cd329d1
ppv-lite86: impl transpose4 and to_scalars
kazcw Oct 13, 2021
f491a3a
Creating FUNDING.yml
kazcw Oct 14, 2021
26f6b91
README: remove obsolete section
kazcw Oct 14, 2021
a9d2b13
build scripts: bring up to date
kazcw Oct 14, 2021
1ba3096
use stable syntax for const intrinsic args
kazcw Oct 14, 2021
b18a9e9
ppv-lite86: release 0.2.12
kazcw Oct 14, 2021
ea81be1
ppv-lite86: soft impl for to_scalars
kazcw Oct 14, 2021
1f2656d
ppv-lite86: release 0.2.13
kazcw Oct 14, 2021
df1d97c
ppv-lite86: fix soft impl of to_scalars
kazcw Oct 14, 2021
3175881
ppv-lite86: release 0.2.14
kazcw Oct 14, 2021
e1059dc
c2-chacha: improve AVX2 performance 16-48%
kazcw Oct 14, 2021
bb70abd
Merge pull request #58 from kazcw/chacha-faster
kazcw Oct 14, 2021
0929e74
c2-chacha: release 0.3.2
kazcw Oct 14, 2021
766ae7d
c2-chacha: fix no-std build
kazcw Oct 14, 2021
3a0503b
ppv-lite86: remove an obsolete impl
kazcw Oct 24, 2021
c9aa399
ppv-lite86: x2/x4 had some assumptions that were only valid for the t…
kazcw Oct 24, 2021
511ac7e
ppv-lite86: new u32x4x2_avx2; use to impl u32x4x4_avx2
kazcw Oct 24, 2021
66ee972
ppv-lite86: impl StoreBytes for u32x4x2, u32x4x4
kazcw Oct 24, 2021
6c540f9
ppv-lite86: release 0.2.15
kazcw Oct 24, 2021
a28f922
Merge pull request #62 from kazcw/storebytes
kazcw Oct 24, 2021
cadd431
c2-chacha: fix for big-endian
kazcw Oct 24, 2021
dce9577
c2-chacha: release 0.3.3
kazcw Oct 24, 2021
4e64921
Merge pull request #63 from kazcw/chacha-be
kazcw Oct 24, 2021
e9c9ceb
cargo fmt
kazcw Oct 24, 2021
f8d79d8
GitHub Action for rustfmt check
kazcw Oct 24, 2021
a2e9baf
clippy
kazcw Oct 24, 2021
4cf46f5
Github Action for clippy check
kazcw Oct 24, 2021
67225b9
c2-chacha: cipher 0.2 -> 0.3 (breaking)
kazcw Oct 24, 2021
a60ca14
threefish: cipher 0.2 -> 0.3 (breaking)
kazcw Oct 24, 2021
209a9fd
skein: cipher 0.2 -> 0.3 (breaking)
kazcw Oct 24, 2021
34d00f5
Merge pull request #65 from kazcw/cipher-0.3
kazcw Oct 24, 2021
8e7c84e
ppv-lite86: add interface needed for BLAKE
kazcw Dec 30, 2021
4b1e1d6
release ppv-lite86 0.2.16, BLAKE 0.4.1
kazcw Dec 30, 2021
33ec0f3
BLAKE: init changelog
kazcw Dec 30, 2021
9f59773
use generic implementation on x86-without-simd
kazcw Nov 4, 2022
8d800aa
Merge pull request #70 from cryptocorrosion/x86-without-simd
kazcw Nov 4, 2022
325fd94
version bump
kazcw Nov 4, 2022
3fe7448
Merge pull request #71 from cryptocorrosion/x86-without-simd
kazcw Nov 4, 2022
216afcf
Fix some unsoundness and remove some unsafe
joshlf Aug 25, 2023
0effdfc
Update Rust version
kazcw Jul 30, 2024
6cf6260
Updates and GH test workflow
kazcw Jul 30, 2024
5e71465
Updates and GH test workflow
kazcw Jul 30, 2024
42056ab
Merge pull request #74 from cryptocorrosion/gh-test-workflow
kazcw Jul 30, 2024
373a801
Merge branch 'master' into joshlf/soundness
kazcw Jul 30, 2024
d6584e8
Merge remote-tracking branch 'origin/master' into joshlf/soundness
kazcw Jul 30, 2024
1d41a55
Merge pull request #72 from joshlf/soundness
kazcw Jul 30, 2024
6802e23
Version bump
kazcw Jul 30, 2024
ee6c7d4
Update dependencies
kazcw Jul 30, 2024
bdcea8e
Merge pull request #76 from cryptocorrosion/update-deps
kazcw Jul 30, 2024
c10d899
Use zerocopies derive feature rather than depending on zerocopy_derive
Abestanis Aug 2, 2024
23b52ad
Merge pull request #78 from Abestanis/fix/zerocopy_derive
kazcw Aug 3, 2024
16e2fe8
Version bump
kazcw Aug 3, 2024
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
3 changes: 3 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# These are supported funding model platforms

github: kazcw
18 changes: 18 additions & 0 deletions .github/workflows/check-clippy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Clippy

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

env:
CARGO_TERM_COLOR: always

jobs:
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: cargo-clippy
run: cargo clippy
15 changes: 15 additions & 0 deletions .github/workflows/check-rustfmt.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Rustfmt

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: cargo-fmt
run: cargo fmt -- --check
168 changes: 168 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
name: Tests

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

permissions:
contents: read

jobs:
#check-doc:
# name: Check doc
# runs-on: ubuntu-latest
# env:
# RUSTDOCFLAGS: "-Dwarnings --cfg docsrs -Zunstable-options --generate-link-to-definition"
# steps:
# - uses: actions/checkout@v4
# - name: Install toolchain
# uses: dtolnay/rust-toolchain@master
# with:
# toolchain: nightly
# - name: Workspace docs
# run: cargo doc --all-features --no-deps

test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
toolchain: stable
- os: macos-latest
target: x86_64-apple-darwin
toolchain: stable
# TODO: also aarch64 / M1
- os: windows-latest
target: x86_64-pc-windows-gnu
toolchain: stable
- os: windows-latest
target: x86_64-pc-windows-msvc
toolchain: beta
# Test both windows-gnu and windows-msvc; use beta rust on one
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
variant: MSRV
toolchain: 1.61.0
# FIXME: some failures down the dependency tree
#- os: ubuntu-latest
# target: x86_64-unknown-linux-gnu
# toolchain: nightly
# variant: minimal_versions

steps:
- uses: actions/checkout@v4
- name: MSRV
if: ${{ matrix.variant == 'MSRV' }}
run: cp Cargo.lock.msrv Cargo.lock
- name: Install toolchain
uses: dtolnay/rust-toolchain@master
with:
target: ${{ matrix.target }}
toolchain: ${{ matrix.toolchain }}
- run: ${{ matrix.deps }}
- name: Maybe minimal versions
if: ${{ matrix.variant == 'minimal_versions' }}
run: |
cargo generate-lockfile -Z minimal-versions
- name: Test
run: |
cargo test --target ${{ matrix.target }}

test-cross:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target: powerpc-unknown-linux-gnu
toolchain: stable

steps:
- uses: actions/checkout@v4
- name: Install toolchain
uses: dtolnay/rust-toolchain@master
with:
target: ${{ matrix.target }}
toolchain: ${{ matrix.toolchain }}
- name: Cache cargo plugins
uses: actions/cache@v4
with:
path: ~/.cargo/bin/
key: ${{ runner.os }}-cargo-plugins
- name: Install cross
run: cargo install cross || true
- name: Test
run: |
cross test --no-fail-fast --target ${{ matrix.target }} -p c2-chacha
cross test --no-fail-fast --target ${{ matrix.target }} -p ppv-lite86
cross test --no-fail-fast --target ${{ matrix.target }} -p ppv-null
cross test --no-fail-fast --target ${{ matrix.target }} -p crypto-simd
cross test --no-fail-fast --target ${{ matrix.target }} -p threefish-cipher
cross test --no-fail-fast --target ${{ matrix.target }} -p blake-hash
cross test --no-fail-fast --target ${{ matrix.target }} -p skein-hash
# Failing on PPC
# cross test --no-fail-fast --target ${{ matrix.target }} -p jh-x86_64
# groestl-aesni: not cross-tested as it only supports specific hardware.

test-miri:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install toolchain
run: |
rustup toolchain install nightly --component miri
rustup override set nightly
cargo miri setup
- name: Test
run: |
cargo miri test -p c2-chacha
cargo miri test -p ppv-lite86
cargo miri test -p ppv-null
cargo miri test -p crypto-simd
cargo miri test -p threefish-cipher
cargo miri test -p blake-hash
cargo miri test -p skein-hash
# groestl-aesni: not tested as it only supports specific hardware.
# jh-x86_64: should work under miri but runs too slowly.

test-no-std:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install toolchain
uses: dtolnay/rust-toolchain@nightly
with:
target: thumbv6m-none-eabi
- name: Chacha, build only
run: cargo build -p c2-chacha --target=thumbv6m-none-eabi --no-default-features

test-ios:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Install toolchain
uses: dtolnay/rust-toolchain@nightly
with:
target: aarch64-apple-ios
- name: Chacha, build only
run: cargo build -p c2-chacha --target=aarch64-apple-ios

test-686:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Deps
run: sudo apt-get update ; sudo apt install gcc-multilib
- name: Install toolchain
uses: dtolnay/rust-toolchain@nightly
with:
target: i686-unknown-linux-gnu
toolchain: nightly
- name: Chacha
run: cargo test -p c2-chacha --target=i686-unknown-linux-gnu
7 changes: 6 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,13 @@ matrix:
rust: nightly
- env: TARGET=x86_64-unknown-linux-gnu
rust: stable
- env: TARGET=x86_64-unknown-linux-gnu OLDER_MSRV_CRATES=1 DISABLE_TESTS=1
rust: 1.32.0
- env: TARGET=x86_64-unknown-linux-gnu
rust: 1.31.1
rust: 1.41.0

# machine-specific tests are skipped based on static feature detection
- env: TARGET=x86_64-unknown-linux-gnu RUSTFLAGS="-C target-cpu=native"

before_install:
- set -e
Expand Down
Loading