[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Minios-devel] [UNIKRAFT PATCH v4 0/4] lib/ukswrand: Add ChaCha20



Hey Vlad,

thanks a lot for your work. The patch series looks fine. There are only a couple if checkpatch formatting issues: lines over 80 characters and wrong indention. If you fix those, I will take your series.

I noticed that we need a follow-up patch (series). After your series, it is not possible anymore to initialize own random number generator instances with uk_swrandr_init_r(): The size of struct uk_swrand is unknown to the API user. There is no way to reserve or allocate memory for it. However, I would postpone the fix for this to a separate patch series. It is currently non critical but it is something to keep in mind. Maybe we may want it back to initialize instances per CPU core when having SMP support.

Thanks,

Simon

On 20.11.19 13:12, Vlad-Andrei BĂDOIU (78692) wrote:
We add the ChaCha20 algorithm. This patch series refactors the
existing code for multiple algorithms support.

Changes since v2:
* Moved _uk_rotl32 to chacha.c
* Moved the constructor and _get_random_seed32 to swrand.c
* Added compile check for rdrand
* Changed to drop-down menu in config.

Changes since v3:
* Extend the seed argument at the init function with a custom sized vector
* Renamed _get_random_seed() to uk_swrandr_gen_seed32() which is now
public

Vlad-Andrei BĂDOIU (78692) (4):
   lib/ukswrand: Adapt the library to work with multiple algorithms
   lib/ukswrand: Add seed generating function
   lib/ukswrand: Add ChaCha algorithm
   lib/ukswrand: Fix uk_swrand_fill_buffer to fill the entire buffer

  lib/ukswrand/Config.uk           |  29 +++++-
  lib/ukswrand/Makefile.uk         |   2 +
  lib/ukswrand/chacha.c            | 158 +++++++++++++++++++++++++++++++
  lib/ukswrand/exportsyms.uk       |   1 +
  lib/ukswrand/include/uk/swrand.h |  12 +--
  lib/ukswrand/mwc.c               |  51 +++-------
  lib/ukswrand/swrand.c            |  98 +++++++++++++++++++
  7 files changed, 299 insertions(+), 52 deletions(-)
  create mode 100644 lib/ukswrand/chacha.c
  create mode 100644 lib/ukswrand/swrand.c


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.