help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Noob dumb question (extending emacs)


From: Jean Louis
Subject: Re: Noob dumb question (extending emacs)
Date: Sat, 23 Oct 2021 00:31:24 +0300
User-agent: Mutt/2.0.7+183 (3d24855) (2021-05-28)

* Yuri Khan <yuri.v.khan@gmail.com> [2021-10-22 21:56]:
> (Sorry for the previous unfinished email.)
> 
> On Sat, 23 Oct 2021 at 00:55, Jean Louis <bugs@gnu.support> wrote:
> 
> > For people interested, manual explains about randomity:
> > (info "(elisp) Random Numbers")
> >
> > How I understand it, than it may be that neither `pwgen' is generating
> > truly random numbers.
> 
> Inspecting the source shows pwgen uses /dev/urandom if available, and
> /dev/random otherwise, and all bytes of the password come from one of
> those sources. These are as random as you can get and use thermal
> noise in your HDD as one of the sources of randomness.

Which tells me Emacs Lisp could have access to such data and set the
seed quite randomly practically:

- I have noticed that file "/proc/pressure/io" is constantly
  changing, could not find temperature stuff now, thus:

(defun first-line-of-file (file)
  (with-temp-buffer
    (insert-file-contents file)
    (substring (buffer-string) 0 (string-match "\n" (buffer-string)))))

(let ((line (first-line-of-file "/proc/pressure/io")))
  ;; Now set random seed:
  (random line)
  ;; Now generate random password
  (rcd-password)) ⇒ "TMqVMJiT(JKR1^8uLYzT"

You say that passwords are not really random and Emacs Lisp is
not made for that.

I say that passwords can be generated practically to be random
for the user from the users' viewpoint, and it is evident.

If you can predict the password I am generating it will become
evident that passwords are not truly random. Until then... they
are random. ;-)


-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]