Skip to content

Instantly share code, notes, and snippets.

View shea256's full-sized avatar

Ryan Shea shea256

View GitHub Profile
import * as secp from '@noble/secp256k1'
import { hkdf } from '@noble/hashes/hkdf'
import { sha256 } from '@noble/hashes/sha256'

function makeSharedSecret(priv: Uint8Array, pub: Uint8Array, i: number) : Uint8Array {
  const secretNumber = secp.getSharedSecret(priv, pub, true).slice(1,33)
  const salt = ""
  const keyInfo = String(i)
 const keyLength = 64
@shea256
shea256 / cure53-micro-btc-signer-audit.md
Last active January 9, 2023 15:16
micro-btc-signer audit by cure53

Private Social Payments

Author: Ryan Shea

Initial Draft: Oct 10, 2022

Last Updated: Aug 3, 2023

Overview

@shea256
shea256 / api-server.js
Created October 21, 2019 16:45
Apollo + Next
import { ApolloServer, gql } from 'apollo-server-micro'
import resolvers from './resolvers'
import typeDefs from './typeDefs'
const apiServer = new ApolloServer({ typeDefs, resolvers })
export default apiServer
Verifying my Blockstack ID is secured with the address 14Bx1w2LG7UKrvZgbqurP14ZsVosYhVKyn https://explorer.blockstack.org/address/14Bx1w2LG7UKrvZgbqurP14ZsVosYhVKyn
Verifying my Blockstack ID is secured with the address 1MvkpZt8tPeWYL98twyRFbbH7P9thKiCib https://explorer.blockstack.org/address/1MvkpZt8tPeWYL98twyRFbbH7P9thKiCib
Verifying my Blockstack ID is secured with the address 15BcxePn59Y6mYD2fRLCLCaaHScefqW2No https://explorer.blockstack.org/address/15BcxePn59Y6mYD2fRLCLCaaHScefqW2No
Verifying my Blockstack ID is secured with the address 1CpipBYyuaXksDETJRnq7c5mx3a7HG3tqg
@shea256
shea256 / gist:9b658acdd400690acf5a7d280ff54bcf
Created October 8, 2017 17:31
Verifying my Blockstack ID is secured with the address 18GNhLizQ51987YBpRrPwZqe3rqJy7dX34
Verifying my Blockstack ID is secured with the address 18GNhLizQ51987YBpRrPwZqe3rqJy7dX34
@shea256
shea256 / gist:fc371df0ae4db308fec12ef7431ea72b
Created October 6, 2017 22:34
Verifying my Blockstack ID is secured with the address 1D1zoHRx8XnBPanLsFbA1D8JgcaFLZiyxN
Verifying my Blockstack ID is secured with the address 1D1zoHRx8XnBPanLsFbA1D8JgcaFLZiyxN