Changes

Jump to navigation Jump to search
check procedure
Line 17: Line 17:     
''R.E.Searcher@socsci.ru.nl''
 
''R.E.Searcher@socsci.ru.nl''
 +
 +
If a participant later comes to you with a PPN and a PIC, you go and lookup your ES. Based on your ES and the PPN given to you by the participant, you recalculate the PIC. If this is identical to the PIC supplied by the participant, then the participant is indeed the person identified by the given PPN in your data file.
 
=== Example ===
 
=== Example ===
 +
[[File:pic.png|frame|Calculating Participant Identification Code in LibreOffice]]
 +
==== Online ====
 
Try this [https://www.socsci.ru.nl/wilberth/computer/pic.html calculator] to make these checksums yourself.
 
Try this [https://www.socsci.ru.nl/wilberth/computer/pic.html calculator] to make these checksums yourself.
 +
 +
==== OpenOffice / LibreOffice ====
 +
If you install the [https://extensions.openoffice.org/en/project/cryptographic-hash-functions-uno-component-openofficeorg cryptographic hash] extension to OpenOffice/ LibreOffice you can use [https://www.socsci.ru.nl/wilberth/nocms/computer/pic.ods this document] to calculate PIC. You may have to enable macros for it to work.
 +
 +
==== Google Sheets ====
 +
You can also calculate the PICs with this [https://docs.google.com/spreadsheets/d/18jmxpui2rr3dShySQiyn06kX36cCHHGRgan2MGGXjlo/edit?usp=sharing Google Sheet]. Use ''File'' -> ''Make a copy'' if you want to alter the document.
 +
 +
==== Python 3 ====
 +
In Python 3 you can easily calculate pic. Note that ''secret'' and the ''ppn'' must be strings.
 +
 +
  #!/usr/bin/env python3
 +
  import hashlib
 +
  secret = "mySecret123!"
 +
  ppn = "0"
 +
  pic = hashlib.sha256(secret.encode('utf-8')+ppn.encode('utf-8')).hexdigest()[0:4].upper()
 +
  print(pic)
    
== Rationale ==
 
== Rationale ==
If you simply give the anonymous PPN to your participants, they can also identify themselves, but the PPN will have to be sufficiently long and random to make sure the participant cannot guess someone else's PPN as well. If you generate PPN the same way for every experiment, then anyone who knows how you do it for one experiment can do it for another and pretent to be a participant.
+
If you simply give the anonymous PPN to your participants, they can also identify themselves, but the PPN will have to be sufficiently long and random to make sure the participant cannot guess someone else's PPN as well. If you generate PPN the same way for every experiment, then anyone who knows how you do it for one experiment can do it for another and pretend to be a participant.
 
      
== Technical Details ==
 
== Technical Details ==
The PIC is the capitalized hexadecimal four character representation of the first two bytes of the SHA256 hash of the concatenation of the UTF-8 representation of the Experiment Secret and the Participant Identifier.
+
The PIC is the capitalized hexadecimal four character representation of the first two bytes of the SHA256 hash of the concatenation of the UTF-8 representation of the Experiment Secret and the Participant Number.

Navigation menu