Re: Is this Possible?
From: John E. Hadstate (nospam_at_null.nil)
Date: 06/24/03
- Next message: Mark Wooding: "Re: Can we obtain securer data encryption if we encrypt the data once more?"
- Previous message: Lurker: "Re: Historical Ciphers"
- In reply to: Myrddin Emrys: "Is this Possible?"
- Next in thread: Jim Gillogly: "Re: Is this Possible?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Tue, 24 Jun 2003 12:46:39 -0400
"Myrddin Emrys" <myrddin@iosys.net> wrote in message
news:7500c01.0306240015.c3f17ec@posting.google.com...
> I'm a novice at cryptography, so I apologize if this could be answered
> in Crypto-101. If it can, please direct me to the appropriate website
> or publication.
This is Crypto-101 ;-)
>
>
> I wish to encrypt an IP:PORT datum, 6 bytes. I do not wish the
> encrypted form to be longer than 8 bytes. I need to be able to reform
> the original result after an arbitrary length of time with no
> additional data. The encrypted chunks will have a massive degree of
> duplication, but I wish the encrypted results to be as random as
> possible. I need it to be impossible for an attacker, given the
> hundreds or thousands of encoded chunks, to be able to break the
> cypher.
>
A couple of ideas come to mind. Later in your post you indicated you were
comfortable using DES or something equivalent, so I'll proceed with that
idea in mind.
Idea I (DES-CTR)
(1) Define a 64-bit integer together with the following methods:
(a) Set to some initial value (like zero).
(b) Increment
(c) Store it to non-volatile storage
(d) Load it from non-volatile storage.
(e) Encrypt it using DES.
(2) Each time you want to encrypt an IP:PORT data value, Load your 64-bit
integer, increment it, Store the result and then Encrypt it using DES and
some key that you've protected from prying eyes. Take the first 6 bytes
from the DES result and XOR it with the IP:PORT data value.
(3) To decrypt, you will have to count the number of IP:PORT data values
that were previously encrypted before the one you want to decrypt. You then
Encrypt the count using DES and the same protected key. Again, take the
first 6 bytes from the DES result and XOR it with the encrypted data item.
Idea II (DES-CBC)
(1) Using DES, encrypt some known value (like 0, or 12345, etc) and store
the 64-bit result in non-volatile storage.
(2) Each time you encrypt an IP:PORT data value using DES, XOR the 64-bit
result with the previously stored 64-bit value.
(3) To decrypt, XOR the previous store IP:PORT value against the value you
plan to decrypt. The decrypt the result using DES and the secret key.
- Next message: Mark Wooding: "Re: Can we obtain securer data encryption if we encrypt the data once more?"
- Previous message: Lurker: "Re: Historical Ciphers"
- In reply to: Myrddin Emrys: "Is this Possible?"
- Next in thread: Jim Gillogly: "Re: Is this Possible?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|