Solved

openssl and random number generator

Posted on 2013-01-25
4
791 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
When the confidentiality and security of your data is a must, trust the highly encrypted cloud fax portfolio used by 12 million businesses worldwide, including nearly half of the Fortune 500.
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…
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…

744 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now