You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To avoid accidental unblinding, we should encrypt the original sacc file before saving it. We should also save the encryption key in a text file and provide the user with a smokescreen function to decrypt (unblind) the original SACC.
Related to #58
Add encryption and decryption functionalities for SACC files.
* **Encryption and Decryption**:
- Add `generate_encryption_key`, `encrypt_data`, and `decrypt_data` methods in `src/smokescreen/datavector.py`.
- Modify `save_concealed_datavector` method to encrypt the SACC file before saving.
- Add `decrypt_sacc_file` function in `src/smokescreen/datavector.py`.
* **Main Function**:
- Update `main` function in `src/smokescreen/__main__.py` to handle encryption and decryption.
- Add `decrypt`, `encrypted_file_path`, and `encryption_key_path` arguments to the `main` function.
* **Tests**:
- Add tests for `generate_encryption_key`, `encrypt_data`, and `decrypt_data` methods in `tests/test_datavector.py`.
- Add tests for the modified `save_concealed_datavector` method.
- Add tests for `decrypt_sacc_file` function.
* **Documentation**:
- Add a section in `docs/source/usage.rst` to document the encryption and decryption functionalities.
* **Dependencies**:
- Add `cryptography` as a dependency in `pyproject.toml` and `environment.yml`.
Needs testing if the Fernet lib actually works with sacc!
---
For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/LSSTDESC/Smokescreen/issues/58?shareId=XXXX-XXXX-XXXX-XXXX).
To avoid accidental unblinding, we should encrypt the original sacc file before saving it. We should also save the encryption key in a text file and provide the user with a smokescreen function to decrypt (unblind) the original SACC.
Tagging @jablazek and @jessmuir for comments :)
The text was updated successfully, but these errors were encountered: