-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
Improve memory testing (#766)
## Type of change ``` - [ ] Bug fix - [ ] New feature development - [x] Tech debt (refactoring, code cleanup, dependency upgrades, etc) - [ ] Build/deploy pipeline (DevOps) - [ ] Other ``` ## Objective Improve how the memory-testing crate does some things: - Compile and run the process in release mode, to better match what our final artifacts will do. - Improve the structure of `Cases` struct, now the values that we want to look up in memory are generic, which greatly simplifies the `analyze-dumps` binary. - Removed the test string from the table output, if we don't find the test string in the dump we assume the dump is invalid and return directly. - Instead of waiting a predefined amount of time, the dump program now waits for the program to notify that it's ready, which speeds up the operations a bit. - Use `black_box` instead of just printing the values, to ensure the compiler doesn't optimize them out.
- Loading branch information
1 parent
b36cf6f
commit 7e57f19
Showing
9 changed files
with
194 additions
and
227 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,78 @@ | ||
{ | ||
"symmetric_key": [ | ||
"cases": [ | ||
{ | ||
"key": "FfhVVP8fmFIZY1WmRszPmRmVCxXNWVcJffPrbkywTPtBNkgfhYGT+D9sVGizYXrPffuj2yoyWqMwF9iF5aMQhQ==", | ||
"decrypted_key_hex": "15f85554ff1f9852196355a646cccf9919950b15cd5957097df3eb6e4cb04cfb", | ||
"decrypted_mac_hex": "4136481f858193f83f6c5468b3617acf7dfba3db2a325aa33017d885e5a31085" | ||
} | ||
], | ||
"master_key": [ | ||
"name": "Symmetric Key", | ||
"symmetric_key": { | ||
"key": "FfhVVP8fmFIZY1WmRszPmRmVCxXNWVcJffPrbkywTPtBNkgfhYGT+D9sVGizYXrPffuj2yoyWqMwF9iF5aMQhQ==" | ||
}, | ||
"memory_lookups": [ | ||
{ | ||
"name": "Decrypted key", | ||
"hex": "15f85554ff1f9852196355a646cccf9919950b15cd5957097df3eb6e4cb04cfb" | ||
}, | ||
{ | ||
"name": "Decrypted MAC", | ||
"hex": "4136481f858193f83f6c5468b3617acf7dfba3db2a325aa33017d885e5a31085" | ||
} | ||
] | ||
}, | ||
|
||
{ | ||
"password": "123412341234", | ||
"email": "[email protected]", | ||
"name": "Master Key PBKDF2", | ||
"master_key": { | ||
"password": "123412341234", | ||
"email": "[email protected]", | ||
|
||
"kdf": { | ||
"pBKDF2": { | ||
"iterations": 100000 | ||
"kdf": { | ||
"pBKDF2": { | ||
"iterations": 100000 | ||
} | ||
} | ||
}, | ||
|
||
"key_hex": "2d55ac8e33bd14ee9eee26fa651163a41049a37b3b20c914a8b6abc9a38a89d5", | ||
"hash": "gQ9O5ZhtQ23dL5r93e4BL04ATYOJVEvBAOwYsDDEJFA=", | ||
"hash_hex": "810f4ee5986d436ddd2f9afdddee012f4e004d8389544bc100ec18b030c42450" | ||
"memory_lookups": [ | ||
{ | ||
"name": "Key", | ||
"hex": "2d55ac8e33bd14ee9eee26fa651163a41049a37b3b20c914a8b6abc9a38a89d5" | ||
}, | ||
{ | ||
"name": "Hash B64", | ||
"string": "gQ9O5ZhtQ23dL5r93e4BL04ATYOJVEvBAOwYsDDEJFA=" | ||
}, | ||
{ | ||
"name": "Hash bytes", | ||
"hex": "810f4ee5986d436ddd2f9afdddee012f4e004d8389544bc100ec18b030c42450" | ||
} | ||
] | ||
}, | ||
{ | ||
"password": "asdfasdfasdf", | ||
"email": "[email protected]", | ||
"name": "Master Key Argon2", | ||
"master_key": { | ||
"password": "asdfasdfasdf", | ||
"email": "[email protected]", | ||
|
||
"kdf": { | ||
"argon2id": { | ||
"iterations": 3, | ||
"memory": 4, | ||
"parallelism": 1 | ||
"kdf": { | ||
"argon2id": { | ||
"iterations": 3, | ||
"memory": 4, | ||
"parallelism": 1 | ||
} | ||
} | ||
}, | ||
|
||
"key_hex": "3bc0520a0abff0097d521ce0ee5e5b1cee301939a84742623c0c1697d7a4bd46", | ||
"hash": "lHkprdORlICVJ4Umwi94Uz/nATK6Y7If7e+iFoabzh0=", | ||
"hash_hex": "947929add391948095278526c22f78533fe70132ba63b21fedefa216869bce1d" | ||
"memory_lookups": [ | ||
{ | ||
"name": "Key", | ||
"hex": "3bc0520a0abff0097d521ce0ee5e5b1cee301939a84742623c0c1697d7a4bd46", | ||
"allowed_count": 3 | ||
}, | ||
{ | ||
"name": "Hash B64", | ||
"string": "lHkprdORlICVJ4Umwi94Uz/nATK6Y7If7e+iFoabzh0=" | ||
}, | ||
{ | ||
"name": "Hash bytes", | ||
"hex": "947929add391948095278526c22f78533fe70132ba63b21fedefa216869bce1d" | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.