def cs_fst
import bend-collections-laws-crypto@1.0.0.0/spec/crypto/curve25519/x25519.bend as X25519import Base
78# cswap(swap, a, b), RFC 7748: (a, b) when swap is 0, (b, a) when it is 1;
79# cs_fst and cs_snd are its two components
80def cs_fst(swap: Nat, a: Nat, b: Nat) -> Nat:
81 match swap:
82 case 0n:
83 a
84 case 1n+q:
85 b
Uses (1)
Used by (8)
- bend-collections-laws-crypto@1.0.0.0/spec/crypto/curve25519/x25519:finish
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/curve25519/ladder:c_fst
- bend-collections-laws-crypto@1.0.0.0/spec/crypto/curve25519/x25519:rung
- bend-collections-laws-crypto@1.0.0.0/spec/crypto/ed25519:dec_fin
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/curve25519/ladder:finish_rel
- …