This file contains hidden or 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
$ ./bin/poly1305.native.exe | |
2.5.2. Poly1305 Example and Test Vector | |
For our example, we will dispense with generating the one-time key | |
using AES, and assume that we got the following keying material: | |
o Key Material: 85:d6:be:78:57:55:6d:33:7f:44:52:fe:42:d5:06:a8:01:0 | |
3:80:8a:fb:0d:b2:fd:4a:bf:f6:af:41:49:f5:1b |
This file contains hidden or 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
[package] | |
name = "orc-builder" | |
version = "0.1.0" | |
edition = "2021" | |
[dependencies] | |
clap = { version = "4.4", features = ["derive"] } | |
serde = { version = "1.0", features = ["derive"] } | |
serde_json = "1.0" | |
sha2 = "0.10" |
This file contains hidden or 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
import time | |
from dataclasses import dataclass | |
from typing import Awaitable, Callable, Generic, Iterable, Literal, Tuple, TypeVar, Union | |
_TaskInputT = TypeVar('_TaskInputT') | |
_TaskOutputT = TypeVar('_TaskOutputT') | |
TaskTypeT = Literal['first', 'intermediate', 'final'] | |
@dataclass |
This file contains hidden or 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
// SPDX-License-Identifier: AGPL-3.0-only | |
pragma solidity ^0.8.0; | |
import { IERC721 } from '@openzeppelin/contracts/token/ERC721/IERC721.sol'; | |
import { IERC721Receiver } from '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol'; | |
import { Staking } from './Staking.sol'; | |
import { randomBytes32 } from './Random.sol'; | |
import { Moderation } from './Moderation.sol'; |
This file contains hidden or 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
use merlin::Transcript; | |
pub trait TranscriptExt { | |
// Proposed method to fork a transcript | |
fn fork_transcript(&mut self) -> Transcript; | |
// Proposed method to append another transcript | |
fn append_transcript(&mut self, other: &mut Transcript); | |
} |
This file contains hidden or 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
#!/usr/bin/env python3 | |
import os | |
import re | |
import sys | |
import requests | |
import calendar | |
from datetime import datetime, timedelta, date | |
from typing import TypedDict | |
from collections import defaultdict |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Triangle</title> | |
</head> | |
<body> | |
<canvas id="canvas" width=500 height=500></canvas> | |
<script> |
This file contains hidden or 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
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; | |
contract RandomStorage { | |
mapping(bytes32 => bytes32) internal data; | |
event ReadEvent(bytes32 k, bytes32 v); | |
constructor() {} |
This file contains hidden or 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
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.18; | |
contract SapphireShuffle { | |
address private constant RANDOM_BYTES = 0x0100000000000000000000000000000000000001; | |
error ErrorGeneratingRandom(); | |
function _random_bytes32() |
This file contains hidden or 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
// SPDX-License-Identifier: AGPL-3.0-or-later | |
pragma solidity ^0.8.9; | |
contract WW | |
{ | |
event EncryptedResponse(bytes32 nonce, bytes data); | |
event PublicKey(bytes32 x25519_public); | |
struct Coupon { |
NewerOlder