MCPcopy Create free account
hub / github.com/ElementsProject/elements / sqr

Method sqr

src/minisketch/tests/pyminisketch.py:115–117  ·  view source on GitHub ↗

Square x in GF(2^field_size).

(self, x)

Source from the content-addressed store, hash-verified

113 return ret
114
115 def sqr(self, x):
116 """Square x in GF(2^field_size)."""
117 return self.mul(x, x)
118
119 def inv(self, x):
120 """Compute the inverse of x in GF(2^field_size)."""

Callers 4

field_size_testMethod · 0.95
poly_sqrFunction · 0.80
addMethod · 0.80
decodeMethod · 0.80

Calls 1

mulMethod · 0.95

Tested by

no test coverage detected