- Documentation
- Reference manual
- Packages
- SWI-Prolog SSL Interface
- library(crypto): Cryptography and authentication library

- SWI-Prolog SSL Interface

`N`is the number of iterations that are performed. If this option is not specified, a number of iterations is used such that the probability of a false positive is at most 2

`^`

(-80).

### 3.10 Elliptic curves

This library provides functionality for reasoning over *elliptic
curves*. Elliptic curves are represented as opaque objects. You
acquire a handle for an elliptic curve via crypto_name_curve/2.

A *point* on a curve is represented by the Prolog term `point(X, Y)`

,
where `X` and `Y` are integers that represent the
point's affine coordinates.

The following predicates are provided for reasoning over elliptic curves:

- [det]
**crypto_name_curve**(`+Name, -Curve`) - Obtain a handle for a
*named*elliptic curve.`Name`is an atom, and`Curve`is unified with an opaque object that represents the curve. Currently, only elliptic curves over prime fields are supported. Examples of such curves are`prime256v1`

and`secp256k1`

.If you have OpenSSL installed, you can get a list of supported curves via:

$ openssl ecparam -list_curves

- [det]
**crypto_curve_order**(`+Curve, -Order`) - Obtain the order of an elliptic curve.
`Order`is an integer, denoting how many points on the curve can be reached by multiplying the curve's generator with a scalar. - [det]
**crypto_curve_generator**(`+Curve, -Point`) `Point`is the*generator*of the elliptic curve`Curve`.- [det]
**crypto_curve_scalar_mult**(`+Curve, +N,`