Skip to content

Instantly share code, notes, and snippets.

OPENSSH-PRIVATEKEY FORMAT for non encrypted ssh-ed25519
https://github.com/openssh/openssh-portable/blob/master/PROTOCOL.key
https://github.com/openssh/openssh-portable/blob/master/sshkey.c :2957
https://github.com/openssh/openssh-portable/blob/master/cipher.c
https://github.com/openssh/openssh-portable/blob/master/sshbuf-getput-basic.c
OpenSSH key format prefixes most content with content length (uint32 + data).
All integers in OpenSSH key are encoded in big endian.
Example of openssh private key:
@MikaelSvenn
MikaelSvenn / gist:5fc7e40793f06b568373edafe89734ab
Created January 27, 2017 09:47
Guide for creating self-signed development certs using OpenSSL
Root-CA:
1) openssl genrsa -aes256 -out localhost-root-ca.key 4096
2) openssl req -out localhost-root-ca.csr -key localhost-root-ca.key -new -sha256
CN = localhost
-or-
CN = fully qualified domain name
3) openssl x509 -req -days 3000 -in localhost-root-ca.csr -signkey localhost-root-ca.key -out localhost-root-ca.pem -sha256