8000 The `pairing` Points are not supporting both uncompressed and compressed forms when Unmarshmalling. · Issue #573 · dedis/kyber · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
The pairing Points are not supporting both uncompressed and compressed forms when Unmarshmalling. #573
Open
@AnomalRoil

Description

@AnomalRoil

Currently it seems some curves are using compressed, while other are using uncompressed format, but since the field elements are not exported, one cannot do compressed decoding manually if they want to.

E.g. bn254 is using uncompressed formatting, and there is no easy way to do decoding from compressed points using kyber at the moment.

We should support both compressed and uncompressed formats in our UnmarshalBinary implementation, IMO.

Typically encoding is dictated by the first 2 most significant bits in the binary encoding:

//	00 -> uncompressed
//	10 -> compressed, use smallest lexicographically square root of Y^2
//	11 -> compressed, use largest lexicographically square root of Y^2
//	01 -> compressed infinity point
//	the "uncompressed infinity point" will just have 00 (uncompressed) followed by zeroes (infinity = 0,0 in affine coordinates)

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

      0