Skip to content

Instantly share code, notes, and snippets.

View tarcieri's full-sized avatar

Tony Arcieri tarcieri

View GitHub Profile
@tarcieri
tarcieri / rwall.md
Last active March 25, 2022 22:25
My Broadcast [The UNIX rwall problem]

Originally from: http://catless.ncl.ac.uk/Risks/4.73.html#subj10.1

Jordan K. Hubbard jkh@violet.Berkeley.EDU
Thu, 2 Apr 87 10:45:46 PST

 [The following message was submitted to RISKS by 6 different people.
 I initially thought it might already have been widely circulated, but 
 its repeated receipt has led me to include it here anyway.  PGN]

By now, many of you have heard of (or seen) the broadcast message I sent to

@tarcieri
tarcieri / gist:7e3ff5582fa26708e7bd7dc2b419c2bc
Created September 26, 2021 17:36
openssl SEC1/RFC5915 private keys
$ openssl version
OpenSSL 1.1.1k 25 Mar 2021
$ openssl genpkey -algorithm EC -pkeyopt ec_paramgen_curve:P-256 -pkeyopt ec_param_enc:named_curve -out p256.pem
$ openssl asn1parse -in p256.pem
0:d=0 hl=3 l= 135 cons: SEQUENCE
3:d=1 hl=2 l= 1 prim: INTEGER :00
6:d=1 hl=2 l= 19 cons: SEQUENCE
8:d=2 hl=2 l= 7 prim: OBJECT :id-ecPublicKey
17:d=2 hl=2 l= 8 prim: OBJECT :prime256v1
27:d=1 hl=2 l= 109 prim: OCTET STRING [HEX DUMP]:306B02010104208225980620669F554FB548DA7AEA8AD04307E06F4F6E27BD75D96FC069A474B3A14403420004C48CA8CF3F38BA757E0D7FB2D961C3A1914A5783DE0748BE4024E3052AA804C4232BEB7AEB6E3503F487CB5F50EBDE03AF002E0318CF2F897BA983A74B016AA3
@tarcieri
tarcieri / POW4POS.md
Last active August 7, 2021 02:10
Proposal for Warner-Portman-Sinema compliance for Proof-of-Stake (and other non-PoW) blockchains

Proposal for Warner-Portman-Sinema compliance for Proof-of-Stake (and other non-PoW) blockchains

The Warner-Portman-Sinema amendment to the forthcoming Bipartisan Infrastructure Framework stipulates that systems with the following property are exempt from compliance obligations:

validating distributed ledger transactions through proof of work (mining)

By default, systems which use consensus based on Proof-of-Stake (PoS) leader election mechanisms do not include a "proof of work (mining)" mechanism. To potentially comply with the proposed legislation, it would be possible to augment Proof-of-Stake consensus with a Proof-of-Work (PoW) mechanism to meet the verbeage in the amendment.

The following is a description of a minimal Proof-of-Work mechanism, inspired by the one used by Bitcoin.

@tarcieri
tarcieri / aes128_aarch64.rs
Created May 11, 2021 18:19
AES-128 using ARMv8 Cryptography Extensions in Rust
#![feature(stdsimd)]
// Based on the following C intrinsics implementation:
// <https://github.com/noloader/AES-Intrinsics/blob/master/aes-arm.c>
//
// Original C written and placed in public domain by Jeffrey Walton.
// Based on code from ARM, and by Johannes Schneiders, Skip Hovsmith and
// Barry O'Rourke for the mbedTLS project.
use core::arch::aarch64::*;
@tarcieri
tarcieri / aarch64_sha256.rs
Created April 3, 2021 16:35
core::simd-based SHA-256 implementation using ARMv8 Cryptography Extensions
#![feature(stdsimd)]
// Based on the following C intrinsics implementation:
// <https://github.com/noloader/SHA-Intrinsics/blob/master/sha256-arm.c>
//
// Original C written and placed in public domain by Jeffrey Walton.
// Based on code from ARM, and by Johannes Schneiders, Skip Hovsmith and
// Barry O'Rourke for the mbedTLS project.
use core::arch::aarch64::*;
@tarcieri
tarcieri / acid_house.rb
Created March 20, 2020 18:16
Sonic Pi Acid House
use_bpm 128
live_loop :kick do
sample :bd_808, amp: 10
sleep 1
end
live_loop :snare do
sleep 1
sample :drum_snare_soft
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tarcieri
tarcieri / blinky_basic.rs
Created March 5, 2019 23:29
NeoTrellis M4 Rust blinky_basic example
#![no_std]
#![no_main]
extern crate cortex_m;
extern crate trellis_m4 as hal;
extern crate panic_halt;
extern crate smart_leds;
extern crate smart_leds_trait;
extern crate ws2812_timer_delay as ws2812;
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tarcieri
tarcieri / experimental.svg
Created April 21, 2017 14:27
DANGER: EXPERIMENTAL
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.