mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-12-06 17:27:57 +00:00
Merge pull request #299 from jhaaaa/regular-keys
Master and Regular Keys concept doc, Assign Regular Key tutorial
This commit is contained in:
116
content/concept-keys.md
Normal file
116
content/concept-keys.md
Normal file
@@ -0,0 +1,116 @@
|
||||
# Cryptographic Keys
|
||||
|
||||
In the XRP Ledger, a digital signature proves that a transaction is authorized to do a specific set of actions. Only signed transactions can be submitted to the network and included in a validated ledger. <!-- STYLE_OVERRIDE: is authorized to -->
|
||||
|
||||
Every digital signature is based on a cryptographic key pair associated with the transaction's sending account. A key pair may be generated using any of the XRP Ledger's supported [cryptographic signing algorithms](#signing-algorithms). A key pair can be used as [master key pair](#master-key-pair), [regular key pair](#regular-key-pair) or a member of a [signer list](reference-transaction-format.html#multi-signing), regardless of what algorithm was used to generate it.
|
||||
|
||||
**Warning:** It is important to maintain proper security over your private keys. Digital signatures are the only way of verifying to the XRP Ledger that you are authorized to send a transaction, and there is no privileged administrator who can undo or reverse any transaction that has been applied to the ledger. If someone else knows the private key of your XRP Ledger account, that person can create digital signatures to authorize any transaction the same as you could.
|
||||
|
||||
## Generating Keys
|
||||
|
||||
You generate a key pair using the [`wallet_propose`](reference-rippled.html#wallet-propose) method. Here's a sample `wallet_propose` response:
|
||||
|
||||
```
|
||||
{
|
||||
"result": {
|
||||
"account_id": "rDGnaDqJczDAjrKHKdhGRJh2G7zJfZhj5q",
|
||||
"key_type": "secp256k1",
|
||||
"master_key": "COON WARN AWE LUCK TILE WIRE ELI SNUG TO COVE SHAM NAT",
|
||||
"master_seed": "sstV9YX8k7yTRzxkRFAHmX7EVqMfX",
|
||||
"master_seed_hex": "559EDD35041D3C11F9BBCED912F4DE6A",
|
||||
"public_key": "aBQXEw1vZD3guCX3rHL8qy8ooDomdFuxZcWrbRZKZjdDkUoUjGVS",
|
||||
"public_key_hex": "0351BDFB30E7924993C625687AE6127034C4A5EBA78A01E9C58B0C46E04E3A4948"
|
||||
},
|
||||
"status": "success",
|
||||
"type": "response"
|
||||
}
|
||||
```
|
||||
|
||||
The response contains a key pair (a private key and a public key, in various formats) as well as an `account_id`.
|
||||
|
||||
**Private Key**
|
||||
|
||||
The `master_key`, `master_seed`, and `master_seed_hex` are the private key in various formats, all of which can be used to sign transactions. Despite being prefixed with `master_`, these keys are not necessarily the master keys for an account. In this context, the `master_` prefix refers more to the keys' role as private keys. The `master_seed` is the master seed from which all other information about this account is derived.
|
||||
|
||||
**Public Key**
|
||||
|
||||
The `public_key` and `public_key_hex` are the public key in various formats, with the `public_key_hex` being the public key corresponding to the private key that signed the transaction. Both the `public_key` and `public_key_hex` are directly derived from the `master_seed`.
|
||||
|
||||
**account_id**
|
||||
|
||||
The `account_id` is [derived from the public key](concept-accounts.html#address-encoding) and designates the *potential* for an account to be created in the XRP Ledger. It is important to know that while an `account_id` exists, no actual account exists in the XRP Ledger until the `account_id` receives its first XRP payment. In addition, the `account_id` can't send any transactions until after it's received a transaction that funds and creates the account.
|
||||
|
||||
The `account_id` (without a funded account) can, however, be used as a [regular key](#regular-key-pair) or a [member of a signer list](reference-transaction-format.html#multi-signing) to authorize transactions for another account that does exist.
|
||||
|
||||
To create a funded account stored in the ledger, the `account_id` must [receive a `Payment` transaction](reference-transaction-format.html#creating-accounts) that provides enough XRP to meet the [reserve requirement](concept-reserves.html).
|
||||
|
||||
For more information about the `wallet_propose` response, see [`wallet_propose`](reference-rippled.html#wallet-propose).
|
||||
|
||||
You can use this generated key pair in one of three ways: as a [master key pair](#master-key-pair), [regular key pair](#regular-key-pair), or [signer list member](reference-transaction-format.html#multi-signing).
|
||||
|
||||
**Key Type**
|
||||
|
||||
The field `key_type` indicates what [cryptographic signing algorithm](#signing-algorithms) was used to generate this key pair. You can specify the `key_type` when you make the request to generate a key pair using the [`wallet_propose` command](reference-rippled.html#wallet-propose).
|
||||
|
||||
|
||||
## Master Key Pair
|
||||
|
||||
The master key pair is composed of a private key and a public key. In addition to being able to sign all transactions that a regular key pair can, the master key pair's private key is the only key that can be used to perform the following actions:
|
||||
|
||||
* [Disable the master public key](reference-transaction-format.html#accountset-flags).
|
||||
|
||||
* Permanently give up the ability to [freeze](concept-freeze.html#no-freeze).
|
||||
|
||||
* Send a cost-0 [key reset transaction](concept-transaction-cost.html#key-reset-transaction).
|
||||
|
||||
The master key pair for an account is generated in the same [`wallet_propose`](reference-rippled.html#wallet-propose) response as the `account_id` of the account the master key pair is authorized to sign transactions for. Because the master key pair is generated in the same response, it is [intrinsically related](concept-accounts.html#address-encoding) to the `account_id`, which is derived from the `public_key_hex`.
|
||||
|
||||
This is as opposed to a regular key pair, which is also generated using the `wallet_propose` method, but which must be explicitly assigned as a regular key pair to an account. Because a regular key pair is explicitly assigned, it is not intrinsically related to the `account_id` of the account it is authorized to sign transactions for. For more information, see [Regular Key Pair](#regular-key-pair).
|
||||
|
||||
**Caution:** A master key pair cannot be changed, but it can be disabled. This means that if your master private key is compromised, rather than change it, you must [disable it](reference-transaction-format.html#accountset-flags).
|
||||
|
||||
Because a master key pair cannot be changed and can only disabled in the event of a compromise, this is a compelling reason to keep your master key pair offline and set up a regular key pair to sign transactions from your account instead.
|
||||
|
||||
Keeping your master key pair offline means not putting your master private key somewhere malicious actors can get access to it. For example, this can mean keeping it on an air-gapped machine that never connects to the internet, on a piece of paper stored in a safe, or in general, not within reach of a computer program that interacts with the internet at large. Ideally, a master key pair is used only on the most trusted of devices and for emergencies only, such as to change a regular key pair in the event of a possible or actual compromise.
|
||||
|
||||
|
||||
## Regular Key Pair
|
||||
|
||||
The XRP Ledger allows an account to authorize a secondary key pair, called a _regular key pair_, to sign future transactions, while keeping your master key pair offline. If the private key of a regular key pair is compromised, you can remove or replace it without changing the rest of your account and re-establishing its relationships to other accounts. You can also rotate a regular key pair proactively. (Neither of those things is possible for the master key pair of an account, which is intrinsically linked to the account's address.)
|
||||
|
||||
You generate a key pair to use as a regular key pair using the [`wallet_propose`](reference-rippled.html#wallet-propose) method. However, unlike with a [master key pair](#master-key-pair), which is generated alongside and intrinsically related to the `account_id` of an account it supports, you must explicitly create the relationship between a regular key pair and the account you want it to sign transactions for. You use the [`SetRegularKey`](reference-transaction-format.html#setregularkey) method to assign a regular key pair to an account.
|
||||
|
||||
For a tutorial on assigning a regular key pair, see [Working with a Regular Key Pair](tutorial-regular-keys.html).
|
||||
|
||||
After you assign a regular key pair to an account, the account has two key pairs associated with it:
|
||||
|
||||
* A master key pair that is intrinsically related to the account's `account_id` and which you keep offline.
|
||||
* A regular key pair that you've explicitly assigned to the account and which you use to sign transactions for the account.
|
||||
|
||||
You can assign one regular key pair to an account and use it to sign all transactions, except for the ones reserved for the [master key pair](#master-key-pair).
|
||||
|
||||
You can remove or change a regular key pair at any time. This means that if a regular private key is compromised (but the master private key is not), you can regain control of your account by simply removing or changing the regular key pair.
|
||||
|
||||
For a tutorial on changing or removing a regular key pair, see [Working with a Regular Key Pair](tutorial-regular-keys.html).
|
||||
|
||||
|
||||
## Signing Algorithms
|
||||
|
||||
Cryptographic key pairs are always tied to a specific signing algorithm, which defines the mathematical relationships between the private key and the public key. Cryptographic signing algorithms have the property that, given the current state of cryptographic techniques, it is "easy" to use a private key to calculate a matching public key, but it is effectively impossible to compute a matching private key by starting from a public key.
|
||||
|
||||
The XRP Ledger supports the following cryptographic signing algorithms:
|
||||
|
||||
| Key Type | Algorithm | Description |
|
||||
|-------------|-----------|---|
|
||||
| `secp256k1` | [ECDSA](https://csrc.nist.gov/CSRC/media/Projects/Cryptographic-Algorithm-Validation-Program/documents/dss2/ecdsa2vs.pdf) using the elliptic curve [secp256k1](https://en.bitcoin.it/wiki/Secp256k1) | This is the scheme used in Bitcoin. The XRP Ledger uses these key types by default. |
|
||||
| `ed25519` | [EdDSA](https://tools.ietf.org/html/rfc8032) using the elliptic curve [Ed25519](https://ed25519.cr.yp.to/) | This is a newer algorithm which has better performance and other convenient properties. Since Ed25519 public keys are one byte shorter than secp256k1 keys, `rippled` prefixes Ed25519 public keys with the byte `0xED` so both types of public key are 33 bytes. |
|
||||
|
||||
When you generate a key pair with the [`wallet_propose` command](reference-rippled.html#wallet-propose), you can specify the `key_type` to choose which cryptographic signing algorithm to use to derive the keys. If you generated a key type other than the default, you must also specify the `key_type` when signing transactions.
|
||||
|
||||
The supported types of key pairs can be used interchangeably throughout the XRP Ledger as master key pairs, regular key pairs, and members of signer lists. The process of [deriving an address](concept-accounts.html#address-encoding) is the same for secp256k1 and Ed25519 key pairs.
|
||||
|
||||
**Note:** Currently, you cannot sign [payment channel claims](tutorial-paychan.html) with Ed25519 keys. This is a bug.
|
||||
|
||||
### Future Algorithms
|
||||
|
||||
In the future, Ripple expects to add new cryptographic signing algorithms to the XRP Ledger to keep up with developments in cryptography. For example, if it seems that quantum computers using [Shor's algorithm](https://en.wikipedia.org/wiki/Shor's_algorithm) (or something similar) will soon be practical enough to break elliptic curve cryptography, Ripple can add a cryptographic signing algorithm that isn't easily broken. As of early 2018, such "quantum-resistant" signing algorithms are relatively impractical and quantum computers are even more impractical, so Ripple has no immediate plans to add any specific algorithms.
|
||||
74
content/concept-signatures.md
Normal file
74
content/concept-signatures.md
Normal file
@@ -0,0 +1,74 @@
|
||||
# Understanding Signatures
|
||||
|
||||
***TODO: DRAFT***
|
||||
|
||||
***TODO: Question: Added this concept section based on fantastic source material from Rome -- thought we should publish it. Useful? May be good to associate it with a flow diagram - like the one for address encoding: https://ripple.com/build/accounts/#address-encoding. Address both single and multi-sign flows.***
|
||||
|
||||
In the XRP Ledger, a digital signature proves that a transaction is authorized to do a specific set of actions. A digital signature is created based on a [key pair](concept-keys.html) associated with the transaction's sending account.
|
||||
|
||||
Here's an overview of some of the more common signature-related fields used in the XRP Ledger.
|
||||
|
||||
***TODO: address from Ryan: Where would you see these fields? Either address in text -- or ensure that this is answered via the flow diagram discussed below.***
|
||||
|
||||
***TODO: JHA fix the IA here. Also need to more clearly express the single-signer flow vs multi-signer flow. Provide a flow diagram. Also need to move some conceptual content out of "Authorizing Transactions" and "Signing and Submitting Transactions" and put it in this doc.***
|
||||
|
||||
## `SigningPubKey` (top-level)
|
||||
|
||||
The public key of the sender in hex format. Empty in the case of a multi-signed transaction.
|
||||
|
||||
To verify whether a single-signed transaction is valid, a `rippled` server checks that all of the following are true:
|
||||
|
||||
1. This key hashes to an address that's authorized by the transaction's sender.
|
||||
|
||||
The default is that only the address of an account is authorized to send all transactions for that account. That address is [derived from](concept-accounts.html#address-encoding) the public key from the master key pair that was generated during address creation. Regular keys add a different address (derived from a different key pair) that's authorized to send most transactions. And of course, you can also disable the [master key](concept-keys.html) or add a [multi-signing list](reference-transaction-format.html#multi-signing). ***TODO: address from Ryan: "And of course" - Nit: this seems a little informal. Maybe just drop it and go into the next sentence? JHA take a closer look at what this sentence is trying to say.***
|
||||
|
||||
2. This key matches the signature on the transaction.
|
||||
|
||||
3. The signature matches the transaction instructions.
|
||||
|
||||
The validation process for multi-signed transactions is slightly different. For more information, see [`Signers[*].SigningPubKey`](#signerssigningpubkey).
|
||||
|
||||
|
||||
## `TxnSignature` (top-level)
|
||||
|
||||
The signature of the transaction instructions, in hex format.
|
||||
|
||||
Used with the `SigningPubKey` to verify that the sender did in fact approve the corresponding transaction instructions.
|
||||
|
||||
***TODO: Ensure that this doc reflects this: In transactions, we have two TxnSignature fields—one at the top level for single-signed transactions, and one in each member of the Signers array for multi-signed transactions. (Any given transaction has either the top level TxnSignature or the members in the Signers array but not both.)***
|
||||
|
||||
## `Signers` (in a multi-signed transaction)
|
||||
|
||||
An array of signature data for a [multi-signed transaction](reference-transaction-format.html#multi-signing).
|
||||
|
||||
Used to verify that a quorum of signers approved a transaction.
|
||||
|
||||
|
||||
### `Signers[*].AccountID`
|
||||
|
||||
The address of one signer, in base58.
|
||||
***TODO: JHA: Slightly nitpicky note (relevant to all the fields, but it especially attracted my notice here): the base58 is how it's generally represented in JSON. In the canonical binary format, I believe this is the AccountID as a 160-bit number, so it's not base58-encoded and doesn't have the checksum in the binary format. Similarly, hexadecimal is just a way of representing a 160-bit number in formats like JSON. In the native binary format, the various fields are just numbers/data in various low-level computer formats. That's only relevant for people who are trying to implement offline signing, though. Everyone else will probably see the JSON representation, where they'll want to know what the conventional way to represent the fields is.***
|
||||
|
||||
Identifies which signer from the (predefined) [multi-signing list](reference-transaction-format.html#multi-signing) this portion of the multi-signature represents.
|
||||
|
||||
|
||||
### `Signers[*].TxnSignature`
|
||||
|
||||
One signature, as hexadecimal.
|
||||
|
||||
Verifying a [multi-signed transaction](reference-transaction-format.html#multi-signing) involves making sure each such signature is valid for its `SigningPubKey` and the transaction instructions.
|
||||
|
||||
|
||||
### `Signers[*].SigningPubKey`
|
||||
|
||||
The public key of one signer. Verifying a [multi-signed transaction](reference-transaction-format.html#multi-signing) involves making sure each such key is authorized to sign for the `AccountID` of the signer.
|
||||
|
||||
Multi-signature `AccountIDs` are a little special. If one is an address that doesn't exist in the ledger, then the `SigningPubKey` must hash to the `AccountID` value using the standard rules for [deriving an AccountID](concept-accounts.html#address-encoding) from a public key. If the address does exist in the ledger, then either:
|
||||
|
||||
1. The `SigningPubKey` must hash to the `AccountID` and the address must not have the master key disabled.
|
||||
|
||||
or
|
||||
|
||||
2. The `SigningPubKey` must hash to a regular key that the address has set in the ledger.
|
||||
|
||||
For more information about signing transactions, see [Signing and Submitting Transactions](reference-transaction-format.html#signing-and-submitting-transactions).
|
||||
@@ -15,16 +15,21 @@ In the decentralized XRP Ledger, a digital signature proves that a transaction i
|
||||
|
||||
A transaction can be authorized by any of the following types of signatures:
|
||||
|
||||
* A single signature from the master secret key that is mathematically associated with the sending address. You can disable or enable the master key using an [AccountSet transaction][].
|
||||
* A single signature that matches a regular key associated with the address. You can add, remove, or replace a regular key using a [SetRegularKey transaction][].
|
||||
* A single signature from the master private key that is mathematically associated with the sending address. You can disable or enable the master key pair using an [AccountSet transaction][].
|
||||
* A single signature that matches the regular private key associated with the address. You can add, remove, or replace a regular key pair using a [SetRegularKey transaction][].
|
||||
* A [multi-signature](#multi-signing) that matches a list of signers owned by the address. You can add, remove, or replace a list of signers using a [SignerListSet transaction][].
|
||||
|
||||
Any signature type can authorize any type of transaction, with the following exceptions:
|
||||
|
||||
* Only the master key can [disable the master key](#accountset-flags).
|
||||
* Only the master key can [permanently give up the ability to freeze](concept-freeze.html#no-freeze).
|
||||
* Only the master private key can [disable the master public key](#accountset-flags).
|
||||
* Only the master private key can [permanently give up the ability to freeze](concept-freeze.html#no-freeze).
|
||||
* You can never remove the last method of signing transactions from an address.
|
||||
|
||||
For more information about master and regular key pairs, see [Cryptographic Keys](concept-keys.html).
|
||||
|
||||
<!--{# Add this reference after signatures concept doc is published. For more information about signatures, see [Understanding Signatures](concept-signatures.html). #}-->
|
||||
|
||||
|
||||
## Signing and Submitting Transactions
|
||||
|
||||
Sending a transaction to the XRP Ledger involves several steps:
|
||||
@@ -170,7 +175,7 @@ Example response from the `tx` command:
|
||||
|
||||
### Multi-Signing
|
||||
|
||||
Multi-signing in the XRP Ledger is the act of [authorizing transactions](#authorizing-transactions) for the XRP Ledger by using a combination of multiple secret keys. You can have any combination of authorization methods enabled for your address, including multi-signing, a master key, and a [regular key](#setregularkey). (The only requirement is that _at least one_ method must be enabled.)
|
||||
Multi-signing in the XRP Ledger is the act of [authorizing transactions](#authorizing-transactions) for the XRP Ledger by using a combination of multiple secret keys. You can have any combination of authorization methods enabled for your address, including multi-signing, a [master key pair](concept-keys.html#master-key-pair), and a [regular key pair](concept-keys.html#regular-key-pair). (The only requirement is that _at least one_ method must be enabled.)
|
||||
|
||||
The [SignerListSet transaction][] defines which addresses can authorize transactions from your address. You can include up to 8 addresses in a SignerList. You can control how many signatures are needed, in which combinations, by using the quorum and weight values of the SignerList.
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
## wallet_propose
|
||||
[[Source]<br>](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/WalletPropose.cpp "Source")
|
||||
|
||||
Use the `wallet_propose` method to generate a key pair and XRP Ledger address. This command only generates keys, and does not affect the XRP Ledger itself in any way. To become a funded address stored in the ledger, the address must [receive a Payment transaction](reference-transaction-format.html#creating-accounts) that provides enough XRP to meet the [reserve requirement](concept-reserves.html).
|
||||
Use the `wallet_propose` method to generate a key pair and XRP Ledger address. This command only generates key and address values, and does not affect the XRP Ledger itself in any way. To become a funded address stored in the ledger, the address must [receive a Payment transaction](reference-transaction-format.html#creating-accounts) that provides enough XRP to meet the [reserve requirement](concept-reserves.html).
|
||||
|
||||
*The `wallet_propose` request is an [admin command](#connecting-to-rippled) that cannot be run by unprivileged users!* (This command is restricted to protect against people sniffing network traffic for account secrets, since admin commands are not usually transmitted over the outside network.)
|
||||
|
||||
@@ -164,19 +164,26 @@ Connecting to 127.0.0.1:5005
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
The response follows the [standard format](#response-formatting), with a successful result containing various important information about the new account, including the following fields:
|
||||
The response follows the [standard format](#response-formatting), with a successful result containing various important information about the new (potential) account, including the following fields:
|
||||
|
||||
| `Field` | Type | Description |
|
||||
|:------------------|:-------|:------------------------------------------------|
|
||||
| `master_seed` | String | The master seed from which all other information about this account is derived, in Ripple's [base58][] encoded string format. This is the private key of the key pair. |
|
||||
| `master_seed_hex` | String | The master seed, in hex format. |
|
||||
| `master_key` | String | The master seed, in [RFC 1751](http://tools.ietf.org/html/rfc1751) format. |
|
||||
| `account_id` | String | The [Address][] of the account. |
|
||||
| `public_key` | String | The public key of the account, in encoded string format. |
|
||||
| `public_key_hex` | String | The public key of the account, in hex format. |
|
||||
| `master_seed` | String | This is the private key of the key pair. The master seed from which all other information about this account is derived, in Ripple's [base58][] encoded string format. Typically, you use the key in this format to sign transactions. |
|
||||
| `master_seed_hex` | String | The master seed, in hex format. A simple, widely-supported way to represent the private key. Can be used to sign transactions. |
|
||||
| `master_key` | String | The master seed, in [RFC 1751](http://tools.ietf.org/html/rfc1751) format. An easier to remember, easier-to-write-down version of the private key. Can be used to sign transactions. |
|
||||
| `account_id` | String | The [Address][] of the account in base58 format. This is not the public key, but a hash-of-a-hash of it. It also has a checksum so a typo almost certainly results in an invalid address rather than a valid, but different address. This is the primary identifier of an account in the XRP Ledger. You tell people this to get paid, and use it in transactions to indicate who you are and who you're paying, trusting, and so forth. [Multi-signing lists](tutorial-multisign.html) also use these to identify other signers. |
|
||||
| `public_key` | String | The public key of the key pair, in Ripple's [base58][] encoded string format. Derived from the `master_seed`. |
|
||||
| `public_key_hex` | String | This is the public key of the key pair, in hexadecimal. Derived from the `master_seed`. To validate the signature on a transaction, `rippled` needs this public key. That's why the format for a signed transaction includes the public key in the `SigningPubKey` field. |
|
||||
| `warning` | String | (May be omitted) If the request specified a seed value, this field provides a warning that it may be insecure. [New in: rippled 0.32.0][] |
|
||||
|
||||
The key generated by this method can also be used as a regular key for an account if you use the [SetRegularKey transaction type](reference-transaction-format.html#setregularkey) to do so.
|
||||
You can also use this method to generate a key pair to use as a regular key pair for an account. You assign a regular key pair to an account to be able to sign most transactions with it, while keeping your master key pair offline whenever possible.
|
||||
|
||||
In addition to using it as a regular key pair, you can also use it as a member of a multi-signing list (SignerList).
|
||||
|
||||
For more information about master and regular key pairs, see [Cryptographic Keys](concept-keys.html)
|
||||
|
||||
For more information about multi-signing and signer lists, see [Multi-Signing](reference-transaction-format.html#multi-signing).
|
||||
|
||||
|
||||
#### Possible Errors
|
||||
|
||||
|
||||
@@ -2,7 +2,15 @@
|
||||
|
||||
[[Source]<br>](https://github.com/ripple/rippled/blob/4239880acb5e559446d2067f00dabb31cf102a23/src/ripple/app/transactors/SetRegularKey.cpp "Source")
|
||||
|
||||
A SetRegularKey transaction changes the regular key associated with an address.
|
||||
A `SetRegularKey` transaction assigns, changes, or removes the regular key pair associated with an 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.
|
||||
|
||||
For more information about regular and master key pairs, see [Cryptographic Keys](concept-keys.html).
|
||||
|
||||
For a tutorial on assigning a regular key pair to an account, see [Working with a Regular Key Pair](tutorial-regular-keys.html).
|
||||
|
||||
For even greater security, you can use [multi-signing](#multi-signing), but multi-signing requires additional XRP for the [transaction cost](concept-transaction-cost.html) and [reserve](concept-reserves.html).
|
||||
|
||||
```
|
||||
{
|
||||
@@ -14,14 +22,6 @@ A SetRegularKey transaction changes the regular key associated with an address.
|
||||
}
|
||||
```
|
||||
|
||||
| Field | JSON Type | [Internal Type][] | Description |
|
||||
|:-----------|:----------|:------------------|:--------------------------------|
|
||||
| RegularKey | String | AccountID | _(Optional)_ A base-58-encoded [Ripple address](reference-rippled.html#addresses) to use as the regular key. If omitted, removes the existing regular key. |
|
||||
|
||||
In addition to the master key, which is mathematically-related to an address, you can associate **at most 1 additional key pair** with an address using this type of transaction. The additional key pair is called a _regular key_. If your address has a regular key pair defined, you can use the secret key of the regular key pair to [authorize transactions](#authorizing-transactions).
|
||||
|
||||
A regular key pair is generated in the same way as any other Ripple keys (for example, with [wallet_propose](reference-rippled.html#wallet-propose)), but it can be changed. A master key pair is an intrinsic part of an address's identity (the address is derived from the master public key). You can [disable](#accountset-flags) a master key but you cannot change it.
|
||||
|
||||
You can protect your master secret by using a regular key instead of the master key to sign transactions whenever possible. If your regular key is compromised, but the master key is not, you can use a SetRegularKey transaction to regain control of your address. In some cases, you can even send a [key reset transaction](concept-transaction-cost.html#key-reset-transaction) without paying the [transaction cost](#transaction-cost).
|
||||
|
||||
For even greater security, you can use [multi-signing](#multi-signing), but multi-signing requires additional XRP for the [transaction cost](concept-transaction-cost.html) and [reserve](concept-reserves.html).
|
||||
| Field | JSON Type | [Internal Type][] | Description |
|
||||
|:-------------|:----------|:------------------|:------------------------------|
|
||||
| `RegularKey` | String | AccountID | _(Optional)_ A base-58-encoded [Ripple address](reference-rippled.html#addresses) that indicates the regular key pair to be assigned to the account. If omitted, removes any existing regular key pair from the account. |
|
||||
|
||||
1030
content/tutorial-regular-keys.md
Normal file
1030
content/tutorial-regular-keys.md
Normal file
File diff suppressed because it is too large
Load Diff
@@ -60,6 +60,7 @@ targets:
|
||||
"tutorial-paychan.html": https://ripple.com/build/payment-channels-tutorial/
|
||||
"tutorial-escrow.html": https://ripple.com/build/escrow-tutorials/
|
||||
"tutorial-listing-xrp.html": https://ripple.com/build/listing-xrp-exchange/
|
||||
"cryptographic-keys.html": https://ripple.com/build/cryptographic-keys/
|
||||
"tutorial-build-run-rippled-ubuntu.html": https://ripple.com/build/build-run-rippled-ubuntu/
|
||||
"concept-accounts.html": https://ripple.com/build/accounts/
|
||||
"concept-amendments.html": https://ripple.com/build/amendments/
|
||||
@@ -259,6 +260,13 @@ pages:
|
||||
- local
|
||||
- ripple.com
|
||||
|
||||
- md: tutorial-regular-keys.md
|
||||
html: working-regular-key-pair.html
|
||||
category: Tutorials
|
||||
targets:
|
||||
- local
|
||||
- ripple.com
|
||||
|
||||
- name: Build and Run rippled on Ubuntu
|
||||
md: tutorial-build-run-rippled-ubuntu.md
|
||||
html: tutorial-build-run-rippled-ubuntu.html
|
||||
@@ -300,6 +308,13 @@ pages:
|
||||
- local
|
||||
- ripple.com
|
||||
|
||||
- category: Features
|
||||
html: cryptographic-keys.html
|
||||
md: concept-keys.md
|
||||
targets:
|
||||
- local
|
||||
- ripple.com
|
||||
|
||||
- md: concept-depositauth.md
|
||||
category: Features
|
||||
targets:
|
||||
|
||||
Reference in New Issue
Block a user