def CrKex.agree

bend-osdev-crypto@0.1.0.0 · kex.bend:40

import bend-osdev-crypto@0.1.0.0/kex.bend as Kex
import Base
import bend-osdev-bytes@0.1.0.0/bytes.bend as B
import bend-osdev-crypto@0.1.0.0/crypto.bend as Cr

40# The shared secret of one's secret key's bytes and the peer's public key's
41# bytes
42def CrKex.agree(~SK: Data, ~PK: Data, ~secret: B.Octets -> Result<&2, &2, Cr.CrError, SK>, ~pk_of: B.Octets -> Result<&2, &2, Cr.CrError, PK>, ~shared: SK -> PK -> Result<&2, &2, Cr.CrError, B.Octets>, sk: B.Octets, peer: B.Octets) -> Result<&2, &2, Cr.CrError, B.Octets>:
43  cr.kex.with(~SK, ~PK, ~shared, secret(sk), pk_of(peer))

Uses (4)

Used by (1)