FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 06-14-2008, 12:12 AM
buyoppy
 
Default Any isencrypted function available?

Is there any 'isencrypted 'function available on Debian
which judges whether some data is encrypted or not?
Thanks in advance.

--------------------------------------
GANBARE! NIPPON! Chance to win 50,000 Yahoo! Points!
http://pr.mail.yahoo.co.jp/ganbare-nippon/


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 06-14-2008, 12:12 AM
buyoppy
 
Default Any isencrypted function available?

Is there any 'isencrypted 'function available on Debian
which judges whether some data is encrypted or not?
Thanks in advance.

--------------------------------------
GANBARE! NIPPON! Chance to win 50,000 Yahoo! Points!
http://pr.mail.yahoo.co.jp/ganbare-nippon/


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 06-14-2008, 01:07 AM
"Douglas A. Tutty"
 
Default Any isencrypted function available?

On Sat, Jun 14, 2008 at 09:12:33AM +0900, buyoppy wrote:
> Is there any 'isencrypted 'function available on Debian
> which judges whether some data is encrypted or not?
> Thanks in advance.
>

Perhaps the file command can tell you for some types, but a file I have
here made with openssl aes just says ASCII text.

Have you seen this function on any other system?

Doug.



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 06-14-2008, 01:11 AM
Hal Vaughan
 
Default Any isencrypted function available?

On Friday 13 June 2008, buyoppy wrote:
> Is there any 'isencrypted 'function available on Debian
> which judges whether some data is encrypted or not?
> Thanks in advance.

Considering one byte looks just as much like any other (with only 256
variations), how would anything in an OS or language know something is
encrypted?

Maybe if the encrypted bit is set in a packet in a data stream, it might
be possible to tell. Isn't the encrypted bit the one right after the
evil bit?


Hal


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 06-14-2008, 01:44 AM
"Douglas A. Tutty"
 
Default Any isencrypted function available?

On Fri, Jun 13, 2008 at 09:11:56PM -0400, Hal Vaughan wrote:
> On Friday 13 June 2008, buyoppy wrote:
> > Is there any 'isencrypted 'function available on Debian
> > which judges whether some data is encrypted or not?
> > Thanks in advance.
>
> Considering one byte looks just as much like any other (with only 256
> variations), how would anything in an OS or language know something is
> encrypted?
>
> Maybe if the encrypted bit is set in a packet in a data stream, it might
> be possible to tell. Isn't the encrypted bit the one right after the
> evil bit?

Perhaps it can do a statistical analysis of the datastream. If its
random, then its either compressed or encrypted (or both). Since file
can identify compressed data (by the header?) perhaps this would work.

You could strongly suspect that something is encrypted if it isn't
compressed yet it is incompressable.

Doug.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 06-14-2008, 01:45 AM
John Hasler
 
Default Any isencrypted function available?

buyoppy writes:
> Is there any 'isencrypted 'function available on Debian which judges
> whether some data is encrypted or not?

"file" can identify some types of encrypted files. You could also look for
high entropy, but that would not distinguish encrypted files from
compressed ones.
--
John Hasler


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 06-14-2008, 02:10 AM
Chris Bannister
 
Default Any isencrypted function available?

On Sat, Jun 14, 2008 at 09:12:33AM +0900, buyoppy wrote:
> Is there any 'isencrypted 'function available on Debian
> which judges whether some data is encrypted or not?
> Thanks in advance.

Maybe the "file" program from the package of the same name can do the
same thing.

--
Chris.
======
"One, with God, is always a majority, but many a martyr has been burned
at the stake while the votes were being counted." -- Thomas B. Reed


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 06-14-2008, 07:03 AM
Volkan YAZICI
 
Default Any isencrypted function available?

On Sat, 14 Jun 2008, buyoppy <buyoppy@yahoo.co.jp> writes:
> Is there any 'isencrypted 'function available on Debian which judges
> whether some data is encrypted or not?

Depends on what you mean by encryption. If you mean encryption via GPG,
see `file' command. OTOH, I can encrypt a plain text file via my own
ad-hoc algorithm and it'll still appear as a plain text file.


Regards.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 06-15-2008, 09:56 PM
buyoppy
 
Default Any isencrypted function available?

On Fri, Jun 13, 2008 at 09:11:56PM -0400, Hal Vaughan
wrote:
> > On Friday 13 June 2008, buyoppy wrote:
>> > > Is there any 'isencrypted 'function available on
Debian
>> > > which judges whether some data is encrypted or not?
>> > > Thanks in advance.
> >
> > Considering one byte looks just as much like any other
(with only 256
> > variations), how would anything in an OS or language
know something is
> > encrypted?
> >
> > Maybe if the encrypted bit is set in a packet in a
data stream, it might
> > be possible to tell. Isn't the encrypted bit the one
right after the
> > evil bit?

Perhaps it can do a statistical analysis of the
datastream. If its
random, then its either compressed or encrypted (or both).
Since file
can identify compressed data (by the header?) perhaps this
would work.

You could strongly suspect that something is encrypted if
it isn't
compressed yet it is incompressable.


I saw a webpage of Solaris's 'isencrypted' function which
inspects some data in a buffer is encrypted or not using
some algorithm including statistical analysis. But now I
cannot find that page on the Internet...
Thanks.


--------------------------------------
GANBARE! NIPPON! Chance to win 50,000 Yahoo! Points!
http://pr.mail.yahoo.co.jp/ganbare-nippon/


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 06-17-2008, 11:26 PM
"James Youngman"
 
Default Any isencrypted function available?

On Sun, Jun 15, 2008 at 10:56 PM, buyoppy <buyoppy@yahoo.co.jp> wrote:

> I saw a webpage of Solaris's 'isencrypted' function which
> inspects some data in a buffer is encrypted or not using
> some algorithm including statistical analysis. But now I
> cannot find that page on the Internet...


Try this implementation, which I have not tested (or even compiled).

#include <stdlib.h>
#include <zlib.h>

enum {
PLANB_BUF_SIZE = 512;
INADEQUATELY_EXPLAINED_MAGIC_NUMBER = 5;
};

static int incompressible(const char *inbuf, size_t len,
char *outbuf, size_t outlen) {
int rv = compress2(outbuf, outlen, inbuf, len,
INADEQUATELY_EXPLAINED_MAGIC_NUMBER);
if (Z_BUF_ERROR == rv)
return 0; /* it grew. */
else if (Z_MEM_ERROR == rv)
return -1; /* meh, it's a guess. */
else
return rv > len;
}


int isencrypted(const char *buf, size_t len) {
int retval;
char planb_buf[PLANB_BUF_SIZE];
void *out = malloc(len);
if (out) {
retval = incompressible(buf, len, out, len);
free (out);
return retval;
} else {
return incompressible(buf, PLANB_BUF_SIZE, planb_buf, PLANB_BUF_SIZE);
}
}


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 01:01 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org