File tree Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -4,13 +4,19 @@ All notable changes to this project will be documented in this file.
4
4
The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
5
5
and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
6
6
7
- ## 0.3.1 (2022-02-10)
7
+ ## 0.3.2 (2022-03-10)
8
+ ### Fixed
9
+ - Potential unsoundness for incorrect ` Padding ` implementations ([ #748 ] )
10
+
11
+ [ #748 ] : https://github.com/RustCrypto/utils/pull/748
12
+
13
+ ## 0.3.1 (2022-02-10) [ YANKED]
8
14
### Fixed
9
15
- Fix doc build on docs.rs by optionally enabling the ` doc_cfg ` feature ([ #733 ] )
10
16
11
17
[ #733 ] : https://github.com/RustCrypto/utils/pull/733
12
18
13
- ## 0.3.0 (2022-02-10)
19
+ ## 0.3.0 (2022-02-10) [ YANKED ]
14
20
### Added
15
21
- ` Iso10126 ` padding algorithm ([ #643 ] )
16
22
- ` PadType ` enum, ` Padding::TYPE ` associated constant, and ` Padding::unpad_blocks ` method ([ #675 ] )
Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " block-padding"
3
- version = " 0.3.1 " # Also update html_root_url in lib.rs when bumping this
3
+ version = " 0.3.2 " # Also update html_root_url in lib.rs when bumping this
4
4
description = " Padding and unpadding of messages divided into blocks."
5
5
authors = [" RustCrypto Developers" ]
6
6
license = " MIT OR Apache-2.0"
Original file line number Diff line number Diff line change 7
7
#![ doc(
8
8
html_logo_url = "https://raw.githubusercontent.com/RustCrypto/media/6ee8e381/logo.svg" ,
9
9
html_favicon_url = "https://raw.githubusercontent.com/RustCrypto/media/6ee8e381/logo.svg" ,
10
- html_root_url = "https://docs.rs/block-padding/0.3.1 "
10
+ html_root_url = "https://docs.rs/block-padding/0.3.2 "
11
11
) ]
12
12
#![ cfg_attr( docsrs, feature( doc_cfg) ) ]
13
13
#![ warn( missing_docs, rust_2018_idioms) ]
@@ -60,6 +60,7 @@ pub trait Padding<BlockSize: ArrayLength<u8>> {
60
60
( _, PadType :: NoPadding ) => bs * blocks. len ( ) ,
61
61
( Some ( last_block) , _) => {
62
62
let n = Self :: unpad ( last_block) ?. len ( ) ;
63
+ assert ! ( n <= bs) ;
63
64
n + bs * ( blocks. len ( ) - 1 )
64
65
}
65
66
( None , PadType :: Ambiguous ) => 0 ,
You can’t perform that action at this time.
0 commit comments