8.16.0.1
secp256k1
1 Field
(require secp256k1/field) | package: secp256k1 |
struct
(struct field-element (value field))
value : integer? field : integer?
An integer over a finite field.
procedure
(field-to-string field-val) → string?
field-val : field-element?
Display a field element (only the value, not the field number)
procedure
(string-to-field value-hex field) → field-element?
value-hex : string? field : integer?
Return a field-element from a hexadecimal string and a field number
Return true if 0 <= value < field
procedure
(add-element fe1 fe2) → field-element?
fe1 : field-element? fe2 : field-element?
Return fe1 + fe2
procedure
(sub-element fe1 fe2) → field-element?
fe1 : field-element? fe2 : field-element?
Return fe1 - fe2
procedure
(rmul-element fe1 scalar) → field-element?
fe1 : field-element? scalar : integer?
Return fe1 * scalar
procedure
(mul-element fe1 fe2) → field-element?
fe1 : field-element? fe2 : field-element?
Return fe1 * fe2
procedure
(pow-element fe1 exponent) → field-element?
fe1 : field-element? exponent : integer?
Return fe1 ^ scalar
procedure
(truediv-element fe1 fe2) → field-element?
fe1 : field-element? fe2 : field-element?
Return fe1 / fe2