Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

openssl and random number generator

Posted on 2013-01-25
4
Medium Priority
?
924 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 2000 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

Threat Trends for MSPs to Watch

See the findings.
Despite its humble beginnings, phishing has come a long way since those first crudely constructed emails. Today, phishing sites can appear and disappear in the length of a coffee break, and it takes more than a little know-how to keep your clients secure.

Question has a verified solution.

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

The well known Cerber ransomware continues to spread this summer through spear phishing email campaigns targeting enterprises. Learn how it easily bypasses traditional defenses - and what you can do to protect your data.
This article will show you step-by-step instructions to build your own NTP CentOS server.  The network diagram shows the best practice to setup the NTP server farm for redundancy.  This article also serves as your NTP server documentation.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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 …
Suggested Courses
Course of the Month9 days, 18 hours left to enroll

926 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