biscuit
A library to work with Javascript Object Signing and Encryption(JOSE), including JSON Web Tokens (JWT), JSON Web Signature (JWS) and JSON Web Encryption (JWE).
0.8.0
6.1M downloads/mo
#4110 most downloaded on crates.io
lawliet89/biscuit
What this package is like to depend on
Last release 4 months ago
05 Apr 2026
Ships unpredictably
gaps range from 1 weeks to 2.4 years
Nearly every release is documented
notes for 19 of 19 stable releases
1 version withdrawn
withdrawn after publishing
9 years old
23 releases · first in 2017
1 release in the last 12 months
see the full history below
Release timeline
23 releases · Mar 2017 to Apr 2026Releases
latest 23-
0.8.005 Apr 2026Release notes
Open source →0.8.0
Breaking Changes
- Bump Minimum Supported Rust Version (MSRV) to
1.66.0(#323)
Enhancements & Fixes
Release notes
Open source → - Bump Minimum Supported Rust Version (MSRV) to
-
0.7.010 Nov 2023Release notes
Open source →What's Changed
- Add Support for P-256 by @Wicpar in #310
- Fix a few typos by @striezel in #311
- Replace unmaintained actions-rs/* actions in CI workflow by @striezel in #312
- Update ring version to 0.17.5 by @olger in #313
New Contributors
- @Wicpar made their first contribution in #310
- @striezel made their first contribution in #311
- @olger made their first contribution in #313
Full Changelog: v0.6.0...v0.7.0
-
0.6.029 Mar 2023Release notes
Open source →0.6.0
Breaking Changes
- Fix build errors and bump MSRV by @lawliet89 in #308
jws::RegisteredHeaderfieldweb_key
is now of typeOption<jwk::JWK<Empty>>instead ofOption<String>. If you were not using JWKs,
continue setting the value toNonewill not breaking. If you were previously serializing your
JWK as JSON strings, you will now have to deserialize them intojwk::JWK<Empty>. Please raise
issues if you encounter any bugs. [#189]
Enhancements
- Add support for Flattened JWS [#190]
- Added more documentation for using OpenSSL to manipulate keys [#179]
- Derive Clone for
JWKSetby @lawliet89 in #204 - Lints fixes
New Contributors
- @anlumo made their first contribution in #179
- @dependabot made their first contribution in #215
- @akhramov made their first contribution in #293
Full Changelog: v0.5.0...v0.6.0
Release notes
Open source →Breaking Changes
- Fix build errors and bump MSRV by @lawliet89 in https://github.com/lawliet89/biscuit/pull/308
jws::RegisteredHeaderfieldweb_keyis now of typeOption<jwk::JWK<Empty>>instead ofOption<String>. If you were not using JWKs, continue setting the value toNonewill not breaking. If you were previously serializing your JWK as JSON strings, you will now have to deserialize them intojwk::JWK<Empty>. Please raise issues if you encounter any bugs. [#189]
Enhancements
-
0.6.0-beta124 Feb 2021 pre-releaseRelease notes
Open source →0.6.0-beta1 (2021-02-24)
Breaking Changes
jws::RegisteredHeaderfieldweb_key
is now of typeOption<jwk::JWK<Empty>>instead ofOption<String>. If you were not using JWKs,
continue setting the value toNonewill not breaking. If you were previously serializing your
JWK as JSON strings, you will now have to deserialize them intojwk::JWK<Empty>. Please raise
issues if you encounter any bugs. [#189]
Enhancements
-
0.5.017 Nov 2020Release notes
Open source →The only changes since
v0.5.0-beta2are dependencies upgrades and setting a higher MSRV.0.5.0 (2020-11-17)
These are changes since
v0.4.2.Breaking Changes
-
MSRV is now Rust 1.41 due to changes in
Cargo.lockformat.
See announcement. -
The
jwk::AlgorithmParameters::OctetKeyenum variant is now a newtype variant which takes a
jwk::OctetKeyParametersstruct for its parameters. To migrate your existing code, you can do
the following-jwk::AlgorithmParameters::OctetKey { +jwk::AlgorithmParameters::OctetKey(jwk::OctetKeyParameters { value: key, key_type: Default::default(), -} +})
(#125)
-
jws::Compact::decode_with_jwksnow supports JWK without analgspecified. However, a new
parameter to specify an expected parameter had to be added to support this use case. This is to
mitigate against issues like
this.
Existing usage of JWK with thealgspecified can simply add aNoneas the second parameter.
(#130) -
Remove
StringOrUribecause it was hard to get theUritype working properly. Replace all usage
ofStringOrUriwithStrings instead. (#131)
Enhancements
- Add new
jwk::AlgorithmParameters::OctetKeyPairvariant to support (de)serializingOKP
key types. (#125) - Add support for JWK thumbprints (RFC 7638) (#156)
- Allow verifying tokens with a
keypairasSecret
(#132)
Bug Fixes
- Fix computing Aad per the RFC by doing base64 encoding
(#147)
Release notes
Open source →Breaking Changes
-
MSRV is now Rust 1.41 due to changes in
Cargo.lockformat. See announcement. -
The
jwk::AlgorithmParameters::OctetKeyenum variant is now a newtype variant which takes ajwk::OctetKeyParametersstruct for its parameters. To migrate your existing code, you can do the following-jwk::AlgorithmParameters::OctetKey { +jwk::AlgorithmParameters::OctetKey(jwk::OctetKeyParameters { value: key, key_type: Default::default(), -} +})(#125)
-
jws::Compact::decode_with_jwksnow supports JWK without analgspecified. However, a new parameter to specify an expected parameter had to be added to support this use case. This is to mitigate against issues like this. Existing usage of JWK with thealgspecified can simply add aNoneas the second parameter. (#130) -
Remove
StringOrUribecause it was hard to get theUritype working properly. Replace all usage ofStringOrUriwithStrings instead. (#131)
Enhancements
- Add new
jwk::AlgorithmParameters::OctetKeyPairvariant to support (de)serializingOKPkey types. (#125) - Add support for JWK thumbprints (RFC 7638) (#156)
- Allow verifying tokens with a
keypairasSecret(#132)
Bug Fixes
- Fix computing Aad per the RFC by doing base64 encoding (#147)
-
-
0.5.0-beta222 Jul 2020 pre-releaseRelease notes
Open source →0.5.0-beta2 (2020-07-22)
The changes below are since
0.5.0-beta1Breaking Changes
- Remove
StringOrUribecause it was hard to get theUritype working properly. Replace all usage
ofStringOrUriwithStrings instead. (#131)
Enhancements
- Add support for JWK thumbprints (RFC 7638) (#156)
- Allow verifying tokens with a
keypairasSecret
(#132)
Bug Fixes
- Fix computing Aad per the RFC by doing base64 encoding
(#147)
- Remove
-
0.5.0-beta129 Apr 2020 pre-releaseRelease notes
Open source →0.5.0-beta1 (2020-04-29)
Breaking Changes
-
The
jwk::AlgorithmParameters::OctetKeyenum variant is now a newtype variant which takes a
jwk::OctetKeyParametersstruct for its parameters. To migrate your existing code, you can do
the following-jwk::AlgorithmParameters::OctetKey { +jwk::AlgorithmParameters::OctetKey(jwk::OctetKeyParameters { value: key, key_type: Default::default(), -} +})
(#125)
-
jws::Compact::decode_with_jwksnow supports JWK without analgspecified. However, a new
parameter to specify an expected parameter had to be added to support this use case. This is to
mitigate against issues like
this.
Existing usage of JWK with thealgspecified can simply add aNoneas the second parameter.
(#130)
Enhancements
- Add new
jwk::AlgorithmParameters::OctetKeyPairvariant to support (de)serializingOKP
key types. (#125)
-
-
0.4.207 Jan 2020Release notes
Open source →0.4.2 (2020-01-07)
Enhancements
- Add
jws::Compact::decode_with_jwksmethod to decode a JWT with JWKs (#124)
Internal Changes
- Replace
lazy_staticwithonce_cell(#123)
Release notes
Open source →Enhancements
- Add
jws::Compact::decode_with_jwksmethod to decode a JWT with JWKs (#124)
Internal Changes
- Replace
lazy_staticwithonce_cell(#123)
- Add
-
0.4.106 Nov 2019 -
0.4.006 Nov 2019Release notes
Open source →0.4.0 (2019-11-06)
There are no new feature except for some breaking changes to correct some errors.
Breaking Changes
OctetMisspellingAll misspelling of
octecthave been corrected tooctet. The following
types have been renamed and the old misspelt version is no longer available.To migrate, you can simply do a case sensitive replace of
OctectwithOctetand
octectwithoctetin your code.The following types have been renamed:
jwk::KeyType::Octect🡒jwk::KeyType::Octetjwk::KeyType::OctectKeyPair🡒jwk::KeyType::OctetKeyPairjwk::OctectKeyType🡒jwk::OctetKeyTypejwk::OctectKeyType::Octect🡒jwk::OctetKeyType::Octetjwk::AlgorithmParameters::OctectKey🡒jwk::AlgorithmParameters::OctetKey
The following functions have been renamed:
jwk::JWK::new_octect_key🡒jwk::JWK::new_octet_keyjwk::JWK::octect_key🡒jwk::JWK::octet_keyjwk::AlgorithmParameters::octect_key🡒jwk::AlgorithmParameters::octet_key
Clippy
trivially_copy_pass_by_reflintThis release also fixes the
Clippytrivially_copy_pass_by_reflint
by modifying function arguments that would have taken a reference of a 1 byte value that
implementsCopyto take the value of itself. This mainly affects all struct methods
of the following typesThere should be no need to modify your code for this because the types are
Copy.jwa::SignatureAlgorithmjwa::KeyManagementAlgorithmjwa::ContentEncryptionAlgorithmjwk::KeyType
Release notes
Open source →There are no new feature except for some breaking changes to correct some errors.
Breaking Changes
OctetMisspellingAll misspelling of
octecthave been corrected tooctet. The following types have been renamed and the old misspelt version is no longer available.To migrate, you can simply do a case sensitive replace of
OctectwithOctetandoctectwithoctetin your code.The following types have been renamed:
jwk::KeyType::Octect🡒jwk::KeyType::Octetjwk::KeyType::OctectKeyPair🡒jwk::KeyType::OctetKeyPairjwk::OctectKeyType🡒jwk::OctetKeyTypejwk::OctectKeyType::Octect🡒jwk::OctetKeyType::Octetjwk::AlgorithmParameters::OctectKey🡒jwk::AlgorithmParameters::OctetKey
The following functions have been renamed:
jwk::JWK::new_octect_key🡒jwk::JWK::new_octet_keyjwk::JWK::octect_key🡒jwk::JWK::octet_keyjwk::AlgorithmParameters::octect_key🡒jwk::AlgorithmParameters::octet_key
Clippy
trivially_copy_pass_by_reflintThis release also fixes the Clippy
trivially_copy_pass_by_reflint by modifying function arguments that would have taken a reference of a 1 byte value that implementsCopyto take the value of itself. This mainly affects all struct methods of the following typesThere should be no need to modify your code for this because the types are
Copy.jwa::SignatureAlgorithmjwa::KeyManagementAlgorithmjwa::ContentEncryptionAlgorithmjwk::KeyType
-
0.3.130 Jul 2019Release notes
Open source →There are no new features except for ring dependency changes.
- biscuit now depends on ring 0.16.5
- Changed internal usage of ring's AEAD APIs
- Removed
Compact::to_string.Compactnow implementsDisplaywhich has a blanket implementation ofstd::string::ToString. Use that instead. This should not break any users becausestd::string::ToStringis used by thestdprelude.
-
0.3.019 Jul 2019 withdrawnRelease notes
Open source →There are no new features or API changes except for ring dependency changes.
Breaking Changes
- Minimum supported Rust version is now 1.36 due to Ring's usage of newer Rust features
- biscuit now depends on ring 0.16
-
0.2.011 Mar 2019Release notes
Open source →- Minimum Rust 1.31 is needed for editions support on dependencies
- biscuit now depends on ring 0.14
-
0.1.118 Mar 2019 -
0.1.029 Oct 2018Release notes
Open source →Breaking Change
- Minimum Rust 1.27.2 supported. Older versions might build, but this might not be supported.
- Ring 0.13.2 minimum required. This breaks with other libraries using any other versions
Features
- Add ECDSA support (https://github.com/lawliet89/biscuit/pull/95)
- Additional claims validation (https://github.com/lawliet89/biscuit/pull/99)
- RSA signature validation with only the exponent and modulus (https://github.com/lawliet89/biscuit/pull/100)
-
0.0.814 Feb 2018Release notes
Open source →There are breaking changes in this release:
ringwas upgraded to 0.12. Until #619 lands, this crate will now be incompatible with all other crates that uses a different version ofring.jwa::rngis no longer public- #84 All AES GCM encryption now requires a user provided nonce. See this example.
SignatureAlgorithm::verifynow returnsResult<(), Error>instead ofResult<bool, Error>.- Bumped various dependencies, although they should not break any user facing code:
lazy_static,data-encoding.
Other non-breaking changes include:
- New helper
function in
JWKSetto find key by Key ID - New helper functions in
jws::Compactto retrieve parts without signature verification.
-
0.0.719 Jul 2017Release notes
Open source →There are no breaking changes in this release.
Added a convenience
validate_timesfunction tojwe::Compactandjws::Compactthat allows quick temporal validation if their payloads areClaimSets. -
0.0.613 Jul 2017Release notes
Open source →This release adds no new features and breaks no API. It simply bumps
ringto 0.11. -
0.0.505 Jul 2017Release notes
Open source →This release adds no new features and breaks no API. It simply bumps Chrono and Ring to their newest version.
-
0.0.415 May 2017Release notes
Open source →Update dependency to
ring0.9.4 so that different versions ofringcan no longer be used in a Rust build.There are no new features or API change.
-
0.0.323 Apr 2017Release notes
Open source →Minor bug fix release. Fixed incorrect ECDSA signature verification.
Thanks to @hobofan.
-
0.0.223 Apr 2017Release notes
Open source →This is a major breaking release. Not all algorithms, verification, and features are supported yet.
New Features
- JSON Web Encryption support (JWE)
- JSON Web Key (JWK)
- Replaced
rustc_serializewithserde - Support custom headers for JWS
- Added a
biscuit::Emptyconvenice empty struct that users can plug into type parameters when they do not need them, such as the type parameter of custom headers. - Added
SingleOrMultipleandStringOrUrienums to better represent the types of values that the JOSE RFCs allow.
Breaking Changes
biscuit::JWTis no longer a struct. It is now a type alias forjws::Compact, which according to the RFC, is the compact serialization of a JSON Web Signature (JWS).- Moved
biscuit::Algorithmtobiscuit::jwa::SignatureAlgorithmto better reflect its use. - Various internal traits that should be implementation detail and opaque to users of
biscuithave been changed, added, or removed.
-
0.0.117 Mar 2017Release notes
Open source →This is an initial release after forking from Version 1.1.6 of
Keats/rust-jwt.- Added RSA signing and verification
- Added ECDSA verification (signing support is pending addition of support in
ring)