简体   繁体   中英

Can we create XRP account address with a given string pattern and complete the rest with the checksum?

Can we create XRP account address with a given string pattern and complete the rest with the checksum?

For example: If we want to create an XRP account address that includes a particular string pattern like "xxtomxxjerry". Can we find an approach to creating such an account address in any XRPL related javascript library?

Account addresses in the XRP Ledger are base58 encoded public-key representations.

The public-key is a valid point on the curve, sometimes inside a specific subgroup of the curve (when the curve isn't prime order).

XRP supports both edwards25519 and secp256k1 curves.

You reach the public point (which is deterministic but not predictable), by scalar multiplication of the curves generator (or subgroups generator) with a cryptographically secure random number which is approximately of the order 2^256 .

So to answer your question... in a tight loop you need to:

  1. Generate a cryptographically secure random number between 0 and 2^256 .
  2. Execute scalar multiplication of this random number by the appropriate group generator.
  3. Take the resultant raw curve point and follow the XRP spec (including base58 encoding), to reach the address value.
  4. Inspect the generated address for desired vanity properties.
  5. If target is reached, break and securely store the scalar.

Eventually you will find a specific address which matches your requirement. More than a few characters will take a long time, predicated of course on your hardware.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM