Skip to content
Success

Changes

Summary

  1. card_key_provider: separate and refactor CSV column encryption (details)
Commit 332dbce1c0f0577087a7dbde775457d0fb264abf by pmaier@sysmocom.de
card_key_provider: separate and refactor CSV column encryption

The CardKeyProviderCsv class implements a column decryption scheme
where columns are protected using a transport key. The CSV files
are enrcypted using contrib/csv-encrypt-columns.py.

The current implementation has two main problems:

- The decryption code in CardKeyProviderCsv is not specific to CSV files.
  It could be re-used in other formats, for example to decrypt columns
  (fields) red from a database. So let's split the decryption code in a
  separate class.

- The encryption code in csv-encrypt-columns.py accesses methods and
  properties in CardKeyProviderCsv. Also having the coresponding
  encryption code somewhere out of tree may be confusing. Let's improve
  the design and put encryption and decryption functions in a single
  class. Let's also make sure the encryption/decryption is covered by
  unittests.

Related: SYS#7725
Change-Id: I180457d4938f526d227c81020e4e03c6b3a57dab
The file was modifiedpySim/card_key_provider.py
The file was modifiedtests/unittests/test_card_key_provider.py
The file was modifiedcontrib/csv-encrypt-columns.py