# How to generate a pair of public and private keys with ECDSA

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 the following methods to create a pair of public and private ECDSA keys. 

Remember: your private key should never be shared with anyone, including us!

## Solution 1: Using OpenSSL

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:

```bash
openssl ecparam -name secp256k1 -genkey -out privateKey.pem
openssl ec -in privateKey.pem -pubout -out publicKey.pem
```

## Solution 2: Using our SDKs

If you use one of the programming languages below, just install our SDK and use the commands below to generate the key pair:

```python
import starkbank

    private_key, public_key = starkbank.key.create("sample/destination/path")

    print(private_key)
    print(public_key)
```

---

## Other Languages

- [Python](https://docs.starkbank.com/how-to-create-ecdsa-keys-python.md)
- [Node.js](https://docs.starkbank.com/how-to-create-ecdsa-keys-node.md)
- [PHP](https://docs.starkbank.com/how-to-create-ecdsa-keys-php.md)
- [Java](https://docs.starkbank.com/how-to-create-ecdsa-keys-java.md)
- [Ruby](https://docs.starkbank.com/how-to-create-ecdsa-keys-ruby.md)
- [Elixir](https://docs.starkbank.com/how-to-create-ecdsa-keys-elixir.md)
- [.NET](https://docs.starkbank.com/how-to-create-ecdsa-keys-dotnet.md)
- [Go](https://docs.starkbank.com/how-to-create-ecdsa-keys-go.md)
- [Clojure](https://docs.starkbank.com/how-to-create-ecdsa-keys-clojure.md)
- [cURL](https://docs.starkbank.com/how-to-create-ecdsa-keys-curl.md)
