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 RustCrypto:master #2

Open
wants to merge 377 commits into
base: master
Choose a base branch
from

Conversation

pull[bot]
Copy link

@pull pull bot commented Jan 25, 2020

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

@pull pull bot added the ⤵️ pull label Jan 25, 2020
@pull pull bot added the merge-conflict Resolve conflicts manually label May 27, 2020
tarcieri and others added 28 commits June 8, 2020 07:34
This commit cuts releases of the following crates:

- `blowfish` v0.5.0
- `cast5` v0.7.0
- `des` v0.4.0
- `idea` v0.1.0
- `rc2` v0.4.0
- `serpent` v0.1.0
- `sm4` v0.1.0
- `twofish` v0.3.0
- `threefish` v0.3.0

It also adds CHANGELOG.md details to `kuznyechik` and `magma` but does
not release those yet as they had endianness issues we should double
check are corrected before cutting a release.
* Use repeat expression
* Use ref in iterator
* Use u64::from()
"enviromental variable" -> "environment variable"
tarcieri and others added 30 commits May 17, 2024 07:12
Includes the v0.0.1 release
- add `lints.rust.unexpected_cfgs` to Cargo.toml
- threefish: fix typo in `cfg(feature = "cipher")`
Cuts a new release of every crate which previously received a pre.0
prerelease, i.e. is used as a (dev-)dependency in downstream projects
that need to be upgraded.

This includes the following:

- `aes` v0.9.0-pre.1
- `belt-block` v0.2.0-pre.1
- `des` v0.9.0-pre.1
- `kuznyechik` v0.9.0-pre.1
- `magma` v0.10.0-pre.1
This pull request contains a constant-time software fixslicing
implementation of the [GIFT](https://eprint.iacr.org/2017/622.pdf) block
cipher, based on the C implementation of the original authors found
[here](https://github.com/aadomn/gift/tree/master/crypto_bc/gift128/opt32).

Gift is a PRESENT based block cipher with focus on energy efficiency and
a small memory footprint making it ideal for usage in resource
constrained environments. It gained some popularity as part of
GIFT-COFB, which is a finalist in the current [NIST lightweight
cryptography
competition](https://csrc.nist.gov/Projects/lightweight-cryptography) as
well as SUNDAE-GIFT.

This pull request comes with an implementation of GIFT-128, meaning Gift
operating on 128-bit blocks, though I am planning on implementing
GIFT-64 in the future.

It passes all test vectors and performs at ~44.5 cpb on an Intel Core i7
8700k with 3.7GHz core clock, while the C version "only" performs at
~47.1 cpb on the same machine.
This PR implements XTEA as described by various sources, including
https://en.wikipedia.org/wiki/XTEA,

XTEA is a historical cipher, which is no longer commonly used today, but
some legacy software still uses it to this day.

I tested that the cipher methods get properly unrolled, which boosts a
3x speed increase, and is one of the faster ciphers in this collection.
(Hopefully there will be an unroll pragma sometime in the future)

Partially solves #1

I decided against pre-computing keys as the computation is trivial, and
doesn't have a noticeable impact on speed, probably because of memory
accesses and that 256 byte don't fit easily in a cache line anyway.
- Updates `cipher` to v0.5.0-pre.6
- Sets both crates' versions to 0.0.0
- Renames gift to `gift-cipher` which is presently unregistered
Criterion is a relatively big dependency which unnecessarily gets pulled
during testing. Additionally, it results in the [security
warnings](https://github.com/RustCrypto/block-ciphers/security/dependabot/1).

In addition to the benchmark changes, this PR also slightly tweaks
module structure of the crate.
The new software backend implements the same approach as in the SSE2
backend, but uses `u128` instead of `__m128i`. The resulting performance
is slightly worse compared to SSE2, but the code is cross-platform and
should be much faster than the old "compact" software backend.
CI did not catch this issue because the job config was broken in the
same PR which has introduced the bad code.
This PR unifies code between AES-NI and ARM backends and prepares ground
for future removal of duplicated definitions of AES types in
`autodetect`, `soft`, `ni`, and `armv8` modules. Additionally, it allows
to quickly change number of blocks processed in parallel by different
intrinsics-based backends instead of hardcoding it to 8 blocks.
This PR significantly reduces size of the crate. But now clean build of
the crate takes 7-12 seconds, which is not great, but tolerable enough.
Hopefully, performance of const eval will be improved in future.

We could improve build times by using a build script and
`include_bytes!`, but it would result in a somewhat less clear code and
it would mean introduction of the first algorithmic crate which uses
build script.

Additionally, this PR adds a chain encryption test for a more thorough
testing.

Closes #448
New Ubuntu images are being deployed, which is causing the cached
binaries not to work due to a GLIBC upgrade:

https://github.blog/changelog/2024-09-25-actions-new-images-and-ubuntu-latest-changes/

To ensure we're caching consistently on the new image, switches from
using `ubuntu-latest` to `ubuntu-24.04`.

We can revert this change after October 30th, when the blog post says
the deployment is complete.
The `actions-rs` action is unmaintained
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⤵️ pull merge-conflict Resolve conflicts manually
Projects
None yet
Development

Successfully merging this pull request may close these issues.