der
Pure Rust embedded-friendly implementation of the Distinguished Encoding Rules (DER) for Abstract Syntax Notation One (ASN.1) as described in ITU X.690 with full support for heapless `no_std`/`no_alloc` targets
0.8.1
423M downloads/mo
#274 most downloaded on crates.io
RustCrypto/formats
What this package is like to depend on
Last release 1 months ago
09 Jul 2026
Release timing varies
gaps range from 2 weeks to 8 months
Nearly every release is documented
notes for 24 of 24 stable releases
19 versions withdrawn
withdrawn after publishing
6 years old
64 releases · first in 2020
6 releases in the last 12 months
see the full history below
Release timeline
64 releases · Dec 2020 to Jul 2026Releases
latest 60 of 64-
0.8.109 Jul 2026 -
0.8.013 Feb 2026Release notes
Open source →Added
- Custom error types support to the
DecodeandDecodeValuetraits (#1055) EncodingRulesenum (#1321)Decode::from_ber(#1389)- Documentation for field-level
tag_modeattribute (#1401) Hashimplementation forAlgorithmIdentifier(#1414)SequenceRef::as_bytesandAsRef<[u8]>impl (#1454)Reader::peek_into(#1478)GeneralStringvariant toTag(#1512)- Conversions from
OctetString(Ref)toVec/Bytes(#1540) - Custom error types in derive macros (#1560)
- Support for tags beyond 30 (#1651)
- Const
::newtoLength,BytesRef, andAnyRef(#1713) - Const
GeneralizedTime::from_date_time(#1718) Decode::from_der_partial(#1725)- Conversions between
BitStringRef/OctetStringRefand[u8; N](#1731) - Add class bits consts for Application and Private tag support (#1721)
- conversions between
heapless:Vec<u8>andOctetStringRef(#1735) IsConstructedtrait, impl'ed on anyFixedTag(#1744)- Implement
HashforSetOf(#1764) - Implement
Uint/Intconversions from native types (#1762) - Support for
APPLICATION,CONTEXT-SPECIFICandPRIVATEtags (#1819, #1825, #1944) - Support
Cow<[u8]>inderive(Sequence)(#1850) diagnostic::on_unimplementedattributes (#1876)Reader::read_value, auto-nestDecodeValue(#1877, #1895, #1897, #1901)- Indefinite length support for BER (#1884, #1885, #1894, #1900, #1902, #1910)
- Constructed OctetString support (#1899, #1922)
- string conversions, predicate methods for EncodingRules (#1903, #1953)
Any::header(#1935)Tag::RelativeOid(#1942)berfeature (#1948, #1950)- Hash derive for
StringOwnedandIa5String(#1973) - Implement
DecodeValue/EncodeValue/TaggedforCow(#2093) - Add doc examples for
EncodeValue,Encode,DecodeValue,Decode,Error,ErrorKind,Tagged,FixedTag,IsConstructed,Tag,Length,Header(#2075, #2071, #2070, #2064, #2058, #2052, #2053, #2051) SequenceRef::new(#2224)
Changed
- Return
Tag::Integer.length_error()on empty ints (#1400) - Allow all blanket impls on
?Sizedtypes (#1451) - Refactor
Tag::peek(#1479) - Refactor
Header::peek(#1480) - Use
core::error::Error(#1553) - Use 2024 edition, bump MSRV to 1.85 (#1670)
- Bump
const-oidto v0.10 (#1676) - Reject zero lengths reads (#1716)
- Deprecate
TagNumber::new(#1727) - Use strict context-specific skipping condition (equal tag numbers only) (#1740)
- Const
Any::to_ref,BytesOwned::to_ref(#1797) - Return
ErrorKind::NoncanonicalinEXPLICITwhen primitive (#1818) - Use
read_nestedto check length ofIMPLICITtypes (#1739) - Simplify
From<&UintRef<'a>>forUint(#1840) - Make
ObjectIdentifier<MAX_SIZE>impls generic (#1851) - Extract
reader::position::Position(#1880) - Make
Readercloneable (#1883) - Simplify
Header::peekandTag::peek(#1886) - Improve constructed bit handling (#1919)
- Use fat pointer in
OctetStringRef, consolidate bytes/string modules, improve internal ref types (#1920, #1921, #1998, #2040) - Change constructor
Header::new, addHeader::with_length, tests for constructed octet string (#1931, #1930) - Simplify
der_cmpforLength(#1997) - Rename variable encoder -> writer and improve example (#2078)
- Have
PemReaderdecode toCow::Owned(#2094) - Only sort
SET OFtypes withEncodingRules::Der(#2219) SetOfandSequenceOfnow requireheaplessfeature (#2220, #2229)
Fixed
- Append in
Encode::encode_to_vec(#1760) - Derive optional OCTET/BIT STRING on
Option<&[u8]>(#1737) - X.680 tag order: compare class and number first (#1790)
- BMPString compatibility in derive macros (#1793)
Tag::peek_optionalfor 6-byte and 7+ byte tags (#1804)Header::peekfor 11-byte tag-lengths (#1828)- Panic in
value_cmp: addIterator::size_hint(#1830) - Error position tracking improvements (#1889, #2080, #2079)
- Bound
Decode(Value)::Erroroncore::error::Error(#2137) - Have
SetOf(Vec)::insertcheck for duplicates (#2217)
Removed
- Custom error types support to the
-
0.8.0-rc.1211 Feb 2026 pre-releaseNothing published for this version
-
0.8.0-rc.1111 Feb 2026 pre-releaseNothing published for this version
-
0.8.0-rc.1008 Nov 2025 pre-releaseNothing published for this version
-
0.8.0-rc.915 Sep 2025 pre-releaseNothing published for this version
-
0.8.0-rc.805 Aug 2025 pre-releaseNothing published for this version
-
0.8.0-rc.710 Jul 2025 pre-releaseNothing published for this version
-
0.8.0-rc.603 Jul 2025 pre-releaseNothing published for this version
-
0.8.0-rc.520 Jun 2025 pre-releaseNothing published for this version
-
0.8.0-rc.405 Jun 2025 pre-releaseNothing published for this version
-
0.8.0-rc.330 May 2025 pre-releaseNothing published for this version
-
0.8.0-rc.223 Apr 2025 pre-releaseNothing published for this version
-
0.8.0-rc.118 Aug 2024 pre-releaseNothing published for this version
-
0.8.0-rc.026 Jul 2024 pre-releaseNothing published for this version
-
0.8.0-pre.007 Jan 2024 pre-releaseNothing published for this version
-
0.8.0-pre07 Jan 2024 pre-releaseNothing published for this version
-
0.7.1018 Apr 2025 -
0.7.901 Apr 2024Release notes
Open source →Changed
- make sure der is comptatible with potential language breaking changed (backport #1374)
-
0.7.807 Aug 2023 -
0.7.729 Jun 2023 -
0.7.616 May 2023 -
0.7.525 Apr 2023 -
0.7.419 Apr 2023Release notes
Open source →Added
Changed
- Bump
hex-literaldependency to v0.4.1 ([#999]) - Bump
der_derivedependency to v0.7.1 (#1016)
- Bump
-
0.7.306 Apr 2023 -
0.7.204 Apr 2023 -
0.7.107 Mar 2023 -
0.7.027 Feb 2023 withdrawnRelease notes
Open source →Added
OwnedtoRef/RefToOwnedtraits; MSRV 1.65 (#797)OctetStringRef::decode_into(#817)IntandIntReftypes (#823)IndefiniteLengthtype (#830)Any::valueaccessor (#833)- Buffered PEM reader (#839)
OctetString::into_bytes(#845)- Blanket impls on
Box<T>forDecodeValue,EncodeValue, andSequence(#860)
Changed
- Rename
UIntRef=>UintRef(#786) - Replace use of
dyn Writerwithimpl Writer(#828) - Rename
AnyRef::decode_into->::decode_as(#829) - Bump
pem-rfc7468dependency to v0.7 (#894) - Rename
Encode::to_vec=>::to_der(#898)
Removed
-
0.6.106 Dec 2022Release notes
Open source →Added
- Rudimentary implementation of
TeletexStringandVideotexString(#691) - Impl
ValueOrdforFlagSet<T>andUIntRef(#723)
Changed
- Eliminate some boilerplate code by using
Deref(#697)
- Rudimentary implementation of
-
0.6.008 May 2022Release notes
Open source →Added
- Impl
ValueOrdforSetOfandSetOfVec(#362) SequenceReftype (#374)- Support for
SetOfsorting on heaplessno_stdtargets (#401) - Support for mapping
BitStringto/from aFlagSet(#412) DecodeOwnedmarker trait (#529)- Support for the ASN.1
REALtype (#346) DecodePemandEncodePemtraits (#571)DocumentandSecretDocumenttypes (#571)EncodeRef/EncodeValueRefwrapper types (#604)Writertrait (#605)Readertrait (#606)- Streaming on-the-fly
PemReaderandPemWriter(#618, #636) - Owned
BitString(#636) - Owned
AnyandOctetStringtypes (#640)
Changed
- Pass
HeadertoDecodeValue(#392) - Bump
const-oiddependency to v0.9 (#507) - Renamed
Decodable/Encodable=>Decode/Encode(#523) - Enable arithmetic, casting, and panic
clippylints (#556, #579) - Use
&mut dyn Writeras output forEncode::encodeandEncodeValue::encode_value(#611) - Bump
pem-rfc7468dependency to v0.6 (#620) - Use
Reader<'a>as input forDecode::decodeandDecodeValue::decode_value(#633) - Renamed
Any=>AnyRef(#637) - Renamed
BitString=>BitStringRef(#637) - Renamed
Ia5String=>Ia5StringRef(#637) - Renamed
OctetString=>OctetStringRef(#637) - Renamed
PrintableString=>PrintableStringRef(#637) - Renamed
Utf8String=>Utf8StringRef(#637) - Renamed
UIntBytes=>UIntRef(#637) - Renamed
Decoder=>SliceReader(#651) - Renamed
Encoder=>SliceWriter(#651)
Fixed
- Handling of oversized unsigned
INTEGERinputs (#447)
Removed
- Impl
-
0.6.0-pre.405 May 2022 pre-releaseNothing published for this version
-
0.6.0-pre.314 Mar 2022 pre-releaseNothing published for this version
-
0.6.0-pre.212 Mar 2022 pre-releaseNothing published for this version
-
0.6.0-pre.104 Feb 2022 pre-releaseNothing published for this version
-
0.6.0-pre.018 Jan 2022 pre-releaseNothing published for this version
-
0.5.117 Nov 2021 -
0.5.015 Nov 2021 withdrawnRelease notes
Open source →Added
- Support for
IMPLICITmodeCONTEXT-SPECIFICfields (#61) DecodeValue/EncodeValuetraits (#63)- Expose
DateTimethrough public API (#75) SEQUENCE OFsupport for[T; N](#90)SequenceOftype (#95)SEQUENCE OFsupport forVec(#96)Documenttrait (#117)- Basic integration with
timecrate (#129) Tag::NumericString(#132)- Support for unused bits to
BitString(#141) Decoder::{peek_tag, peek_header}(#142)- Type hint in
encodersequence` method (#147) Tag::Enumerated(#153)ErrorKind::TagNumberInvalid(#156)Tag::VisibleStringandTag::BmpString(#160)- Inherent constants for all valid
TagNumbers (#165) DerOrdandValueOrdtraits (#190)ContextSpecificReftype (#199)
Changed
- Make
ContextSpecificgeneric around an inner type (#60) - Removed
SetOftrait; renameSetOfArray=>SetOf(#97) - Rename
Messagetrait toSequence(#99) - Make
GeneralizedTime/UtcTimeintoDateTimenewtypes (#102) - Rust 2021 edition upgrade; MSRV 1.56 (#136)
- Replace
ErrorKind::TruncatedwithErrorKind::Incomplete(#143) - Rename
ErrorKind::UnknownTagMode=>ErrorKind::TagModeUnknown(#155) - Rename
ErrorKind::UnexpectedTag=>ErrorKind::TagUnexpected(#155) - Rename
ErrorKind::UnknownTag=>ErrorKind::TagUnknown(#155) - Consolidate
ErrorKind::{Incomplete, Underlength}(#157) - Rename
Tagged=>FixedTag; add newTaggedtrait (#189) - Use
DerOrdforSetOf*types (#200) - Switch
impl From<BitString> for &[u8]toTryFrom(#203) - Bump
crypto-bigintdependency to v0.3 (#215) - Bump
const-oiddependency to v0.7 (#216) - Bump
pem-rfc7468dependency to v0.3 (#217) - Bump
der_derivedependency to v0.5 (#221)
Removed
- Support for
-
0.5.0-pre.114 Oct 2021 pre-releaseNothing published for this version
-
0.4.501 Dec 2021 -
0.4.406 Oct 2021 -
0.4.315 Sep 2021 withdrawn -
0.4.214 Sep 2021 withdrawnRelease notes
Open source → -
0.4.108 Aug 2021 -
0.4.008 Jun 2021Release notes
Open source →Added
TagNumbertype- Const generic integer de/encoders with support for all of Rust's integer primitives
crypto-bigintsupportTagnumber helpersTag::octetErrorKind::ValuehelpersSequenceIter
Changed
- Bump
const-oidcrate dependency to v0.6 - Make
Tagstructured - Namespace ASN.1 types in
asn1module - Refactor context-specific field decoding
- MSRV 1.51
- Rename
big-uintcrate feature tobigint - Rename
BigUInttoUIntBytes - Have
Decoder::error()return anError
Removed
- Deprecated methods replaced by associated constants
-
0.3.524 May 2021Release notes
Open source →Added
- Helper methods for context-specific fields
ContextSpecificfield wrapper- Decoder position tracking for errors during
Any<'a>decoding
Fixed
Fromconversion forBitStringintoAny
-
0.3.416 May 2021 withdrawn -
0.3.315 Apr 2021 withdrawnRelease notes
Open source →Added
Lengthconstants
Changed
- Deprecate
const fnmethods replaced byLengthconstants
-
0.3.215 Apr 2021 withdrawn -
0.3.101 Apr 2021 withdrawn -
0.3.022 Mar 2021 withdrawnRelease notes
Open source →Added
- Impl
Decode/Encoded/TaggedforString Length::oneandLength::for_tlvSET OFsupport withSetOftrait andSetOfRef
Changed
- Rename
Decodable::from_bytes=>Decodable::from_der - Separate
sequenceandmessage - Rename
ErrorKind::Oid=>ErrorKind::MalformedOid - Auto-derive
Fromimpls for variants when derivingChoice - Make
Lengthuseu32internally - Make
Sequenceconstructor private - Bump
const_oidto v0.5 - Bump
der_deriveto v0.3
Removed
- Deprecated methods
BigUIntSize
- Impl
-
0.2.1028 Feb 2021Release notes
Open source →Added
- Impl
From<ObjectIdentifier>forAny
Changed
- Bump minimum
const-oiddependency to v0.4.4
- Impl
-
0.2.924 Feb 2021 -
0.2.822 Feb 2021 -
0.2.720 Feb 2021 withdrawn -
0.2.619 Feb 2021 withdrawn -
0.2.519 Feb 2021 withdrawn -
0.2.417 Feb 2021 withdrawn -
0.2.315 Feb 2021 withdrawn -
0.2.212 Feb 2021 withdrawn -
0.2.102 Feb 2021 withdrawn