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
# Load using the following command in SageMath: | |
# | |
# load("https://gist.githubusercontent.com/recmo/6393218cab40baa78e44766772d1ec34/raw/GaloisRing.sage") | |
# | |
# Get the latest version from https://gist.github.com/recmo/6393218cab40baa78e44766772d1ec34 | |
from sage.structure.richcmp import richcmp | |
class GaloisRingElement(CommutativeRingElement): |
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
(function(){window.renderMath=function(){renderMathInElement(document.body,{delimiters:[{left:'$$',right:'$$',display:true},{left:'$',right:'$',display:false}],throwOnError:false});};if(!window.katex){css=document.createElement('link');css.rel='stylesheet';css.href='https://cdn.jsdelivr.net/npm/katex@0.16.3/dist/katex.min.css';css.crossorigin='anonymous';script=document.createElement('script');script.src='https://cdn.jsdelivr.net/npm/katex@0.16.3/dist/katex.min.js';script.async=false;script.crossorigin='anonymous';copyTex=document.createElement('script');copyTex.src='https://cdn.jsdelivr.net/npm/katex@0.16.3/dist/contrib/copy-tex.min.js';copyTex.async=false;copyTex.crossorigin='anonymous';autoRender=document.createElement('script');autoRender.src='https://cdn.jsdelivr.net/npm/katex@0.16.3/dist/contrib/auto-render.min.js';autoRender.async=false;autoRender.onload=window.renderMath;autoRender.crossorigin='anonymous';document.head.appendChild(css);document.head.appendChild(script);document.head.appendChild(copyTe |
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
DUP2 899407 | |
PUSH1 718627 | |
PUSH2 718557 | |
ADD 686328 | |
JUMPDEST 573198 | |
POP 457984 | |
JUMPI 436369 | |
MSTORE 328876 | |
SWAP1 326765 | |
MLOAD 315104 |
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
#![cfg(all(target_arch = "aarch64", target_feature = "sha3"))] | |
use core::arch::asm; | |
const RC: [u64; 24] = [ | |
0x0000000000000001, | |
0x0000000000008082, | |
0x800000000000808a, | |
0x8000000080008000, | |
0x000000000000808b, | |
0x0000000080000001, |
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
I contributed to the Semaphore Trusted Setup Multi-Party Ceremony. | |
The following are my contribution signatures: | |
Circuit: semaphore16 | |
Contributor # 250 | |
Hash: c293791b 1806dea5 2b5eb5df 876a8690 | |
1bd6fd3b 642e1193 066254c2 53932eb5 | |
53e990b7 6dd80e26 a5b9e65e f8fd90b7 | |
94a06997 000dc2ad 4e4032f1 a87718fc | |
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
[book] | |
authors = ["Remco Bloemen"] | |
language = "en" | |
multilingual = false | |
src = "src" | |
[build] | |
create-missing = false | |
[preprocessor.html] |
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
contract ShardToken { | |
address OWNER; | |
address ROOT; | |
uint256[] ANCESTRY_PROOF; | |
address owner; | |
uint256 next_nonce; | |
uint256 balance; |
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
contract MerkleVerifier { | |
function hash_leaf(uint256 value) | |
internal pure | |
returns (bytes32 hash) | |
{ | |
return bytes32(value); | |
} | |
function hash_node(bytes32 left, bytes32 right) |
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
// Simple lending contract demostrating complex call-stack | |
// dependant state invariants. | |
// @author Remco Bloemen <remco@0xproject.com> | |
pragma solidity ^0.4.25; | |
// Simple non-reentrant version. (Or actually, the innermost call is responsible for paying back everyone.) | |
contract Lending1 { | |
constructor () public payable { |
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
contract BloomNuke { | |
function nuke() { | |
assembly { | |
log4(0, 0, 0, 1, 2, 3) | |
log4(0, 0, 4, 5, 6, 7) | |
log4(0, 0, 8, 10, 11, 12) | |
log4(0, 0, 13, 14, 15, 16) | |
log4(0, 0, 17, 18, 19, 20) | |
log4(0, 0, 21, 22, 23, 24) | |
log4(0, 0, 25, 27, 28, 29) |
NewerOlder