bytes compressed and encrypted


Closed Thread
Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2007
    Location
    paris
    Posts
    22

    Default bytes compressed and encrypted

    Hello

    I need to store 40 channels of digital characters in a 512k eeprom and we need to compress the chain of maximum 40 bytes
    I saw an example or the result after compression is 18 bytes
    The string is converted to decimal hexadecimal

    Example: 1234567890 = 10 bytes
    Becomes: 12 34 56 78 90 = 5 bytes

    I do not know if there is another way to further reduce the minimum bytes?
    And once the data I have to compress encrypt in the same
    eeprom you have an idea?
    Even with encrypted xor chain is still a length of 18 bytes
    Because I have an encrypted text and no way to decrypt it, I do not see
    how it was I wanted to emulate him.
    But apparently it must have a high level of programming and
    Encryption is very strong.

    Is there another way to encrypt without taking up too much space?

  2. #2
    Join Date
    Mar 2006
    Location
    China
    Posts
    266


    Did you find this post helpful? Yes | No

    Default An ugly way

    Hi,

    If the size of the stored data is important this might be one way.

    I ASSUME that you will only store numbers, and these numbers are from 0-9.

    Imagine a number serie like this one where each number is one byte (8 bits):

    1 1 1 2 3 4 ..... 9 9

    Step one:

    Group bytes 2 and 2 so you get this number serie stored as bytes, this I think you have already figured out:

    when you do this you have to make sure you calculate in DECIMAL
    3 4 -> 3 * 10 + 4 = 34 dec

    11 12 34 ..... 99

    Step 2:

    Since the biggest number you will have to store this way is 99 it is enough to use 7 bits. So now we store 7 lower bits from the first byte + one bit from the next byte =8 and write to the eeprom.

    This way will allow you to store 18 numbers using 8 Bytes. 44,4% size of the original data


    This will also encrypt your data a little bit, if you want it to be more encrypted you just re-arrange the bit order in the BYTE you write to the ee-prom. If you have a good plan how to re-arrange the bits that covers 8 bytes it will be close to impossible to find out what you have stored. Bits inside this 8-byte block change places with each other.. or any other way of maipulating the bits with factor X .

    To get the data back you just need to undo what you have done and put the bits back... extract the 7 + 1 bit into bytes... and split the Byte into 2.

    So that would mean that you will work in block of 8 bytes compressing, encrypting and so on.

    /me
    Last edited by Jumper; - 2nd March 2009 at 12:34.

  3. #3
    Join Date
    Jul 2007
    Location
    paris
    Posts
    22


    Did you find this post helpful? Yes | No

    Default Compressed

    Hello

    Thank you for your help, we assume that the string stored voullons

    9976710618889188 = 07002013512770340000 and the date: 27/02/2009 19:20:51

    A maximum compression to save space in the eeprom.
    I attached an example and I can not understand

    thank you
    Attached Files Attached Files

  4. #4
    Join Date
    Mar 2006
    Location
    China
    Posts
    266


    Did you find this post helpful? Yes | No

    Default As we have mentioned before

    I am sorry but I have no intention to decrypt or analyze numbers to find out how they have been encrypted.

    You asked for a way to store data, I gave you a suggestion.

    Properly done and using a long enough key i.e 128 bit there is a very big risk you will get old without ever finding what you are looking for.

  5. #5
    Join Date
    Jul 2007
    Location
    paris
    Posts
    22


    Did you find this post helpful? Yes | No

    Default example

    Hello

    This is an example I'm looking over, because the second part I did
    not included.

    Example this channel you compress how?

    9976710618889188 = 07002013512770340000

    Thank you

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts