Skip to main content

Linux Kernel Begins Phasing Out the crypto_rng Layer to Simplify Random Number Generation

3 months ago
by George Whittaker

Linux kernel developers are moving forward with plans to remove the crypto_rng API layer, a long-standing component of the kernel's cryptographic subsystem. The proposed change is part of a broader effort to simplify the kernel's internal architecture by eliminating redundant code paths and encouraging developers to rely on the kernel's modern random number generation interfaces instead. (phoronix.com)

Although the change happens entirely behind the scenes, it reflects the Linux kernel community's ongoing commitment to reducing technical debt, improving maintainability, and modernizing core infrastructure.

What Is the crypto_rng Layer?

The crypto_rng framework is an API within the Linux kernel's Crypto API that provides random number generation services for kernel components.

Historically, it allowed different kernel subsystems and drivers to request random data through a generic cryptographic interface. Over time, however, the kernel's dedicated random number generator has matured considerably, making much of the crypto_rng abstraction unnecessary. (kernel.org)

Today, developers generally recommend using the kernel's built-in random number generation functions directly instead of routing requests through the older crypto layer.

Why Developers Want to Remove It

According to discussions on the Linux kernel mailing list, the crypto_rng layer has become largely redundant.

Modern kernel code already relies on well-established interfaces such as:

  • get_random_bytes()
  • get_random_u32()
  • get_random_u64()

These functions are maintained as part of the kernel's primary random number generation subsystem and are widely used throughout Linux. Maintaining an additional abstraction layer increases code complexity without providing significant practical benefits. (phoronix.com)

Removing unnecessary infrastructure also makes the kernel easier to maintain and audit over the long term.

Simplifying the Crypto API

The Linux Crypto API has evolved significantly over the years as new algorithms, hardware accelerators, and security features have been introduced.

Kernel maintainers have increasingly focused on:

Go to Full Article
George Whittaker

Apple Launches Legal Challenge Against UK Demand To Access Encrypted User Data

3 months ago
An anonymous reader quotes a report from The Guardian: Apple has launched a new legal challenge against a UK government demand to access its customers' highly encrypted data, a year after the Home Office agreed to abandon its previous request. The US tech company launched the legal complaint last month at the Investigatory Powers Tribunal (IPT), an independent court that has the power to investigate claims that the UK intelligence services have acted unlawfully. The UK government had made a second request to Apple to grant it a "back door" to encrypted iCloud data belonging to British users, according to an order issued by the court. Britain backed down on its original demand for access to data from UK and US customers last year, after a heated transatlantic tussle over encryption between London and Washington. UK authorities subsequently issued a new "technical capability notice" (TCN) to Apple that did not apply to American users. Apple is seeking to challenge the British government's powers to issue TCNs under the UK Investigatory Powers Act, according to the details of the new legal case first reported by the Financial Times. [...] The original TCN issued last year asked Apple for the right to see users' encrypted data protected by its advanced data protection (ADP) program in the event of a national security risk. Apple said the removal of the tool -- which not even it can access -- would make users more vulnerable to data breaches from bad actors and other threats to customer privacy. Creating a "back door" would also mean all data was accessible by Apple, which it could be forced to share with law enforcement possessing a warrant. As a result, Apple withdrew UK customers' access to its ADP program in January 2025. The Home Office has maintained that the Investigatory Powers Act, under which such orders are issued, contains robust safeguards and is used only when absolutely necessary.

Read more of this story at Slashdot.

BeauHD