diff --git a/src/lib_signer_backends/test/test_encrypted.ml b/src/lib_signer_backends/test/test_encrypted.ml index 4c4add99931c0f65fb424584ade29e72c87790e4..81200e812d48254f5dc694f7b2f3441eb14248f1 100644 --- a/src/lib_signer_backends/test/test_encrypted.ml +++ b/src/lib_signer_backends/test/test_encrypted.ml @@ -7,6 +7,13 @@ (* *) (**************************************************************************) +(** Testing + ------- + Component: Remote-signature Backends + Invocation: dune build @src/lib_signer_backends/runtest + Subject: On secret keys and URIs. +*) + open Error_monad let loops = 10 @@ -143,11 +150,22 @@ let test_random algo = in inner 0 +(** For each of the algorithms [Ed25519; Secp256k1; P256], creates a + dummy context. It randomly generates a Base58-encoded secret key, + then encrypts it into a URI and decrypts it. It it asserted that + the secret key is preserved after Base58-decoding comparison. This + process is repeated 10 times. +*) let test_random _switch () = iter_s test_random Signature.[Ed25519; Secp256k1; P256] >>= function | Ok _ -> Lwt.return_unit | Error _ -> Lwt.fail_with "test_random" +(** For each of the algorithms [Ed25519; Secp256k1; P256], creates a + dummy context, uses it to decrypt a list of secret key URIs + [...__sks_encrypted]. It is asserted that the decrypted keys shall + match the list [..._sks]. +*) let test_vectors _switch () = test_vectors () >>= function diff --git a/src/lib_signer_backends/unix/test/test_crouching.ml b/src/lib_signer_backends/unix/test/test_crouching.ml index 9bbae3a0bea464794182db0b236d2a17bff79a2a..df2e867c42765f83d111fe9b222d1b6326b8a056 100644 --- a/src/lib_signer_backends/unix/test/test_crouching.ml +++ b/src/lib_signer_backends/unix/test/test_crouching.ml @@ -1,3 +1,14 @@ +(** Testing + ------- + Component: Remote-signature Backends + Invocation: dune build @src/lib_signer_backends/runtest + Subject: On pseudo-unique names for Ledger Nano S devices. +*) + +(** Deterministically derive a sentence with the form + adjective-animal-adjective-animal from "12345". It is asserted that + the tuple is "calculating-meerkat-straight-beetle". +*) let test_example () = let name = Ledger_names.crouching_tiger "12345" in assert (