Solved

openssl and random number generator

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

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Provide an easy one stop to quickly get the relevant information on common asked question on Ransomware in Expert Exchange.
SSL stands for “Secure Sockets Layer” and an SSL certificate is a critical component to keeping your website safe, secured, and compliant. Any ecommerce website must have an SSL certificate to ensure the safe handling of sensitive information like…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
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 …

803 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