Skip to content
This repository has been archived by the owner on Jul 27, 2024. It is now read-only.
/ rngdrv Public archive

Part of the SPBU's programming course. Linux character device that generates random bytes.

License

Notifications You must be signed in to change notification settings

artem-burashnikov/rngdrv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rngdrv

GPLv3

Overview

Linux Kernel module which provides a character device that generates random bytes.

Getting Started

Prerequisites

  • Make
  • Tested on Ubuntu 22.04 Kernel 6.5.0-28-generic

Building

Open the terminal and follow these steps:

  1. Clone the repository:

    git clone git@github.com:artem-burashnikov/rngdrv.git
  2. Navigate to the project root:

    cd rngdrv/
  3. Build object files using Make:

    make
  4. Insert the module into the kernel:

    The module takes 3 parameters:

    1. crs_ord=<num> — where num a positive number.

    2. crs_coeffs=<num1,num2,...> — where <num1,num2,...>. are positive bytes of length crs_ord.

    3. crs_vals=<num1,num2,...> — same as crs_coeffs.

    4. *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
  5. Output the stream of random bytes:

    xxd /dev/rngdrv
  6. To unload the module and delete the device you can use:

    make unload
  7. To clean up generated object and system files you can use:

    make clean

Licenses

The project is licensed under GPLv3.

About

Part of the SPBU's programming course. Linux character device that generates random bytes.

Topics

Resources

License

Stars

Watchers

Forks