Results 1 to 4 of 4

Thread: DES / Encryption

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2000
    Location
    Pittsburgh, PA
    Posts
    329

    DES / Encryption

    I'm alittle confused about encryption. Encryption like DES or any algorythm that operates like it uses a fixed amount of data to encrypt in every "block" of plaintext. For example DES, uses 64bits of plaintext data and a 64bit key to make 64bits of cyphertext.

    (if you know what i mean, but need to review... http://www.cerberussystems.com/INFOSEC/stds/fip46-3.htm)

    my problem is, what does DES or an algorythm like DES do if it is encrypting a block of data with less than 64bits of data (like the last few bits of a larger file that's size isn't an even multiple of 64)? after all, it has to go through the initial permutation and swap the place of the different bits of data before it encrypts them. so how do you swap the bits of data if there aren't all 64bits there to swap?? If you add in null characters of data to even it out to 64 bits, then when you decrypt, the nulls will be there, and you won't have any way to tell if they are supposed to be there (cause they could have been part of the end of the origional data) or if they were added.

    if someone could help me out here.....
    ______________

  2. #2
    Destined Soul
    Guest
    I'm not too sure, but the simplest answer might just be to "pad" the value up to 64 bits with, say, all zeros. It really depends on the situation: is it a fixed length, is the transfer packet always 64 bits, etc.

    Anyhow, that's my guess.

    Destined

  3. #3
    Junior Member
    Join Date
    Jun 2002
    Location
    Urbana, IL
    Posts
    24
    Actually DES uses a 56 bit key. Usually the data is padded out with nulls. You will find that most data dosn't end in nulls so it isn't a problem. The pad can be application specific though. Even if you data to be encrypted can end in nulls a lot of file formats stipulate some kind of end sequence or have a length defined in the header so that too can be used to prevent confusion with the pad.

  4. #4
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418
    Yes galway is correct DES is a symmetric 64 bit block cipher which uses a 56 bit key. Padding in the answer and as far as i know algorithm specific. ie............ Cipher des = Cipher.getInstance("DES/CBC/PKCS5Padding");

Posting Permissions

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



Click Here to Expand Forum to Full Width