Thread: 40, 128 BIT encryption

  1. #1
    Code Warrior
    Join Date
    Nov 2001
    Posts
    669

    40, 128 BIT encryption

    Hi!

    Could anyone explain to me how those encryptions work. What this 40 bit means?

    Thnx in advance.
    Current projects:
    1) User Interface Development Kit (C++)
    2) HTML SDK (C++)
    3) Classes (C++)
    4) INI Editor (Delphi)

  2. #2
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,380
    That 40 bit usually refers to the size of the used key. There are many encryption techniques, which are you talking about?

  3. #3
    Code Warrior
    Join Date
    Nov 2001
    Posts
    669
    I want to know how XOR encryption works and could you enumerate the other encryptions too. And what kind of encryption uses Microsoft with his Setup programs (that key I'm wondering about)?
    Current projects:
    1) User Interface Development Kit (C++)
    2) HTML SDK (C++)
    3) Classes (C++)
    4) INI Editor (Delphi)

  4. #4
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,380
    XOR encryption is based on the logical xor-function. This function is defined as:

    Code:
    P Q  P xor Q
    0 0       0
    0 1       1
    1 0       1
    1 1       0
    Assume N and M are bytes, then:

    (N xor M) xor M = N

    This is the reason why the xor-function can be used to encrypt and decrypt data. A disadvantage: there's just one key needed. This implies that if you know the key for encryption, you also need the key for decryption. This xor-encryption is also used in a method called One Time Pad. In theory this mehod is uncrackable since each key may be a valid key.

    To solve this problem, the so-called public key methods were invented. One of the most known methods is RSA. Public key methods use a key for encryption and another key for decryption. The key for encryption is called the public key and the other key is the private key.

    Usually you send your public keys around the world, so anyone can encrypt a secret message to you. And since you're the only one who has the private key, you're the only one who can decrypt the secret message. Ofcourse there are methods to crack the code.

    Some other encryption methods:

    - IDEA
    - BlowFish

    Some links:

    http://www.cryptosoft.com/html/download.htm
    ftp://ftp.zedz.net/pub/crypto/applied-crypto/
    http://pajhome.org.uk/crypt/rsa/rsa.html
    http://www.esat.kuleuven.ac.be/~rijmen/rijndael/
    http://rijndael.com/

    I don't know what kind of encryption Microsoft uses in Setup programs.

  5. #5
    Code Warrior
    Join Date
    Nov 2001
    Posts
    669

    Thumbs up

    Thanks Shiro!
    Current projects:
    1) User Interface Development Kit (C++)
    2) HTML SDK (C++)
    3) Classes (C++)
    4) INI Editor (Delphi)

  6. #6
    Unregistered
    Guest
    If you have a real-random-key which is as long as your secret message you can encrypt it with the xor-operation:
    message xor key=encryptet message.
    This encryption-method is called One-Time-Pad.
    The problem is the long key and that itīs really a random key.

    klausi

  7. #7
    Registered User
    Join Date
    Jan 2002
    Posts
    363
    Xor is supposed to be about the strongest forms of encryption as the only way to break it is using a brute force method.
    I was reading about some people using some quantum thing to make a stronger encryption however it relied on having a direct fiberoptic connection between the two computers. . . . Although they did say that it could somehow actually detect when someone was snooping on the line.

  8. #8
    Registered User
    Join Date
    Oct 2001
    Posts
    197

    Thumbs up

    Hi!

    You can also delete a file effectively with xor (normally you can reconstruct a deleted file).
    If you xor a byte with itself, the result is 00000000b.
    You can do this with your file and itīs deleted effectively.

    klausi
    When I close my eyes nobody can see me...

  9. #9
    Registered User
    Join Date
    Jan 2002
    Posts
    363
    >>If you xor a byte with itself, the result is 00000000b.

    Wouldn't it be faster and less confusing just to write all zeros into the file?

  10. #10
    Registered User
    Join Date
    Oct 2001
    Posts
    197
    Someone said to me that it would be better to reconstruct if you only overwrite the file with zeros.

    klausi
    When I close my eyes nobody can see me...

  11. #11
    Registered User GiraffeMan's Avatar
    Join Date
    Feb 2002
    Posts
    20

    Question brute force???

    hey People you mentioned earlier that Xor encryption can be broken by "brute force"...
    what does that mean??
    you beat the guy up until he gives you the key to decrypt???

    could you explain the code of brute force and on what specificly it works???

    thanks
    THE GIRAFFE MAN
    "our heads in the skies, but our feet on the ground"....

    http://dagan.150m.com

  12. #12
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,829
    "brute force" is a general term, not specific. An example of a "brute force" technique is working out the 4 digit pin code of a credit card by trying all possible values.

    A definition appears here...

    http://www.webopedia.com/TERM/b/brute_force.html
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  13. #13
    Registered User SavesTheDay's Avatar
    Join Date
    Jan 2002
    Posts
    77

    FALSE ENCRYPTION

    ....you people throw the word "encryption" around lightly....many of these programs are actually obfuscating programs....there is a big difference in TRUE encryption, and just hiding letters which you can quickly decode....alot of the XOR encryption programs that are seen on here are not TRUE encryption programs...if you have everything you need to decode the text (Such as...if you can work it all through backwards), then it isn't a true encryption program....cryptology is extremely advanced and is usually done by mathematicians or cryptoanalysts......i'm not saying to stop writing fun little programs which code things in funky characters.....just making sure everyone is familiar with what a true encryption program is...

  14. #14
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,380
    Cryptology can be very complex. There are some very complex algorithms around, like Rijndael and RSA, which require a lot of knowledge about mathematics to understand what's going on. You need for example about number theory, especially the theory of prime numbers, but also linear algebra and abstract algebra are fields of mathematics you need knowledge of.

    But there are also very easy to understand methods. For example the use of P- and S-boxes. A P-box is a permutation-box and a S-box is a substitution box. A permutation-box does change the order of the bits in a byte and a substitution box does substitute the byte with a different byte. And also encryption using the XOR-function is one of those easy to understand methods.

    The famous One-Time-Pad is one of the strongest encryption algorithms around and it is very easy to understand. The reason why it is so strong is: every key can be a valid key.

    Assume you have a key and a piece of plain text. Using the XOR-operation you encrypt the plain text using the key. The resulted cipher text can be decoded by using the key to get the original plain text. But it is very good possible to create a key which, when used, results in a plain text which could be valid.

    Assume the plain text is:

    i am a c programmer

    Now after encryption we get something like:

    aoficjfkaierytjchfha

    And now imagine I create a key which gives the result:

    i can see the moon!

    Since you, as a cracker, don't know the original plain text, you might think that this text is valid! nd I can create many more keys to get many more texts which seem valid.

    That's the power of One-Time-Pad. Since the key is random and usually some redundant bytes are added to the plain text, it is impossible, even with brute force, to crack the code. Just simply because each key could be a valid key.

    So, there is no something like a true encryption program. Every program that transforms plain text into cipher text and is able to transfer the cipher text back to the plain text is an encryption/decryption program.

  15. #15
    Code Warrior
    Join Date
    Nov 2001
    Posts
    669
    Waaaav man this is awesome!!!
    Current projects:
    1) User Interface Development Kit (C++)
    2) HTML SDK (C++)
    3) Classes (C++)
    4) INI Editor (Delphi)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. 128 bit uchar array? please help
    By brooksbp in forum C Programming
    Replies: 4
    Last Post: 07-31-2008, 01:41 AM
  2. 32 bit or 64 bit allignment ?! gcc options??
    By mynickmynick in forum C Programming
    Replies: 3
    Last Post: 07-29-2008, 02:43 AM
  3. Replies: 7
    Last Post: 12-10-2004, 08:18 AM
  4. bit patterns of negtive numbers?
    By chunlee in forum C Programming
    Replies: 4
    Last Post: 11-08-2004, 08:20 AM
  5. Array of boolean
    By DMaxJ in forum C++ Programming
    Replies: 11
    Last Post: 10-25-2001, 11:45 PM