File tree Expand file tree Collapse file tree 4 files changed +16
-3
lines changed Expand file tree Collapse file tree 4 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ script:
3030 - cargo build --verbose --no-default-features --features="rand"
3131 - cargo build --verbose --no-default-features --features="rand serde recovery endomorphism"
3232 - cargo build --verbose --no-default-features --features="fuzztarget recovery"
33+ - cargo build --verbose --no-default-features --features="lowmemory"
3334 - cargo build --verbose
3435 - cargo test --verbose
3536 - cargo build --release
Original file line number Diff line number Diff line change 1+ # 0.15.2 - 2019-08-08
2+
3+ - Add feature ` lowmemory ` that reduces the EC mult window size to require
4+ significantly less memory for the validation context (~ 680B instead of
5+ ~ 520kB), at the cost of slower validation. It does not affect the speed of
6+ signing, nor the size of the signing context.
7+
18# 0.15.0 - 2019-07-25
29
310* Implement hex human-readable serde for PublicKey
Original file line number Diff line number Diff line change 11[package ]
22
33name = " secp256k1"
4- version = " 0.15.1 "
4+ version = " 0.15.2 "
55authors = [ " Dawid Ciężarkiewicz <dpc@ucore.info>" ,
66 " Andrew Poelstra <apoelstra@wpsoftware.net>" ]
77license = " CC0-1.0"
@@ -32,6 +32,7 @@ fuzztarget = []
3232std = [" rand/std" ]
3333recovery = []
3434endomorphism = []
35+ lowmemory = []
3536
3637[dev-dependencies ]
3738rand = " 0.6"
Original file line number Diff line number Diff line change @@ -53,9 +53,13 @@ fn main() {
5353 . define ( "USE_FIELD_INV_BUILTIN" , Some ( "1" ) )
5454 . define ( "USE_SCALAR_INV_BUILTIN" , Some ( "1" ) )
5555 . define ( "ENABLE_MODULE_ECDH" , Some ( "1" ) )
56- . define ( "USE_EXTERNAL_DEFAULT_CALLBACKS" , Some ( "1" ) )
57- . define ( "ECMULT_WINDOW_SIZE" , Some ( "15" ) ) ; // This is the default in the configure file (`auto`)
56+ . define ( "USE_EXTERNAL_DEFAULT_CALLBACKS" , Some ( "1" ) ) ;
5857
58+ if cfg ! ( feature = "lowmemory" ) {
59+ base_config. define ( "ECMULT_WINDOW_SIZE" , Some ( "4" ) ) ; // A low-enough value to consume neglible memory
60+ } else {
61+ base_config. define ( "ECMULT_WINDOW_SIZE" , Some ( "15" ) ) ; // This is the default in the configure file (`auto`)
62+ }
5963 #[ cfg( feature = "endomorphism" ) ]
6064 base_config. define ( "USE_ENDOMORPHISM" , Some ( "1" ) ) ;
6165 #[ cfg( feature = "recovery" ) ]
You can’t perform that action at this time.
0 commit comments