Skip to content

Instantly share code, notes, and snippets.

Christopher Jeffrey (JJ) chjj

Block or report user

Report or block chjj

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View ksk2010-revocation.zone
. 172800 IN DNSKEY 256 3 8 AwEAAcH+axCdUOsTc9o+jmyVq5rsGTh1EcatSumPqEfsPBT+whyj0/Uh D7cWeixV9Wqzj/cnqs8iWELqhdzGX41ZtaNQUfWNfOriASnWmX2D9m/E unplHu8nMSlDnDcT7+llE9tjk5HI1Sr7d9N16ZTIrbVALf65VB2ABbBG 39dyAb7tz21PICJbSp2cd77UF7NFqEVkqohl/LkDw+7Apalmp0qAQT1M gwi2cVxZMKUiciA6EqS+KNajf0A6olO2oEhZnGGY6b1LTg34/YfHdiII ZQqAfqbieruCGHRiSscC2ZE7iNreL/76f4JyIEUNkt6bQA29JsegxorL zQkpF7NKqZc= ; ZSK ; alg = RSASHA256 ; bits = 2048,17 ; key id = 16749
. 172800 IN DNSKEY 257 3 8 AwEAAaz/tAm8yTn4Mfeh5eyI96WSVexTBAvkMgJzkKTOiW1vkIbzxeF3 +/4RgWOq7HrxRixHlFlExOLAJr5emLvN7SWXgnLh4+B5xQlNVz8Og8kv ArMtNROxVQuCaSnIDdD5LKyWbRd2n9WGe2R8PzgCmr3EgVLrjyBxWezF 0jLHwVN8efS3rCj/EWgvIWgb9tarpVUDK/b58Da+sqqls3eNbuv7pr+e oZG+SrDK6nWeL3c6H5Apxz7LjVc1uTIdsIXxuOLYA4/ilBmSVIzuDWfd RUfhHdY6+cn8HFRm+2hM8AnXGXws9555KrUB5qihylGa8subX2Nn6UwN R1AkUTV74bU= ; KSK ; alg = RSASHA256 ; bits = 2048,17 ; key id = 20326
. 172800 IN DNSKEY 385 3 8 AwEAAagAIKlVZrpC6Ia7gEzahOR+9W29euxhJhVVLOyQbSEW0O8gcCjF FVQUTf6v58fLjwBd0YI0EzrAcQqBGCzh/RStIoO8g0NfnfL2MTJRkxoX b
@chjj
chjj / covert_ecdh.md
Created Oct 23, 2019 — forked from sipa/covert_ecdh.md
Covert ECDH over secp256k1
View covert_ecdh.md

Covert ECDH over secp256k1

If ECDH is used to establish a shared session secret for an encrypted connection, two elliptic curve points need to be transmitted (one in each direction) before encryption starts. In order to avoid being identifiable as a (specific) ECDH negotiation, ideally those two points are sent in a way that is indistinguishable from random.

This problem is easily addressed by using curves that support Elligator-style encodings: functions that encode a (subset of) elliptic curve points as sequences of bytes with no observable bias: (almost) every byte sequence corresponds to exactly one point, and the others correspond to none.

Unfortunately, no Elligator-style encoding is known for secp256k1.

@chjj
chjj / .vimrc
Created Feb 12, 2019
mini vimrc
View .vimrc
"
" ~/.vimrc
"
set nocompatible
set hidden
set ruler
set visualbell
set noerrorbells
set nostartofline
View bmocha.js
#!/usr/bin/env node
/* eslint no-control-regex: "off" */
'use strict';
const assert = require('assert');
const Path = require('path');
const {
View rewrite.js
'use strict';
const path = require('path');
const fs = require('./lib/utils/fs');
async function findFiles(dir, match, ignore, files) {
const list = await fs.readdir(dir);
for (const name of list) {
if (ignore.has(name))
@chjj
chjj / sweep-bcc.js
Created Aug 8, 2017
Sweep BCC from trezor multisig
View sweep-bcc.js
'use strict';
// Sweep bcc from trezor multisig.
const assert = require('assert');
const util = require('util');
const trezor = require('trezor.js-node');
const HDPublicKey = require('bcoin/lib/hd/public');
const HARDENED = 0x80000000;
View 1000-cost.json
[
{
"hash": "0000000000000000018c59d807bff651ead9f8fd6eef075ee5cffcf98bf4674c",
"height": 464208,
"size": 998109,
"txs": 684,
"inputs": 6162,
"outputs": 1362,
"inputCost": 5578086,
"outputCost": 271012,
View libsecp256k1.wast
This file has been truncated, but you can view the full file.
(module
(type $0 (func (param i32 i32)))
(type $1 (func (param i32 i32 i32 i32 i32 i32) (result i32)))
(type $2 (func (param i32)))
(type $3 (func (result i32)))
(type $4 (func (param i32 i32 i32 i32) (result i32)))
(type $5 (func (param i32 i32 i32) (result i32)))
(type $6 (func))
(type $7 (func (param i32) (result i32)))
View fisqrt.js
// Fast inverse square root in javascript
// https://en.wikipedia.org/wiki/Fast_inverse_square_root#Overview_of_the_code
// Example:
// > 1 / Math.sqrt(0.15625)
// 2.5298221281347035
// > Math.pow(0.15625, -0.5)
// 2.5298221281347035
// > Q_rsqrt(0.15625)
// 2.5254863388218056
View gist:358d4b1ab1a9ad3e2f9c2421db6d4794
78d841612ec3cfa069040348a45bbb0eca7006cdc01ed4be18d51ee8c0fd07bf
d2fe25f0ecc567158923131f12ab10b370463cebace765a0f9bfc4b3e655b183
3120a3bef7c2d904d6742c375214594420e90f953d54d391ccaefdce5ae60910
You can’t perform that action at this time.