Closed sugargoat closed 4 years ago
Is there an issue with using the attach_rng
function instead? It should achieve this..
@burdges - Thank you! I will take a look
Hi @burdges, I attempted to update our no_std
schnorrkel usage to use attach_rng
as opposed to the changes in this PR, but it does not build for no_std
. Digging in now to see where std
is coming in.
Nevermind! The issue was that I didn't have default-features = false
on the new merlin dependency. Sorry about that, and thank you for the help!
Motivation
I am using schnorrkel signatures in a no_std environment, however the rand_hack requirement for signing via witness_scalar was causing collisions via rand_core. This PR introduces bypasses to calls to rand_hack and allows the caller to provide an rng. For example, with
default-features = false
, the following builds and runs in the no_std environment of SGX:This approach may also address related no_std issue #31.
In this PR
witness_scalar_rng
to SigningTranscriptsign_rng
to SecretKeysuper::rand_hack()