Skip to content

Commit

Permalink
Merge #474: Disable re-randomization under more conditions
Browse files Browse the repository at this point in the history
d206891 bump version to 0.23.4 (Andrew Poelstra)
b01337c context: unconditionally disable auto-rerandomization on wasm (Andrew Poelstra)
7482846 apply `global-context-not-secure` logic to Secp256k1::new (Andrew Poelstra)

Pull request description:

  Fixes #470

ACKs for top commit:
  Kixunil:
    ACK d206891
  tcharding:
    ACK d206891
  sanket1729:
    ACK d206891

Tree-SHA512: 2a7db5b75f55a007aa780b6317804c819c0366e207623220f72a06c2af09087accf1bc834f05899897afcc2035f5e9a5480d8a7ffff83536327c695602ba138d
  • Loading branch information
sanket1729 committed Jul 19, 2022
2 parents 6741aa0 + d206891 commit 125211d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,7 @@
# 0.23.4 - 2022-07-14

* [Disable automatic rerandomization of contexts under WASM](https://github.com/rust-bitcoin/rust-secp256k1/pull/474)

# 0.23.3 - 2022-06-29

* [Add must_use for mut self key manipulation methods](https://github.com/rust-bitcoin/rust-secp256k1/pull/465)
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "secp256k1"
version = "0.23.3"
version = "0.23.4"
authors = [ "Dawid Ciężarkiewicz <dpc@ucore.info>",
"Andrew Poelstra <apoelstra@wpsoftware.net>" ]
license = "CC0-1.0"
Expand Down
4 changes: 2 additions & 2 deletions src/context.rs
Expand Up @@ -47,7 +47,7 @@ pub mod global {
static mut CONTEXT: Option<Secp256k1<All>> = None;
ONCE.call_once(|| unsafe {
let mut ctx = Secp256k1::new();
#[cfg(all(feature = "rand-std", not(feature = "global-context-less-secure")))]
#[cfg(all(not(target_arch = "wasm32"), feature = "rand-std", not(feature = "global-context-less-secure")))]
{
ctx.randomize(&mut rand::thread_rng());
}
Expand Down Expand Up @@ -202,7 +202,7 @@ mod alloc_only {
size,
};

#[cfg(feature = "rand-std")]
#[cfg(all(not(target_arch = "wasm32"), feature = "rand-std", not(feature = "global-context-less-secure")))]
{
ctx.randomize(&mut rand::thread_rng());
}
Expand Down

0 comments on commit 125211d

Please sign in to comment.