X25519.step: def of bend-collections@1.0.0.0 Import: import bend-collections@1.0.0.0/src/crypto/curve25519/x25519.bend as X25519 Lines 68-79 of bend-collections@1.0.0.0/src/crypto/curve25519/x25519.bend: https://jend.leeeet.dev/read.txt?path=bend-collections@1.0.0.0/src/crypto/curve25519/x25519.bend&start_line=68&end_line=79 import Base import bend-collections@1.0.0.0/src/crypto/curve25519/field.bend as F # one ladder step on the swapped pair (x2 : z2), (x3 : z3); c24 is a24 def step(+c24: List<&2, U32>, +x1: List<&2, U32>, +x2: List<&2, U32>, +z2: List<&2, U32>, +x3: List<&2, U32>, +z3: List<&2, U32>, kt: U32) -> St: +a = F.add(x2, z2) +aa = F.sq(a) +b = F.sub(x2, z2) +bb = F.sq(b) +e = F.sub(aa, bb) +c = F.add(x3, z3) +d = F.sub(x3, z3) +da = F.mul(d, a) +cb = F.mul(c, b) St{F.mul(aa, bb), F.mul(e, F.add(aa, F.mul(e, c24))), F.sq(F.add(da, cb)), F.mul(x1, F.sq(F.sub(da, cb))), kt} Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 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/curve25519/x25519.bend&name=St