From fa73fb2b3154cd09fcec911c65f9a6d9444ec37b Mon Sep 17 00:00:00 2001 From: brycx Date: Thu, 17 Nov 2022 12:50:16 +0100 Subject: [PATCH] v0.6.4 --- CHANGELOG.md | 7 +++++++ Cargo.toml | 2 +- src/keys.rs | 3 +++ src/lib.rs | 2 +- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 98ace74..6e5b2de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +### 0.6.4 + +__Date:__ November 17, 2022. + +__Changelog:__ +- `AsymmetricSecretKey` now re-computes the public key from the secret seed to check if they match. If they don't an error is returned. Because we use `ed25519-compact` crate for Ed25519, if an all-zero seed is used, the creation of `AsymmetricSecretKey` will panic. + ### 0.6.3 __Date:__ October 15, 2022. diff --git a/Cargo.toml b/Cargo.toml index f4bcc99..ac2632a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pasetors" -version = "0.6.3" # Update html_root_url in lib.rs along with this. +version = "0.6.4" # Update html_root_url in lib.rs along with this. authors = ["brycx "] edition = "2018" description = "PASETO: Platform-Agnostic Security Tokens (in Rust)" diff --git a/src/keys.rs b/src/keys.rs index 25537d5..02699c2 100644 --- a/src/keys.rs +++ b/src/keys.rs @@ -63,6 +63,9 @@ pub struct AsymmetricSecretKey { impl AsymmetricSecretKey { /// Create a `AsymmetricSecretKey` from `bytes`. + /// + /// __PANIC__: If the version is V2 or V4, a panic will occur if an all-zero + /// secret seed is used. pub fn from(bytes: &[u8]) -> Result { V::validate_secret_key(bytes)?; diff --git a/src/lib.rs b/src/lib.rs index 2b18124..58e69f0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -183,7 +183,7 @@ unused_qualifications, overflowing_literals )] -#![doc(html_root_url = "https://docs.rs/pasetors/0.6.3")] +#![doc(html_root_url = "https://docs.rs/pasetors/0.6.4")] #![cfg_attr(docsrs, feature(doc_cfg))] #[macro_use]