How to create ES and RS keys

These methods allow you to pass your public key to someone verifying your tokens, without giving them chance to generate their own signed tokens (they would need to have the private key for that). Below is a quick reference for generating the key pairs.

To generate RS256, RS384 or RS512 private key (to add to your IRCd):

openssl genrsa -out privkey.pem 4096

To generate matching public key (to use for token verification):

openssl rsa -in privkey.pem -pubout > pubkey.pem

To generate ES256, ES384 or ES512 private key (to add to your IRCd):

openssl ecparam -genkey -name secp521r1 -noout -out privkey.pem

To generate matching public key (to use for token verification):

openssl ec -in privkey.pem -pubout -out pubkey.pem

Of course, substitute your preferred file names for pubkey.pem and privkey.pem.

  • pubkey.pem, privkey.pem
  • 0 gebruikers vonden dit artikel nuttig
Was dit antwoord nuttig?

Gerelateerde artikelen

How to Set Up a Mac for Your Kids

Providing children with access to a computer and the internet is increasingly important, but so...

How to Get Help With a Command from the Linux Terminal

Whether you’re an inexperienced terminal user or a grizzled veteran, you won’t always know the...

How to change the ssh port on Linux

To Change the SSH Port for Linux Server Connect to your server via SSH Switch to the root...

How To Install screenFetch in Linux

If you've browsed Linux groups on social media, you've probably seen a lot of screenshots that...

Static IP vs. Dynamic IP Address

A static IP address is one that remains fixed and never changes. The PC always sees the same...

Powered by WHMCompleteSolution