Skip to content

Instantly share code, notes, and snippets.

Avatar

Alex Bosworth alexbosworth

View GitHub Profile
View SNICKER_BIP_draft.mediawiki


  BIP: ??
  Layer: Applications
  Title: SNICKER - Simple Non-Interactive Coinjoin with Keys for Encryption Reused
  Author&#58; Adam Gibson <AdamISZ@protonmail.com>
  Comments&#45;Summary&#58; No comments yet.
  Comments&#45;URI&#58; &#45;
  Status&#58; Proposed
  Type&#58; Informational
  Created&#58; &#45;

@arik-so
arik-so / schnorr_signature.js
Last active Jul 10, 2018
Schnorr Experimenting
View schnorr_signature.js
const ecurve = require('ecurve');
let secp256k1 = ecurve.getCurveByName('secp256k1');
const BigInteger = require('bigi');
const crypto = require('crypto');
const calculateHash = (R, P, message) => {
const hashPreimage = Buffer.concat([R.getEncoded(true), P.getEncoded(true), Buffer.from(message, 'utf-8')]);
return BigInteger.fromHex(crypto.createHash('sha256').update(hashPreimage).digest('hex')).mod(secp256k1.n);
};
@bretton
bretton / improved-lnd-bitcoind-install.md
Last active Oct 23, 2020
updated & improved guide to installing LND, Bitcoind, on Ubuntu 16.04 Server on testnet
View improved-lnd-bitcoind-install.md

2018-03-18: Updating of this guide is taking a backseat to the mainnet version at

Intro

This guide is specific to getting LND and bitcoind running on ubuntu 16.04 LTS for testnet.

It does not address mainnet, or using btcd, or neutrino.

Original installation guide:

@joyrexus
joyrexus / README.md
Last active Apr 12, 2021
collapsible markdown
View README.md

collapsible markdown?

CLICK ME

yes, even hidden code blocks!

print("hello world!")
@pixelspark
pixelspark / Fallible.swift
Created Jun 3, 2015
Swift Fallible type
View Fallible.swift
/**
FIXME: Box exists to prevent the "Unimplemented IR generation feature non-fixed multi-payload enum layout" error. */
final class Box<T> {
let value: T
init(_ value: T) {
self.value = value
}
}
@s-aska
s-aska / Keychain.swift
Last active Aug 25, 2020
Swift Keychain class ( supported Xcode 6.0.1 )
View Keychain.swift
import UIKit
import Security
class Keychain {
class func save(key: String, data: NSData) -> Bool {
let query = [
kSecClass as String : kSecClassGenericPassword as String,
kSecAttrAccount as String : key,
kSecValueData as String : data ]
View delay.swift
func delay(delay:Double, closure:()->()) {
dispatch_after(
dispatch_time(
DISPATCH_TIME_NOW,
Int64(delay * Double(NSEC_PER_SEC))
),
dispatch_get_main_queue(), closure)
}
@julasamer
julasamer / Timer.swift
Last active Aug 29, 2015
Timer.swift - A Timer class
View Timer.swift
/**
Copyright (c) 2014 Julian Asamer
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions: