Skip to content

Instantly share code, notes, and snippets.

// Constructor deploys the linked eQRTFactory, which users can call
// to generate a Quantum-Resistant token meeting the ERC-20 standard
constructor() public {
eQRTFactory eQRTContract = new eQRTFactory(address(this));
eQRTGenerator = eQRTContract;
}
// called by an account holder in order to replace the XMSS pubkey in their XMSSAccount
// The keccak256 hash of their new XMSS pubkey (with 0x) must be passed
// in as a message, signed using a valid OTS of their previous XMSS pubkey
function replaceXMSSpubkey(bytes calldata _newXMSSpubkey, bytes calldata _signedHash) external {
require(accounts[msg.sender].isLinked == true, "caller must have an XMSSAccount");
require(accounts[msg.sender].hasMultipleXMSSPubkeys == false, "multiplePubkeys XMSSAccounts need to pass argument specifying XMSS pubkey to replace");
bytes32 hashedNewPubkey = keccak256(_newXMSSpubkey);
// pubkey[0] is the only one which can be replaced for a user with a single XMSS pubkey
// One XMSSAccount exists for every unique Ethereum EAO in the "accounts" mapping.
// An Ethereum user desiring to protect ETH and ERC-20 assets with XMSS
// can invoke newXMSSAccount() to create a PQSecureMultisig contract wallet
struct XMSSAccount {
bytes[] pubkeys; // Dynamic array of XMSS pubkeys (each is 67 bytes)
uint32[] nextOTSindex; // nextOTSindex[x] linked to pubkey[x] - 32 bits allows for values 0 - 4294967295 (tree height of 32)
Descriptor[] descriptor; // descriptor[x] linked to pubkey[x] - contains tree height, hash function, etc (see XMSSVerify.sol)
mapping(bytes => uint) XMSSpubkeyIndex; // links XMSS pubkey to index x in list, so that pubkey[x] / nextOTSindex[x] / descriptor[x] can be used
address PQSecureMult
@doctor-gonzo
doctor-gonzo / arcDance.pde
Created February 28, 2020 18:27 — forked from beesandbombs/arcDance.pde
arc dance
// arc dance by dave
// https://twitter.com/beesandbombs/status/1233403691673235457
int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;
}
@doctor-gonzo
doctor-gonzo / sineShine.pde
Created January 21, 2020 18:00 — forked from beesandbombs/sineShine.pde
sine shine
int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;
}
float ease(float p, float g) {
if (p < 0.5)
return 0.5 * pow(2*p, g);
### Keybase proof
I hereby claim:
* I am doctor-gonzo on github.
* I am charlie_thompson (https://keybase.io/charlie_thompson) on keybase.
* I have a public key ASAreLVnAmnbTugnAzSAYRLDiI7B0PszcxxCpylV_lLTwAo
To claim this, I am signing this object: