mirror of
https://github.com/Mbed-TLS/mbedtls-framework.git
synced 2026-09-16 23:29:54 +00:00
Make the output deterministic
Tests using randomized signatures were currently randomized. We need the output of the script to be reproducible, so this won't do. Force randomized signatures to use a specific RNG which is reset before constructing each test case. This way, the script's output is reproducible. Signed-off-by: Gilles Peskine <[email protected]>
This commit is contained in:
@@ -45,6 +45,7 @@ class Key:
|
|||||||
self.public, self.secret = PURE[kl]._keygen_internal(seed)
|
self.public, self.secret = PURE[kl]._keygen_internal(seed)
|
||||||
|
|
||||||
def sign_message(self, message: bytes, deterministic: bool) -> bytes:
|
def sign_message(self, message: bytes, deterministic: bool) -> bytes:
|
||||||
|
PURE[self.kl].set_drbg_seed(bytes(48))
|
||||||
return PURE[self.kl].sign(self.secret, message,
|
return PURE[self.kl].sign(self.secret, message,
|
||||||
deterministic=deterministic)
|
deterministic=deterministic)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user