At Stark Bank, we use the secp256k1 curve to create and validate digital signatures, the same used by Bitcoin, Ethereum and other cryptocurrencies.
We recommend any of following methods to create a pair of public and private ECDSA keys.
Remember: your private key should never be shared with anyone, including us!
For Mac and most Linux distros, OpenSSL is already installed by default. Windows users need to install OpenSSL in order to use this solution. We recommend the version that comes bundled with Git for Windows.
To generate your key pair, open the terminal (Git Bash for Windows) and insert the code below:
openssl ecparam -name secp256k1 -genkey -out privateKey.pem openssl ec -in privateKey.pem -pubout -out publicKey.pem
If you use one of the programming languages bellow, just install our SDK and use the commands below to generate the key pair:
import starkbank private_key, public_key = starkbank.key.create("sample/destination/path") print(private_key) print(public_key)
const starkbank = require('starkbank') let privateKey, publicKey [privateKey, publicKey] = starkbank.key.create("sample/destination/path") console.log(privateKey) console.log(publicKey)
use StarkBankKey; list($privateKey, $publicKey) = Key::create("sample/destination/path"); print_r($privateKey) print_r($publicKey)
import com.starkbank.*; Key key = Key.create("sample/destination/path"); String privatePem = key.privatePem; String publicPem = key.publicPem; System.out.print(privatePem); System.out.print(publicPem);
require('starkbank') private_key, public_key = StarkBank::Key.create("sample/destination/path") puts private_key puts public_key
{private_key, public_key} = StarkBank.Key.create("sample/destination/path") IO.puts(private_key) IO.puts(public_key)
(string privateKey, string publicKey) = StarkBank.Key.Create("sample/destination/path"); Console.WriteLine(privateKey); Console.WriteLine(publicKey);
package main import ( "fmt" "github.com/starkinfra/core-go/starkcore/key" ) func main() { privateKey, publicKey := key.Create("sample/destination/path") fmt.Println(privateKey) fmt.Println(publicKey) }
(ns my-lib.core (:use starkbank.core)) (def key-pair (starkbank.key/create "/sample/destination/path")) (println (:private-pem key-pair)) (println (:public-pem key-pair))
If none of the methods above worked for you, we can use our Node ECDSA library to generate a pair of keys locally in your browser. To create your keys, just click on the button below: