Commit Graph

18 Commits

Author SHA1 Message Date
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
Steve Atherton cc68800d2a Update IV functions to use 32 bit block size. 2021-07-31 12:27:58 -07:00
Steve Atherton 15f5e4e4a5 Fixed file size limitation caused by block id being only 16 bits, now 32. 2021-07-31 11:39:28 -07:00
Steve Atherton 256e9ba487 Fixed warnings in IDE, applied clang-format. 2021-07-31 11:35:02 -07:00
Steve Atherton 494acf7a54 Bug fixes with block memory lifetime and handling reads that cross the end of file barrier. 2021-07-31 11:33:53 -07:00
sfc-gh-tclinkenbeard b9a22a61ef Fix many -Wreorder-ctor warnings 2021-07-23 17:33:18 -07:00
sfc-gh-tclinkenbeard a5ecc11bba Added AsyncFileEncrypted::mode field 2021-06-27 18:55:57 -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 1afae7623b Added /backup/containers/localdir/encrypted unit test 2021-06-25 22:33:26 -07:00
sfc-gh-tclinkenbeard 53f5cd2453 Support passing encryption file to BackupContainer::openContainer 2021-06-25 14:11:21 -07:00
sfc-gh-tclinkenbeard 5858ca3c62 Use unit test data directory for fdbrpc/AsyncFileEncrypted test 2021-06-25 12:23:08 -07:00
sfc-gh-tclinkenbeard d56906cd54 Addressed review comments 2021-05-03 15:26:27 -07:00
sfc-gh-tclinkenbeard d4191899d9 Add comments for AsyncFileEncrypted changes 2021-03-28 22:14:37 -07: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 4563eeba5b Moved AsyncFileEncrypted::RandomCache implementation to cpp file 2021-01-30 00:12:05 -08:00
sfc-gh-tclinkenbeard bbf8230462 Use random eviction policy for cached AsyncFileEncrypted blocks 2021-01-29 23:57:24 -08:00
sfc-gh-tclinkenbeard 88bc157bd0 Added AsyncFileEncrypted 2021-01-24 22:53:04 -08:00