Solved

openssl and random number generator

Posted on 2013-01-25
4
843 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

Many companies are looking to get out of the datacenter business and to services like Microsoft Azure to provide Infrastructure as a Service (IaaS) solutions for legacy client server workloads, rather than continuing to make capital investments in h…
There are many Password Managers (PM) out there to choose from. PM's can help with your password habits and routines, but they should not be a crutch you rely on too heavily. I also have an article for company/enterprise PM's.
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 …

687 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