We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When I try to call SigningKey::sign_prehash_recoverable in wasm32-unknown-emscripten, I get the following error:
SigningKey::sign_prehash_recoverable
wasm32-unknown-emscripten
10, SIGBUS: access to undefined memory
The problems seems to be with the precomputed-tables feature enabled by default.
precomputed-tables
How to test:
# Cargo.toml [package] name = "k256-test" version = "0.1.0" edition = "2021" [dependencies] hex = "0.4.3" k256 = "0.13.0" # The fix: # k256 = { version = "0.13.0", features = ["ecdh", "ecdsa", "schnorr", "std"], default-features = false }
// lib.rs use k256::ecdsa::SigningKey; #[test] fn test_ecdsa_sign() { let secret = hex::decode("afeefca74d9a325cf1d6b6911d61a65c32afa8e02bd5e78e2e4ac2910bab45f5").unwrap(); let signing = SigningKey::from_slice(&secret); let hash = hex::decode("1c8aff950685c2ed4bc3174f3472287b56d9517b9c948127319a09a7a36deac8").unwrap(); let (_signature, _recovery_id) = signing.sign_prehash_recoverable(&hash).unwrap(); }
To run the test (emsdk should be installed already).
source path/to/emsdk/emsdk_env.sh CARGO_TARGET_WASM32_UNKNOWN_EMSCRIPTEN_RUNNER=node cargo test --target wasm32-unknown-emscripten --release
The text was updated successfully, but these errors were encountered:
cc @fjarri
If this is true, it seems like a bug in once_cell
once_cell
Sorry, something went wrong.
No branches or pull requests
When I try to call
SigningKey::sign_prehash_recoverable
inwasm32-unknown-emscripten
, I get the following error:The problems seems to be with the
precomputed-tables
feature enabled by default.How to test:
To run the test (emsdk should be installed already).
The text was updated successfully, but these errors were encountered: