clj-ssh-keygen
                                
                                 clj-ssh-keygen copied to clipboard
                                
                                    clj-ssh-keygen copied to clipboard
                            
                            
                            
                        Generate RSA PKCS #1 key-pairs from scratch (without 3rd party libs) in Clojure
clj-ssh-keygen
Generate RSA PKCS #1 keys from scratch and without 3rd party libs in Clojure, export PEM and OpenSSH formats
☛ intended for hacking and educational purposes only!

Usage
 (let [key (generate-key)]
    (write-private-key! key "pvt.pem")
    (write-public-key! key "pub.pem")
    (write-openssh-public-key! key "id_rsa.pub")))
for generating a default (2048 bit) length key, while:
(write-private-key! (generate-key 2345) "pvt.pem")
will issue a custom length key:
$ openssl rsa -noout -text -in pvt.pem|head -n 1
RSA Private-Key: (2345 bit, 2 primes)
License
Copyright (c) 2020-2024 Saidone
Distributed under the MIT License