简体   繁体   中英

Generate a public / private key pair in Julia

I am playing around with some encryption / blockchain ideas right now that require the use of a public / private key pair. I looked at some of the existing packages and could not find one. https://gitlab.com/braneproject/ECC.jl provides much of the desired functionality but lacks the ability to create a public key.

Any idea how I would go about doing this? In Python, I would use from ecdsa import SigningKey to get this functionality. I also looked at https://github.com/JuliaCrypto/OpenSSH.jl but it seems focused on documenter.

The library you mention depends on OpenSSH being installed on your system, and if it is, you can do the following in the REPL. Hit the ';' key and you can enter ssh-keygen at the prompt, as in:

shell> ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (users/yourname/.ssh/id_rsa):

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM