Skip to content

Instantly share code, notes, and snippets.

@dragon788
dragon788 / !scdrand-yubikey-nitro-compile-and-installation.md
Last active May 9, 2021 10:58
Script to use scdrand to generate entropy from smartcard

Using scdrand to utilize a smartcard as a hardware RNG

Copy/download the quick build steps file and execute it with sh quick-build-steps.sh and if you are on Debian and have Docker it should fetch the Dockerfile here which when run with the docker build in the script clones scdtools and installs scdrand (and scdtotp) on your host system.

After you've installed it you can run sudo scdrand to get try and add some entropy to the kernel pool.

For all of you wanting this feature there's a great option out there if you're willing to step beyond Signal: Conversations. There's no primary/secondary distinction: it does true-multi-device multi-key encryption (they adopted libsignal and built on it and I'm very grateful that OWS developed and released it so it could be built upon), as well as video chat, file attachments (encrypted, of course), and cross-device history syncing, and all that at 1/3rd the size of Signal, and without a dependency on push notifications. And you can pretty easily set up alt identities and use them on the same devices so there's no need to worry about [giving out a private number](https://www.vice.com/en_us/article/9kaxge/how-to-use-signal-without-giving-out-your-phone-number-a-gender

@mwild1
mwild1 / snikket-update-20200513.md
Last active January 26, 2021 19:15
Snikket Server: Updating from the initial alpha release to 20200512+

This update requires changes to the configuration of the container. Assuming you followed the quickstart guide on our website, you need do the following:

cd /etc/snikket

Open docker-compose.yml and remove the 'ports' section, and add network_mode:host. You can view the changes you need to make, or just fetch the updated version of

@themikefuller
themikefuller / aes-gcm.js
Created October 15, 2018 02:07
AES-GCM Encryption and Decryption Examples using Web Crypto (subtle.crypto) JavaScript API
async function generateKey() {
return await crypto.subtle.generateKey({
"name":"AES-GCM",
"length":256
},true,['encrypt','decrypt']);
}
async function exportKey(key) {
return await crypto.subtle.exportKey('jwk', key);
}
@ReyKoxha
ReyKoxha / nodebbstack.md
Created May 29, 2018 00:29
NodeBB - Full Stack Setup

Hello girls and boys,

remember my last guide about a "High performance stack"? This time I got something better for you - a complete guide from picking a server until the actual setup with plenty of extras.

Table of contents

  1. Server
  2. OS
  3. Preperation
  4. DNS
  5. Security
@sowbug
sowbug / gnuk-on-stlinkv2.sh
Last active August 14, 2023 18:15
Gnuk on ST-Link v2
# https://github.com/cabo/stlink
# https://blog.danman.eu/2-usb-crypto-token-for-use-with-gpg-and-ssh/
sudo ./upgrade_by_passwd.py -f ../regnual/regnual.bin ../src/build/gnuk-vidpid.bin
sudo st-flash erase && st-flash --reset write ~/src/gnuk/src/build/gnuk-vidpid.bin 0x08000000
-- or --
~/src/stlink/build/Debug/st-flash reset && \
~/src/stlink/build/Debug/st-flash erase && \
@kafene
kafene / gpg-wkd.md
Last active April 12, 2024 19:14
Setting up WKD for self-hosted automatic key discovery

I just got this working so I figured I'd share what I found, since there's hardly any information about this anywhere online except an RFC, the GPG mailing list and one tutorial from the GnuPG blog.

You can use automatic key discovery with WKD (Web key directory) to make it easy for users to import your key, in GPG since version 2.1.12. Since this feature is fairly new, it isn't yet available in the current LTS release of Ubuntu (16.04; xenial), however it is available in Debian stable (stretch).

I couldn't add a DNS CERT or DANE / OPENPGPKEY record through my email service (which also hosts my nameservers). I tried making the PKA record - a foo._pka.example.com TXT record but GPG doesn't seem to recognize it and fails; I'm still investigating why.

So the last option for self-hosted auto-discovery was WKD.

First thing I had to do was add an email address to my key. My primary UID is just my name so the key represents my identity rather

@nebulak
nebulak / Thunderbird-Addon-Ressources.md
Last active August 20, 2023 21:17
Outdated: Ressources and useful links for Thunderbird addon development

Ressources for Thunderbird addon development

Most content of this gist is outdated, as the TB addon system has changed and now uses the same addon system, that is used by firefox

Mozilla pages

@attacus
attacus / riot-matrix-workshop.md
Last active March 13, 2024 00:16
Create your own encrypted chat server with Riot and Matrix

This guide is unmaintained and was created for a specific workshop in 2017. It remains as a legacy reference. Use at your own risk.

Running your own encrypted chat service with Matrix and Riot

Workshop Instructor:

This workshop is distributed under a CC BY-SA 4.0 license.

What are we doing here?

@pklaus
pklaus / rpi3-arch-linux-to-sdcard.sh
Last active February 3, 2023 01:58
Raspberry Pi 3: Arch Linux ARM 64bit to SDcard Script. This is for the Rapsberry Pi 3. For the RPi 2 (or the 3 32bit), see https://gist.github.com/pklaus/9dd4a7bf040788cda501 . For the RPi 1, see https://gist.github.com/pklaus/b92dfc72136d1509c2ed .
#!/bin/bash
# <https://archlinuxarm.org/platforms/armv8/broadcom/raspberry-pi-3>
echo -e "\n\nArch Linux ARM to SD Card"
echo -e "For the Raspberry Pi 3, if you want to use the unofficial arm64 variant."
echo -e "(Otherwise use the Raspberry Pi 2 version of this script!)\n\n"
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2