Shifting is the right thing to do, but wrapping it with a little macro would make it a lot easier to read (and avoid mistakes like shifting by the wrong amount when changing the value in the future). There is already a MEGABYTE() macro in PIM-common, so you could add a KILOBYTE() macro and use it in this case.
https://github.com/UBC-ECE-Sasha/PIM-encryption/blob/8de4e5fd3ff8c70b007441edd5f6882e9af9ef92/host/host.c#L24
Shifting is the right thing to do, but wrapping it with a little macro would make it a lot easier to read (and avoid mistakes like shifting by the wrong amount when changing the value in the future). There is already a MEGABYTE() macro in PIM-common, so you could add a KILOBYTE() macro and use it in this case.