[personal profile] ex0_planet
Как предложено тут:
function frng()
{
        openssl enc -aes-256-ctr \
                    -pass pass:"$(dd if=/dev/urandom bs=128 count=1 2>/dev/null | base64)" \
                    -nosalt < /dev/zero 
}


Скорость заметно выше чем /dev/urandom
$ frng | dd count=2M of=/dev/null
2097152+0 records in
2097152+0 records out
error writing output file
1073741824 bytes (1.1 GB) copied, 4.94361 s, 217 MB/s

$ </dev/urandom dd count=2M of=/dev/null
2097152+0 records in
2097152+0 records out
1073741824 bytes (1.1 GB) copied, 87.8828 s, 12.2 MB/s


У владельцев процессоров с AES-NI будет еще быстрее.

Date: 2014-12-03 01:53 am (UTC)
wizzard: (Default)
From: [personal profile] wizzard
а еще есть /dev/random (без u)

я идиот, извините, думал что не хватает скорости именно блокирующего генератора.

а так да, key stretching aes'ом (а по сути фортуной) это хорошо и правильно.
Edited Date: 2014-12-03 01:54 am (UTC)

Profile

ex0_planet

April 2023

S M T W T F S
      1
234567 8
910111213 1415
16171819202122
23242526272829
30      

Most Popular Tags

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated Apr. 29th, 2026 11:46 am
Powered by Dreamwidth Studios