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

# Struct PublicKeys

Module: `noir_aztec::protocol::public_keys`

```rust
pub struct PublicKeys {
    pub npk_m_hash: Field,
    pub ivpk_m: IvpkM,
    pub ovpk_m_hash: Field,
    pub tpk_m_hash: Field,
    pub mspk_m_hash: Field,
    pub fbpk_m_hash: Field,
}
```

A non-owner's view of an account's master public keys.

`npk_m_hash`, `ovpk_m_hash`, `tpk_m_hash`, `mspk_m_hash`, and `fbpk_m_hash` are the [`hash_public_key`](/aztec-nr-api/v6.0.0/protocol_types/public_keys/fn.hash_public_key.md) digests of the underlying points. The points themselves are not exposed here - they are only known to the owner. `ivpk_m` remains a point because address derivation (encrypt-to-address) requires the raw point in-circuit.

## Fields

```rust
npk_m_hash: Field
```

```rust
ivpk_m: IvpkM
```

```rust
ovpk_m_hash: Field
```

```rust
tpk_m_hash: Field
```

```rust
mspk_m_hash: Field
```

```rust
fbpk_m_hash: Field
```

## Implementations

```rust
impl PublicKeys
```

```rust
pub fn hash(self) -> PublicKeysHash
```

```rust
pub fn validate_on_curve(self)
```

Validates that the (only) point-form key, `ivpk_m`, lies on the Grumpkin curve.

The other five keys are exposed only as hashes and are unverifiable on-circuit; the PXE is responsible for ensuring they were derived from on-curve points before persistence.

```rust
pub fn validate_non_infinity(self)
```

Validates that `ivpk_m` is not the point at infinity.

As with [`Self::validate_on_curve`](/aztec-nr-api/v6.0.0/protocol_types/public_keys/struct.PublicKeys.md#validate_on_curve), the other five keys are now exposed only as hashes and this property must be enforced PXE-side.

## Trait implementations

```rust
impl Default for PublicKeys
```

```rust
pub fn default() -> Self
```

```rust
impl Deserialize for PublicKeys
```

```rust
pub fn deserialize(fields: [Field; 7]) -> Self
```

```rust
pub fn stream_deserialize<let K: u32>(reader: &mut Reader<K>) -> Self
```

```rust
impl Eq for PublicKeys
```

```rust
pub fn eq(_self: Self, _other: Self) -> bool
```

```rust
impl Serialize for PublicKeys
```

```rust
pub fn serialize(self) -> [Field; 7]
```

```rust
pub fn stream_serialize<let K: u32>(self, writer: &mut Writer<K>)
```
