Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
aports
aports
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 647
    • Issues 647
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 195
    • Merge Requests 195
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • alpine
  • aportsaports
  • Issues
  • #9777

Closed
Open
Opened Dec 19, 2018 by Steffen Nurpmeso@sdaoden
  • Report abuse
  • New issue
Report abuse New issue

init.d/urandom: increase saved entropy

my startup (whether on real hardware or my server VM) currently involves long hangs of sshd, and warnings on uninitialized random reads by dnsmasq.
When i look into init.d/urandom i see mysterious calculations which result in 512 bytes to be saved for restoring purposes, and i wonder why this is so.

I would assume that the kernel passes data fed in to seed the PRNG through (possibly even multiple) sophisticated algorithms.., and uses conservative guessing on the quality of bytes fed into urandom.
Hence my suggestion to increase the number of bytes saved in between reboots, e.g., like so (untested):

save_seed()
{
local ibs=1024

if [ -e /proc/sys/kernel/random/poolsize ]; then
ibs=$(cat /proc/sys/kernel/random/poolsize)
fi

( # sub shell to prevent umask pollution
umask 077
dd if=/dev/urandom of=“$urandom_seed” \
ibs=$ibs count=1 2>/dev/null
)
}

(from redmine: issue id 9777, created on 2018-12-19, closed on 2019-01-08)

To upload designs, you'll need to enable LFS and have admin enable hashed storage. More information
Assignee
Assign to
3.9.0
Milestone
3.9.0 (Past due)
Assign milestone
Time tracking
None
Due date
None
3
Labels
Boot sequence Normal type:feature
Assign labels
  • View project labels
Reference: alpine/aports#9777