Point.double: def of bend-collections@1.0.0.0 Import: import bend-collections@1.0.0.0/src/crypto/ed25519/point.bend as Point Lines 80-92 of bend-collections@1.0.0.0/src/crypto/ed25519/point.bend: https://jend.leeeet.dev/read.txt?path=bend-collections@1.0.0.0/src/crypto/ed25519/point.bend&start_line=80&end_line=92 import Base import bend-collections@1.0.0.0/src/crypto/curve25519/field.bend as F # RFC 8032 5.1.4, doubling def double(p: Pt) -> Pt: match p: case Pt{+x1, +y1, +z1, t1}: +a = F.sq(x1) +b = F.sq(y1) +zz = F.sq(z1) +cc = F.add(zz, zz) +h = F.add(a, b) +e = F.sub(h, F.sq(F.add(x1, y1))) +g = F.sub(a, b) +f = F.add(cc, g) Pt{F.mul(e, f), F.mul(g, h), F.mul(f, g), F.mul(e, h)} Uses (5): https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/curve25519/field.bend&name=add https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/curve25519/field.bend&name=mul https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/curve25519/field.bend&name=sq https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/curve25519/field.bend&name=sub https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/ed25519/point.bend&name=Pt