Skip to content

Commit

Permalink
Merge pull request #24 from dusk-network/vlopes11/10-dhke
Browse files Browse the repository at this point in the history
DHKE should return canonical EC point
  • Loading branch information
vlopes11 authored Jul 28, 2020
2 parents 11a1061 + 35edeb1 commit fcc40f2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ homepage = "https://github.com/dusk-network/jubjub"
license = "MIT/Apache-2.0"
name = "dusk-jubjub"
repository = "https://github.com/dusk-network/jubjub"
version = "0.3.3"
version = "0.3.4"
keywords = ["cryptography", "jubjub", "zk-snarks", "ecc", "elliptic-curve"]
categories =["algorithms", "cryptography", "science"]
edition = "2018"
Expand Down
4 changes: 4 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.3.4
### Fix
- Fix `dhke` to return an elliptic curve point instead of scalar.

# 0.3.3
### Fix
- Fix `GENERATOR_NUMS` value and add tests to check it's correct.
Expand Down
5 changes: 2 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1504,7 +1504,6 @@ fn test_serialization_consistency() {
}

/// Compute a shared secret `secret · public` using DHKE protocol
pub fn dhke(secret: &Fr, public: &ExtendedPoint) -> Fq {
let shared: AffinePoint = public.mul(secret).into();
shared.get_y()
pub fn dhke(secret: &Fr, public: &ExtendedPoint) -> AffinePoint {
public.mul(secret).into()
}

0 comments on commit fcc40f2

Please sign in to comment.