def shared_of
import bend-collections-laws-crypto@1.0.0.0/src/crypto/kex.bend as Keximport Base
import bend-collections-laws-crypto@1.0.0.0/src/crypto/curve25519/field.bend as F
58def shared_of(m: Maybe<&2, List<&2, U32>>) -> Maybe<&2, List<&2, U32>>:
59 match m:
60 case None{}:
61 None{}
62 case Some{+ss}:
63 nonzero(ss, U32.is_eq(F.sum_all(ss, 0), 0))
Uses (6)
Used by (4)
- bend-collections-laws-crypto@1.0.0.0/src/crypto/kex:shared_secret
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/curve25519/proof:shared_by
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/curve25519/proof:kex_reject
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/curve25519/proof:kex_shared