Zum Inhalt springen
ecdsa.com

OpenSSL-Befehls-Builder

Wähle eine Aufgabe, fülle die Lücken aus, kopiere einen funktionierenden Befehl – und lass dir jedes Flag darin erklären. Oder füge einen Befehl ein, den du irgendwo gefunden hast, und lass ihn für dich zerlegen.

100 % lokal – der Katalog besteht aus statischen Daten und der Parser läuft in deinem Browser; nichts, was du eingibst, wird irgendwohin gesendet

Schlüssel

Privaten EC-Schlüssel erzeugen

Die moderne Form mit einem einzigen Befehl. Schreibt einen privaten Schlüssel im Format PKCS#8, den Node.js, Go, Python, Java und WebCrypto ohne Konvertierung laden.

Parameter

Befehl
openssl genpkey -algorithm EC -pkeyopt ec_paramgen_curve:P-256 -out key.pem

Was jedes Flag bewirkt

openssl genpkey
Der Schlüsselgenerator von OpenSSL 3.x. Ein Befehl deckt alle Algorithmen ab und schreibt immer den PKCS#8-Container – `-----BEGIN PRIVATE KEY-----`.
-algorithm EC
Erzeugt einen Schlüssel auf einer elliptischen Kurve. Die Kurve selbst kommt aus -pkeyopt.
-pkeyopt ec_paramgen_curve:P-256
Algorithmusspezifische Option: erzeugt den Schlüssel auf der Kurve P-256. Ohne sie hat openssl keine Kurve, mit der es arbeiten kann, und bricht ab.
-out key.pem
Wohin der Schlüssel geschrieben wird. Lässt du das weg, landet der Schlüssel in deinem Terminal – praktisch für einen kurzen Blick, für alles andere denkbar schlecht.

Hinweise

  • Die Datei mit dem privaten Schlüssel enthält bereits den öffentlichen Schlüssel. Den öffentlichen Teil musst du nur dann separat speichern, wenn jemand anderes ihn lesen muss.
  • P-256, prime256v1 und secp256r1 sind drei Namen für dieselbe Kurve. secp256k1 ist eine tatsächlich andere Kurve, kein vierter Alias – wähle sie nur, wenn du mit Bitcoin oder Ethereum arbeitest.
  • Das ältere `openssl ecparam -name prime256v1 -genkey -noout -out key.pem` funktioniert weiterhin und erzeugt dasselbe Schlüsselmaterial, aber im SEC1-Container (`BEGIN EC PRIVATE KEY`). WebCrypto und mehrere Codepfade in der JVM akzeptieren nur PKCS#8.
  • Nichts hier ändert die Berechtigungen der Datei. Führe auf einem gemeinsam genutzten Rechner anschließend `chmod 600` für den Schlüssel aus.
Versionsunterschiede. `genpkey` und die NIST-Schreibweisen der Kurven funktionieren unter 1.1.1 und 3.x identisch. Welche Kurven es überhaupt gibt, hängt davon ab, wie das Binary gebaut wurde – `openssl ecparam -list_curves` liefert die Antwort für dein System.

Schritt-für-Schritt-Anleitung – dieselbe Aufgabe als getestete Schrittfolge, in der die Ausgabe jedes Befehls erklärt wird.

Verwandte Aufgaben

Jeder Befehl im Katalog wurde vor der Veröffentlichung mit seinen Standardparametern erzeugt und mit OpenSSL 3.6.3 (9 Jun 2026), darwin64-arm64 ausgeführt. Optionen ändern sich durchaus zwischen Releases – wo sich 1.1.1 und 3.x unterscheiden, weist die Aufgabe darauf hin.

How it works

openssl is not one program but roughly thirty, each with its own option set, and the manual page is organised around those programs rather than around what anyone is trying to do. The result is that “make a self-signed certificate with a SAN” lives under req, which is documented as the certificate request command, and that the flag which actually decides whether browsers accept your certificate — -addext — appears nowhere near the top. This page inverts that: 36 tasks phrased as goals, each producing a command whose every flag is spelled out underneath.

The explanations are the point. A command you copied and cannot read is a command you cannot adapt, and openssl’s flags are unusually easy to misread — -noout suppresses the object rather than all output, -nocrypt is the difference between a script that runs and one that hangs at a prompt, and -copy_extensions is why a certificate you issued yourself has no hostnames in it. Each task also lists the specific ways it goes wrong, because those are what actually costs the afternoon.

Values you type are quoted for a POSIX shell before they go into the command, so a path with spaces or a subject with a comma survives the copy-paste. If a value contains something a shell would normally act on — backticks, $( ), a semicolon — the builder says so, because the quoting means it will be passed through literally rather than executed, and that is occasionally the surprise rather than the reassurance. Windows users should note that cmd.exe and PowerShell quote differently; the commands here assume sh, bash or zsh.

The reverse mode splits a pasted command the way a shell would — respecting quotes, escapes, pipes and redirections — and looks each flag up in a dictionary covering 180 options across 24 subcommands. Nothing is executed, and a flag that is not in the dictionary is labelled unknown rather than given an invented meaning. For the authoritative list your build accepts, openssl <subcommand> -help is always right and always local.