# SetRegularKey [[Source]](https://github.com/XRPLF/rippled/blob/master/src/xrpld/app/tx/detail/SetRegularKey.cpp) Assign, change, or remove the [regular key pair](/docs/concepts/accounts/cryptographic-keys) associated with your account. You can protect your account by assigning a regular key pair to it and using it instead of the master key pair to sign transactions whenever possible. If your regular key pair is compromised, but your master key pair is not, you can use a `SetRegularKey` transaction to regain control of your account. ## Example JSON ```json { "Flags": 0, "TransactionType": "SetRegularKey", "Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn", "Fee": "12", "RegularKey": "rAR8rR8sUkBoCZFawhkWzY4Y5YoyuznwD" } ``` ## Fields In addition to the [common fields](/docs/references/protocol/transactions/common-fields), transactions use the following fields: | Field | JSON Type | [Internal Type](/docs/references/protocol/binary-format) | Description | | --- | --- | --- | --- | | `RegularKey` | String | AccountID | *(Optional)* A base-58-encoded [Address](/docs/references/protocol/data-types/basic-data-types#addresses) that indicates the regular key pair to be assigned to the account. If omitted, removes any existing regular key pair from the account. Must not match the master key pair for the address. | ## See Also For more information about regular and master key pairs, see [Cryptographic Keys](/docs/concepts/accounts/cryptographic-keys). For a tutorial on assigning a regular key pair to an account, see [Working with a Regular Key Pair](/docs/tutorials/how-tos/manage-account-settings/assign-a-regular-key-pair). For even greater security, you can use [multi-signing](/docs/concepts/accounts/multi-signing), but multi-signing requires additional XRP for the [transaction cost](/docs/concepts/transactions/transaction-cost) and [reserve](/docs/concepts/accounts/reserves).