Linux Kernel module which provides a character device that generates random bytes.
- Make
- Tested on Ubuntu 22.04 Kernel 6.5.0-28-generic
Open the terminal and follow these steps:
-
Clone the repository:
git clone [email protected]:artem-burashnikov/rngdrv.git
-
Navigate to the project root:
cd rngdrv/
-
Build object files using Make:
make
-
Insert the module into the kernel:
The module takes 3 parameters:
-
crs_ord=<num> — where num a positive number.
-
crs_coeffs=<num1,num2,...> — where <num1,num2,...>. are positive bytes of length crs_ord.
-
crs_vals=<num1,num2,...> — same as crs_coeffs.
-
*crs_const=<num>* — a positive byte.
For example:
sudo insmod rngdrv.ko crs_order=3 crs_coeffs=2,4,8 crs_vals=15,3,9 crs_const=10
-
-
Output the stream of random bytes:
xxd /dev/rngdrv
-
To unload the module and delete the device you can use:
make unload
-
To clean up generated object and system files you can use:
make clean
The project is licensed under GPLv3.