Commit Graph

16 Commits

Author SHA1 Message Date
sfc-gh-tclinkenbeard a71099471b Update copyright header dates 2022-03-21 13:36:23 -07:00
Mohamed Oulmahdi 9e81945301 Enable encryption for Windows 2022-03-11 10:06:07 +01:00
Ata E Husain Bohra 344a14b010
Update StreamCipher ctx/cipher management to respect determinism (#6427)
* Update StreamCipher ctx/cipher management to respect determinism

StreamCipher keeps record of CipherKeys created
(including globalCipherKey) to ensure the sensitive data gets
ZERO-OUT and not recorded as part of FDB process dump. However,
in current code it is maintained as an unordered_set indexed
by the object itself. Approach adds non determinism given
object pointer based indexing scheme.

Patch addresses the concern by updating the recording to use
a map indexed by UID.
2022-02-22 17:34:29 -08:00
Ata E Husain Bohra 591ef57857
Upgrade AES 128 GCM -> AES 256, StreamCipher code refactor (#6314)
* Upgrade AES 128 GCM -> AES 256, StreamCipher code refactor

Major changes proposed are:
1. Refactor StreamCipher code to enable instantiation of
   multiple encryption keys. However, code still retains
   a globalEncryption key semantics used in Backup file
   encryption usecase.
2. Enhance StreamCipher to provide HMAC signature digest
   generation. Further, the class implements HMAC encryption
   key derivation function.
3. Upgrade StreamCipher to use AES 256 GCM mode from currently
   supported AES 128 GCM mode.
   Note: The code changes the encryption key size, however, the
         feature is NOT currently in use, hence, should be OK.
3. Add EncryptionOps validation and benchmark toml supported
   workload, it does the following:
   a. Allow user to configure encrypt-decrypt of a fixed size
      buffer or variable size buffer [100, 512K]
   b. Allow user to configure number of interactions of the runs,
      in each iteration: generate random data, derive an encryption
      key using HMAC SHA256 method, encrypt data and
      then decrypt data. It collects following metrics:
    i) time taken to derive encryption key.
    ii) time taken to encrypt the buffer.
    iii) time taken to decrypt the buffer.
    iv) total bytes encrypted and/or decrypted
   c. Along with stats it basic basic validations on the encrypted
      and decrypted buffer
   d. On completion for test, records the above mentioned metrics
      in trace files.
2022-01-31 19:52:44 -06:00
sfc-gh-tclinkenbeard 41b4ace19a Added ENCRYPTION_ENABLED macro 2021-07-09 21:20:40 -07:00
sfc-gh-tclinkenbeard ad03a4787a Fix non-TLS build 2021-07-09 21:06:15 -07:00
sfc-gh-tclinkenbeard 27e44c1bb9 Add support for encryption testing in BackupCorrectness workload 2021-06-26 11:15:12 -07:00
sfc-gh-tclinkenbeard 53f5cd2453 Support passing encryption file to BackupContainer::openContainer 2021-06-25 14:11:21 -07:00
sfc-gh-tclinkenbeard d4191899d9 Add comments for AsyncFileEncrypted changes 2021-03-28 22:14:37 -07:00
sfc-gh-tclinkenbeard b601a73a25 Clean up all cipher contexts in crashHandler 2021-02-04 23:47:34 -08:00
sfc-gh-tclinkenbeard 8470a326a2 Clean up StreamCipher::Key::globalKey in crashHandler 2021-02-03 18:49:51 -08:00
sfc-gh-tclinkenbeard b5ed7dcdf8 Make StreamCipher::Key constructor effectively private 2021-02-03 18:21:04 -08:00
sfc-gh-tclinkenbeard 7c0e331e07 Disable copying StreamCipher::Key 2021-02-03 18:13:39 -08:00
sfc-gh-tclinkenbeard 5be4df6f84 Move global key into StreamCipher 2021-02-03 17:39:59 -08:00
sfc-gh-tclinkenbeard 88bc157bd0 Added AsyncFileEncrypted 2021-01-24 22:53:04 -08:00
sfc-gh-tclinkenbeard 1615977695 Added StreamCipher 2021-01-24 22:53:01 -08:00