npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cipherhub

v1.0.1

Published

encrypt messages based on github ssh public keys

Downloads

7

Readme

cipherhub

encrypt messages based on ssh public keys

cipherhub

It can be frustrating and annoying to communicate with somebody using public key cryptography since setting up PGP/GPG is a hassle, particularly managing keyrings and webs of trust.

Luckily, you can fetch the public ssh keys of anybody on github by going to:

https://github.com/$USERNAME.keys

If you just want to send somebody an encrypted message out of the blue and they already have a github account with RSA keys uploaded to it, you can just do:

cipherhub $USERNAME < secret_message.txt

and it will fetch their public keys from github, storing the key locally for next time.

There is an openssl rsautl command to do this but the usage is not particularly friendly and doesn't keep a keyring around.

install

With npm do:

npm install -g cipherhub

to get the cipherhub command.

usage

cipherhub USERNAME {OPTIONS} < message.txt

  Create an encrypted message for USERNAME on stdin.
 
  If there isn't yet a local key stored for USERNAME, request a key from
  https://github.com/$USERNAME.keys
 
  If there are multiple RSA keys, the operation fails and you will need to
  add the key you want manually with `cipherhub --add`.
  If there are no RSA keys, the command fails with a nonzero exit code.
 
  OPTIONS are:
 
    --no-github     don't request key data from github, just fail
    --no-save       don't automatically save keys fetched from github
    --quiet, -q     suppress extra output
    --encoding, -e  output encoding to use. default: base64

cipherhub --add USERNAME < id_rsa.pub
cipherhub -a USERNAME < id_rsa.pub

  Set the public key for USERNAME from stdin.

cipherhub --remove USERNAME
cipherhub -r USERNAME

  Remove a USERNAME from the local key list.

cipherhub --list
cipherhub -l

  List all the keys in the local key list.

cipherhub --decrypt PRIVKEY {OPTIONS}
cipherhub -d PRIVKEY {OPTIONS}

  Decrypt a message on stdin with an rsa key file PRIVKEY.
  If PRIVKEY isn't specified, only `-d` by itself, cipherhub uses ~/.ssh/id_rsa

  OPTIONS are:

    --encoding, -e  input encoding. default: base64

crazy ideas

You can create private github issues by just encrypting your message with the maintainer's public key and posting the issue with the ciphertext.

caveat npmtor

github's servers can be compromised by a court order, intruder, or employee. You should use a secondary means of verification to check all the keys fetched from github where secrecy from courts, intruders, and github employees is of paramount importance.

license

MIT