Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added
Decoder<R>for bounded, nested decoding without allocation. Useread_nestedfor a known length orread_prefixedfor an SSH length prefix (#618)Mpint::is_zeroand equality comparisons forMpintwithout thectutilsfeature (#622)MpintReffor encoding a borrowed magnitude,Decoder::read_mpint_bytesfor decoding into caller-provided storage, and aWriterimpl for&mut [u8](#656)Decoder::from_bytes,from_base64, andfrom_pem. Thebase64andpemfeatures exposeBase64DecoderandPemDecoderaliases. Usepem_label()to inspect the PEM label orpem::PemReaderto access the reader directly (#663)derivefeature, use#[ssh(error = crate::Error)]to select a derivedDecode::Error(#665)Changed
Mpintmagnitudes to 16384 bits (2048 bytes) (#615)Decode::decodenow takes&mut Decoder<impl Reader>. Call nested reads and completion checks on the decoder. After a read or nested decode fails, subsequent reads returnError::Failed(#618)Mpint::from_bytesandas_bytesnow use unsigned big-endian magnitudes. Decoding rejects negative wire values and accepts redundant leading zeros within the wire-size limit. Encoding produces canonical SSH integers. UseTryFromto convert aUintto anMpintandFromfor the reverse conversion (#622)Error::Allocwhen decoding owned values or encoding into aVec<u8>(#627)Decoder::newandReader::into_decoderare fallible and reject decoded binary input larger than 128 MiB, including when reading Base64 or PEM (#628)uint32representable as ausize, lifting the previous0xfffffcap (#637)Error::NestingDepthat the next level (#641)#[ssh(...)]attributes on enum variants (#644)Readerimplementations must implementClone. Each clone starts at the same position and advances independently, allowing a decoder to reread the original bytes (#659)ssh-derivedependency to v0.4 (#667)Removed
Mpint::from_positive_bytes,as_positive_bytes, andis_positive. Usefrom_bytesandas_bytesfor unsigned magnitudes andis_zeroto test for zero (#622)Reader::read_byten. UseDecoder::read_string_bytesfor a length-prefixed SSH string or decode[u8; N]for a fixed-width byte array (#647)Fixed
Error::TrailingDatawhen a length-prefixed field is only partly consumed (8cbd2a0)Mpintvalues numerically withctutilsenabled and preserve canonical zero after zeroization (#622)#[repr(usize)]enum tags in derivedEncode::encoded_len, and allow fields namedwriter. Derived decoders now match discriminant expressions by value (#643)Vec<String>documentation to describe an SSH string containing a sequence of length-prefixed strings (#646)Security
ctutilsv0.4.8 when that optional dependency is enabled, picking up upstream constant-time fixes for mask generation and comparisons (#610, RUSTSEC-2026-0385)