Skip to content

in slash(), id_commitment is calculated wrong? #4

@bkomuves

Description

@bkomuves

It seems to me, that when computing id_commitment in slash():

let id_commitment = hash_pair(&identity_secret, &[0u8; 32]);

to be compatible with Zerokit, you would need to use compress_1() instead of hash_pair() (which in turn uses compress_2()).

Cf.:

https://github.com/vacp2p/zerokit/blob/3d9ff51d934a7abaabd749eb2c052d594371c369/rln/src/protocol/keygen.rs#L52

let id_commitment = poseidon_hash(&[identity_secret])?;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions