Skip to content

Instantly share code, notes, and snippets.

View grempe's full-sized avatar
🚀
Coding like crazy.

Glenn Rempe grempe

🚀
Coding like crazy.
View GitHub Profile
@grempe
grempe / hashes.js
Created July 30, 2021 21:12
Hash Encodings Example
// filename: hashes.js
// For Node.js
// Run this file in your terminal using node:
// $ node hashes.js
// NOTE : You can find an interactive Runkit version of this file here:
// https://runkit.com/truestamp/610455fa5f22db001adf76a8
const crypto = require('crypto')
BEGIN MESSAGE.
GBx6Q8YTN3Y7TWB HoPknyYV4C5vdQl YyUKWVhdNEP2Ebs YEkUgidKlGyWdLd
XDzn0YPdqUT4jvn 5mq5TlDdHU7TCKq 6Xr2MZHgg7FAA3Z 8onR3P5xGsYaXbP
kspQdcAMqRrBCnS SO3pVkMPbOBC0Vn 9eA0UGhcxSgCv96 KDcWcK5PxDWgDfo
KROfhtkGGCoAtay 5OV4ptQhH55Fvn7 u9BBq21.
END MESSAGE.
@grempe
grempe / README.md
Last active February 27, 2020 20:51
Keybase Signed Assertions

Keybase Self Claims

The excellent Keybase.io service provides a means to make cryptographic claims to prove ownership of certain types of information. e.g. DNS, Twitter, etc. These proofs are independently verified by each client by retrieving a proof statement from each service in a service dependant manner.

However Keybase does not provide a way to make arbitrary claims for services, accounts, keys, etc. that are not officially supported. The ability to make such arbitrary claims, perhaps in the form of unverified key:value pairs which are

➜ ~ openssl speed sha256 sha512
To get the most accurate results, try to run this
program when this computer is idle.
Doing sha256 for 3s on 16 size blocks: 4524013 sha256's in 2.65s
Doing sha256 for 3s on 64 size blocks: 2538054 sha256's in 2.62s
Doing sha256 for 3s on 256 size blocks: 1179898 sha256's in 2.64s
Doing sha256 for 3s on 1024 size blocks: 360805 sha256's in 2.60s
Doing sha256 for 3s on 8192 size blocks: 51451 sha256's in 2.66s
Doing sha512 for 3s on 16 size blocks: 3500317 sha512's in 2.65s
Doing sha512 for 3s on 64 size blocks: 3257795 sha512's in 2.58s
@grempe
grempe / bcoin.conf
Last active May 30, 2017 21:21
We are starting bcoin with the command `bcoin --http-host=:: --host=:: --daemon` on a public server for testing. The bcoin.conf file is show below. This is a testnet instance.
# Sample bcoin config file (~/.bcoin/bcoin.conf)
#
# Options
#
network: testnet
use-workers: true
# max-workers: 4
# worker-timeout: 5000
@grempe
grempe / beacon.sh
Last active April 21, 2024 10:00
The following are modified (to work, and work on macOS) from the Hackaday article about the NIST Randomness Beacon. You may need to `brew install coreutils` and add them to your path to get the shasum binaries. http://hackaday.com/2014/12/19/nist-randomness-beacon/
## NIST Randomness Beacon verification routine
## Only slightly adapted by Elliot Williams
## from code provided by Lawrence Bassham, NIST
## The UNIX time that you'd like to test:
##
whichRecord=1491202440
## --------------- Utility Functions ----------------
@grempe
grempe / gen_long_expire_gem_cert.rb
Created October 13, 2016 01:22
A script to generate a Ruby gem signing certificate of N years length. Temporary workaround until this is built into Rubygems.
#!/usr/bin/env ruby
# Usage:
# ./gen_long_expire_gem_cert.rb email@example.com [years]
# See also:
# https://github.com/rubygems/rubygems/pull/1725
# https://github.com/djberg96/sys-uname/issues/5
require 'rubygems'
A challenge.
Prove that a file or hash uploaded to stamp.io, and the certificate page that stamp.io provides, can
be used to unequivocally, deterministically, and mathematically prove that the file existed
on or before the timestamp in the certificate.
The answer code:
Sample code in pure javascript, executed with node, using the current stampery NPM package installed from npmjs.org.
All dependencies should be only an 'npm install' away and run with e.g. 'npm test'.
Verifying that +grempe is my blockchain ID. https://onename.com/grempe
@grempe
grempe / keybase.md
Created November 6, 2014 00:45
keybase.io proof - DO NOT REMOVE

Keybase proof

I hereby claim:

  • I am grempe on github.
  • I am grempe (https://keybase.io/grempe) on keybase.
  • I have a public key whose fingerprint is 497A 6138 963D 6C47 202B 238B A4A2 88A3 BECC AE17

To claim this, I am signing this object: