Sponsored Content
Top Forums UNIX for Dummies Questions & Answers how to compare 2 encrypted files? Post 302297687 by Perderabo on Saturday 14th of March 2009 01:30:11 PM
Old 03-14-2009
That is a feature, not a bug. With many algorithms the data is encrypted block by block. And the previous encrypted data block is combined with the current plaintext data block as part of the encryption. To get the ball rolling, the algorithm generates a block a random data to combine with the first plain text data block. During decryption, this initial block of make believe encrypted data is discarded.

Now if the same data is encrypted with the same pass phrase, you can't tell by looking at the data. This is a good thing.

The only way to compare two encrypted data files is to decrypt them. If you don't know both passphrases, the contents of the files are none of your business.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

executing encrypted files

Hi, Is there a way of executing encrypted files? I have encrpyted files using vi and crypt, but when I execute the encrypted file, it takes the contents literally (special characters, junk - encrpyted format). Kind Regards, Kawah (1 Reply)
Discussion started by: Kawah Cheung
1 Replies

2. UNIX for Advanced & Expert Users

executing encrypted files

Hi, Is there a way of executing encrypted files? I have encrpyted files using vi and crypt, but when I execute the encrypted file, it takes the contents literally (special characters, junk - encrpyted format). Kind Regards, Kawah (4 Replies)
Discussion started by: Kawah Cheung
4 Replies

3. UNIX for Dummies Questions & Answers

encrypted files

Hi lads me again trying to get a wee bit fancy with my scripting anyway it dosn't seem to want to run (strange as it may seem) I encrypted a file renamed it and wrote another file that unencrypts it (it contains passwords) (and b4 anyone says I am doing this for my own reasons) In a... (3 Replies)
Discussion started by: w33man
3 Replies

4. UNIX for Dummies Questions & Answers

How to unzip multiple files (encrypted) in a directory.

Good day all. I want to unzip multiple files in a directory. Suppose there are two files: test.txt.zip and test1.txt.zip Using this command: unzip -o -P test*.zip results in the unzipping of the first file not second. It gives this error: Archive: test.txt.zip caution: filename not... (2 Replies)
Discussion started by: er_ashu
2 Replies

5. Shell Programming and Scripting

compare files in two directories and output changed files to third directory

I have searched about 30 threads, a load of Google pages and cannot find what I am looking for. I have some of the parts but not the whole. I cannot seem to get the puzzle fit together. I have three folders, two of which contain different versions of multiple files, dist/file1.php dist/file2.php... (4 Replies)
Discussion started by: bkeep
4 Replies

6. Shell Programming and Scripting

How to compare 2 files & get only few columns based on a condition related to both files?

Hiiiii friends I have 2 files which contains huge data & few lines of it are as shown below File1: b.dat(which has 21 columns) SSR 1976 8 12 13 10 44.00 39.0700 70.7800 7.0 0 0.00 0 2.78 0.00 0.00 0 0.00 2.78 0 NULL ISC 1976 8 12 22 32 37.39 36.2942 70.7338... (6 Replies)
Discussion started by: reva
6 Replies

7. Linux

Secured encrypted files via Linux

I need to encrypt a ".txt" file with password settings and it should decrypt the file automatoically when end user types correct password. Can some one help me on this. Thank you (3 Replies)
Discussion started by: rlmadhav
3 Replies

8. Shell Programming and Scripting

Compare 2 folders to find several missing files among huge amounts of files.

Hi, all: I've got two folders, say, "folder1" and "folder2". Under each, there are thousands of files. It's quite obvious that there are some files missing in each. I just would like to find them. I believe this can be done by "diff" command. However, if I change the above question a... (1 Reply)
Discussion started by: jiapei100
1 Replies

9. Shell Programming and Scripting

Require compare command to compare 4 files

I have four files, I need to compare these files together. As such i know "sdiff and comm" commands but these commands compare 2 files together. If I use sdiff command then i have to compare each file with other which will increase the codes. Please suggest if you know some commands whcih can... (6 Replies)
Discussion started by: nehashine
6 Replies

10. Shell Programming and Scripting

Compare multiple files, and extract items that are common to ALL files only

I have this code awk 'NR==FNR{a=$1;next} a' file1 file2 which does what I need it to do, but for only two files. I want to make it so that I can have multiple files (for example 30) and the code will return only the items that are in every single one of those files and ignore the ones... (7 Replies)
Discussion started by: castrojc
7 Replies
crypt(3)						     Library Functions Manual							  crypt(3)

NAME
crypt, crypt16, setkey, encrypt - DES encryption SYNOPSIS
#include <unistd.h> #include <stdlib.h> char *crypt( const char *key, const char *salt); char *crypt16( const char *key, const char *salt); void setkey( const char *key); DESCRIPTION
The subroutine is the password encryption routine. It is based on the NBS Data Encryption Standard, with variations intended to frustrate use of hardware implementations of the DES for key search. The first argument to is normally a user's typed password. The second is a 2-character string chosen from the set [a-zA-Z0-9./]. The salt string is used to perturb the DES algorithm in one of 4096 different ways, after which the password is used as the key to encrypt repeat- edly a constant string. The returned value points to the encrypted password, in the same alphabet as the salt. The first two characters are the salt itself. The subroutine is identical to the function except that it will accept a password up to sixteen characters in length. It generates a longer encrypted password for use with enhanced security features. The other entries provide primitive access to the actual DES algorithm. The argument of is a character array of length 64 containing only the characters with numerical value 0 and 1. If this string is divided into groups of 8, the low-order bit in each group is ignored, lead- ing to a 56-bit key which is set into the machine. The argument to the entry is likewise a character array of length 64 containing 0s and 1s. The argument array is modified in place to a similar array representing the bits of the argument after having been subjected to the DES algorithm using the key set by If edflag is 0, the argument is encrypted; if non-zero, it is decrypted. RESTRICTIONS
The return values from and point to static data areas whose content is overwritten by each call. ENVIRONMENT
Default Environment In the default environment on systems that do not have the optional encryption software installed the function expects exactly one argu- ment, the data to be encrypted. The edflag argument is not supplied and there is no way to decrypt data. If the optional encryption soft- ware is installed the function behaves as it does in the POSIX environment. The syntax for the default environment follows: void encrypt(block) char *block; POSIX Environment In the POSIX environment the encrypt function always expects two arguments. The function will set errno to ENOSYS and return if edflag is non-zero and the optional encryption software is not present. The syntax for the POSIX environment follows: void encrypt(block, edflag) char *block; int edflag; In all cases the function will set errno to ENOSYS and return if the optional encryption software is not present. RELATED INFORMATION
login(1), passwd(1), yppasswd(1), getpass(3), passwd(4), prpasswd(4) delim off crypt(3)
All times are GMT -4. The time now is 11:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy