X25519.len: def of bend-collections@1.0.0.0 Import: import bend-collections@1.0.0.0/src/crypto/curve25519/x25519.bend as X25519 Lines 88-96 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=88&end_line=96 import Base # the ladder's bit count, 8 len(k) - 1: 255 for a 32-byte scalar (RFC 7748 # `bits`). Taken from the scalar, it keeps the proof checker from unfolding # the 255 steps for an unknown scalar. def len(xs: List<&2, U32>) -> Nat: match xs: case Nil{}: 0n case Con{x, xt}: 1n+len(xt) Uses (3): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32