Project

General

Profile

Feature #45

add backend encryption for all sensitive data

Added by The 2nd over 5 years ago. Updated almost 5 years ago.

Status:
In Bearbeitung
Priority:
Normal
Assignee:
Target version:
Start date:
19 October 2015
Due date:
% Done:

80%


Description

we should not save password (hashes), PINs etc. in plaintext.


Subtasks

Feature #59: Add header to encrypted attributesIn BearbeitungThe 2nd

History

#1 Updated by The 2nd over 5 years ago

  • Subject changed from Add backend encryption for all sensitive data to add backend encryption for all sensitive data

#2 Updated by The 2nd about 5 years ago

  • Status changed from Neu to In Bearbeitung
  • % Done changed from 0 to 90

current implementation uses AES encryption in CFB mode.

from Crypto.Cipher import AES
from Crypto import Random

def encrypt(aeskey, data):
""" encrypt string with given aes key """
iv = Random.new().read(AES.block_size)
cipher = AES.new(aeskey.decode("hex"), AES.MODE_CFB, iv)
encrypted_data = iv + cipher.encrypt(data)
return encrypted_data.encode("hex")

still needs some investigation if this is the way to go. but replacing the encrypt/decryption functions should be easy.

Also available in: Atom PDF