02-10-2011
Hi Thanks for your reply.
Quote:
I am not sure what you mean by .NET SHA512Managed generating "a 64-byte hash key but then it only uses the first 32 bytes as the key" Do you mean, as I suspect you mean, that Rijndael is using a 256-bit key?
That is correct, only 32 bytes are passed through to the encryption/decryption process
using
blocksize of 128 and a 32 byte key
Last edited by caciing_help; 02-11-2011 at 06:19 AM..
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
whats the most sufficient way to make decryption software? What are the recoomendations for one? (3 Replies)
Discussion started by: Phatress
3 Replies
2. UNIX for Advanced & Expert Users
I want to write a server application that would accept HTTP requests from client.
The server would be on a machine that has no connection to the INTERNET.
The clients that would be posting their HTTP requests would be doing so through webbrowser .Thus it would be sort of intranet application.... (0 Replies)
Discussion started by: rraajjiibb
0 Replies
3. Programming
Dear Sir,
i m going to use NP5610-16 moxa device for multiport serial communication.
i m using fedora-core 6 o.s.
after installation it will detect serial ports as /dev/ttyr0,/dev/ttyr1...ttyr32.
there are total 32 com ports.
now i want to write application which monitor all serial ports and... (6 Replies)
Discussion started by: amitpansuria
6 Replies
4. IP Networking
Hi,
We have smb client running on two of the linux boxes and smb server on another linux system. During a backup operation which uses smb, read of a file was allowed while write to the same file was going on.Also simultaneous writes to the same file were allowed.Following are the settings in the... (1 Reply)
Discussion started by: swatidas11
1 Replies
5. Shell Programming and Scripting
Hi,
I don't know if I am in a correct category with my question.
I want to know what decryption-method is used for this password:
(1) The first stadium is (its stored in the settings.xml of my software):... (2 Replies)
Discussion started by: Mogli1977
2 Replies
6. Shell Programming and Scripting
Hi,
Something bizarre is happening while decrypting the files. I had a decrypt script which was working smoothly on
uname -a
Linux ######### 2.6.9-89.ELsmp #1 SMP Mon Apr 20 10:33:05 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
After the front-end application was moved to
uname -a
Linux... (2 Replies)
Discussion started by: dips_ag
2 Replies
7. UNIX for Dummies Questions & Answers
Hi i have the path for encrytion file in unix and i want to decrypt the .cpt file in unix and change the password
how can i do that . (3 Replies)
Discussion started by: lily
3 Replies
8. Shell Programming and Scripting
Hello All,
There are so many questions on this and I didn't find any concluded answer.
I want to encrypt a string in the script, actually this is a password. I tried using openssl (I am a newbie to openssl), but it is generating a long one which we can't remember.
I want to encrypt the... (5 Replies)
Discussion started by: karumudi7
5 Replies
9. Web Development
Hello,
I am newbie on php-mysql and just know only installation.
I have an apache2+php5+mysql installed VPS.
What I would like to do is that when visitor enters requested data shown in index.html, submit button will run a script to save each field into a file.
Here is an example shown in... (1 Reply)
Discussion started by: baris35
1 Replies
10. UNIX for Advanced & Expert Users
Hi all,
I have a code to create folder in application server through shell script and i want to create if conditional based folder
folder=$HOME/test/sample/whatever
if ; then
echo "$folder already exists, not created."
else
mkdir -p "$folder" > /dev/null 2>&1
... (7 Replies)
Discussion started by: Boost
7 Replies
LEARN ABOUT PHP
mcrypt_module_open
MCRYPT_MODULE_OPEN(3) 1 MCRYPT_MODULE_OPEN(3)
mcrypt_module_open - Opens the module of the algorithm and the mode to be used
SYNOPSIS
resource mcrypt_module_open (string $algorithm, string $algorithm_directory, string $mode, string $mode_directory)
DESCRIPTION
This function opens the module of the algorithm and the mode to be used. The name of the algorithm is specified in algorithm, e.g.
"twofish" or is one of the MCRYPT_ciphername constants. The module is closed by calling mcrypt_module_close(3).
PARAMETERS
o $algorithm
-One of the MCRYPT_ciphername constants, or the name of the algorithm as string.
o $algorithm_directory
- The $algorithm_directory parameter is used to locate the encryption module. When you supply a directory name, it is used. When
you set it to an empty string ( ""), the value set by the mcrypt.algorithms_dir php.ini directive is used. When it is not set, the
default directory that is used is the one that was compiled into libmcrypt (usually /usr/local/lib/libmcrypt).
o $mode
-One of the MCRYPT_MODE_modename constants, or one of the following strings: "ecb", "cbc", "cfb", "ofb", "nofb" or "stream".
o $mode_directory
- The $mode_directory parameter is used to locate the encryption module. When you supply a directory name, it is used. When you
set it to an empty string ( ""), the value set by the mcrypt.modes_dir php.ini directive is used. When it is not set, the default
directory that is used is the one that was compiled-in into libmcrypt (usually /usr/local/lib/libmcrypt).
RETURN VALUES
Normally it returns an encryption descriptor, or FALSE on error.
EXAMPLES
Example #1
mcrypt_module_open(3) Examples
<?php
$td = mcrypt_module_open(MCRYPT_DES, '',
MCRYPT_MODE_ECB, '/usr/lib/mcrypt-modes');
$td = mcrypt_module_open('rijndael-256', '', 'ofb', '');
?>
The first line in the example above will try to open the DES cipher from the default directory and the ECB mode from the directory
/usr/lib/mcrypt-modes. The second example uses strings as name for the cipher and mode, this only works when the extension is linked
against libmcrypt 2.4.x or 2.5.x.
Example #2
Using mcrypt_module_open(3) in encryption
<?php
/* Open the cipher */
$td = mcrypt_module_open('rijndael-256', '', 'ofb', '');
/* Create the IV and determine the keysize length, use MCRYPT_RAND
* on Windows instead */
$iv = mcrypt_create_iv(mcrypt_enc_get_iv_size($td), MCRYPT_DEV_RANDOM);
$ks = mcrypt_enc_get_key_size($td);
/* Create key */
$key = substr(md5('very secret key'), 0, $ks);
/* Intialize encryption */
mcrypt_generic_init($td, $key, $iv);
/* Encrypt data */
$encrypted = mcrypt_generic($td, 'This is very important data');
/* Terminate encryption handler */
mcrypt_generic_deinit($td);
/* Initialize encryption module for decryption */
mcrypt_generic_init($td, $key, $iv);
/* Decrypt encrypted string */
$decrypted = mdecrypt_generic($td, $encrypted);
/* Terminate decryption handle and close module */
mcrypt_generic_deinit($td);
mcrypt_module_close($td);
/* Show string */
echo trim($decrypted) . "
";
?>
SEE ALSO
mcrypt_module_close(3), mcrypt_generic(3), mdecrypt_generic(3), mcrypt_generic_init(3), mcrypt_generic_deinit(3).
PHP Documentation Group MCRYPT_MODULE_OPEN(3)