Skip to content

Instantly share code, notes, and snippets.

View cygnusv's full-sized avatar
🐛

David Núñez cygnusv

🐛
View GitHub Profile
@robertDurst
robertDurst / ShamirSecretShare.rs
Created July 20, 2018 15:24
LaGrange interpolation implementation in rust demonstrating how to calculate f(0) for a given set of points.
// Because of this feature gate, you must use a nightly
// version of rust.
#![feature(euclidean_division)]
#[derive(Debug)]
struct Point {
x: f64,
y: f64,
}
@tpmccallum
tpmccallum / pyumbral.md
Last active May 7, 2018 15:20
Installing and testing NuCypher's pyUmbral on Ubuntu 16.04
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get -y install python3-pip
sudo -H pip3 install pipenv
cd ~
git clone https://github.com/nucypher/pyUmbral.git
cd pyUmbral/
pipenv install
pipenv shell
@atoponce
atoponce / gist:07d8d4c833873be2f68c34f9afc5a78a
Last active July 17, 2024 07:03 — forked from tqbf/gist:be58d2d39690c3b366ad
Cryptographic Best Practices

Cryptographic Best Practices

Putting cryptographic primitives together is a lot like putting a jigsaw puzzle together, where all the pieces are cut exactly the same way, but there is only one correct solution. Thankfully, there are some projects out there that are working hard to make sure developers are getting it right.

The following advice comes from years of research from leading security researchers, developers, and cryptographers. This Gist was [forked from Thomas Ptacek's Gist][1] to be more readable. Additions have been added from

@nogweii
nogweii / Test.java
Created October 1, 2013 23:39
A quick test to see if you have the JCE Unlimited Strength Jurisdiction Policy files installed. If you don't, in Java 6 you'll see 128. If you do, you'll see 2147483647. Thanks to http://stackoverflow.com/questions/11538746/check-for-jce-unlimited-strength-jurisdiction-policy-files
import javax.crypto.Cipher;
class Test {
public static void main(String[] args) {
try {
System.out.println("Hello World!");
int maxKeyLen = Cipher.getMaxAllowedKeyLength("AES");
System.out.println(maxKeyLen);
} catch (Exception e){
System.out.println("Sad world :(");