Skip to content

[Issue] Fix: use blake3's native XOF API in nym-kkt so external consumers compile #6862

Description

@IRClichtR

Describe the issue
nym-kkt 1.21.0 calls blake3's XOF through the digest::ExtendableOutput trait
imported from nym_crypto::hmac::hmac::digest. In an external consumer's graph
that import resolves to digest 0.8.1, while nym_crypto::blake3::Hasher
implements digest 0.11.3's trait. The two are semver-incompatible, so
finalize_xof_into is not visible and the crate fails to compile
(error[E0599]). The monorepo doesn't hit this because its workspace lock pins
digest to one version.

Steps to Reproduce
import nym_sdk and nym_bin_common in the same external Cargo.toml

Which area of Nym were you using?
1.21.0

Suggested fix

in nym-kkt/src/masked_byte.rs:

- use nym_crypto::{blake3, hmac::hmac::digest::ExtendableOutput};
+ use nym_crypto::blake3;

Line 40:

- hasher.finalize_xof_into(&mut output);
+ hasher.finalize_xof().fill(&mut output);

Line 69:

- t_hasher.finalize_xof_into(&mut buf);
+ t_hasher.finalize_xof().fill(&mut buf);

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingbug-needs-triageA bug that needs discussing and triageneeds-triageqaQuality Assurance

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions