Skip to content

Instantly share code, notes, and snippets.

👨‍💻
Ready to code

Marc-André Servant maservant

👨‍💻
Ready to code
View GitHub Profile
@maservant
maservant / StrictDER.cpp
Created Dec 14, 2016
Complement to this answer http://bitcoin.stackexchange.com/a/50177/10397 on Bitcoin Stack Exchange.
View StrictDER.cpp
#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 Nov 14, 2016
Exercice en classe pour calcul du plus grand commun diviseur
View gcd.vhd
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 Aug 13, 2016
Keybase.io identity
View keybase.md

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:

You can’t perform that action at this time.