Skip to content

Commit

Permalink
Use Blake for stealth addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
xevisalle committed Mar 27, 2024
1 parent fd8e8df commit 7170102
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/permutation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
//
// Copyright (c) DUSK NETWORK. All rights reserved.

use dusk_jubjub::{JubJubExtended, JubJubScalar};
use dusk_poseidon::sponge::truncated;
use dusk_jubjub::{JubJubAffine, JubJubExtended, JubJubScalar};

/// Hashes a JubJub's ExtendedPoint into a JubJub's Scalar using the poseidon
/// hash function
/// Hashes a JubJub's ExtendedPoint into a JubJub's Scalar using the JubJub's
/// hash to scalar function
pub fn hash(p: &JubJubExtended) -> JubJubScalar {
truncated::hash(&p.to_hash_inputs())
dusk_jubjub::Fr::hash_to_scalar(&JubJubAffine::from(p).to_bytes())
}

0 comments on commit 7170102

Please sign in to comment.