From 2d144e7bf28a550ccbe7bffe104c9d80753d6524 Mon Sep 17 00:00:00 2001 From: Ignacio Hagopian Date: Mon, 4 Dec 2023 18:11:59 -0300 Subject: [PATCH] fix typo Signed-off-by: Ignacio Hagopian --- banderwagon/element.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/banderwagon/element.go b/banderwagon/element.go index ca14a32..fb13382 100644 --- a/banderwagon/element.go +++ b/banderwagon/element.go @@ -245,14 +245,14 @@ func (p *Element) SetBytesUncompressed(buf []byte, trusted bool) error { x.SetBytes(buf[:coordinateSize]) var y fp.Element - // subgroup check + // point in curve & subgroup check if !trusted { point := bandersnatch.GetPointFromX(&x, true) if point == nil { return fmt.Errorf("point not in the curve") } - calcualtedYBytes := point.Y.Bytes() - if !bytes.Equal(calcualtedYBytes[:], buf[coordinateSize:]) { + calculatedYBytes := point.Y.Bytes() + if !bytes.Equal(calculatedYBytes[:], buf[coordinateSize:]) { return fmt.Errorf("provided Y coordinate doesn't correspond to X") } y = point.Y