Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reimplement core::uuid_generate() using libuuid #692

Open
gavv opened this issue Feb 8, 2024 · 1 comment
Open

Reimplement core::uuid_generate() using libuuid #692

gavv opened this issue Feb 8, 2024 · 1 comment
Assignees
Labels
easy hacks The solution is expected to be straightforward even if you are new to the project help wanted An important and awaited task but we have no human resources for it yet security Security, encryption system Low-level system-specific stuff

Comments

@gavv
Copy link
Member

gavv commented Feb 8, 2024

We have simple implementation of UUID generation using random numbers. It would be great to have alternative optional implementation using libuuid from util-linux package.

Our implementation is portable but unsophisticated. It blindly generates random UUID no matter where it's running and what's the quality of PRNG. libuuid, on the other hand, is capable to check system capabilities: if high-quality random generator is available, it will use it, otherwise it will fallback to using low-level system information like MAC address and system time. It will also employ uuidd if it's present on system.

Steps:

  • Add libuuid to build scripts (build-3rdparty.py, 3rdparty/Sconscript). Add --disable-libuuid to SConstruct. If the option is given, enable target_nouuid target directory, otherwise enable target_libuuid.

    Basically you can replicate what have been done in this commit to add OpenSSL (you can ignore openssl_get_platform() function, it's OpenSSL-specific).

  • Move existing implementation from roc_core to roc_core/target_nouuid target directory.

  • Add new implementation to roc_core/target_libuuid using libuuid.

  • Add simple test that will pass for both implementations.

Related docs:

@gavv gavv added help wanted An important and awaited task but we have no human resources for it yet easy hacks The solution is expected to be straightforward even if you are new to the project security Security, encryption system Low-level system-specific stuff labels Feb 8, 2024
@gavv gavv added this to Frontlog in kanban board Feb 8, 2024
@gavv gavv moved this from Frontlog to Help wanted in kanban board Feb 8, 2024
@gavv gavv changed the title Reimplement uuid_generate() using libuuid Reimplement core::uuid_generate() using libuuid Feb 8, 2024
@nolan-veed
Copy link
Contributor

This one is right up my street. I'll do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
easy hacks The solution is expected to be straightforward even if you are new to the project help wanted An important and awaited task but we have no human resources for it yet security Security, encryption system Low-level system-specific stuff
Projects
kanban board
Help wanted
Development

No branches or pull requests

2 participants