-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove size alignment requirement for dpu_AES_ecb
In prior versions, dpu_AES_ecb() required that the number of AES blocks of data be evenly divisible by the number of DPUs, so that each DPU could encrypt the same amount of data. This made it very hard to use, particularly when gathering data across many numbers of DPUs (e.g. 64MB across 1 rank, 2 ranks, 3 ranks...). This commit allows dpu_AES_ecb() to encrypt any whole number of AES blocks by requiring a certain amount of padding at the end of the data. The amount of padding is determined by get_pim_buffer_size(). However, some safety is sacrificed for ease of data gathering: dpu_AES_ecb() ASSUMES THE PADDING IS PRESENT and reads/writes beyond the specified length (which is assumed to be the length of the actual data, without padding). This is so that a test measuring one data size across many ranks can get data which shows the same data size, not slightly different sizes depending on padding. A safer design would be to restore dpu_AES_ecb() to the version prior to this commit (i.e. rejects unaligned sizes), and have the data size be inclusive of the padding.
- Loading branch information
Showing
3 changed files
with
21 additions
and
13 deletions.
There are no files selected for viewing
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