This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### 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: |