Skip to content

Instantly share code, notes, and snippets.

Avatar

Robert Quattlebaum darconeous

  • @nestlabs/@google
  • California, USA
View GitHub Profile
@darconeous
darconeous / quick_install.sh
Created Mar 17, 2020
Installer script for ledger-u2f-javacard
View quick_install.sh
#!/bin/sh
GP=${GP-java -jar gp.jar}
set -v
set -e
# This is for the ACR122U to put it into
# a nice state where it won't time out on us.
$GP -d -v -a ff0041ff00 -a ff00520000 || true
@darconeous
darconeous / Curve25519-Curve448-Terminology.md
Last active Feb 9, 2020
Curve25519/Curve448 Terminology
View Curve25519-Curve448-Terminology.md

Curve25519/Curve448 Terminology

Curve25519: A well-known Montgomery curve designed for ECC at a 128-bit security level.

X25519: The name of the scalar-point multiplication function for points on Curve25519 when performing ECDH. It is also commonly used as a shorthand for ECDH-using-Curve25519.

EdDSA:

View tesla-key-card-protocol.md

Tesla Key Card Protocol

Researched by Robert Quattlebaum darco@deepdarc.com.

Last updated 2020-02-03.

Image of Tesla Key Card Image of Tesla Model 3 Key Fob

@darconeous
darconeous / playground.rs
Last active Jul 2, 2019 — forked from rust-play/playground.rs
Code shared from the Rust Playground
View playground.rs
use futures::prelude::*;
use pin_utils::unsafe_pinned;
use std::ops::Deref;
use std::pin::Pin;
use std::sync::Arc;
/// A container for a single object with lifetime that is bound to that of an `Arc`.
/// This is useful for passing around boxed futures that have a lifetime that is limited
/// to that of the object that created it.
///
@darconeous
darconeous / playground.rs
Last active May 29, 2019 — forked from rust-play/playground.rs
Code shared from the Rust Playground
View playground.rs
/// Demonstration of compile-time key-value type safety.
///
/// This program demonstrates how you use Rust generics to encode type
/// information into the keys for a key-value store. This allows for
/// type-safe access to data in the store, preventing things like writing
/// strings to keys that should only contain integers. Attempting to
/// do so results in a compile-time error.
///
/// The example code is at the top of this file, the implementation details
/// are below the example.
@darconeous
darconeous / playground.rs
Last active May 17, 2019 — forked from rust-play/playground.rs
Code shared from the Rust Playground
View playground.rs
/// Demonstration of a way to do polymorphic property lookup of standardized
/// collections of properties via simple traits and getter methods. This
/// approach could be extended to do things like fetch a list of the supported
/// keys, or expose aritrary traits via a property interface.
/// This is the trait that will be our general-purpose property interface. It
/// is intended to be used as a trait object.
///
/// This trait is implemented automatically by the `impl_super_trait!` macro,
@darconeous
darconeous / main.c
Created Mar 25, 2018
ATTiny LED Twinkler
View main.c
/* ATTiny LED Twinkler
*
* This is come code I wrote a while back to "twinkle"
* four GPIO outputs that would drive LEDs. It was designed
* to be run on an eight-pin ATTiny13 chip. It works
* quite well, even considering how inefficient it is.
*
* - Robert Quattlebaum, 2012
*/
@darconeous
darconeous / eagle-200-curl.md
Last active Sep 27, 2021
Eagle-200 Local Usage via CURL
View eagle-200-curl.md

Eagle-200 Local Usage via CURL

You can locally pull data from your Rainforest Eagle-200 using cURL.

Rainforest has published a local API document which explains the details of the protocol. But this particular document is about quickly getting to the point and giving you some cURL commands you can use to immediately start pulling out data.

Prerequisites

First, I'll assume that you have the following environment variables set:

View keybase.md

Keybase proof

I hereby claim:

  • I am darconeous on github.
  • I am darconeous (https://keybase.io/darconeous) on keybase.
  • I have a public key whose fingerprint is 23D1 FEC8 37D0 5C91 5BA3 8A5D 95B0 6A0F 3F86 5814

To claim this, I am signing this object:

@darconeous
darconeous / masrp.md
Last active Sep 9, 2019
Multiplexed Asynchronous Serial Reliability Protocol (MASRP)
View masrp.md

Multiplexed Asynchronous Stream Reliability Protocol (MASRP)

Copyright (C) 2017 Nest Labs, All Rights Reserved

License

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: