Skip to content

Commit 019db96

Browse files
authored
mgm: upgrade to Rust 2024 edition; MSRV 1.85 (#753)
This will eventually let us add the crate back to the workspace, where the rest of the crates are 2024 edition.
1 parent 0e4f261 commit 019db96

File tree

11 files changed

+24
-139
lines changed

11 files changed

+24
-139
lines changed

.github/workflows/mgm.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
strategy:
2929
matrix:
3030
rust:
31-
- 1.81.0 # MSRV
31+
- 1.85.0 # MSRV
3232
- stable
3333
target:
3434
- thumbv7em-none-eabi
@@ -46,7 +46,7 @@ jobs:
4646
strategy:
4747
matrix:
4848
rust:
49-
- 1.81.0 # MSRV
49+
- 1.85.0 # MSRV
5050
- stable
5151
steps:
5252
- uses: actions/checkout@v6

mgm/Cargo.lock

Lines changed: 3 additions & 118 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mgm/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ name = "mgm"
55
version = "0.5.0-pre.1"
66
description = "Generic implementation of the Multilinear Galois Mode (MGM) cipher"
77
authors = ["RustCrypto Developers"]
8-
edition = "2021"
8+
edition = "2024"
99
license = "Apache-2.0 OR MIT"
1010
readme = "README.md"
1111
documentation = "https://docs.rs/mgm"
1212
homepage = "https://github.com/RustCrypto/AEADs/tree/master/mgm"
1313
repository = "https://github.com/RustCrypto/AEADs"
1414
categories = ["cryptography", "no-std"]
1515
keywords = ["encryption", "aead"]
16-
rust-version = "1.81"
16+
rust-version = "1.85"
1717

1818
[dependencies]
1919
aead = { version = "0.5", default-features = false }
@@ -28,15 +28,15 @@ cpufeatures = "0.2"
2828
aead = { version = "0.5", features = ["dev"], default-features = false }
2929
kuznyechik = "0.7"
3030
magma = "0.7"
31-
hex-literal = "0.2"
31+
hex-literal = "1"
3232

3333
[features]
3434
default = ["alloc", "getrandom"]
3535
std = ["aead/std", "alloc"]
3636
alloc = ["aead/alloc"]
3737
arrayvec = ["aead/arrayvec"]
3838
bytes = ["aead/bytes"]
39-
getrandom = ["aead/getrandom", "rand_core"]
39+
getrandom = ["aead/getrandom", "rand_core"]
4040
rand_core = ["aead/rand_core"]
4141
stream = ["aead/stream"]
4242
force-soft = [] # Disable support for hardware intrinsics

mgm/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
[![crate][crate-image]][crate-link]
44
[![Docs][docs-image]][docs-link]
5+
[![Build Status][build-image]][build-link]
56
![Apache2/MIT licensed][license-image]
67
![Rust Version][rustc-image]
78
[![Project Chat][chat-image]][chat-link]
8-
[![Build Status][build-image]][build-link]
99

1010
Pure Rust implementation of the Multilinear Galois Mode ([MGM]): an
1111
Authenticated Encryption with Associated Data ([AEAD]) algorithm generic over
@@ -40,12 +40,12 @@ dual licensed as above, without any additional terms or conditions.
4040
[crate-link]: https://crates.io/crates/mgm
4141
[docs-image]: https://docs.rs/mgm/badge.svg
4242
[docs-link]: https://docs.rs/mgm
43+
[build-image]: https://github.com/RustCrypto/AEADs/actions/workflows/mgm.yml/badge.svg
44+
[build-link]: https://github.com/RustCrypto/AEADs/actions/workflows/mgm.yml
4345
[license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg
44-
[rustc-image]: https://img.shields.io/badge/rustc-1.81+-blue.svg
46+
[rustc-image]: https://img.shields.io/badge/rustc-1.85+-blue.svg
4547
[chat-image]: https://img.shields.io/badge/zulip-join_chat-blue.svg
4648
[chat-link]: https://rustcrypto.zulipchat.com/#narrow/stream/260038-AEADs
47-
[build-image]: https://github.com/RustCrypto/AEADs/workflows/mgm/badge.svg?branch=master&event=push
48-
[build-link]: https://github.com/RustCrypto/AEADs/actions
4949

5050
[//]: # (general links)
5151

mgm/benches/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#![feature(test)]
22
extern crate test;
33

4-
use aead::{generic_array::GenericArray, AeadInPlace, KeyInit};
4+
use aead::{AeadInPlace, KeyInit, generic_array::GenericArray};
55
use hex_literal::hex;
66
use kuznyechik::Kuznyechik;
77
use mgm::Mgm;

mgm/src/encdec.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
use crate::{
2+
DecArgs, EncArgs, MgmBlockSize,
23
gf::GfElement,
34
sealed::{Counter, Sealed},
4-
DecArgs, EncArgs, MgmBlockSize,
55
};
66
use aead::{
7+
Error,
78
generic_array::{
8-
typenum::{Unsigned, U16, U8},
99
GenericArray,
10+
typenum::{U8, U16, Unsigned},
1011
},
11-
Error,
1212
};
1313
use cipher::{Block, BlockEncrypt, ParBlocks};
1414
use subtle::ConstantTimeEq;

mgm/src/gf/gf128_soft64.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use super::{utils::bmul64, GfElement};
1+
use super::{GfElement, utils::bmul64};
22
use aead::{consts::U16, generic_array::GenericArray};
33

44
pub struct Element(u64, u64);

mgm/src/gf/gf64_soft64.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use super::{utils::bmul64, GfElement};
1+
use super::{GfElement, utils::bmul64};
22
use aead::{consts::U8, generic_array::GenericArray};
33

44
pub struct Element(u64);

mgm/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
//! ```
3131
3232
use aead::{
33-
consts::U0, generic_array::GenericArray, AeadCore, AeadInPlace, Error, Key, KeyInit,
34-
KeySizeUser,
33+
AeadCore, AeadInPlace, Error, Key, KeyInit, KeySizeUser, consts::U0,
34+
generic_array::GenericArray,
3535
};
3636
use cfg_if::cfg_if;
3737
use cipher::{BlockCipher, BlockEncrypt, NewBlockCipher};

mgm/src/sealed.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
use aead::{
2+
Error,
23
generic_array::{
3-
typenum::{U16, U8},
44
ArrayLength, GenericArray,
5+
typenum::{U8, U16},
56
},
6-
Error,
77
};
88
use cipher::BlockCipher;
99

0 commit comments

Comments
 (0)