Skip to content

Instantly share code, notes, and snippets.

View maservant's full-sized avatar
👨‍💻
Ready to code

Marc-André Servant maservant

👨‍💻
Ready to code
View GitHub Profile
@maservant
maservant / StrictDER.cpp
Created December 14, 2016 00:44
Complement to this answer http://bitcoin.stackexchange.com/a/50177/10397 on Bitcoin Stack Exchange.
#include <vector>
#include <iostream>
// This function from https://github.com/bitcoin/bitcoin/blob/master/src/script/interpreter.cpp#L110,
// MIT Licence. (c) 2009-2015 Satoshi Nakamoto and the Bitcoin Core developers
bool static IsValidSignatureEncoding(const std::vector<unsigned char> &sig) {
// Format: 0x30 [total-length] 0x02 [R-length] [R] 0x02 [S-length] [S] [sighash]
// * total-length: 1-byte length descriptor of everything that follows,
// excluding the sighash byte.
// * R-length: 1-byte length descriptor of the R value that follows.
@maservant
maservant / gcd.vhd
Last active November 14, 2016 15:20
Exercice en classe pour calcul du plus grand commun diviseur
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.numeric_std.all;
entity gcd is
port(
Ai, Bi : in unsigned(15 downto 0);
init, clk : in std_logic;
F : out unsigned(15 downto 0);
fini : out std_logic
@maservant
maservant / keybase.md
Created August 13, 2016 02:42
Keybase.io identity

Keybase proof

I hereby claim:

  • I am maservant on github.
  • I am servant (https://keybase.io/servant) on keybase.
  • I have a public key ASD-l21HGoUfGh5fPAnzTiZU0dctnDojfvl6rsjJwDVaygo

To claim this, I am signing this object: