aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/error.rs4
-rw-r--r--src/kem.rs2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/error.rs b/src/error.rs
index a79b8e0..4a5c204 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -14,8 +14,8 @@ pub enum Error {
/// Error returned when trying to derive the root identity, as there is no parent key for the
/// root.
- #[error("The supplied identity had no elements")]
- EmptyIdentity,
+ #[error("Cannot derive the root identity")]
+ DerivingRoot,
/// Error when the given ciphertext was malformed.
///
diff --git a/src/kem.rs b/src/kem.rs
index a8261b6..091247d 100644
--- a/src/kem.rs
+++ b/src/kem.rs
@@ -298,7 +298,7 @@ impl<M> HybridKem<M> {
{
let identity = self.mapper.map_identity(identity)?;
let Some((child, parent)) = identity.split_last() else {
- return Err(Error::EmptyIdentity);
+ return Err(Error::DerivingRoot);
};
let private_key = self
.hibe