diff --git a/Cargo.toml b/Cargo.toml
index f7b4439f..41d6dbb7 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -17,6 +17,9 @@ rand = "0.4"
 rustc-serialize = { git = "https://github.com/cdetrio/rustc-serialize", branch = "for-wasm" }
 byteorder = "1.0"
 
+[patch.crates-io]
+num-bigint = { git = "https://github.com/ignatenkobrain/num-bigint", branch = "rand-v0.4" }
+
 [dev-dependencies.bincode]
 version = "0.6"
 default-features = false