Commit Graph

28 Commits

Author SHA1 Message Date
Trevor Clinkenbeard cd97ad4708 Mark frequently hit code probes non-rare 2026-07-14 08:54:09 -07:00
Akanksha Mahajan e1edb57472
Add GCM Authentication Tag to Encrypted Backup Files 2026-07-09 09:26:39 -07:00
Trevor Clinkenbeard 79a2d23ce9
Replace NULL with nullptr in cpp files (#12803) 2026-03-19 09:13:41 -07:00
Trevor Clinkenbeard a135fb34ff
Use structured bindings in for loops (#12744)
* Use structured bindings in for loops

* Simplify more for loops
2026-03-03 18:48:55 -08:00
Jingyu Zhou 2d2a2144f4
Update copyright years to 2013-2026 (#12653)
No functional changes.
2026-01-22 10:49:41 -08:00
Syed Paymaan Raza 48064f6cf1
Make some codeprobes rare (#11607)
* Make BlobGranule code probes rare

* Make encryption related code probes rare

* fixup! Fix formatting
2024-08-26 22:33:38 -07:00
Syed Paymaan Raza c3e7542cda Update end year in copyright header 2024-08-02 09:40:11 -07:00
sfc-gh-tclinkenbeard 436cdff912 Remove dead code for applyHmacKeyDerivationFunc 2022-09-20 21:08:36 -07:00
Junhyun Shim e2a3fedfc7
Merge branch 'main' into features/authz 2022-07-27 00:08:57 +02:00
Junhyun Shim 0874e553cd Place generateRandomData() under {I|Deterministic}Random 2022-07-20 13:21:11 +02:00
Markus Pilman 1de37afd52
Make TEST macros C++ only (#7558)
* proof of concept

* use code-probe instead of test

* code probe working on gcc

* code probe implemented

* renamed TestProbe to CodeProbe

* fixed refactoring typo

* support filtered output

* print probes at end of simulation

* fix missed probes print

* fix deduplication

* Fix refactoring issues

* revert bad refactor

* make sure file paths are relative

* fix more wrong refactor changes
2022-07-19 13:15:51 -07:00
sfc-gh-tclinkenbeard a71099471b Update copyright header dates 2022-03-21 13:36:23 -07: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
FDB Formatster 2c788c233d apply clang-format to *.c, *.cpp, *.h, *.hpp files 2021-08-27 17:07:47 -07:00
sfc-gh-tclinkenbeard a3133d4b91 Store encryption key file name in encoded Reference<IBackupContainer> tuple 2021-07-21 18:02:51 -07:00
sfc-gh-tclinkenbeard 4ed23b8ee6 Addressed review comments 2021-07-06 21:20:59 -07:00
sfc-gh-tclinkenbeard cbdf5bf6b7 Fix failing BackupCorrectness test with encryption 2021-06-26 17:38: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 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