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
// tweaked from: https://stackoverflow.com/a/42718113/1170664 | |
func getXML(url string) ([]byte, error) { | |
resp, err := http.Get(url) | |
if err != nil { | |
return []byte{}, fmt.Errorf("GET error: %v", err) | |
} | |
defer resp.Body.Close() | |
if resp.StatusCode != http.StatusOK { | |
return []byte{}, fmt.Errorf("Status error: %v", resp.StatusCode) |
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/bash | |
set -e | |
export CONFIG_MODULE_SIG=n | |
export CONFIG_MODULE_SIG_ALL=n | |
export KERNELRELEASE=${1} | |
echo "Installing FacetimeHD camera for $KERNELRELEASE" | |
cd /tmp | |
git clone https://github.com/patjak/bcwc_pcie.git |
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 "ecc/babyjubjubParams.code" as context | |
import "ecc/proofOfOwnership.code" as proofOfOwnership | |
import "hashes/sha256/512bitPacked.code" as sha256packed | |
def proofOfKnowledge(private field[4] secret, field[2] hash) -> (field): | |
// check that the computed hash matches the input | |
hash == sha256packed(secret) | |
return 1 | |
def main(field[2] pkA, field[2] pkB, field[2] hash, private field skA, private field[4] secret, private field skB) -> (field): |
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
[dependencies] | |
sgx-isa = { version = "0.2", features = ["sgxstd"] } | |
# RustCrypto, used for CMAC | |
cmac = "0.2.0" | |
crypto-mac = "0.7.0" | |
aes = "0.3.2" | |
block-cipher-trait = "0.6.2" | |
generic-array = "0.12" |
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
''' | |
Pure Python Borromean Ring Signatures | |
DEPENDS ON: pip install ecdsa | |
WARNING: THIS IS A PEDAGOGICAL IMPLEMENTATION. | |
PERFORMANCE IS HORRIBLE AND NON-CONSTANT. | |
CORNER CASES ARE NOT PROPERLY CHECKED. | |
FOR THE LOVE OF GOD USE THE CODE FROM THE ELEMENTS PROJECT. | |
https://gist.github.com/badmofo/2d6e66630e4a6748edb7 | |
''' | |
from hashlib import sha256 |
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
sudo apt-get update | |
sudo apt-get install golang-go -y | |
wget https://dist.ipfs.io/go-ipfs/v0.4.15/go-ipfs_v0.4.15_linux-386.tar.gz | |
tar xvfz go-ipfs_v0.4.15_linux-386.tar.gz | |
sudo mv go-ipfs/ipfs /usr/local/bin/ipfs |
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
// This file is MIT Licensed. | |
// | |
// Copyright 2017 Christian Reitwiessner | |
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF O |