View Source ecies_pubkey (ecies v1.1.0)
Summary
Functions
Equivalent to compress(PubKey, ecies:default_params()).
PublicKey
, which is a binary representation of an elliptic curve point. Returns the PublicKey
unchanged if it is already in compressed form.Decompresses the PublicKey
, which is a binary representation of an elliptic curve point.
Calculates a public key from the given PrivateKey
.
Calculates the multiplication of an elliptic curve point given by PublicKey
by a scalar given by PrivateKey
.
decompress/1
and decompress/2
functions.from_private/1
and from_private/2
functions.Functions
-spec compress(ecies:public_key()) -> ecies:public_key().
Equivalent to compress(PubKey, ecies:default_params()).
Compresses thePublicKey
, which is a binary representation of an elliptic curve point. Returns the PublicKey
unchanged if it is already in compressed form.
PublicKey
, which is a binary representation of an elliptic curve point. Returns the PublicKey
unchanged if it is already in compressed form.
-spec decompress(PublicKey :: ecies:public_key()) -> ecies:public_key().
Equivalent to decompress(PublicKey, ecies:default_params()).
Decompresses the PublicKey
, which is a binary representation of an elliptic curve point.
PublicKey
is already in decompressed form, it returns the PublicKey
unchanged.
-spec decompress(PublicKey :: ecies:public_key(), ecies:ecies_params()) -> ecies:public_key().
Decompresses the PublicKey
, which is a binary representation of an elliptic curve point.
PublicKey
is already in decompressed form, it returns the PublicKey
unchanged. This function is only valid for curves returned by the supports_decompress/0
function.See also: supports_decompress/0, supports_decompress/1.
-spec from_private(PrivateKey :: ecies:private_key()) -> ecies:public_key().
Equivalent to from_private(PrivateKey, ecies:default_params()).
Calculates a public key from the givenPrivateKey
.
-spec from_private(PrivateKey :: ecies:private_key(), ecies:ecies_params()) -> ecies:public_key().
Calculates a public key from the given PrivateKey
.
supports_from_private/0
.See also: supports_from_private/0, supports_from_private/1.
-spec mul(PublicKey :: ecies:public_key(), PrivateKey :: ecies:private_key()) -> ecies:public_key().
Equivalent to mul(PublicKey, PrivateKey, ecies:default_params()).
Calculates the multiplication of an elliptic curve point given byPublicKey
by a scalar given by PrivateKey
.
-spec mul(ecies:public_key(), ecies:private_key(), ecies:ecies_params()) -> ecies:public_key().
Calculates the multiplication of an elliptic curve point given by PublicKey
by a scalar given by PrivateKey
.
supports_decompress/0
.See also: supports_decompress/0, supports_decompress/1.
-spec point_bits(ecies:named_curve()) -> integer().
-spec supports_decompress() -> [ecies:named_curve()].
decompress/1
and decompress/2
functions.
-spec supports_decompress(NamedCurve :: ecies:named_curve()) -> boolean().
NamedCurve
is supported by the decompress/1
and decompress/2
functions.
-spec supports_from_private() -> [ecies:named_curve()].
from_private/1
and from_private/2
functions.
-spec supports_from_private(NamedCurve :: ecies:named_curve()) -> boolean().
NamedCurve
is supported by the from_private/1
and from_private/2
functions.