Skip to content

Instantly share code, notes, and snippets.

View jonajosejg's full-sized avatar

Jonathan G jonajosejg

View GitHub Profile
@jonajosejg
jonajosejg / instructions.md
Created February 13, 2025 18:23
how to really install a complete coding environment for windows

1

/**
* api.js - client for interracting with the steam client
* https://github.com/jonajosejg/steamclient
* Copyright (C) 2024, Jonathan Gonzales (MIT License)
*/
'use strict';
const assert = require('bsert');
const {Client} = require('bcurl');
@jonajosejg
jonajosejg / blk001.raw
Last active October 31, 2023 21:49
Sidechain genesis raw hex string
01000000 - version
0000000000000000000000000000000000000000000000000000000000000000 - prevblock
8a6be158deb38d5cc20aa8612ac303bb7ae59520d3b22213df5e88434f36b18e - merkleblock
2d87ce6000000000000000000000000000000000000000000000000000000000 - withdrawalBundle
0000000000000000000000000000000000000000000000000000000000000000 - mainchainBlock
00000000 - timestamp
ffff7f20 - bits
02000000 - nonce
01 - number of tx
01000000 - version
@jonajosejg
jonajosejg / sidechain.js
Created May 26, 2023 14:54
sidechain template
/*!
* sidechain.js - a sidechain template for bitcoin
* Copyright (C) 2023, Jonathan Gonzalies (MIT License).
* https://github.com/rojii/sidechain
*/
'use strict';
const assert = require('bsert');
const layout = require('./blockchain/layout');
'use strict';
const assert = require('bsert');
const EventEmitter = require('events');
const WEB3 = require('web3-eth');
const {endpoint} = require('./constants');
/**
'use strict';
const assert = require('assert');
const bcoin = require('bcoin');
const MTX = bcoin.MTX;
const Keyring = bcoin.wallet.WalletKey;
const Outpoint = bcoin.Outpoint;
const Script = bcoin.Script;
const Coin = bcoin.Coin;
@jonajosejg
jonajosejg / yo.txt
Created July 27, 2022 09:39
she called me name and just said hello all day ba daaaa, california esta lleno de maricones purse son maricones
0x42C6A98F84fec35d50c0188989817d5A535bB214
/* eslint-env mocha */
'use strict';
const {NodeClient, WalletClient} = require('../lib/client');
const assert = require('bsert');
const consensus = require('../lib/protocol/consensus');
const FullNode = require('../lib/node/fullnode');
const Network = require('../lib/protocol/network');
const Mnemonic = require('../lib/hd/mnemonic');
@jonajosejg
jonajosejg / epsilon.js
Last active January 7, 2020 03:36
alnilam variable for use with delta functions
var alnilam = Number.EPSILON * illai * 0.4503599627370496
var e = Number.EPSILON * 2 ** 52;
@jonajosejg
jonajosejg / covert_ecdh.md
Created January 2, 2020 12:08 — forked from chjj/covert_ecdh.md
Covert ECDH over secp256k1

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.