Go Back   Wireless and Wifi Forums > News > Newsgroups > comp.security.misc
Register FAQ Forum Rules Members List Calendar Search Today's Posts Advertise Mark Forums Read

 
Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-21-2007, 01:33 AM
Eman On
Guest
 
Posts: n/a
Default cipher question

Hello:

I was wondering if there was a cypher that could encrypt something and
keep the encrypted content the same length or shorter.

For example:
"This is unencrypted data" (length of 24)

Once encrypted:
p)(*&^%$#qwertxd12bgdrt32

Is there something like this?

TIA


Reply With Quote
  #2 (permalink)  
Old 07-21-2007, 04:47 PM
Moe Trin
Guest
 
Posts: n/a
Default Re: cipher question

On Sat, 21 Jul 2007, in the Usenet newsgroup comp.security.misc, in article
<1184981605.262235.165440@r34g2000hsd.googlegroups .com>, Eman On wrote:

>I was wondering if there was a cypher that could encrypt something and
>keep the encrypted content the same length or shorter.


1. Encrypt something to the same length: Any number of algorithms that
have been developed over the centuries. For a crude example, read the
man page on that wonky browser you're using, and discover "rot-13"
which is a simple Caesar substitution. From the command line, this
can be implemented by

[compton ~]$ echo 'This is to be encrypted' | tr 'M-ZA-Lm-za-l' 'A-Za-z'
Hvwg wg hc ps sbqfmdhsr
[compton ~]$

While any six-year-old can break this encryption (in seconds once they
know the trick), a Vigenere or Jeffersonian code disk would be more
secure (might need an 8 or 9 year old to crack it), and the ultimate
scheme using a one-time keypad is literally unbreakable. There are a
lot of schemes in-between. Pay your money - take your pick.

2. Encrypt something to a shorter length: Two techniques should leap
out at you - data compression first, then any encryption - or changing
character sets using something like 'mimencode'

[compton ~]$ whatis compress zip gzip bzip2 mimencode
compress (1) - compress and expand data (version 4.1)
zip (1) - package and compress (archive) files
gzip (1) - compress or expand files
bzip2 (1) - a block-sorting file compressor, v0.9.0
mimencode (1) - Translate to and from mail-oriented encoding formats
[compton ~]$

-rw-rw-r-- 1 gferg ldp 77918 Nov 18 2004 Disk-Encryption-HOWTO
-rw-rw-r-- 1 gferg ldp 22890 Nov 18 2004 Disk-Encryption-HOWTO.gz

Then of course, you _could_ look at PGP...

>For example:
>"This is unencrypted data" (length of 24)
>
>Once encrypted:
>p)(*&^%$#qwertxd12bgdrt32


That's rather a short example - but you should also look at code books
(telegraphic codes disappeared with the proliferation of the telephone,
but codes like the Bentley, or ABC were designed to minimize data
length). Go to your public library, and find a copy of the book "The
Code-Breakers" by David Kahn (originally 1967, by Macmillan, about 1200
pages, but there is at least several editions - each expanding over the
earlier, as well as a slightly condensed paper-pack edition) for quite
extensive material on the subject. Some codebooks condensed entire
phrases to a single 5 character codeword - hence the name 'code
condenser' - but you should read the book to see some of the pitfalls.
One of the biggest is creating your own scheme when you don't understand
the principles.

>Is there something like this?


Well, you _are_ posting from a search engine - did you bother to think
about using the d4mn thing for it's intended purpose, or are you
expecting others will do your homework for you? Heck, you might even
discover the Usenet newsgroup 'sci.crypt' among others:

[compton ~]$ zgrep crypt big.8.list.07.15.07.gz | grep -v Moderated
comp.security.pgp.test Testing signing, encryption and decryption using PGP.
sci.crypt Different methods of data en/decryption.
sci.crypt.random-numbers Generating cryptographic strength randomness.
talk.politics.crypto The relation between cryptography and government.
[compton ~]$

but I STRONGLY advise you to read at least a months worth of postings
before you post a question like this - they tend not to tolerate mindless
questions that can be answered by using a search engine first.

Old guy

Reply With Quote
  #3 (permalink)  
Old 07-21-2007, 06:20 PM
Ant
Guest
 
Posts: n/a
Default Re: cipher question

"Moe Trin" wrote:

> 1. Encrypt something to the same length: Any number of algorithms that
> have been developed over the centuries. For a crude example, read the
> man page on that wonky browser you're using, and discover "rot-13"


Firefox is becoming quite popular now. Are there less-wonky graphical
(as opposed to text only) browsers that you would recommend? I'll take
it as understood that you wouldn't recommend a browser for reading a
newsgroup.

> 2. Encrypt something to a shorter length: Two techniques should leap
> out at you - data compression first, then any encryption - or changing
> character sets using something like 'mimencode'


> mimencode (1) - Translate to and from mail-oriented encoding formats


MIME encoding makes things longer (e.g. base64) unless there is a
packing scheme I'm unaware of; in which case it would be compression.



Reply With Quote
  #4 (permalink)  
Old 07-25-2007, 06:24 AM
Ertugrul Soeylemez
Guest
 
Posts: n/a
Default Re: cipher question

Eman On <magawake@gmail.com> (07-07-21 01:33:25):

> I was wondering if there was a cypher that could encrypt something and
> keep the encrypted content the same length or shorter.


Shortening means compression. That's a different topic. Keeping it the
same length is simple: use a stream cipher. Usually you'll rather want
to use block ciphers. Those will enlarge your data slightly.


Regards,
Ertugrul Söylemez.


--
Security is the one concept, which makes things in your life stay as
they are. Otto is a man, who is afraid of changes in his life; so
naturally he does not employ security.

Reply With Quote
Reply


« did AVG eat my drivers? | HPSBMA02133 SSRT061201 rev.5 - HP Oracle for OpenView (OfO) Critical Patch Update »
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Question RE: Nvidia GeForce card over heating wanker alt.comp.hardware 8 03-03-2013 02:41 AM
Could you answer this question for me? KFM Wireless Networking Discussion 1 06-25-2007 08:03 AM
Question about Asus P4R800-VM motherboard Jethro alt.comp.hardware 3 03-22-2007 09:16 AM
Router Security Question... spooker Network Troubleshooting 3 10-11-2006 12:29 PM
OT question about small office server John Hyde comp.security.misc 14 10-13-2005 08:51 PM


All times are GMT. The time now is 06:11 AM.



Powered by vBulletin® Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.6.0 PL2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45