X25519.cs_fst: def of bend-collections-laws-crypto@1.0.0.0 Import: import bend-collections-laws-crypto@1.0.0.0/spec/crypto/curve25519/x25519.bend as X25519 Lines 78-85 of bend-collections-laws-crypto@1.0.0.0/spec/crypto/curve25519/x25519.bend: https://jend.leeeet.dev/read.txt?path=bend-collections-laws-crypto@1.0.0.0/spec/crypto/curve25519/x25519.bend&start_line=78&end_line=85 import Base # cswap(swap, a, b), RFC 7748: (a, b) when swap is 0, (b, a) when it is 1; # cs_fst and cs_snd are its two components def cs_fst(swap: Nat, a: Nat, b: Nat) -> Nat: match swap: case 0n: a case 1n+q: b Uses (1): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat