Proof of Preregistration via Cryptographic Hash

Written on October 23, 2018

Matan Mazor suggested to use a cryptographic hash as a seed to randomize stimulus sequences in order to prove that the preregistration happened before data collection. I thought this is a good idea. You can easily do it with JATOS. Here is how.

Each JATOS study has in its properties a field Description where you can store a description of the study. Whatever one writes in there is shown in the top of the study page. But behind the scene JATOS additionally calculates a hash of everything in Description and stores it together with a timestamp in the study’s Study Log. This entry might look like this here:

{
    "msg": "Study description changed",
    "studyDescriptionHash": "5ebcf2d8e30dcb721899fd1801be3c9f74de67b5d713ec00f50f94555b73ff69",
    "timestamp": "Tue, 23 Oct 2018 19:06:14 GMT"
}

Whenever you change the Description JATOS recalculates the hash and stores a new entry in the Study Log.

So now you already have a proof of the time when you wrote this Description (if your JATOS server’s time setup is correct).

What Matan additionally suggests is to use this hash as an input to the calculations you might do in your experiment (e.g. as a seed for a random function). You can get the hash from the Study Log but there is also a jatos.js variable jatos.studyProperties.descriptionHash if you want to use it directly in your study’s JavaScript.

Now you have a happens-before relationship between your Description and your result data.

EDIT (December 2018): See the published article introducing cryptographic preregistration at the European Journal of Neuroscience. (Mazor, M., Mazor, N., & Mukamel, R. (2018). A novel tool for time‐locking study plans to results)

Written on October 23, 2018 by Kristian Lange (lange.kristian@gmail.com)