Assessment reports>Session Token>Threat Model>Function: hashToG2()

Function: hashToG2()

The function maps a uint256 value to a point in the group . To fulfill BLS security, this function should be collision-resistant and not reveal the discrete logarithm of the resulting point.

Inputs

  • h

    • Validation: No validation.

    • Impact: Map a value to .

Branches and code coverage (including function calls)

Intended branches

Function call analysis

  • mapToG2(h)

    • External/Internal? Internal.

    • Argument control: The arguments are controllable by the caller, but the value is usually a hash.

    • Impact: Maps a value to a point on the curve.

  • ECTwistMulByCofactor(map.X[1], map.X[0], map.Y[1], map.Y[0])

    • External/Internal? Internal.

    • Argument control: No.

    • Impact: Clear the cofactor to have a point in .

Zellic © 2024Back to top ↑