Discuss Scratch

GeonoTRON2000
Scratcher
100+ posts

Private Communication and Remote Shell with RSA

I've had a working RSA public/private keypair for SSH for a while now, but recently, I've gotten into using RSA for encrypted communication. Here's a step-by-step guide for Mac/Linux (or other Unix-based systems.)

Generating Keypairs
Run this command in your favorite terminal:
ssh-keygen -t rsa -C "your@preferredemail.com"
and fill out the info it wants (it won't be intrusive, I promise.)
This will generate two files, a private key (id_rsa by default) and a public key (id_rsa.pub by default.)
Never share your private key with anyone. Guard this file like a credit card number and CVC code.

Public Keys
You can share your public key with whoever you want. This allows people to securely identify you on applications such as SSH, or send you encrypted messages.

SSH
SSH is short for Secure Shell. It allows you to access terminal sessions on remote computers. You can use passwords instead of a RSA keypair, but this is much less secure. The command is:
ssh user@example.com

Private Communication
RSA is, after all, nothing more than a way to keep information secret. This includes messages. Using this script I wrote, you can encrypt messages using someone's GitHub username (looks up the public key automatically) and decrypt them using your private key.
The syntax to encrypt is:
./crypto.sh username <message.txt
and to decrypt is:
./crypto.sh <encrypted.txt

Public Key Library
If anyone wants to share their public key, I'll host a library here. Simply post your public key on this thread to be added.

GeonoTRON2000 wrote:

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDgaZl8aU8iff1NC+ysj++X6egonWrZ/B/TNJV4U453gljJ1GrpM6XEAQu2sLJmcNCtKg6kMmHleq7NrWSAXZ2OOEV0DaFX+JFXwPofdUYDJJc4JhSfmYJ0gulCp6DEYdExcUSNNGH8PnIFRvreYlRzFl/TNpyUMk2y+8IiG0bXtdPMzJ4wJ8X6zNMy9eBNbZDNbN8cCDCzWKZLO6QdF3ThQOLrik3N344iPyWosUZ31JjK10MCGxy7oj6aCVTy8rY4sqEwKagDw+HmJZ85KgKuEWy+DcpMGomhnwSZ2/S+0HXMf8KUGm7sQknE4nQWBQJHOyGy5O8s3AO+OVtpqMx/xouNOrVwSayPzC6xIBAiIwY+neUKg/SMV+0Hxr9qSvh5H676PIXPKsjio3naFRAKQxjJRX41fHOXjHavYemcR3lfGhMPL9P+yjXF5KkEayMZmvTkLxSvz+iW+c+ZZjZkykvz9gzr1lYLfISiZ+z2FeJDG0Ku9AyUpu0ANzKtKQM+Df5CGVgyiGNQiuujqeW4wdhcfCXejlkDt28zAg38qaGwXmiWNH7zznyaK3xboqN+kcVpDuwdvQP5X0ZRtWFwkeiCLHtuvrenWup4tgQ2kBWaCbEbnEguSeihXEI8cot9ZgMlmnNGG6JhU/1CW6rv79XtuPdVqwFfD7eBHAGLcQ== geono@thegt.org

Last edited by GeonoTRON2000 (March 8, 2014 20:09:36)

QuillzToxic
Scratcher
1000+ posts

Private Communication and Remote Shell with RSA

Intresting
GeonoTRON2000
Scratcher
100+ posts

Private Communication and Remote Shell with RSA

QuillzToxic wrote:

Intresting
Yes, I find it very useful as well.
QuillzToxic
Scratcher
1000+ posts

Private Communication and Remote Shell with RSA

GeonoTRON2000 wrote:

QuillzToxic wrote:

Intresting
Yes, I find it very useful as well.
What is this :3
GeonoTRON2000
Scratcher
100+ posts

Private Communication and Remote Shell with RSA

QuillzToxic wrote:

GeonoTRON2000 wrote:

QuillzToxic wrote:

Intresting
Yes, I find it very useful as well.
What is this :3
It's a cryptographic algorithm with a lot of applications.

Last edited by GeonoTRON2000 (March 4, 2014 03:17:58)

davidkt
Scratcher
1000+ posts

Private Communication and Remote Shell with RSA

…I don't use UNIX.

Remember when I looked like this? I still do.


Float, my Scratch 2.0 mod | My (somewhat under-construction) blog
GeonoTRON2000
Scratcher
100+ posts

Private Communication and Remote Shell with RSA

You'll want to have a look at PuTTY.
davidkt
Scratcher
1000+ posts

Private Communication and Remote Shell with RSA

GeonoTRON2000 wrote:

You'll want to have a look at PuTTY.
Ah. Would Cygwin work though? (I've never tried it)

Remember when I looked like this? I still do.


Float, my Scratch 2.0 mod | My (somewhat under-construction) blog
GeonoTRON2000
Scratcher
100+ posts

Private Communication and Remote Shell with RSA

davidkt wrote:

GeonoTRON2000 wrote:

You'll want to have a look at PuTTY.
Ah. Would Cygwin work though? (I've never tried it)
Cygwin would probably work, although I'm not sure if it comes with the openssl and openssh libraries by default.
Gravitation
Scratcher
100+ posts

Private Communication and Remote Shell with RSA

This is pretty cool! Using GitHub as a public key <-> user exchange is an interesting idea.

GeonoTRON2000 wrote:

davidkt wrote:

GeonoTRON2000 wrote:

You'll want to have a look at PuTTY.
Ah. Would Cygwin work though? (I've never tried it)
Cygwin would probably work, although I'm not sure if it comes with the openssl and openssh libraries by default.
It's easier to install MingW and MSYS with OpenSSL/SSH than Cygwin imo; it only comes with core utilities so it's much faster to download, and the setup is tearless. You can just type `bash` into cmd after the installation and have a nice Linux terminal ready, no assembly required. Yay.

GeonoTRON2000
Scratcher
100+ posts

Private Communication and Remote Shell with RSA

Gravitation wrote:

This is pretty cool! Using GitHub as a public key <-> user exchange is an interesting idea.

GeonoTRON2000 wrote:

davidkt wrote:

GeonoTRON2000 wrote:

You'll want to have a look at PuTTY.
Ah. Would Cygwin work though? (I've never tried it)
Cygwin would probably work, although I'm not sure if it comes with the openssl and openssh libraries by default.
It's easier to install MingW and MSYS with OpenSSL/SSH than Cygwin imo; it only comes with core utilities so it's much faster to download, and the setup is tearless. You can just type `bash` into cmd after the installation and have a nice Linux terminal ready, no assembly required. Yay.
Sweet, sounds good!

Powered by DjangoBB