# Keys

{% hint style="info" %}
The following functions do not update keys for a subnet owner. To update keys for a subnet owner, see [transfer\_ownership](/network/subnet-owner.md#transfer-ownership).
{% endhint %}

Coldkey and hotkey **can never match**. This design is to force the security of all subnets and nodes. For example, by the network not allowing hotkeys to be used more than once or across multiple subnets, if a subnet is exploited, the network will be aware of which subnet was exploited.

### Update Coldkey

#### Call `update_coldkey` with the coldkey to update to a new coldkey.

```rust
pub fn update_coldkey(
    origin: OriginFor<T>, 
    hotkey: T::AccountId,
    new_coldkey: T::AccountId
)
```

### Update Hotkey

#### Call `update_hotkey` with the coldkey to update to a new hotkey.

```rust
pub fn update_hotkey(
    origin: OriginFor<T>, 
    old_hotkey: T::AccountId,
    new_hotkey: T::AccountId
)
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hypertensor.org/network/subnet-node/keys.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
