Solved

openssl and random number generator

Posted on 2013-01-25
4
818 Views
Last Modified: 2013-01-26
Hello All,

I'm trying to learn about encryption with the use of openssl on a laptop with Ubuntu.
I'm trying to use the random number generator in openssl.
When I enter openssl rand in the terminal I don't receive any numbers.  It takes my
command but does not output anything.   I also have tried   openssl rand -hex 4
and nothing happens either.  

Could some one tell me what I'm not doing or doing wrong.  I had no problem using
openssl for encrypting but the random generator is causing me grief.

Thank you for your help in advance.
0
Comment
Question by:NewbieITGal
  • 3
4 Comments
 
LVL 31

Expert Comment

by:farzanj
ID: 38821134
This command works well with me.  What is your openssl version?
Issue command
openssl version

Also try command
openssl rand -base64 128
0
 
LVL 31

Expert Comment

by:farzanj
ID: 38821139
$ openssl rand -hex 4
fd537c0d
$ openssl rand -hex 4
5ff23802
$ openssl rand -hex 4
f0440308
$ openssl rand -hex 4
caa280de
$ openssl rand -hex 8
a516e2b31f32cf0f
0
 
LVL 31

Accepted Solution

by:
farzanj earned 500 total points
ID: 38821146
It worked fine with version 1.0.0 but when I logged onto another system see what happens
$ openssl version
OpenSSL 0.9.7a Feb 19 2003
$ openssl rand -hex 4
Usage: rand [options] num
where options are
-out file             - write to file
-engine e             - use engine e, possibly a hardware device.
-rand file:file:... - seed PRNG from files
-base64               - encode output
$ openssl rand -base64 128
3lOecEGNjqgv/H+MJST6cnnV11KD29OrB4WS7Qd6lQ/9K+b0j7O8OaoaL6ICdMIm
Psqd57P+XDALn21XmQXEYi69YJ7DL/+YlT1JWmC6W7uTKpOM6VoPEqlA0fx+9XyL
HF0azRme7u5A1LNfkxEFQ5tgt8EPzOfgSz9f7VF4dmY=


So I guess older version doesn't support this command
0
 

Author Closing Comment

by:NewbieITGal
ID: 38822693
It worked on my friend's newer computer.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Encryption for Business Encryption (https://en.wikipedia.org/wiki/Encryption) ensures the safety of our data when sending emails. In most cases, to read an encrypted email you must enter a secret key that will enable you to decrypt the email. T…
In 2017, ransomware will become so virulent and widespread that if you aren’t a victim yourself, you will know someone who is.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question