- Bump MSRV to 1.58.
- Update dependencies.
- Fix bounds bug for label sorting.
- Helpers for ordering of fields in a
COSE_Key
:- Add
Label::cmp_canonical()
for RFC 7049 canonical ordering. - Add
CborOrdering
enum to specify ordering. - Add
CoseKey::canonicalize()
method to order fields.
- Add
- Add helper methods to create and verify detached signatures:
- Add
CoseSignBuilder
methodsadd_detached_signature
andtry_add_detached_signature
. - Add
CoseSign
methodverify_detached_signature
. - Add
CoseSign1Builder
methodscreate_detached_signature
andtry_create_detached_signature
. - Add
CoseSign1
methodverify_detached_signature
.
- Add
- Implement CBOR conversion traits for
ciborium::value::Value
. - Update
ciborium
dependency.
- Add non-default
std
feature that turns onimpl Error for CoseError
. - Add
cwt::ClaimsSetBuilder::private_claim
method. - Update documentation for existing encryption methods to make it clear that they only support AEAD encryption.
- Add
CoseKeyBuilder
methodskty
,key_type
andnew_okp_key
.
- Add basic CWT support in
cwt
module, via theClaimsSet
type.
- Implement
Display
forCoseError
. - Fix
Cargo.toml
to indicate reliance onalloc
feature ofciborium-io
. - Make
AsCborValue
trait public.
- Change to use
ciborium
as CBOR library. Breaking change with many knock-on effects:- Re-export
ciborium
ascoset::cbor
(rather thansk-cbor
). - Use
ciborium
'sValue
type rather thansk-cbor
's version. - Change
CoseError
to no longer wrapsk-cbor
errors. - Drop
derive
ofEq
for data types (ciborium
supports float values, which are inherently non-Eq
) - Add
#[must_use]
attributes to builder methods. - Update MSRV to 1.56.0, as
ciborium
isedition=2021
- Re-export
- Use new
ProtectedHeader
type for protected headers (breaking change). This variant ofHeader
preserves any originally-parsed data, so that calculations (signatures, decryption, etc.) over the data can use the bit-for-bit wire data instead of a reconstituted (and potentially different) version. - Add more specific error cases to
CoseError
(breaking change):- Use new
OutOfRangeIntegerValue
error when an integer value is too large for the representation used in this crate. - Use new
DuplicateMapKey
error when a CBOR map contains duplicate keys (and is thus invalid). - Extend
DecodeFailed
error to include the underlyingciborium::de::Error
value. - Use new
ExtraneousData
error when data remains after reading a CBOR value. - Rename
UnexpectedType
error toUnexpectedItem
to reflect broader usage than type.
- Use new
- Add a crate-specific
Result
type whoseE
field defaults toCoseError
.
- Change to use
sk-cbor
as CBOR library, due to deprecation ofserde-cbor
. Breaking change with many knock-on effects:- Re-export
sk-cbor
ascoset::cbor
. - Use
sk-cbor
'sValue
type rather thanserde-cbor
's version. - Change encoding methods to consume
self
. - Change encoding methods to be fallible.
- Move to be
no_std
(but still usingalloc
) - Add
CoseError
error type and use throughout. - Use
Vec
of pairs notBTreeMap
s for CBOR map values. - Use
i64
noti128
for integer values throughout. - Drop use of
serde
'sSerialize
andDeserialize
traits; instead… - Add
CborSerializable
extension trait for conversion to/from bytes. - Drop
from_tagged_reader
/to_tagged_writer
methods fromTaggedCborSerializable
trait. - Derive
Debug
for builders. - Convert
CoseKeySet
to a newtype, and add standard traits.
- Re-export
- Add fallible variants of builder methods that invoke closures (#20):
CoseRecipientBuilder::try_create_ciphertext()
CoseEncryptBuilder::try_create_ciphertext()
CoseEncrypt0Builder::try_create_ciphertext()
CoseMacBuilder::try_create_tag()
CoseMac0Builder::try_create_tag()
CoseSignBuilder::try_add_created_signature()
CoseSign1Builder::try_create_signature()
- Upgrade dependencies.
- Make
KeyType
andKeyOperation
public. - Upgrade dependencies.
- Initial version, using
serde-cbor
as CBOR library.