Struct libsecp256k1_rs::PublicKey[][src]

pub struct PublicKey(_);

Public key on a secp256k1 curve.

Methods

impl PublicKey
[src]

Create a public key from a private key by performing P = k.G

Create a public key from a compressed public key. Remember that Public keys are just points on the elliptic curve, so you can derive the full point by supplying the x-coordinate and the parity. By convention, compressed public keys hold the parity in the first byte and the x-coordinate in the next 32 bytes.

Create a PublicKey from 65-byte binary representation of a public key. The first byte is a prefix (must be 4,6, or 7). The next 32 bytes represent the x-coordinate; and the last 32 bytes represent thew y-coordinate.

Return the 65-bit serialization of the public key. The first byte is always 0x04 to represent an uncompressed public key.

Return the 33-bit serialization of the compressed public key.

Trait Implementations

impl Debug for PublicKey
[src]

Formats the value using the given formatter. Read more

impl Clone for PublicKey
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Copy for PublicKey
[src]

impl Eq for PublicKey
[src]

impl PartialEq for PublicKey
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Into<Affine> for PublicKey
[src]

Performs the conversion.

impl Add for PublicKey
[src]

The resulting type after applying the + operator.

Performs the + operation.

impl Sub for PublicKey
[src]

The resulting type after applying the - operator.

Performs the - operation.

impl Mul<PublicKey> for SecretKey
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl Combinable for PublicKey
[src]

Auto Trait Implementations

impl Send for PublicKey

impl Sync for PublicKey