> Aztec.nr API reference, v6.0.0 (mainnet and testnet). Index: https://docs.aztec.network/aztec-nr-api/v6.0.0/llms.txt

# Function generate_positive_ephemeral_key_pair

Module: `noir_aztec::keys::ephemeral`

```rust
pub fn generate_positive_ephemeral_key_pair(
) -> (EmbeddedCurveScalar, EmbeddedCurvePoint)
```

Generates a random ephemeral key pair with a positive y-coordinate.

Unlike [`generate_ephemeral_key_pair`](/aztec-nr-api/v6.0.0/noir_aztec/keys/ephemeral/fn.generate_ephemeral_key_pair.md), the y-coordinate of the public key is guaranteed to be a positive value (i.e. [`crate::utils::point::get_sign_of_point`](/aztec-nr-api/v6.0.0/noir_aztec/utils/point/fn.get_sign_of_point.md) will return `true`).

This is useful as it means it is possible to just broadcast the x-coordinate as a single `Field` and then reconstruct the original public key using [`crate::utils::point::point_from_x_coord_and_sign`](/aztec-nr-api/v6.0.0/noir_aztec/utils/point/fn.point_from_x_coord_and_sign.md) with `sign: true`.
