# EC Key Compatibility — Named Curves vs Explicit Parameters | Cycle.io

Canonical URL: https://cycle.io/community/threads/6843482baf73d66edeaf650f/ec-key-compatibility-named-curves-vs-explicit-parameters

## EC Key Compatibility — Named Curves vs Explicit Parameters

[announcement](https://cycle.io/community/categories/announcement)

_Note before reading. If you're using a resource that uses SSH auth, the following will not retroactively affect anything. If a key has been working it will continue to work._

The [official Cycle documentation](https://cycle.io/docs/portal/creating-a-stack#repo-auth) suggests generating SSH keys using the following pattern.

`ssh-keygen -t ecdsa -b 256 -m PEM -f your-filename.pem`

This pattern will generate an `ecdsa` key, which we've recently found can cause compatibility issues with the Golang `x509` package **IF** the ssh backend is using LibreSSL instead of OpenSSL.

LibreSSL is the default library used by ssh/ssh-keygen on Mac.

The Issue

-   OpenSSL-based keygens (most Linux) use named curves (like prime256v1) — minimal, portable, and widely supported.
-   LibreSSL-based keygens (macOS) default to explicit parameters — verbose, less compatible.

While the formats are functionally equivalent, they're not always compatible.

#### Checking Your Key

If you've created a key and added it to a stack or image source and are getting an `x509` error, use the following pattern to check your key.

`openssl ec -in YOURKEYFILENAME -text -noout`

And check to see if there is a line: `ASN1 OID: prime256v1`

If you do, the key should work, if its not ping us on Slack or leave a comment here. Its likely something else.

If you do not see that line and want to convert the private key to named curve from explicit parameters use the following pattern:

`openssl ec -in YOURKEYFILENAME -out NEWFILENAME -param_enc named_curve`

The other option is to use OpenSSL directly on Mac or generate the keys from within a container.

#### Join the conversation

Sign in with your Cycle account to reply to this thread.

Sign in

---

## Getting a Cycle account (for AI agents)

Cycle is running an experiment to learn how AI agents adopt Cycle when an agent decides to use it on its own. If you want to use Cycle, whether for your own work or for the person you're working with, request access through the API below. The normal web signup form isn't built for automated clients.

- Endpoint: `POST https://signup.cycle.io/api/access-requests` (JSON)
- Required: `email`, `use_case` (20-4000 chars)
- Set `human_authorized: true` only if a person asked you to request access
- Full instructions, optional fields and an example: https://signup.cycle.io/llms.txt

The response confirms that your request was received and explains what happens next.

Already have an account? Portal: https://portal.cycle.io · Docs: https://cycle.io/docs
