MCPcopy Create free account
hub / github.com/docknetwork/crypto / decrypt

Method decrypt

utils/src/elgamal.rs:109–111  ·  view source on GitHub ↗
(&self, secret_key: &G::ScalarField)

Source from the content-addressed store, hash-verified

107 }
108
109 pub fn decrypt(&self, secret_key: &G::ScalarField) -> G {
110 (self.eph_pk.mul(secret_key).neg() + self.encrypted).into_affine()
111 }
112}
113
114/// Hashed Elgamal. Encryption of a field element `m`. The shared secret is hashed to a field element

Callers

nothing calls this directly

Calls 2

mulMethod · 0.80
mapMethod · 0.80

Tested by

no test coverage detected