aztec-nr - protocol_types::public_keys

Struct PublicKeys

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 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

npk_m_hash: Field
ivpk_m: IvpkM
ovpk_m_hash: Field
tpk_m_hash: Field
mspk_m_hash: Field
fbpk_m_hash: Field

Implementations

impl PublicKeys

pub fn hash(self) -> PublicKeysHash 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.

pub fn validate_non_infinity(self)

Validates that ivpk_m is not the point at infinity.

As with Self::validate_on_curve, the other five keys are now exposed only as hashes and this property must be enforced PXE-side.

Trait implementations

impl Default for PublicKeys

pub fn default() -> Self

impl Deserialize for PublicKeys

pub fn deserialize(fields: [Field; 7]) -> Self pub fn stream_deserialize<let K: u32>(reader: &mut Reader<K>) -> Self

impl Eq for PublicKeys

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

impl Serialize for PublicKeys

pub fn serialize(self) -> [Field; 7] pub fn stream_serialize<let K: u32>(self, writer: &mut Writer<K>)