Actions

Encryptie

From LimeSurvey Manual

Revision as of 21:03, 11 August 2019 by Han (talk | contribs) (Created page with "Encryptie kan op elk moment worden ingeschakeld en uitgeschakeld.")



Inleiding

Encryptie is een nieuwe functie in LimeSurvey 4. Het is gemaakt om enquêtebeheerders te helpen beter om te gaan met de nieuwe voorschriften voor gegevensbescherming die sinds 2016 in de Europese Unie zijn aangenomen (bijv. AVG).

Deze functie maakt het versleutelen mogelijk van persoonlijke gegevens in de deelnemersdatabase en / of deelnemers enquête. Bovendien kun je de gegevens die je van je respondenten verzamelt ook versleutelen als het encryptie vraagattribuut is ingeschakeld.

Hou er rekening mee dat de gegevens altijd zichtbaar zijn in de LimeSurvey-interface. Alleen de opslag in de database is versleuteld, niemand die toegang heeft tot de server waarop je LimeSurvey host, kan de respectieve gegevens bekijken, buiten LimeSurvey om. Let daarom op aan wie je rechten geeft.


  Nadat je sleutels voor encryptie hebt gemaakt, moet je back-ups maken. Als je de sleutel verliest, worden de gegevens onbruikbaar omdat ze niet meer kunnen worden gelezen. Als je LimeSurvey CE gebruikt, zijn de openbare en geheime sleutels te vinden in /application/config/security.php.



Wanneer versleutelen?

Dat is afhankelijk van:

  • het type gegevens dat wordt verzamelt
  • waar de gegevens staan
  • Nederlandse of Europese wetgeving
  • ...

Meestal is het belangrijk om persoonlijk identificeerbare gegevens te versleutelen (zoals aanbevolen in de Algemene Verordening Gegevensbescherming). Velden als voornaam, achternaam, e-mailadres, telefoonnummer, adres, ... kunnen worden gebruikt om de responsen te identificeren naar één persoon.

In andere gevallen kunnen ook meer velden moeten worden versleuteld. Bijvoorbeeld in medisch onderzoek moet je mogelijk de meeste van de gegevens coderen als de antwoorden naar een persoon zijn te achterhalen.

Pas daarom de enquête en de gegevens aan de geldende wetgeving aan!

Settings

There are three places in LimeSurvey where data encryption settings can be set:


Question attributes

Question attribute "Encrypted" is used to enable data encryption for corresponding responses. This attribute is turned off by default. Once survey is activated, it is not possible to change this attribute.



Participant attributes

Three core attributes (firstname, lastname, and email) are always shown in the survey participants table, the encryption being turned on by default.

Each new participant attribute will have encryption turned off by default.

Encryption can be turned on or off at any moment.



Central participant database attribute management

Three core attributes (firstname, lastname and email) are always shown in the central participant database, the encryption being turned on by default.

Each new participant attribute will have encryption turned off by default.

Encryptie kan op elk moment worden ingeschakeld en uitgeschakeld.


Advanced

Sodium library is used to provide data encryption and decryption functionality for LimeSurvey.

Sodium is a modern, easy-to-use software library for encryption, decryption, signatures, password hashing and more. It is a portable, cross-compilable, installable, packageable fork of NaCl, with a compatible API, and an extended API to improve usability even further. Its goal is to provide all of the core operations needed to build higher-level cryptographic tools.


Sodium is cross-platforms and cross-languages. It runs on a variety of compilers and operating systems, including Windows (with MinGW or Visual Studio, x86 and x86_64), iOS and Android. Javascript and WebAssembly versions are also available and are fully supported. Bindings for all common programming languages are available and well-supported.


Version 7.2.0 and newer of the PHP programming language includes the Sodium extension (referred to as ext/sodium) as a core cryptography library. Version 2 of the PHP extension in PECL is compatible with ext/sodium in PHP 7.2.


LimeSurvey uses the Sodium Compat library to bridge with different PHP versions. This library tentatively supports PHP 5.2.4 - 7.x (latest), but officially it only supports non-EOL'd versions of PHP.


Data encryption/decryption methods used in LimeSurvey are based on public-key signatures. Public and secret keys can be found in /application/config/security.php file. Keys are automatically generated on first usage of encryption feature.


  Warning : Once data encryption is turned on, data in corresponding database columns would become unreadable without decrypting them first. You should always have a backup of your encryption keys in case they get deleted. Also, once encryption keys are set, you should never change them because it would make all existing data unusable.



Partial string search won't be possible for database columns with encrypted data, only exact match search.


Errors

Possible errors when using data encryption:

  • library doesn't exists: PHP Sodium library have to be installed to be able to use data encryption feature. Here is a guide on how to install library: Sodium installation. If you don't want to use data encryption, you have to disable encryption in attribute settings.
  • wrong decryption key: decryption key has changed since data was last saved, so data can't be decrypted. The only way to decrypt data is to retrieve the original key from backup and replace the current decryption key with the original key.