ripple-keypairs: XRP Ledger Key Generation and Signing
Tags: javascript, xrpl, crypto, blockchain
Published: 2021-10-19 06:24:28

_This was originally posted to the RippleX blog on March 31, 2021._

Public key cryptography is one of the fundamental technologies that enables the XRP Ledger and other blockchain systems to operate.

It uses a pair of keys: a public key and a private key. Anyone can create a new account and have authority to sign transactions from that account. In order to generate these keys, you can use a software library like [ripple-keypairs](https://github.com/ripple/ripple-keypairs).

Many of the applications that integrate with the [XRP Ledger](https://xrpl.org/index.html) depend on the stability and security of ripple-keypairs in order to create and use XRP Ledger accounts.

Each account has an address, which is derived from the account's master public key. It might also have a regular key, which is a secondary way to authorize transactions from an account.

An account can also have a signing list to allow for multi-signing, which requires a transaction to have multiple signatures before it is considered valid.

We help to maintain and enhance the libraries underpinning the XRP Ledger in order to ensure superior security, safety and ease-of-use for every app that uses XRP.

High-quality apps deserve high-quality supporting libraries, and that's why we're excited to announce that [ripple-keypairs v1.0](https://github.com/ripple/ripple-keypairs/releases/tag/1.0.3) is now available.

With this release, the ripple-keypairs library has been refactored into TypeScript, bringing it up-to-date with modern JavaScript. It also has 100% unit test coverage, ensuring that every line in the library has been thoughtfully considered and tested. Similarly, we have released a Java version of this library, which is called [xrpl4j-keypairs](https://github.com/XRPLF/xrpl4j).

Here are the library's main use cases:

- Generate new XRPL accounts (wallets)
- Generate a [regular key](https://xrpl.org/assign-a-regular-key-pair.html) to use with your account
- Generate keys to use for [multi-signing](https://xrpl.org/set-up-multi-signing.html)
- Sign messages (create signatures)
- Verify messages (verify signatures)
- Generate a [validator manifest public key](https://xrpl.org/run-rippled-as-a-validator.html)

[ripple-keypairs](https://github.com/ripple/ripple-keypairs) is fully open source and licensed under the ISC license, is available as an npm package and is easy to use in browser-based apps using a compiler like TypeScript, Browserify, Babel, or Parcel.

It is also an integrated component of [ripple-lib (RippleAPI)](https://xrpl.org/rippleapi-reference.html) and the RippleX Dev Kit, so if you're developing on the XRP Ledger, you are probably already using ripple-keypairs!

## More Resources:

- [ripple-keypairs on GitHub](https://github.com/ripple/ripple-keypairs)
- [RippleAPI (ripple-lib) Reference Documentation](https://xrpl.org/rippleapi-reference.html)

We continue to work with the open source XRP Community on the development of ripple-keypairs and the entire suite of XRPL libraries. We'd love to hear your feedback. You can reach out to us through GitHub issues.

Happy developing!

### Other Information

#### Bug Bounties and Responsible Disclosures

As a responsible participant in the XRP Ledger ecosystem, Ripple is sponsoring a bug-bounty program to help encourage third-party reviews of the codebase. We urge developers and researchers to responsibly disclose any issues that they may find.

For more on Ripple’s Bug Bounty program, please visit https://ripple.com/bug-bounty/.